Changeset 2434623
- Timestamp:
- 12/08/2020 08:14:00 PM (5 years ago)
- Location:
- autotweaks/trunk
- Files:
-
- 2 edited
-
autotweaks.php (modified) (3 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
autotweaks/trunk/autotweaks.php
r2400645 r2434623 7 7 * Author URI: https://www.luisceladita.com 8 8 * Text Domain: autotweaks 9 * Version: 1. 19 * Version: 1.2 10 10 * License: GPLv2 or later 11 11 * License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 71 71 72 72 //Disable the plugins and theme editor. A mostly useless tool that can be very dangerous in the wrong hands. 73 if ( ! defined( 'DISALLOW_FILE_EDIT' ) ) {74 define( 'DISALLOW_FILE_EDIT', true );75 }73 // if ( ! defined( 'DISALLOW_FILE_EDIT' ) ) { 74 // define( 'DISALLOW_FILE_EDIT', true ); 75 // } 76 76 77 77 //Starting with 4.7, WordPress tries to make thumbnails from each PDF you upload, potentially crashing your server if GhostScript and ImageMagick aren't properly configured. This option disables PDF thumbnails. … … 159 159 } 160 160 ); 161 162 //prevent all page titles from appearing on any page 163 function ele_disable_page_title( $return ) { 164 return false; 165 } 166 add_filter( 'hello_elementor_page_title', 'ele_disable_page_title' ); 167 168 //Add Post ID to Posts and Pages Admin Columns 169 add_filter('manage_posts_columns', 'posts_columns_id', 5); 170 add_action('manage_posts_custom_column', 'posts_custom_id_columns', 5, 2); 171 add_filter('manage_pages_columns', 'posts_columns_id', 5); 172 add_action('manage_pages_custom_column', 'posts_custom_id_columns', 5, 2); 173 function posts_columns_id($defaults){ 174 $defaults['wps_post_id'] = __('ID'); 175 return $defaults; 176 } 177 function posts_custom_id_columns($column_name, $id){ 178 if($column_name === 'wps_post_id'){ 179 echo $id; 180 } 181 } 182 183 //Add Category ID to Posts and Pages Admin Columns 184 foreach ( get_taxonomies() as $taxonomy ) { 185 add_action( "manage_edit-${taxonomy}_columns", 't5_add_col' ); 186 add_filter( "manage_edit-${taxonomy}_sortable_columns", 't5_add_col' ); 187 add_filter( "manage_${taxonomy}_custom_column", 't5_show_id', 10, 3 ); 188 } 189 add_action( 'admin_print_styles-edit-tags.php', 't5_tax_id_style' ); 190 function t5_add_col( $columns ){return $columns + array ( 'tax_id' => 'ID' );} 191 function t5_show_id( $v, $name, $id ){return 'tax_id' === $name ? $id : $v;} 192 function t5_tax_id_style(){print '<style>#tax_id{width:4em}</style>';} -
autotweaks/trunk/readme.txt
r2400647 r2434623 5 5 Requires at least: 4.2 6 6 Tested up to: 5.5 7 Stable tag: 1. 17 Stable tag: 1.2 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 39 39 * Change Control Heartbeat API interval (60 seconds) 40 40 * Disable the XML-RPC interface 41 * Disable the plugins and theme editor42 41 * Disable PDF thumbnails preview 43 42 * Disable Self Pingbacks 44 43 * Limit Post Revisions to 1 44 * Add IDs to posts, pages, and categories 45 45 46 46 Just activate the plugin and test your site’s speed in your favourite tool (GTMetrix, Pingdom Tools, Securityheaders.com, etc.) … … 61 61 62 62 == Changelog == 63 = 1.2 = 64 * minor changes 63 65 = 1.1 = 64 66 * minor changes
Note: See TracChangeset
for help on using the changeset viewer.