_deprecated_function example


    public function find_base_dir( $base = '.', $verbose = false ) {
        _deprecated_function( __FUNCTION__, '2.7.0', 'WP_Filesystem_Base::abspath() or WP_Filesystem_Base::wp_*_dir()' );
        $this->verbose = $verbose;
        return $this->abspath();
    }

    /** * Locates a folder on the remote filesystem. * * @since 2.5.0 * @deprecated 2.7.0 use WP_Filesystem_Base::abspath() or WP_Filesystem_Base::wp_*_dir() methods instead. * @see WP_Filesystem_Base::abspath() * @see WP_Filesystem_Base::wp_content_dir() * @see WP_Filesystem_Base::wp_plugins_dir() * @see WP_Filesystem_Base::wp_themes_dir() * @see WP_Filesystem_Base::wp_lang_dir() * * @param string $base Optional. The folder to start searching from. Default '.'. * @param bool $verbose Optional. True to display debug information. Default false. * @return string The location of the remote path. */

function set_current_user($id$name = '') {
    _deprecated_function( __FUNCTION__, '3.0.0', 'wp_set_current_user()' );
    return wp_set_current_user($id$name);
}
endif;

if ( !function_exists('get_currentuserinfo') ) :
/** * Populate global variables with information about the currently logged in user. * * @since 0.71 * @deprecated 4.5.0 Use wp_get_current_user() * @see wp_get_current_user() * * @return bool|WP_User False on XMLRPC Request and invalid auth cookie, WP_User instance otherwise. */

}

