labels->name ); $taxonomy_terms = get_terms( $single_taxonomy ); if(count($taxonomy_terms) > 0) { echo ""; } } } } add_action( 'restrict_manage_posts', 'rudr_posts_taxonomy_filter' ); // Include color picker assets add_action( 'admin_enqueue_scripts', 'asp_add_color_picker' ); function asp_add_color_picker( $hook ) { if( is_admin() ) { // Add the color picker css file wp_enqueue_style( 'wp-color-picker' ); // Include our custom jQuery file with WordPress Color Picker dependency } } // Upload Image Engine function asp_load_media_files() { wp_enqueue_media(); } add_action( 'admin_enqueue_scripts', 'asp_load_media_files' ); /* Manage Sermons Admin Bar quick links */ add_action('admin_bar_menu', 'asp_admin_bar_manage_sermons', 70); function asp_admin_bar_manage_sermons($admin_bar){ $asp_toolbar_menu = get_option( 'asp_general_toolbar_menu' ); $sermon_label = get_option( 'asp_general_sermon_label' ); $speaker_label = get_option( 'asp_general_speaker_label' ); $topic_label = get_option( 'asp_general_topic_label' ); if (!empty($sermon_label)) { $sermon_label = $sermon_label; $sermon_label_slug = strtolower("$sermon_label"); } else { $sermon_label = 'Sermon'; $sermon_label_slug = strtolower("Sermon"); } if (!empty($speaker_label)) { $speaker_label = $speaker_label; $speaker_label_slug = strtolower($speaker_label); } else { $speaker_label = 'Speaker'; $speaker_label_slug = strtolower("Speaker"); } if (!empty($topic_label)) { $topic_label = $topic_label; $topic_label_slug = strtolower("$topic_label"); } else { $topic_label = 'Topic'; $topic_label_slug = strtolower("Topic"); } if (empty($asp_toolbar_menu)) { $admin_bar->add_menu( array( 'id' => 'asp-sermons', 'title' => "Manage {$sermon_label}s", 'href' => '/wp-admin/edit.php?post_type=sermons', 'meta' => array( 'title' => __("Manage {$sermon_label}s"), ), )); $admin_bar->add_menu( array( 'id' => 'asp-sermons-all', 'parent' => 'asp-sermons', 'title' => "All {$sermon_label}s", 'href' => '/wp-admin/edit.php?post_type=sermons', 'meta' => array( 'title' => __("All {$sermon_label}s"), 'target' => '_self', 'class' => 'asp-sermons-all-link' ), )); $admin_bar->add_menu( array( 'id' => 'asp-sermons-new', 'parent' => 'asp-sermons', 'title' => "Add $sermon_label", 'href' => '/wp-admin/post-new.php?post_type=sermons', 'meta' => array( 'title' => __("Add $sermon_label"), 'target' => '_self', 'class' => 'asp-sermons-new-link' ), )); $admin_bar->add_menu( array( 'id' => 'asp-sermons-speakers', 'parent' => 'asp-sermons', 'title' => "{$speaker_label}s", 'href' => '/wp-admin/edit-tags.php?taxonomy=sermon_speaker&post_type=sermons', 'meta' => array( 'title' => __("{$speaker_label}s"), 'target' => '_self', 'class' => 'asp-sermons-speakers-link' ), )); $admin_bar->add_menu( array( 'id' => 'asp-sermons-topics', 'parent' => 'asp-sermons', 'title' => "{$topic_label}s", 'href' => '/wp-admin/edit-tags.php?taxonomy=sermon_topics&post_type=sermons', 'meta' => array( 'title' => __("{$topic_label}s"), 'target' => '_self', 'class' => 'asp-sermons-topics-link' ), )); $admin_bar->add_menu( array( 'id' => 'asp-sermons-series', 'parent' => 'asp-sermons', 'title' => 'Series', 'href' => '/wp-admin/edit-tags.php?taxonomy=sermon_series&post_type=sermons', 'meta' => array( 'title' => __('Series'), 'target' => '_self', 'class' => 'asp-sermons-series-link' ), )); // Display general settings in admin bar to users who can only manage options if ( current_user_can('manage_options') ) { $admin_bar->add_menu( array( 'id' => 'asp-sermons-settings', 'parent' => 'asp-sermons', 'title' => 'General Settings', 'href' => '/wp-admin/edit.php?post_type=sermons&page=asp-settings', 'meta' => array( 'title' => __('General Settings'), 'target' => '_self', 'class' => 'asp-sermons-settings-link' ), )); } } }