Function Reference: geodir_on_init
Summary
Geodirectory Post or Get request handler on init.
Global Values
- $wpdb
- (object) (required) WordPress Database object.
- Default: None
Package
GeoDirectory
Change Log
Since: 1.0.0
1.6.18 Option added to disable overwrite by Yoast SEO titles & metas on GD pages.
Actions
‘giodir_handle_request’ [Line: 65]
Source File
geodir_on_init() is located in geodirectory-functions/ajax_handler_functions.php [Line: 58]
Source Code
function geodir_on_init() { /** * Called on the wp_init WP hook at the start of the geodir_on_init() function. * * @since 1.0.0 */ do_action('giodir_handle_request'); global $wpdb; if (get_option('geodir_allow_wpadmin') == '0' && is_user_logged_in() && !current_user_can('manage_options') && !class_exists('BuddyPress')) { show_admin_bar(false); } if (isset($_REQUEST['ptype']) && $_REQUEST['ptype'] == 'get_markers') { /** * Contains map marker functions. * * @since 1.0.0 * @package GeoDirectory */ include_once(geodir_plugin_path() . '/geodirectory-functions/map-functions/get_markers.php'); die; } if ( class_exists( 'WPSEO_Frontend' ) && !is_admin() ) { add_action( 'template_redirect', 'geodir_remove_yoast_seo_metas' ); } }