/** * Displays a list of post custom fields. * * @since 1.2.0 * * @deprecated 6.0.2 Use get_post_meta() to retrieve post meta and render manually. */
function the_meta() {
    _deprecated_function( __FUNCTION__, '6.0.2', 'get_post_meta()' );
    $keys = get_post_custom_keys();
    if ( $keys ) {
        $li_html = '';
        foreach ( (array) $keys as $key ) {
            $keyt = trim( $key );
            if ( is_protected_meta( $keyt, 'post' ) ) {
                continue;
            }

            $values = array_map( 'trim', get_post_custom_values( $key ) );
            $value  = implode( ', ', $values );

            

function readonly( $readonly_value$current = true, $display = true ) {
    _deprecated_function( __FUNCTION__, '5.9.0', 'wp_readonly()' );
    return wp_readonly( $readonly_value$current$display );
}

    public function __construct( WP_Customize_Manager $manager$id, array $args = array() ) {
        _deprecated_function( __METHOD__, '4.9.0' );
        parent::__construct( $manager$id$args );
    }

    /** * Render the section, and the controls that have been added to it. * * @since 4.3.0 * @deprecated 4.9.0 */
    protected function render() {
        _deprecated_function( __METHOD__, '4.9.0' );
        

    public function print_scripts_l10n( $handle$display = true ) {
        _deprecated_function( __FUNCTION__, '3.3.0', 'WP_Scripts::print_extra_script()' );
        return $this->print_extra_script( $handle$display );
    }

    /** * Prints extra scripts of a registered script. * * @since 3.3.0 * * @param string $handle The script's registered handle. * @param bool $display Optional. Whether to print the extra script * instead of just returning it. Default true. * @return bool|string|void Void if no data exists, extra scripts if `$display` is true, * true otherwise. */
/** * Used as a wrapper for PHP's parse_url() function that handles edgecases in < PHP 5.4.7. * * @deprecated 4.4.0 Use wp_parse_url() * @see wp_parse_url() * * @param string $url The URL to parse. * @return bool|array False on failure; Array of URL components on success; * See parse_url()'s return values. */
    protected static function parse_url( $url ) {
        _deprecated_function( __METHOD__, '4.4.0', 'wp_parse_url()' );
        return wp_parse_url( $url );
    }

    /** * Converts a relative URL to an absolute URL relative to a given URL. * * If an Absolute URL is provided, no processing of that URL is done. * * @since 3.4.0 * * @param string $maybe_relative_path The URL which might be relative. * @param string $url The URL which $maybe_relative_path is relative to. * @return string An Absolute URL, in a failure condition where the URL cannot be parsed, the relative URL will be returned. */

    public function _weak_escape( $data ) {
        if ( func_num_args() === 1 && function_exists( '_deprecated_function' ) ) {
            _deprecated_function( __METHOD__, '3.6.0', 'wpdb::prepare() or esc_sql()' );
        }
        return addslashes( $data );
    }

    /** * Real escape, using mysqli_real_escape_string() or mysql_real_escape_string(). * * @since 2.8.0 * * @see mysqli_real_escape_string() * @see mysql_real_escape_string() * * @param string $data String to escape. * @return string Escaped string. */
return Akismet::check_db_comment( $id$recheck_reason );
}

function akismet_rightnow() {
    if ( !class_exists( 'Akismet_Admin' ) )
        return false;
   
       return Akismet_Admin::rightnow_stats();
}

function akismet_admin_init() {
    _deprecated_function( __FUNCTION__, '3.0' );
}
function akismet_version_warning() {
    _deprecated_function( __FUNCTION__, '3.0' );
}
function akismet_load_js_and_css() {
    _deprecated_function( __FUNCTION__, '3.0' );
}
function akismet_nonce_field( $action = -1 ) {
    return wp_nonce_field( $action );
}
function akismet_plugin_action_links( $links$file ) {
    

    public function sanitize_theme_status( $statuses$request$parameter ) {
        _deprecated_function( __METHOD__, '5.7.0' );

        $statuses = wp_parse_slug_list( $statuses );

        foreach ( $statuses as $status ) {
            $result = rest_validate_request_arg( $status$request$parameter );

            if ( is_wp_error( $result ) ) {
                return $result;
            }
        }

        
/** * Get the "dashboard blog", the blog where users without a blog edit their profile data. * Dashboard blog functionality was removed in WordPress 3.1, replaced by the user admin. * * @since MU (3.0.0) * @deprecated 3.1.0 Use get_site() * @see get_site() * * @return WP_Site Current site object. */
function get_dashboard_blog() {
    _deprecated_function( __FUNCTION__, '3.1.0', 'get_site()' );
    if ( $blog = get_site_option( 'dashboard_blog' ) ) {
        return get_site( $blog );
    }

    return get_site( get_network()->site_id );
}

/** * Generates a random password. * * @since MU (3.0.0) * @deprecated 3.0.0 Use wp_generate_password() * @see wp_generate_password() * * @param int $len Optional. The length of password to generate. Default 8. */
/** * Sets up the object properties. * * The role key is set to the current prefix for the $wpdb object with * 'user_roles' appended. If the $wp_user_roles global is set, then it will * be used and the role option will not be updated or used. * * @since 2.1.0 * @deprecated 4.9.0 Use WP_Roles::for_site() */
    protected function _init() {
        _deprecated_function( __METHOD__, '4.9.0', 'WP_Roles::for_site()' );

        $this->for_site();
    }

    /** * Reinitializes the object. * * Recreates the role objects. This is typically called only by switch_to_blog() * after switching wpdb to a new site ID. * * @since 3.5.0 * @deprecated 4.7.0 Use WP_Roles::for_site() */

    protected function _init_caps( $cap_key = '' ) {
        global $wpdb;

        _deprecated_function( __METHOD__, '4.9.0', 'WP_User::for_site()' );

        if ( empty( $cap_key ) ) {
            $this->cap_key = $wpdb->get_blog_prefix( $this->site_id ) . 'capabilities';
        } else {
            $this->cap_key = $cap_key;
        }

        $this->caps = $this->get_caps_data();

        $this->get_role_caps();
    }

    
/** * logIO() - Writes logging info to a file. * * @deprecated 3.4.0 Use error_log() * @see error_log() * * @param string $io Whether input or output * @param string $msg Information describing logging reason. */
function logIO( $io$msg ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid     _deprecated_function( __FUNCTION__, '3.4.0', 'error_log()' );
    if ( ! empty( $GLOBALS['xmlrpc_logging'] ) ) {
        error_log( $io . ' - ' . $msg );
    }
}

    public static function get_filter_id_from_preset( $preset ) {
        _deprecated_function( __FUNCTION__, '6.3.0' );

        $filter_id = '';
        if ( isset( $preset['slug'] ) ) {
            $filter_id = self::get_filter_id( $preset['slug'] );
        }
        return $filter_id;
    }

    /** * Gets the SVG for the duotone filter definition from a preset. * * Exported for the deprecated function wp_get_duotone_filter_property(). * * @internal * * @since 6.3.0 * @deprecated 6.3.0 * * @param array $preset The duotone preset. * @return string The SVG for the filter definition. */
Home | Imprint | This part of the site doesn't use cookies.