From: Laury GvR Date: Thu, 14 Feb 2019 18:04:28 +0000 (-0500) Subject: Comment out templates_used code X-Git-Tag: v1.0.0^2~100 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=eddc3d107045df73b7ec6e5a5f9260f99ce9ebaf;p=WP-Themes%2Fuptravel.git Comment out templates_used code --- diff --git a/functions.php b/functions.php index f7e17ed..e7a970b 100644 --- a/functions.php +++ b/functions.php @@ -416,61 +416,61 @@ function get_county_page_children($countyPageId = false) { return $countyChildren; } -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 .= ''; - } +// 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 .= '
IDNameSlugTemplate
' . $post->ID . '' . $post->post_title . '' . $post->post_name . '' . get_page_template_slug( $post->ID ) . '
'; +// $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 ) . '
'; +// } +// $output .= ''; +// $output .= ''; - 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; -} \ No newline at end of file +// wp_reset_postdata(); +// echo $output; +// } \ No newline at end of file