• Resolved mklappen

    (@mklappen)


    Hi
    using AZ-Listing version 1.3.1 –
    I’m getting the following warning when viewing my posts (non- AZ List posts)

    Missing argument 2 for has_shortcode(), called in /home/<mysite>/public_html/<mysite>/wp-content/plugins/a-z-listing/functions/az-styling.php on line 4

    Can you confirm that there’s not an error in the code? According to WP docs has_shortcode requires 2 params, but hte call in az-styling.php contians only 1 param.

    function a_z_listing_enqueue_styles( $force = false ) {
    	if ( ! ( $force || is_active_widget( false, false, 'bh_az_widget', true ) || ( is_single() && has_shortcode( 'a-z-listing' ) ) ) ) {
    		return;
    	}
    	wp_enqueue_style( 'a-z-listing' );
    }
    
    • This topic was modified 7 years, 10 months ago by mklappen.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘AZ Styling Throws Warning for has_shortcode()’ is closed to new replies.