You appear to be a bot. Output may be restricted
Description
Display the "Add new" button for the post type.
Usage
$string = bw_get_add_new_button_text( $post_type );
Parameters
- $post_type
- ( string ) required – expected to be a valid post type
Returns
string more often than not the add_new_item label.Source
File name: oik-fields/shortcodes/oik-new.phpLines:
1 to 9 of 9
function bw_get_add_new_button_text( $post_type ) { $post_type_object = get_post_type_object( $post_type ); if ( $post_type_object ) { $add_new_item = $post_type_object->labels->add_new_item; } else { $add_new_item = sprintf( __( "Add new %s" ), $post_type ); } return( $add_new_item ); }View on GitHub