Function Reference: geodir_before_admin_panel
Summary
Function to show success or error message on admin option form submission.
Package
GeoDirectory
Change Log
Since: 1.0.0
Source File
geodir_before_admin_panel() is located in geodirectory-admin/admin_functions.php [Line: 322]
Source Code
function geodir_before_admin_panel() { if (isset($_REQUEST['installed']) && $_REQUEST['installed'] != '') { echo ''; } if (isset($_REQUEST['msg']) && $_REQUEST['msg'] != '') { switch ($_REQUEST['msg']) { case 'success': echo '' . __('Like Geodirectory?', 'geodirectory') . ' ' . __('Support us by leaving a rating!', 'geodirectory') . '
' . __('Geodirectory has been installed and setup. Enjoy :)', 'geodirectory') . '
'; flush_rewrite_rules(false); break; case 'fail': $gderr = isset($_REQUEST['gderr']) ? $_REQUEST['gderr'] : ''; if ($gderr == 21) echo '' . __('Your settings have been saved.', 'geodirectory') . '
'; else echo '' . __('Error: You can not add same permalinks for both Listing and Location, please try again.', 'geodirectory') . '
'; break; } } $geodir_load_map = get_option('geodir_load_map'); $need_map_key = false; if($geodir_load_map=='' || $geodir_load_map=='google' || $geodir_load_map=='auto' ){ $need_map_key = true; } if (!geodir_get_map_api_key() && $need_map_key) { echo '' . __('Error: Your settings have not been saved, please try again.', 'geodirectory') . '
'; } if (!geodir_is_default_location_set()) { echo '' . sprintf(__('Google Maps API KEY not set, %sclick here%s to set one OR use Open Street Maps instead.', 'geodirectory'), '', '') . '
'; } if (!function_exists('curl_init')) { echo '' . sprintf(__('Please %sclick here%s to set a default location, this will make the plugin work properly.', 'geodirectory'), '', '') . '
'; } }' . __('CURL is not installed on this server, this can cause problems, please ask your server admin to install it.', 'geodirectory') . '