• Resolved flynsarmy

    (@flynsarmy)


    In */includes/wp-geo.php* init_later() method you call $wp_geo_options = get_option( 'wp_geo_options' ); at the top, however you only use it inside a nested if check. I suggest changing

    $wp_geo_options = get_option( 'wp_geo_options' );
    
    // Support for custom post types
    // Don't add support if on the WP settings page though
    if ( ! is_admin() || ! isset( $_GET['page'] ) || ( isset( $_GET['page'] ) && $_GET['page'] != 'wp-geo' ) ) {
    	if ( function_exists( 'get_post_types' ) && function_exists( 'add_post_type_support' ) && isset( $wp_geo_options['show_maps_on_customposttypes'] ) ) {
    		$post_types = get_post_types();

    to

    // Support for custom post types
    // Don't add support if on the WP settings page though
    if ( ! is_admin() || ! isset( $_GET['page'] ) || ( isset( $_GET['page'] ) && $_GET['page'] != 'wp-geo' ) ) {
    	if ( function_exists( 'get_post_types' ) && function_exists( 'add_post_type_support' ) && isset( $wp_geo_options['show_maps_on_customposttypes'] ) ) {
    		$wp_geo_options = get_option( 'wp_geo_options' );
    		$post_types = get_post_types();

    https://www.ads-software.com/plugins/wp-geo/

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[PATCH] Only get options when required on init’ is closed to new replies.