array( 'name' => __( 'StreamCast'), 'singular_name' => __( 'StreamCast' ), 'add_new' => __( 'Add New Radio Player' ), 'add_new_item' => __( 'Add New Radio' ), 'edit_item' => __( 'Edit Radio' ), 'new_item' => __( 'New Radio' ), 'view_item' => __( 'View Portfolio' ), 'search_items' => __( 'Search Portfolio'), 'not_found' => __( 'Sorry, we couldn\'t find the Portfolio you are looking for.' ) ), 'public' => false, 'show_ui' => true, 'publicly_queryable' => true, 'exclude_from_search' => true, 'menu_position' => 14, 'menu_icon' =>'dashicons-microphone', 'has_archive' => false, 'hierarchical' => false, 'capability_type' => 'page', 'rewrite' => array( 'slug' => 'behance' ), 'supports' => array( 'title' ) ) ); } //Remove post update massage and link function stp_updated_messages( $messages ) { $messages['streamcast'][1] = __('Updated '); return $messages; } add_filter('post_updated_messages','stp_updated_messages'); /*-------------------------------------------------------------------------------*/ /* Hide & Disabled View, Quick Edit and Preview Button /*-------------------------------------------------------------------------------*/ function stp_remove_row_actions( $idtions ) { global $post; if( $post->post_type == 'streamcast' ) { unset( $idtions['view'] ); unset( $idtions['inline hide-if-no-js'] ); } return $idtions; } if ( is_admin() ) { add_filter( 'post_row_actions','stp_remove_row_actions', 10, 2 );} // HIDE everything in PUBLISH metabox except Move to Trash & PUBLISH button function stp_hide_publishing_actions(){ $my_post_type = 'streamcast'; global $post; if($post->post_type == $my_post_type){ echo ' '; } } add_action('admin_head-post.php', 'stp_hide_publishing_actions'); add_action('admin_head-post-new.php', 'stp_hide_publishing_actions'); // Change publish button to save. add_filter( 'gettext', 'stp_change_publish_button', 10, 2 ); function stp_change_publish_button( $translation, $text ) { if ( 'streamcast' == get_post_type()) if ( $text == 'Publish' ) return 'Save'; return $translation; } // column management add_filter('manage_streamcast_posts_columns', 'stp_columns_head_only_streamcast', 10); add_action('manage_streamcast_posts_custom_column', 'stp_columns_content_only_streamcast', 10, 2); function stp_columns_head_only_streamcast($defaults) { $defaults['directors_name'] = 'ShortCode'; return $defaults; } function stp_columns_content_only_streamcast($column_name, $post_ID) { if ($column_name == 'directors_name') { // show content of 'directors_name' column echo ''; } } // Add shortcode area add_action( 'edit_form_after_title', 'stp_shortcode_area' ); function stp_shortcode_area() { global $post; if ( $post->post_type == 'streamcast' ) { ?>