Plugin Directory

Changeset 2434623


Ignore:
Timestamp:
12/08/2020 08:14:00 PM (5 years ago)
Author:
Kodam
Message:

minor changes, 1.2 version updated

Location:
autotweaks/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • autotweaks/trunk/autotweaks.php

    r2400645 r2434623  
    77 * Author URI:      https://www.luisceladita.com
    88 * Text Domain:     autotweaks
    9  * Version:         1.1
     9 * Version:         1.2
    1010 * License:         GPLv2 or later
    1111 * License URI:     https://www.gnu.org/licenses/gpl-2.0.html
     
    7171
    7272//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// }
    7676
    7777//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.
     
    159159  }
    160160);
     161
     162//prevent all page titles from appearing on any page
     163function ele_disable_page_title( $return ) {
     164  return false;
     165}
     166add_filter( 'hello_elementor_page_title', 'ele_disable_page_title' );
     167
     168//Add Post ID to Posts and Pages Admin Columns
     169add_filter('manage_posts_columns', 'posts_columns_id', 5);
     170add_action('manage_posts_custom_column', 'posts_custom_id_columns', 5, 2);
     171add_filter('manage_pages_columns', 'posts_columns_id', 5);
     172add_action('manage_pages_custom_column', 'posts_custom_id_columns', 5, 2);
     173function posts_columns_id($defaults){
     174   $defaults['wps_post_id'] = __('ID');
     175   return $defaults;
     176}
     177function 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
     184foreach ( 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}
     189add_action( 'admin_print_styles-edit-tags.php', 't5_tax_id_style' );
     190function t5_add_col( $columns ){return $columns + array ( 'tax_id' => 'ID' );}
     191function t5_show_id( $v, $name, $id ){return 'tax_id' === $name ? $id : $v;}
     192function t5_tax_id_style(){print '<style>#tax_id{width:4em}</style>';}
  • autotweaks/trunk/readme.txt

    r2400647 r2434623  
    55Requires at least: 4.2
    66Tested up to: 5.5
    7 Stable tag: 1.1
     7Stable tag: 1.2
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    3939* Change Control Heartbeat API interval (60 seconds)
    4040* Disable the XML-RPC interface
    41 * Disable the plugins and theme editor
    4241* Disable PDF thumbnails preview
    4342* Disable Self Pingbacks
    4443* Limit Post Revisions to 1
     44* Add IDs to posts, pages, and categories
    4545
    4646Just activate the plugin and test your site’s speed in your favourite tool (GTMetrix, Pingdom Tools, Securityheaders.com, etc.)
     
    6161
    6262== Changelog ==
     63= 1.2 =
     64* minor changes
    6365= 1.1 =
    6466* minor changes
Note: See TracChangeset for help on using the changeset viewer.