do_action_deprecated example

<?php     if ( 'category' === $taxonomy ) {
        /** * Fires before the Add Category form. * * @since 2.1.0 * @deprecated 3.0.0 Use {@see '{$taxonomy}_pre_add_form'} instead. * * @param object $arg Optional arguments cast to an object. */
        do_action_deprecated( 'add_category_form_pre', array( (object) array( 'parent' => 0 ) ), '3.0.0', '{$taxonomy}_pre_add_form' );
    } elseif ( 'link_category' === $taxonomy ) {
        /** * Fires before the link category form. * * @since 2.3.0 * @deprecated 3.0.0 Use {@see '{$taxonomy}_pre_add_form'} instead. * * @param object $arg Optional arguments cast to an object. */
        do_action_deprecated( 'add_link_category_form_pre', array( (object) array( 'parent' => 0 ) ), '3.0.0', '{$taxonomy}_pre_add_form' );
    } else {
        
// Back compat hooks. if ( 'category' === $taxonomy ) {
    /** * Fires before the Edit Category form. * * @since 2.1.0 * @deprecated 3.0.0 Use {@see '{$taxonomy}_pre_edit_form'} instead. * * @param WP_Term $tag Current category term object. */
    do_action_deprecated( 'edit_category_form_pre', array( $tag ), '3.0.0', '{$taxonomy}_pre_edit_form' );
} elseif ( 'link_category' === $taxonomy ) {
    /** * Fires before the Edit Link Category form. * * @since 2.3.0 * @deprecated 3.0.0 Use {@see '{$taxonomy}_pre_edit_form'} instead. * * @param WP_Term $tag Current link category term object. */
    do_action_deprecated( 'edit_link_category_form_pre', array( $tag ), '3.0.0', '{$taxonomy}_pre_edit_form' );
} else {
    
$wpdb->update( $wpdb->posts, array( 'guid' => get_permalink( $post->ID ) ), array( 'ID' => $post->ID ) );
        }

        /** * Fires when a post's status is transitioned from private to published. * * @since 1.5.0 * @deprecated 2.3.0 Use {@see 'private_to_publish'} instead. * * @param int $post_id Post ID. */
        do_action_deprecated( 'private_to_published', array( $post->ID ), '2.3.0', 'private_to_publish' );
    }

    // If published posts changed clear the lastpostmodified cache.     if ( 'publish' === $new_status || 'publish' === $old_status ) {
        foreach ( array( 'server', 'gmt', 'blog' ) as $timezone ) {
            wp_cache_delete( "lastpostmodified:$timezone", 'timeinfo' );
            wp_cache_delete( "lastpostdate:$timezone", 'timeinfo' );
            wp_cache_delete( "lastpostdate:$timezone:{$post->post_type}", 'timeinfo' );
        }
    }

    
/** * Fires before a new password is retrieved. * * Use the {@see 'retrieve_password'} hook instead. * * @since 1.5.0 * @deprecated 1.5.1 Misspelled. Use {@see 'retrieve_password'} hook instead. * * @param string $user_login The user login name. */
    do_action_deprecated( 'retreive_password', array( $user->user_login ), '1.5.1', 'retrieve_password' );

    /** * Fires before a new password is retrieved. * * @since 1.5.1 * * @param string $user_login The user login name. */
    do_action( 'retrieve_password', $user->user_login );

    $password_reset_allowed = wp_is_password_reset_allowed_for_user( $user );
    

    }

    /** * Fires in the middle of built-in meta box registration. * * @since 2.1.0 * @deprecated 3.7.0 Use {@see 'add_meta_boxes'} instead. * * @param WP_Post $post Post object. */
    do_action_deprecated( 'dbx_post_advanced', array( $post ), '3.7.0', 'add_meta_boxes' );

    /* * Allow the Discussion meta box to show up if the post type supports comments, * or if comments or pings are open. */
    if ( comments_open( $post ) || pings_open( $post ) || post_type_supports( $post_type, 'comments' ) ) {
        add_meta_box( 'commentstatusdiv', __( 'Discussion' ), 'post_comment_status_meta_box', null, 'normal', 'core', array( '__back_compat_meta_box' => true ) );
    }

    $stati = get_post_stati( array( 'public' => true ) );
    if ( empty( $stati ) ) {
        

        do_action_deprecated(
            'wpmu_new_blog',
            array( $new_site->id, $user_id$new_site->domain, $new_site->path, $new_site->network_id, $meta ),
            '5.1.0',
            'wp_initialize_site'
        );
    }

    return (int) $new_site->id;
}

/** * Updates a site in the database. * * @since 5.1.0 * * @global wpdb $wpdb WordPress database abstraction object. * * @param int $site_id ID of the site that should be updated. * @param array $data Site data to update. See {@see wp_insert_site()} for the list of supported keys. * @return int|WP_Error The updated site's ID on success, or error object on failure. */
$upload_path = trim( get_option( 'upload_path' ) );

    // If ms_files_rewriting is enabled and upload_path is empty, wp_upload_dir is not reliable.     if ( $drop && get_site_option( 'ms_files_rewriting' ) && empty( $upload_path ) ) {
        $drop = false;
    }

    if ( $drop ) {
        wp_delete_site( $blog_id );
    } else {
        /** This action is documented in wp-includes/ms-blogs.php */
        do_action_deprecated( 'delete_blog', array( $blog_id, false ), '5.1.0' );

        $users = get_users(
            array(
                'blog_id' => $blog_id,
                'fields'  => 'ids',
            )
        );

        // Remove users from this blog.         if ( ! empty( $users ) ) {
            foreach ( $users as $user_id ) {
                

    do_action_deprecated(
        'wp_blacklist_check',
        array( $author$email$url$comment$user_ip$user_agent ),
        '5.5.0',
        'wp_check_comment_disallowed_list',
        __( 'Please consider writing more inclusive code.' )
    );

    /** * Fires before the comment is tested for disallowed characters or words. * * @since 5.5.0 * * @param string $author Comment author. * @param string $email Comment author's email. * @param string $url Comment author's URL. * @param string $comment Comment content. * @param string $user_ip Comment author's IP address. * @param string $user_agent Comment author's browser user agent. */
Home | Imprint | This part of the site doesn't use cookies.