WordPress.org

Make WordPress Core

Changeset 35688


Ignore:
Timestamp:
11/18/2015 08:48:24 PM (4 years ago)
Author:
jorbin
Message:

Revert [34291] bringing back my-hacks

Keeping myhacks support is a small price to pay for not breaking people's sites. Even if it is very very very few sites, breaking sites isn't something that should be encouraged. Even with 10 years of deprecation notices.

https://core.trac.wordpress.org/ticket/33741#comment:18 outlines all the ways that the hack_file and my-hacks options can be setup and thus all the ways that the removal of those options could break sites.

Fixes #33741.

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/file.php

    r35644 r35688  
    4040    'audio.php' => __('Audio Attachment Template'),
    4141    'application.php' => __('Application Attachment Template'),
     42    'my-hacks.php' => __( 'my-hacks.php (legacy hacks support)' ),
    4243    '.htaccess' => __( '.htaccess (for rewrite rules )' ),
    4344    // Deprecated files
  • trunk/src/wp-admin/includes/schema.php

    r35638 r35688  
    421421    'moderation_notify' => 1,
    422422    'permalink_structure' => '',
     423    'hack_file' => 0,
    423424    'blog_charset' => 'UTF-8',
    424425    'moderation_keys' => '',
  • trunk/src/wp-includes/load.php

    r35641 r35688  
    553553    $plugins = array();
    554554    $active_plugins = (array) get_option( 'active_plugins', array() );
     555
     556    // Check for hacks file if the option is enabled
     557    if ( get_option( 'hack_file' ) && file_exists( ABSPATH . 'my-hacks.php' ) ) {
     558        _deprecated_file( 'my-hacks.php', '1.5' );
     559        array_unshift( $plugins, ABSPATH . 'my-hacks.php' );
     560    }
     561
    555562    if ( empty( $active_plugins ) || wp_installing() )
    556563        return $plugins;
Note: See TracChangeset for help on using the changeset viewer.