From d58496c91ba53463f018754f4f05f198dbbe226b Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Thu, 15 Nov 2018 09:58:21 -0500 Subject: [PATCH] removing templates used from the admin --- functions.php | 100 +++++++++++++++++++++--------------------- parts/header-meta.php | 2 +- style.css | 2 +- 3 files changed, 52 insertions(+), 52 deletions(-) diff --git a/functions.php b/functions.php index bfa0381..f72cc5b 100644 --- a/functions.php +++ b/functions.php @@ -239,61 +239,61 @@ function is_post_type($type){ add_action('thematic_searchloop', 'mytheme_search_loop'); // End of the Contextual/Highlight Search functions -function templates_used() { - add_menu_page( - __( 'Templates Used', 'textdomain' ), - 'Templates Used', - 'manage_options', - 'templates-used.php', - 'list_templates_used', - plugins_url( '' ), - 999 - ); - } - add_action( 'admin_menu', 'templates_used' ); - function list_templates_used( ) { - global $post; - echo "

Templates Used

"; - list_templates_by_type( 'page' ); - list_templates_by_type( 'post' ); - //list_templates_by_type( 'custom-post-type' ); - } - function list_templates_by_type( $type = 'page' ) { +// function templates_used() { +// add_menu_page( +// __( 'Templates Used', 'textdomain' ), +// 'Templates Used', +// 'manage_options', +// 'templates-used.php', +// 'list_templates_used', +// plugins_url( '' ), +// 999 +// ); +// } +// add_action( 'admin_menu', 'templates_used' ); +// function list_templates_used( ) { +// global $post; +// echo "

Templates Used

"; +// list_templates_by_type( 'page' ); +// list_templates_by_type( 'post' ); +// //list_templates_by_type( 'custom-post-type' ); +// } +// function list_templates_by_type( $type = 'page' ) { - $args = array( 'post_type' => $type, 'posts_per_page' => -1 ); - $posts = get_posts( $args ); - $count = 0; +// $args = array( 'post_type' => $type, 'posts_per_page' => -1 ); +// $posts = get_posts( $args ); +// $count = 0; - $output = ''; - $output .= '

\''. $type .'\' List

'; +// $output = ''; +// $output .= '

\''. $type .'\' List

'; - foreach ($posts as $post) { - setup_postdata( $post ); - if ( get_page_template_slug( $post->ID ) ) { - if ( $count == 0 ) { - $output .= ' Every '. $type .' not listed below has template "Default".

'; - $output .= ' '; - $output .= ' '; - } - $count++; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - $output .= ''; - } - } - $output .= ''; - $output .= '
IDNameSlugTemplate
' . $post->ID . '' . $post->post_title . '' . $post->post_name . '' . get_page_template_slug( $post->ID ) . '
'; +// foreach ($posts as $post) { +// setup_postdata( $post ); +// if ( get_page_template_slug( $post->ID ) ) { +// if ( $count == 0 ) { +// $output .= ' Every '. $type .' not listed below has template "Default".

'; +// $output .= ' '; +// $output .= ' '; +// } +// $count++; +// $output .= ''; +// $output .= ''; +// $output .= ''; +// $output .= ''; +// $output .= ''; +// $output .= ''; +// } +// } +// $output .= ''; +// $output .= '
IDNameSlugTemplate
' . $post->ID . '' . $post->post_title . '' . $post->post_name . '' . get_page_template_slug( $post->ID ) . '
'; - if ( $count == 0 ) { - $output .= ' Either there are no posts with type "' . $type . '", or none of them have custom templates set (and have the Default template). '; - } +// if ( $count == 0 ) { +// $output .= ' Either there are no posts with type "' . $type . '", or none of them have custom templates set (and have the Default template). '; +// } - wp_reset_postdata(); - echo $output; -} +// wp_reset_postdata(); +// echo $output; +// } function has_children() { global $post; diff --git a/parts/header-meta.php b/parts/header-meta.php index 5830284..92d175b 100644 --- a/parts/header-meta.php +++ b/parts/header-meta.php @@ -3,7 +3,7 @@ <?php wp_title(); ?> - + diff --git a/style.css b/style.css index 80d9dfc..0a24cc6 100644 --- a/style.css +++ b/style.css @@ -3,5 +3,5 @@ Theme Name: Discover Kalamazoo 2018 Author: Gaslight Media Author URI: http://www.gaslightmedia.com Description: A theme for Discover Kalamazoo -Version: 1.0.26 +Version: 1.0.27 */ -- 2.17.1