Changeset 1521054
- Timestamp:
- 10/24/2016 12:04:16 PM (9 years ago)
- Location:
- remove-wp-overhead/trunk
- Files:
-
- 11 edited
-
assets/css/admin.css (modified) (1 diff)
-
assets/js/admin.js (modified) (1 diff)
-
assets/js/admin.min.js (modified) (1 diff)
-
includes/class-remove-wordpress-overhead-settings.php (modified) (10 diffs)
-
includes/class-remove-wordpress-overhead.php (modified) (8 diffs)
-
includes/lib/class-remove-wordpress-overhead-admin-api.php (modified) (3 diffs)
-
includes/lib/class-remove-wordpress-overhead-post-type.php (modified) (1 diff)
-
includes/lib/class-remove-wordpress-overhead-taxonomy.php (modified) (1 diff)
-
readme.txt (modified) (3 diffs)
-
remove-wordpress-overhead.php (modified) (2 diffs)
-
screenshot-1.png (modified) (previous)
Legend:
- Unmodified
- Added
- Removed
-
remove-wp-overhead/trunk/assets/css/admin.css
r1500279 r1521054 1 #remove_wordpress_overhead_settings input[type=checkbox] { 2 visibility: hidden; 3 } 4 5 #remove_wordpress_overhead_settings .form-table a { 6 text-decoration: none; 7 } 8 9 .remove-wordpress-overhead_slide_selectall { 10 height: 28px; 11 margin-bottom: 20px; 12 position: relative; 13 line-height: 28px; 14 padding-left: 10px; 15 } 16 17 .remove-wordpress-overhead_slide_selectall label { 18 cursor: pointer; 19 position: absolute; 20 width: 20px; 21 height: 20px; 22 left: 4px; 23 top: 4px; 24 25 -webkit-box-shadow: inset 0px 1px 1px rgba(0,0,0,0.5), 0px 1px 0px rgba(255,255,255,1); 26 -moz-box-shadow: inset 0px 1px 1px rgba(0,0,0,0.5), 0px 1px 0px rgba(255,255,255,1); 27 box-shadow: inset 0px 1px 1px rgba(0,0,0,0.5), 0px 1px 0px rgba(255,255,255,1); 28 29 background-color: #dcdada; 30 } 31 32 .remove-wordpress-overhead_slide_selectall label:after { 33 -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; 34 filter: alpha(opacity=0); 35 opacity: 0; 36 content: ''; 37 position: absolute; 38 width: 9px; 39 height: 5px; 40 background: transparent; 41 top: 4px; 42 left: 4px; 43 border: 3px solid #81a919; 44 border-top: none; 45 border-right: none; 46 47 -webkit-transform: rotate(-45deg); 48 -moz-transform: rotate(-45deg); 49 -o-transform: rotate(-45deg); 50 -ms-transform: rotate(-45deg); 51 transform: rotate(-45deg); 52 } 53 54 .remove-wordpress-overhead_slide_selectall label:hover::after { 55 -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=30)"; 56 filter: alpha(opacity=30); 57 opacity: 0.3; 58 } 59 60 .remove-wordpress-overhead_slide_selectall input[type=checkbox]:checked + label:after { 61 -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; 62 filter: alpha(opacity=100); 63 opacity: 1; 64 } 65 66 .remove-wordpress-overhead_slide_checkbox { 67 width: 80px; 68 height: 26px; 69 background: #dcdada; 70 71 -webkit-border-radius: 50px; 72 -moz-border-radius: 50px; 73 border-radius: 50px; 74 position: relative; 75 76 -webkit-box-shadow: inset 0px 1px 1px rgba(0,0,0,0.5), 0px 1px 0px rgba(255,255,255,0.2); 77 -moz-box-shadow: inset 0px 1px 1px rgba(0,0,0,0.5), 0px 1px 0px rgba(255,255,255,0.2); 78 box-shadow: inset 0px 1px 1px rgba(0,0,0,0.5), 0px 1px 0px rgba(255,255,255,0.2); 79 } 80 81 .remove-wordpress-overhead_slide_checkbox:after { 82 content: 'OFF'; 83 font: 12px/26px Arial, sans-serif; 84 color: #940a0a; 85 position: absolute; 86 right: 10px; 87 z-index: 0; 88 font-weight: bold; 89 text-shadow: 1px 1px 0px rgba(255,255,255,.15); 90 } 91 92 .remove-wordpress-overhead_slide_checkbox:before { 93 content: 'ON'; 94 font: 12px/26px Arial, sans-serif; 95 color: #81a919; 96 position: absolute; 97 left: 10px; 98 z-index: 0; 99 font-weight: bold; 100 } 101 102 .remove-wordpress-overhead_slide_checkbox label { 103 display: block; 104 width: 34px; 105 height: 20px; 106 107 -webkit-border-radius: 50px; 108 -moz-border-radius: 50px; 109 border-radius: 50px; 110 111 -webkit-transition: all .4s ease; 112 -moz-transition: all .4s ease; 113 -o-transition: all .4s ease; 114 -ms-transition: all .4s ease; 115 transition: all .4s ease; 116 cursor: pointer; 117 position: absolute; 118 top: 3px; 119 left: 3px; 120 z-index: 1; 121 122 -webkit-box-shadow: 0px 2px 5px 0px rgba(0,0,0,0.3); 123 -moz-box-shadow: 0px 2px 5px 0px rgba(0,0,0,0.3); 124 box-shadow: 0px 2px 5px 0px rgba(0,0,0,0.3); 125 background: #fcfff4; 126 127 background: -webkit-linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%); 128 background: -moz-linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%); 129 background: -o-linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%); 130 background: -ms-linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%); 131 background: linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%); 132 filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fcfff4', endColorstr='#b3bead',GradientType=0 ); 133 } 134 135 .remove-wordpress-overhead_slide_checkbox input[type=checkbox]:checked + label { 136 left: 43px; 137 } -
remove-wp-overhead/trunk/assets/js/admin.js
r1500279 r1521054 1 1 jQuery( document ).ready( function ( e ) { 2 2 var remove_wordpress_overhead_checked_all = false; 3 jQuery( '#remove_wordpress_overhead_selectall' ).click( function() { 4 if ( !remove_wordpress_overhead_checked_all ) { 5 jQuery('#remove_wordpress_overhead_settings td input').prop('checked', true); 6 remove_wordpress_overhead_checked_all = true; 7 } else { 8 jQuery('#remove_wordpress_overhead_settings td input').prop('checked', false); 9 remove_wordpress_overhead_checked_all = false; 10 } 11 } ); 3 12 }); -
remove-wp-overhead/trunk/assets/js/admin.min.js
r1500279 r1521054 1 jQuery(document).ready(function( ){});1 jQuery(document).ready(function(a){var b=!1;jQuery("#remove_wordpress_overhead_selectall").click(function(){b?(jQuery("#remove_wordpress_overhead_settings td input").prop("checked",!1),b=!1):(jQuery("#remove_wordpress_overhead_settings td input").prop("checked",!0),b=!0)})}); -
remove-wp-overhead/trunk/includes/class-remove-wordpress-overhead-settings.php
r1500279 r1521054 1 1 <?php 2 namespace Remove_Wordpress_Overhead; 3 use Remove_Wordpress_Overhead\Remove_Wordpress_Overhead_Settings; 2 4 3 5 if ( ! defined( 'ABSPATH' ) ) exit; … … 110 112 $settings['standard'] = array( 111 113 'title' => __( 'Settings', 'remove-wordpress-overhead' ), 112 'description' => __( 'Check the boxes to remove stuff and keep your HTML and WP clean .', 'remove-wordpress-overhead' ),114 'description' => __( 'Check the boxes to remove stuff and keep your HTML and WP clean and website fast.', 'remove-wordpress-overhead' ), 113 115 'fields' => array( 114 116 array( 115 117 'id' => 'remove_rsd_link', 116 'label' => __( 'Remove RSD Link', 'remove-wordpress-overhead' ),118 'label' => __( 'Remove RSD / EditURI Link <a href="https://en.wikipedia.org/wiki/Really_Simple_Discovery" target="_blank"><i class="dashicons dashicons-editor-help"></i></a>', 'remove-wordpress-overhead' ), 117 119 'description' => __( '<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://www.site.com/xmlrpc.php?rsd" />', 'remove-wordpress-overhead' ), 118 120 'type' => 'checkbox', … … 121 123 array( 122 124 'id' => 'remove_wlwmanifest_link', 123 'label' => __( 'Remove WLW Manifest Link ', 'remove-wordpress-overhead' ),125 'label' => __( 'Remove WLW Manifest Link <a href="https://msdn.microsoft.com/en-us/library/bb463265.aspx" target="_blank"><i class="dashicons dashicons-editor-help"></i></a>', 'remove-wordpress-overhead' ), 124 126 'description' => __( '<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://www.site.com/wp-includes/wlwmanifest.xml" />', 'remove-wordpress-overhead' ), 125 127 'type' => 'checkbox', … … 128 130 array( 129 131 'id' => 'remove_rss_feed_links', 130 'label' => __( 'Remove RSS Feed Links ', 'remove-wordpress-overhead' ),132 'label' => __( 'Remove RSS Feed Links <a href="https://en.wikipedia.org/wiki/RSS" target="_blank"><i class="dashicons dashicons-editor-help"></i></a>', 'remove-wordpress-overhead' ), 131 133 'description' => __( '<link rel="alternate" type="application/rss+xml" title="Site name » (Comments) Feed" href="http://www.site.com/(comments)/feed" />', 'remove-wordpress-overhead' ), 132 134 'type' => 'checkbox', … … 135 137 array( 136 138 'id' => 'remove_next_prev_links', 137 'label' => __( 'Remove Next & Prev Post Links ', 'remove-wordpress-overhead' ),139 'label' => __( 'Remove Next & Prev Post Links <a href="https://support.google.com/webmasters/answer/1663744?hl=en" target="_blank"><i class="dashicons dashicons-editor-help"></i></a>', 'remove-wordpress-overhead' ), 138 140 'description' => __( '<link rel="prev|prev" title="Some Post Title" href="http://www.site.com/some-slug/" />', 'remove-wordpress-overhead' ), 139 141 'type' => 'checkbox', … … 142 144 array( 143 145 'id' => 'remove_shortlink', 144 'label' => __( 'Remove Shortlink URL', 'remove-wordpress-overhead' ), 145 'description' => __( '<link rel="shortlink" href="http://www.site.com/some-slug/" />', 'remove-wordpress-overhead' ), 146 'type' => 'checkbox', 147 'default' => '' 148 ), 149 array( 150 'id' => 'remove_shortlink', 151 'label' => __( 'Remove Shortlink URL', 'remove-wordpress-overhead' ), 146 'label' => __( 'Remove Shortlink URL <a href="http://microformats.org/wiki/rel-shortlink" target="_blank"><i class="dashicons dashicons-editor-help"></i></a>', 'remove-wordpress-overhead' ), 152 147 'description' => __( '<link rel="shortlink" href="http://www.site.com/some-slug/" />', 'remove-wordpress-overhead' ), 153 148 'type' => 'checkbox', … … 170 165 array( 171 166 'id' => 'disable_wp_emojicons', 172 'label' => __( 'Disable WP Emoji cons', 'remove-wordpress-overhead' ),167 'label' => __( 'Disable WP Emoji <a href="https://en.support.wordpress.com/emoji/" target="_blank"><i class="dashicons dashicons-editor-help"></i></a>', 'remove-wordpress-overhead' ), 173 168 'description' => __( 'Emoji CSS styles and javascript in header', 'remove-wordpress-overhead' ), 174 169 'type' => 'checkbox', … … 178 173 'id' => 'disable_json_api', 179 174 'label' => __( 'Disable JSON API', 'remove-wordpress-overhead' ), 180 'description' => __( '<link rel="https://api.w.org/" href="http://www.site.com/wp-json/"" />', 'remove-wordpress-overhead' ), 175 'description' => __( '<link rel="https://api.w.org/" href="http://www.site.com/wp-json/" />', 'remove-wordpress-overhead' ), 176 'type' => 'checkbox', 177 'default' => '' 178 ), 179 array( 180 'id' => 'remove_canonical', 181 'label' => __( 'Remove Canonical URL <a href="https://support.google.com/webmasters/answer/139066?hl=en"><i class="dashicons dashicons-editor-help"></i></a>', 'remove-wordpress-overhead' ), 182 'description' => __( '<link rel="canonical" href="http://www.site.com/some-url" />', 'remove-wordpress-overhead' ), 183 'type' => 'checkbox', 184 'default' => '' 185 ), 186 array( 187 'id' => 'remove_woo_generator', 188 'label' => __( 'Remove WooCommerce Generator Meta', 'remove-wordpress-overhead' ), 189 'description' => __( '<meta name="generator" content="WooCommerce x.x.x" />', 'remove-wordpress-overhead' ), 181 190 'type' => 'checkbox', 182 191 'default' => '' … … 184 193 array( 185 194 'id' => 'disable_wp_widgets', 186 'label' => __( 'WP Widgets ', 'remove-wordpress-overhead' ),187 'description' => __( ' ---<br>Check which widgets you want to disable', 'remove-wordpress-overhead' ),195 'label' => __( 'WP Widgets<br><small>Check which widgets you want to disable</small>', 'remove-wordpress-overhead' ), 196 'description' => __( 'Check which widgets you want to disable', 'remove-wordpress-overhead' ), 188 197 'type' => 'checkbox_multi', 189 198 'options' => array( 'WP_Widget_Archives' => '1. Archives ', 'WP_Widget_Calendar' => '2. Calendar ', 'WP_Widget_Categories' => '3. Categories ', 'WP_Widget_Links' => '4. Links ', 'WP_Widget_Meta' => '5. Meta ', 'WP_Nav_Menu_Widget' => '6. Nav Menu ', 'WP_Widget_Pages' => '7. Pages ', 'WP_Widget_Recent_Comments' => '8. Recent Comments ', 'WP_Widget_Recent_Posts' => '9. Recent Posts ', 'WP_Widget_RSS' => '10. RSS ', 'WP_Widget_Search' => '11. Search ', 'WP_Widget_Tag_Cloud' => '12. Tag Cloud ', 'WP_Widget_Text' => '13. Text ' ) … … 244 253 public function settings_section ( $section ) { 245 254 $html = '<p> ' . $this->settings[ $section['id'] ]['description'] . '</p>' . "\n"; 255 $html .= '<div class="remove-wordpress-overhead_slide_selectall"><input type="checkbox" id="' . $this->parent->_token . '_selectall"></input><label for="' . $this->parent->_token . '_selectall"></label> Select all</div>'; 246 256 echo $html; 247 257 } -
remove-wp-overhead/trunk/includes/class-remove-wordpress-overhead.php
r1500279 r1521054 1 1 <?php 2 namespace Remove_Wordpress_Overhead; 3 use Remove_Wordpress_Overhead\Remove_Wordpress_Overhead; 2 4 3 5 if ( ! defined( 'ABSPATH' ) ) exit; … … 168 170 */ 169 171 public function admin_enqueue_styles ( $hook = '' ) { 170 wp_register_style( $this->_token . '-admin', esc_url( $this->assets_url ) . 'css/admin .css', array(), $this->_version );172 wp_register_style( $this->_token . '-admin', esc_url( $this->assets_url ) . 'css/admin' . $this->script_suffix . '.css', array(), $this->_version ); 171 173 wp_enqueue_style( $this->_token . '-admin' ); 172 174 } // End admin_enqueue_styles () … … 282 284 $options['emojicons'] = get_option( $this->_base . 'disable_wp_emojicons' ); 283 285 $options['json_api'] = get_option( $this->_base . 'disable_json_api' ); 286 $options['canonical'] = get_option( $this->_base . 'remove_canonical' ); 287 $options['woo_generator'] = get_option( $this->_base . 'remove_woo_generator' ); 284 288 $options['widgets'] = get_option( $this->_base . 'disable_wp_widgets' ); 285 289 set_transient( $this->_base . 'transient_settings', $options ); … … 287 291 288 292 // remove really simple discovery link 289 if ( $options['rsd_link']&& 'on' == $options['rsd_link'] ) {293 if ( isset( $options['rsd_link'] ) && 'on' == $options['rsd_link'] ) { 290 294 remove_action('wp_head', 'rsd_link'); 291 295 } 292 296 293 297 // remove wlwmanifest.xml (needed to support windows live writer) 294 if ( $options['wlwmanifest']&& 'on' == $options['wlwmanifest'] ) {298 if ( isset( $options['wlwmanifest'] ) && 'on' == $options['wlwmanifest'] ) { 295 299 remove_action('wp_head', 'wlwmanifest_link'); 296 300 } 297 301 298 302 // remove rss feed and exta feed links (make sure you add them in yourself if you are using as RSS service 299 if ( $options['feed_links']&& 'on' == $options['feed_links'] ) {303 if ( isset( $options['feed_links'] ) && 'on' == $options['feed_links'] ) { 300 304 remove_action('wp_head', 'feed_links', 2); 301 305 remove_action('wp_head', 'feed_links_extra', 3); … … 303 307 304 308 // remove the next and previous post links 305 if ( $options['next_prev']&& 'on' == $options['next_prev'] ) {309 if ( isset( $options['next_prev'] ) && 'on' == $options['next_prev'] ) { 306 310 remove_action('wp_head', 'adjacent_posts_rel_link', 10, 0); 307 311 remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0 ); … … 309 313 310 314 // remove the shortlink url from header 311 if ( $options['shortlink']&& 'on' == $options['shortlink'] ) {315 if ( isset( $options['shortlink'] ) && 'on' == $options['shortlink'] ) { 312 316 remove_action('wp_head', 'wp_shortlink_wp_head', 10, 0 ); 313 317 } 314 318 315 319 // remove wordpress generator version 316 if ( $options['wp_generator'] && 'on' == $options['wp_generator'] ) { 317 function wp_remove_version() { 318 return ''; 319 } 320 add_filter('the_generator', 'wp_remove_version'); 320 if ( isset( $options['wp_generator'] ) && 'on' == $options['wp_generator'] ) { 321 add_filter( 'the_generator', array( $this, 'wp_remove_version' ) ); 321 322 } 322 323 323 324 // remove ver= after style and script links 324 if ( $options['ver'] && 'on' == $options['ver'] ) { 325 add_filter( 'style_loader_src', 'remove_ver_css_js', 9999 ); 326 add_filter( 'script_loader_src', 'remove_ver_css_js', 9999 ); 327 328 function remove_ver_css_js( $src ) { 329 if ( strpos( $src, 'ver=' ) ) { 330 $src = remove_query_arg( 'ver', $src ); 331 } 332 return $src; 333 } 325 if ( isset( $options['ver'] ) && 'on' == $options['ver'] ) { 326 add_filter( 'style_loader_src', array( $this, 'remove_ver_css_js' ), 9999 ); 327 add_filter( 'script_loader_src', array( $this, 'remove_ver_css_js' ), 9999 ); 334 328 } 335 329 336 330 // remove emoji styles and script from header 337 if ( $options['emojicons'] && 'on' == $options['emojicons'] ) { 338 function disable_wp_emojicons() { 339 remove_action( 'admin_print_styles', 'print_emoji_styles' ); 340 remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); 341 remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); 342 remove_action( 'wp_print_styles', 'print_emoji_styles' ); 343 remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' ); 344 remove_filter( 'the_content_feed', 'wp_staticize_emoji' ); 345 remove_filter( 'comment_text_rss', 'wp_staticize_emoji' ); 346 add_filter( 'tiny_mce_plugins', 'disable_emojicons_tinymce' ); 347 } 348 349 function disable_emojicons_tinymce( $plugins ) { 350 if ( is_array( $plugins ) ) { 351 return array_diff( $plugins, array( 'wpemoji' ) ); 352 } else { 353 return array(); 354 } 355 } 356 357 add_action( 'init', 'disable_wp_emojicons' ); 331 if ( isset( $options['emojicons'] ) && 'on' == $options['emojicons'] ) { 332 add_action( 'init', array( $this, 'disable_wp_emojicons' ) ); 358 333 } 359 334 360 335 // disable json api and remove link from header 361 if ( $options['json_api']&& 'on' == $options['json_api'] ) {336 if ( isset( $options['json_api'] ) && 'on' == $options['json_api'] ) { 362 337 add_action( 'after_setup_theme', array( $this, 'remove_json_api' ) ); 363 338 add_action( 'after_setup_theme', array( $this, 'disable_json_api' ) ); 364 339 } 365 340 341 // remove canonical link 342 if ( isset( $options['canonical'] ) && 'on' == $options['canonical'] ) { 343 remove_action('embed_head', 'rel_canonical'); 344 add_filter( 'wpseo_canonical', '__return_false' ); 345 } 346 347 // remove woocommerce generator version 348 if ( isset( $options['woo_generator'] ) && 'on' == $options['woo_generator'] ) { 349 remove_action( 'wp_head','wc_generator_tag' ); 350 } 351 366 352 // disable wp widgets 367 if ( $options['widgets']&& '' != $options['widgets'] && is_array( $options['widgets'] ) ) {353 if ( isset( $options['widgets'] ) && '' != $options['widgets'] && is_array( $options['widgets'] ) ) { 368 354 // unregister widgets 369 355 add_action('widgets_init', array( $this, 'unregister_default_widgets' ), 11); … … 385 371 remove_action( 'wp_head', 'wp_oembed_add_discovery_links' ); 386 372 remove_action( 'wp_head', 'wp_oembed_add_host_js' ); 373 remove_action( 'template_redirect', 'rest_output_link_header', 11, 0 ); 387 374 } 388 375 … … 425 412 } 426 413 414 /** 415 * Remove WP generator link 416 * @access public 417 * @since 1.1.0 418 * @return void 419 */ 420 public function wp_remove_version() { 421 return ''; 422 } 423 424 /** 425 * Remove version numbers at the end of css and js files 426 * @access public 427 * @since 1.1.0 428 * @return void 429 */ 430 public function remove_ver_css_js( $src ) { 431 if ( strpos( $src, 'ver=' ) ) { 432 $src = remove_query_arg( 'ver', $src ); 433 } 434 return $src; 435 } 436 437 /** 438 * Disable WP emojicons 439 * @access public 440 * @since 1.1.0 441 * @return void 442 */ 443 public function disable_wp_emojicons() { 444 remove_action( 'admin_print_styles', 'print_emoji_styles' ); 445 remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); 446 remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); 447 remove_action( 'wp_print_styles', 'print_emoji_styles' ); 448 remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' ); 449 remove_filter( 'the_content_feed', 'wp_staticize_emoji' ); 450 remove_filter( 'comment_text_rss', 'wp_staticize_emoji' ); 451 add_filter( 'tiny_mce_plugins', array( $this, 'disable_emojicons_tinymce' ) ); 452 } 453 454 /** 455 * Disable WP emojicons from TinyMCE 456 * @access public 457 * @since 1.1.0 458 * @return void 459 */ 460 public function disable_emojicons_tinymce( $plugins ) { 461 if ( is_array( $plugins ) ) { 462 return array_diff( $plugins, array( 'wpemoji' ) ); 463 } else { 464 return array(); 465 } 466 } 467 427 468 } -
remove-wp-overhead/trunk/includes/lib/class-remove-wordpress-overhead-admin-api.php
r1500279 r1521054 1 1 <?php 2 namespace Remove_Wordpress_Overhead; 2 3 3 4 if ( ! defined( 'ABSPATH' ) ) exit; … … 104 105 $checked = 'checked="checked"'; 105 106 } 106 $html .= '< input id="' . esc_attr( $field['id'] ) . '" type="' . esc_attr( $field['type'] ) . '" name="' . esc_attr( $option_name ) . '" ' . $checked . '/>' . "\n";107 $html .= '<div class="remove-wordpress-overhead_slide_checkbox"><input id="' . esc_attr( $field['id'] ) . '" type="' . esc_attr( $field['type'] ) . '" name="' . esc_attr( $option_name ) . '" ' . $checked . '/><label for="' . esc_attr( $field['id'] ) . '"></label></div>' . "\n"; 107 108 break; 108 109 … … 113 114 $checked = true; 114 115 } 115 $html .= '< label for="' . esc_attr( $field['id'] . '_' . $k ) . '" class="checkbox_multi"><input type="checkbox" ' . checked( $checked, true, false ) . ' name="' . esc_attr( $option_name ) . '[]" value="' . esc_attr( $k ) . '" id="' . esc_attr( $field['id'] . '_' . $k ) . '" /> ' . $v . '</label> ';116 $html .= '<div class="remove-wordpress-overhead_slide_selectall"><input type="checkbox" ' . checked( $checked, true, false ) . ' name="' . esc_attr( $option_name ) . '[]" value="' . esc_attr( $k ) . '" id="' . esc_attr( $field['id'] . '_' . $k ) . '" /> ' . $v . '<label for="' . esc_attr( $field['id'] . '_' . $k ) . '"></label></div> '; 116 117 } 117 118 break; -
remove-wp-overhead/trunk/includes/lib/class-remove-wordpress-overhead-post-type.php
r1500279 r1521054 1 1 <?php 2 namespace Remove_Wordpress_Overhead; 3 use Remove_Wordpress_Overhead\Remove_Wordpress_Overhead_Post_Type; 2 4 3 5 if ( ! defined( 'ABSPATH' ) ) exit; -
remove-wp-overhead/trunk/includes/lib/class-remove-wordpress-overhead-taxonomy.php
r1500279 r1521054 1 1 <?php 2 namespace Remove_Wordpress_Overhead; 3 use Remove_Wordpress_Overhead\Remove_Wordpress_Overhead_Taxonomy; 2 4 3 5 if ( ! defined( 'ABSPATH' ) ) exit; -
remove-wp-overhead/trunk/readme.txt
r1500991 r1521054 5 5 Requires at least: 3.9 6 6 Tested up to: 4.6 7 Stable tag: 1. 0.27 Stable tag: 1.1.0 8 8 License: GPLv3 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html 10 10 11 Remove overhead from the <head> HTML and disable widgets you don't use11 Remove overhead from the <head> HTML, speed up your website and disable widgets you don't use 12 12 13 13 == Description == 14 14 15 A standard WP installation contains many links in the head of your HTML and has standard widgets you might never use. You can now install this plugin and check the items you want to have removed. The saved options are cached for better performance.15 A standard WP installation contains many links in the head of your HTML (which slow down your site) and has standard widgets you might never use. You can now install this plugin and check the items you want to have removed. The saved options are cached for better performance. 16 16 17 17 Header items you can remove: 18 * Remove RSD Link18 * Remove RSD / EditURI Link 19 19 * Remove WLW Manifest Link 20 20 * Remove RSS Feed Links … … 23 23 * Remove WP Generator Meta 24 24 * Remove Version Numbers from Style and Script Links 25 * Disable WP Emoji cons25 * Disable WP Emoji / emoticons 26 26 * Disable JSON API 27 * Disable Canonical URL 28 * Remove WooCommerce Generator Meta 27 29 28 30 You can disable the following widgets: … … 55 57 == Changelog == 56 58 59 = 1.1.0 = 60 * 2016-10-23 61 * ability to remove canonical url from header 62 * ability to remove WooCommerce generator tag from header 63 * add plugin git URL 64 * add "select all" op settings page 65 * namespace classes to avoid function name collisions 66 * add css sliders and checkboxes on settings page 67 * added info buttons on the settings page 68 57 69 = 1.0.2 = 58 70 * 2016-09-23 -
remove-wp-overhead/trunk/remove-wordpress-overhead.php
r1500996 r1521054 2 2 /* 3 3 * Plugin Name: Remove Wordpress Overhead 4 * Version: 1. 0.25 * Plugin URI: http ://www.omnisite.nl4 * Version: 1.1.0 5 * Plugin URI: https://github.com/omnisite/WP-Plugin-Remove-Wordpress-Overhead 6 6 * Description: Remove overhead from the <head> HTML and disable widgets you don't use 7 7 * Author: Omnisite … … 19 19 20 20 if ( ! defined( 'ABSPATH' ) ) exit; 21 22 use Remove_Wordpress_Overhead\Remove_Wordpress_Overhead; 23 use Remove_Wordpress_Overhead\Remove_Wordpress_Overhead_Settings; 21 24 22 25 // Load plugin class files
Note: See TracChangeset
for help on using the changeset viewer.