You appear to be a bot. Output may be restricted
Description
Return Yes / No to indicate if a shortcode expands in titlesWhen you register a shortcode using bw_add_shortcode() you can decide whether or not it will be expanded during 'the_title' processing. Shortcodes which are registered using add_shortcode() have to control their own expansion. So, unless they have logic to test the current filter then they will be expanded in titles due to the fact that oik adds the do_shortcode action for 'the_title' We use a lower case "yes" to indicate this.
Usage
$string = bw_get_shortcode_expands_in_titles( $shortcode );
Parameters
- $shortcode
- ( string ) required –
Returns
string 'Yes' if it does, 'No' if it doesn't, 'yes' for unknownSource
File name: oik/shortcodes/oik-codes.phpLines:
1 to 11 of 11
function bw_get_shortcode_expands_in_titles( $shortcode ) { $expand = bw_get_shortcode_title_expansion( $shortcode ); if ( $expand === null ) { $sceit = __( "yes", "oik" ); } elseif ( $expand === false ) { $sceit = __( "No", "oik" ); } else { $sceit = __( "Yes", "oik" ); } return( $sceit ); }View on GitHub View on Trac