_deprecated_file example

<?php /** * Session API * * @since 4.0.0 * @deprecated 4.7.0 */

_deprecated_file( basename( __FILE__ ), '4.7.0' );

require_once ABSPATH . WPINC . '/class-wp-session-tokens.php';
require_once ABSPATH . WPINC . '/class-wp-user-meta-session-tokens.php';
<?php /** * Dependencies API: WP_Styles class * * This file is deprecated, use 'wp-includes/class-wp-styles.php' instead. * * @deprecated 6.1.0 * @package WordPress */

_deprecated_file( basename( __FILE__ ), '6.1.0', WPINC . '/class-wp-styles.php' );

/** WP_Styles class */
require_once ABSPATH . WPINC . '/class-wp-styles.php';
<?php /** * The User Interface "Skins" for the WordPress File Upgrader * * @package WordPress * @subpackage Upgrader * @since 2.8.0 * @deprecated 4.7.0 */

_deprecated_file( basename( __FILE__ ), '4.7.0', 'class-wp-upgrader.php' );

/** WP_Upgrader_Skin class */
require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader-skin.php';

/** Plugin_Upgrader_Skin class */
require_once ABSPATH . 'wp-admin/includes/class-plugin-upgrader-skin.php';

/** Theme_Upgrader_Skin class */
require_once ABSPATH . 'wp-admin/includes/class-theme-upgrader-skin.php';

/** Bulk_Upgrader_Skin class */
<?php /** * Back-compat placeholder for the base embed template * * @package WordPress * @subpackage oEmbed * @since 4.4.0 * @deprecated 4.5.0 Moved to wp-includes/theme-compat/embed.php */

_deprecated_file( basename( __FILE__ ), '4.5.0', WPINC . '/theme-compat/embed.php' );

require ABSPATH . WPINC . '/theme-compat/embed.php';
<?php /** * Dependencies API: WP_Scripts class * * This file is deprecated, use 'wp-includes/class-wp-scripts.php' instead. * * @deprecated 6.1.0 * @package WordPress */

_deprecated_file( basename( __FILE__ ), '6.1.0', WPINC . '/class-wp-scripts.php' );

/** WP_Scripts class */
require_once ABSPATH . WPINC . '/class-wp-scripts.php';

function wp_get_active_and_valid_plugins() {
    $plugins        = array();
    $active_plugins = (array) get_option( 'active_plugins', array() );

    // Check for hacks file if the option is enabled.     if ( get_option( 'hack_file' ) && file_exists( ABSPATH . 'my-hacks.php' ) ) {
        _deprecated_file( 'my-hacks.php', '1.5.0' );
        array_unshift( $plugins, ABSPATH . 'my-hacks.php' );
    }

    if ( empty( $active_plugins ) || wp_installing() ) {
        return $plugins;
    }

    $network_plugins = is_multisite() ? wp_get_active_network_plugins() : false;

    foreach ( $active_plugins as $plugin ) {
        if ( ! validate_file( $plugin )                     // $plugin must validate as file.
<?php
/** * The SMTP class has been moved to the wp-includes/PHPMailer subdirectory and now uses the PHPMailer\PHPMailer namespace. */
_deprecated_file(
    basename( __FILE__ ),
    '5.5.0',
    WPINC . '/PHPMailer/SMTP.php',
    __( 'The SMTP class has been moved to the wp-includes/PHPMailer subdirectory and now uses the PHPMailer\PHPMailer namespace.' )
);

require_once __DIR__ . '/PHPMailer/SMTP.php';

class_alias( PHPMailer\PHPMailer\SMTP::class, 'SMTP' );
/** * WordPress database access abstraction class. * * This file is deprecated, use 'wp-includes/class-wpdb.php' instead. * * @deprecated 6.1.0 * @package WordPress */

if ( function_exists( '_deprecated_file' ) ) {
    // Note: WPINC may not be defined yet, so 'wp-includes' is used here.     _deprecated_file( basename( __FILE__ ), '6.1.0', 'wp-includes/class-wpdb.php' );
}

/** wpdb class */
require_once __DIR__ . '/class-wpdb.php';
<?php /** * Custom header image script. * * This file is deprecated, use 'wp-admin/includes/class-custom-image-header.php' instead. * * @deprecated 5.3.0 * @package WordPress * @subpackage Administration */

_deprecated_file( basename( __FILE__ ), '5.3.0', 'wp-admin/includes/class-custom-image-header.php' );

/** Custom_Image_Header class */
require_once ABSPATH . 'wp-admin/includes/class-custom-image-header.php';
<?php /** * Feed API * * @package WordPress * @subpackage Feed * @deprecated 4.7.0 */

_deprecated_file( basename( __FILE__ ), '4.7.0', 'fetch_feed()' );

if ( ! class_exists( 'SimplePie', false ) ) {
    require_once ABSPATH . WPINC . '/class-simplepie.php';
}

require_once ABSPATH . WPINC . '/class-wp-feed-cache.php';
require_once ABSPATH . WPINC . '/class-wp-feed-cache-transient.php';
require_once ABSPATH . WPINC . '/class-wp-simplepie-file.php';
require_once ABSPATH . WPINC . '/class-wp-simplepie-sanitize-kses.php';
<?php /** * Custom background script. * * This file is deprecated, use 'wp-admin/includes/class-custom-background.php' instead. * * @deprecated 5.3.0 * @package WordPress * @subpackage Administration */

_deprecated_file( basename( __FILE__ ), '5.3.0', 'wp-admin/includes/class-custom-background.php' );

/** Custom_Background class */
require_once ABSPATH . 'wp-admin/includes/class-custom-background.php';
<?php /** * Administration Functions * * This file is deprecated, use 'wp-admin/includes/admin.php' instead. * * @deprecated 2.5.0 * @package WordPress * @subpackage Administration */

_deprecated_file( basename( __FILE__ ), '2.5.0', 'wp-admin/includes/admin.php' );

/** WordPress Administration API: Includes all Administration functions. */
require_once ABSPATH . 'wp-admin/includes/admin.php';
<?php /** * Feed API: WP_Feed_Cache class * * @package WordPress * @subpackage Feed * @since 4.7.0 * @deprecated 5.6.0 */

_deprecated_file(
    basename( __FILE__ ),
    '5.6.0',
    '',
    __( 'This file is only loaded for backward compatibility with SimplePie 1.2.x. Please consider switching to a recent SimplePie version.' )
);

/** * Core class used to implement a feed cache. * * @since 2.8.0 * * @see SimplePie_Cache */
<?php /** * Core class used for managing HTTP transports and making HTTP requests. * * This file is deprecated, use 'wp-includes/class-wp-http.php' instead. * * @deprecated 5.9.0 * @package WordPress */

_deprecated_file( basename( __FILE__ ), '5.9.0', WPINC . '/class-wp-http.php' );

/** WP_Http class */
require_once ABSPATH . WPINC . '/class-wp-http.php';


_deprecated_file( basename( __FILE__ ), '5.3.0', '', 'SPL can no longer be disabled as of PHP 5.3.' );
Home | Imprint | This part of the site doesn't use cookies.