removing force template functions from the functions.php to fix template issues
authorAnthony Talarico <talarico@gaslightmedia.com>
Wed, 1 Mar 2017 16:02:26 +0000 (11:02 -0500)
committerAnthony Talarico <talarico@gaslightmedia.com>
Wed, 1 Mar 2017 16:02:26 +0000 (11:02 -0500)
functions.php

index 9c3d231..bbbbf11 100644 (file)
@@ -9,7 +9,46 @@
     include_once 'lib/enqueueing.php';
     include_once 'lib/images.php';
     include_once 'lib/plugins.php';
-    include_once 'lib/force-template-functions.php';
+//    include_once 'lib/force-template-functions.php';
     include_once 'lib/EventRegistration.php';
     include_once 'lib/theme-support.php';
 
+//function templates_used() {
+//    add_menu_page(
+//        __( 'Templates Used', 'textdomain' ),
+//        'templates used',
+//        'manage_options',
+//        'templates-used.php',
+//        'list_templates_used',
+//        plugins_url( 'myplugin/images/icon.png' ),
+//        999
+//    );
+//}
+//add_action( 'admin_menu', 'templates_used' );
+//
+//function list_templates_used(){
+//    global $post;
+//    
+//    $args = array( 'post_type' => 'page', 'posts_per_page' => -1 );
+//    $template_posts = get_posts( $args );
+//    
+//    $output = ' <br><b><h2>Templates Used</h2></b></br>';
+//    $output .= ' <table style="border-collapse: collapse;">';
+//    $output .= ' <tr><th>ID</th><th>Name</th><th>Slug</th><th>Template</th></tr>';
+//    foreach ($template_posts as $post) {
+//        setup_postdata( $post );
+//        if ( get_page_template_slug( $post->ID ) ) {
+//            $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>';
+//    wp_reset_postdata();
+//    echo $output;
+//}
\ No newline at end of file