• In the FAQ-section, starting on line 38, the text should be:

    add_filter( 'if_menu_conditions', 'my_new_menu_conditions' );
    
    function my_new_menu_conditions( $conditions ) {
    	$conditions[] = array(
    		'name'		=>	'If single custom-post-type',	// name of the condition
    		'condition'	=>	function() {					// callback - must return TRUE or FALSE
    			return is_singular( 'my-custom-post-type' );
    		}
    	);
    
    	return $conditions;
    }

    Changes:
    – Removed duplicate backticks
    – Added “return $conditions;”

    http://wordpress.org/extend/plugins/if-menu/

  • The topic ‘Bugfix for readme.txt’ is closed to new replies.