removing templates used from the admin
authorAnthony Talarico <talarico@gaslightmedia.com>
Thu, 15 Nov 2018 14:58:21 +0000 (09:58 -0500)
committerAnthony Talarico <talarico@gaslightmedia.com>
Thu, 15 Nov 2018 14:58:21 +0000 (09:58 -0500)
functions.php
parts/header-meta.php
style.css

index bfa0381..f72cc5b 100644 (file)
@@ -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 "<br><b><h1>Templates Used</h1></b>";
-    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 "<br><b><h1>Templates Used</h1></b>";
+//     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 .= '<br><h3>\''. $type .'\' List</h3>';
+//     $output = '';
+//     $output .= '<br><h3>\''. $type .'\' List</h3>';
     
-    foreach ($posts as $post) {
-        setup_postdata( $post );
-        if ( get_page_template_slug( $post->ID ) ) {
-            if ( $count == 0 ) {
-                $output .= ' <span>Every '. $type .' not listed below has template "Default".</span></b></br><br>';
-                $output .= ' <table style="border-collapse: collapse;">';
-                $output .= ' <tr><th>ID</th><th>Name</th><th>Slug</th><th>Template</th></tr>';
-            }
-            $count++;
-            $output .= '<tr style="background-color: white;">';
-            $output .= '<td style="border: 1px solid black;padding: 4px;">' . $post->ID . '</td>';
-            $output .= '<td style="border: 1px solid black;padding: 4px;">' . $post->post_title . '</td>';
-            $output .= '<td style="border: 1px solid black;padding: 4px;">' . $post->post_name . '</td>';
-            $output .= '<td style="border: 1px solid black;padding: 4px;">' . get_page_template_slug( $post->ID ) . '</td>';
-            $output .= '</tr>';
-        }
-    }
-    $output .= '</tr>';
-    $output .= '</table>';
+//     foreach ($posts as $post) {
+//         setup_postdata( $post );
+//         if ( get_page_template_slug( $post->ID ) ) {
+//             if ( $count == 0 ) {
+//                 $output .= ' <span>Every '. $type .' not listed below has template "Default".</span></b></br><br>';
+//                 $output .= ' <table style="border-collapse: collapse;">';
+//                 $output .= ' <tr><th>ID</th><th>Name</th><th>Slug</th><th>Template</th></tr>';
+//             }
+//             $count++;
+//             $output .= '<tr style="background-color: white;">';
+//             $output .= '<td style="border: 1px solid black;padding: 4px;">' . $post->ID . '</td>';
+//             $output .= '<td style="border: 1px solid black;padding: 4px;">' . $post->post_title . '</td>';
+//             $output .= '<td style="border: 1px solid black;padding: 4px;">' . $post->post_name . '</td>';
+//             $output .= '<td style="border: 1px solid black;padding: 4px;">' . get_page_template_slug( $post->ID ) . '</td>';
+//             $output .= '</tr>';
+//         }
+//     }
+//     $output .= '</tr>';
+//     $output .= '</table>';
     
-    if ( $count == 0 ) {
-        $output .= '<span> Either there are no posts with type "' . $type . '", or none of them have custom templates set (and have the Default template). </span>';
-    }
+//     if ( $count == 0 ) {
+//         $output .= '<span> Either there are no posts with type "' . $type . '", or none of them have custom templates set (and have the Default template). </span>';
+//     }
     
-    wp_reset_postdata();
-    echo $output;
-}
+//     wp_reset_postdata();
+//     echo $output;
+// }
 
 function has_children() {
     global $post;
index 5830284..92d175b 100644 (file)
@@ -3,7 +3,7 @@
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
     <title><?php wp_title(); ?></title>
     <link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri() ; ?>/css/animate.min.css">
-    <link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri() ; ?>/css/app.css?v=1.0.26">
+    <link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri() ; ?>/css/app.css?v=1.0.27">
     <link rel="shortcut icon" href="<?php echo get_stylesheet_directory_uri() ; ?>/assets/favicon.ico">
     <link href='https://fonts.googleapis.com/css?family=Montserrat:400,400italic,700' rel='stylesheet' type='text/css'>
     <link rel="stylesheet" href="https://use.typekit.net/vqf0bqy.css">
index 80d9dfc..0a24cc6 100644 (file)
--- 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
 */