Changeset 2778880
- Timestamp:
- 09/01/2022 02:37:45 PM (2 years ago)
- Location:
- page-template-usage-info/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
page-template-usage-info/trunk/fti_page_templates.php
r2195003 r2778880 85 85 global $wpdb; 86 86 87 if ($template_filename != '') {87 if ($template_filename != '') { 88 88 $sql = $wpdb->prepare("SELECT p.ID, u.display_name AS post_author, post_date, post_title, post_status, post_modified, post_content FROM " . $wpdb->prefix . "posts p INNER JOIN " . $wpdb->prefix . "users u ON p.post_author = u.ID LEFT JOIN " . $wpdb->prefix . "postmeta pm ON p.ID = pm.post_id AND pm.meta_key = '_wp_page_template' WHERE p.post_type = 'page' AND p.post_status IN ('publish', 'draft') AND pm.meta_value = '%s'", $template_filename); 89 89 } else { … … 137 137 echo '</tr>'; 138 138 139 // Loop through the t hemes139 // Loop through the tes 140 140 foreach ($templates as $template_name => $template_filename) { 141 141 echo '<tr>'; 142 echo sprintf('<td>%s</td><td>%s</td><td><a href="edit.php?post_type=page&page=fti_page_templates&template=%s">%d</a></td>', $template_name, $template_filename, $template_filename, $templateUse[$template_filename]->pages_using); 142 $pages_using = 0; 143 if ( isset($templateUse[$template_filename]) ) { 144 $pages_using = $templateUse[$template_filename]; 145 } 146 echo sprintf('<td>%s</td><td>%s</td><td><a href="edit.php?post_type=page&page=fti_page_templates&template=%s">%d</a></td>', $template_name, $template_filename, $template_filename, $pages_using); 143 147 echo '</tr>'; 144 148 } -
page-template-usage-info/trunk/readme.txt
r2195001 r2778880 3 3 Tags: templates, page, reporting, blocks, gutenberg, reports, management, auditing 4 4 Requires at least: 3.0.1 5 Tested up to: 5.3.06 Stable tag: 1.3. 15 Tested up to: 6 Stable tag: 1.3. 7 7 Text Domain: pagetemplateusageinfo 8 8 License: GPLv2 or later … … 24 24 == Changelog == 25 25 26 27 28 29 30 31 32 26 33 = 1.3 = 27 34 * Adds a new column to show if this page was created with the Gutenberg editor
Note: See TracChangeset
for help on using the changeset viewer.