File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed
Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -10,8 +10,12 @@ function scripted_create_current_jobs_callback()
1010 $ paged = (isset ($ _GET ['paged ' ]) and $ _GET ['paged ' ] !='' ) ? sanitize_text_field ($ _GET ['paged ' ]) : '' ;
1111 $ per_page = 15 ;
1212 $ validate = validateApiKey ($ ID ,$ accessToken );
13- $ out = '<div class="wrap">
14- <div class="icon32" style="width:100px;padding-top:5px;" id="icon-scripted"><img src=" ' .SCRIPTED_LOGO .'"></div><h2>Jobs</h2> ' ;
13+ $ out = '<div class="wrap"> ' ;
14+
15+ if ( $ _GET ['auth ' ] )
16+ $ out .= '<div class="notice notice-success" id="message"><p>Great! Your code validation is correct. Thanks, enjoy...</p></div> ' ;
17+
18+ $ out .= '<div class="icon32" style="width:100px;padding-top:5px;" id="icon-scripted"><img src=" ' .SCRIPTED_LOGO .'"></div><h2>Jobs</h2> ' ;
1519
1620 $ filter = (!isset ($ _GET ['filter ' ])) ? 'all ' : sanitize_text_field ($ _GET ['filter ' ]);
1721 $ jobUrl = ($ filter !='all ' ) ? 'jobs/ ' .$ filter : 'jobs/ ' ;
Original file line number Diff line number Diff line change @@ -58,9 +58,13 @@ function scripted_settings_menu_function() {
5858 $ validate = validateApiKey ($ _POST ['ID_text ' ],$ _POST ['success_tokent_text ' ]);
5959 if ($ validate ) {
6060 update_option ( '_scripted_ID ' , sanitize_text_field ($ _POST ['ID_text ' ]) );
61- update_option ( '_scripted_auccess_tokent ' , sanitize_text_field ($ _POST ['success_tokent_text ' ] ));
62- echo '<div class="notice notice-success" id="message"><p>Great! Your code validation is correct. Thanks, enjoy...</p></div> ' ;
63- } else {
61+ update_option ( '_scripted_auccess_tokent ' , sanitize_text_field ($ _POST ['success_tokent_text ' ] )); ?>
62+
63+ <script type="text/javascript">
64+ window.location = '<?php echo admin_url ('/admin.php?page=scripted_jobs&auth=true ' ) ?> ';
65+ </script>
66+
67+ <?php } else {
6468 echo '<div class="notice notice-error" id="message"><p>Sorry, we found an error. Please confirm your Organization Key and Access Token are correct and try again.</p></div> ' ;
6569 }
6670 }
You can’t perform that action at this time.
0 commit comments