説明
2003年に誕生したWordPress。その歴史の中には、廃止予定(deprecated)となっている関数がいくつも存在する。それらの関数をテーマやプラグインで使用するべきではないし、使用しているなら代替の関数に書き換えるべきである。ここでは廃止予定(一部は実質廃止済み)の関数は、基本的には/wp-includes/deprecated.phpに記載されている。
| 廃止予定の関数名 | 定義された バージョン | 廃止予定になった バージョン | 代替関数など |
|---|---|---|---|
| get_postdata | 0.71 | 1.5.1 | get_post |
| start_wp | 1.0.1 | 1.5 | - |
| the_category_ID | 0.71 | 0.71 | get_the_category |
| the_category_head | 0.71 | 0.71 | get_the_category_by_ID |
| previous_post | 1.5 | 2.0 | previous_post_link |
| next_post | 0.71 | 2.0 | next_post_link |
| user_can_create_post | 1.5 | 2.0 | current_user_can |
| user_can_create_draft | 1.5 | 2.0 | current_user_can |
| user_can_edit_post | 1.5 | 2.0 | current_user_can |
| user_can_delete_post | 1.5 | 2.0 | current_user_can |
| user_can_set_post_date | 1.5 | 2.0 | current_user_can |
| user_can_edit_post_date | 1.5 | 2.0 | current_user_can |
| user_can_edit_post_comments | 1.5 | 2.0 | current_user_can |
| user_can_delete_post_comments | 1.5 | 2.0 | current_user_can |
| user_can_edit_user | 1.5 | 2.0 | current_user_can |
| get_linksbyname | 0.71 | 2.1 | get_bookmarks |
| wp_get_linksbyname | 1.0.1 | 2.1 | wp_list_bookmarks |
| get_linkobjectsbyname | 1.0.1 | 2.1 | get_bookmarks |
| get_linkobjects | 1.0.1 | 2.1 | get_bookmarks |
| get_linksbyname_withrating | 0.71 | 2.1 | get_bookmarks |
| get_links_withrating | 0.71 | 2.1 | get_bookmarks |
| get_autotoggle | 0.71 | 2.1 | - |
| list_cats | 0.71 | 2.1 | wp_list_categories |
| wp_list_cats | 1.2 | 2.1 | wp_list_categories |
| dropdown_cats | 0.71 | 2.1 | wp_dropdown_categories |
| list_authors | 1.2 | 2.1 | wp_list_authors |
| wp_get_post_cats | 1.0.1 | 2.1 | wp_get_post_categories |
| wp_set_post_cats | 1.0.1 | 2.1 | wp_set_post_categories |
| get_archives | 0.71 | 2.1 | wp_get_archives |
| get_author_link | 1.2 | 2.1 | get_author_posts_url |
| link_pages | 0.71 | 2.1 | wp_link_pages |
| get_settings | 0.71 | 2.1 | get_option |
| permalink_link | 0.71 | 1.2 | the_permalink |
| permalink_single_rss | 0.71 | 2.3 | the_permalink_rss |
| wp_get_links | 1.0.1 | 2.1 | wp_list_bookmarks |
| get_links | 0.71 | 2.1 | get_bookmarks |
| get_links_list | 1.0.1 | 2.1 | wp_list_bookmarks |
| links_popup_script | 0.71 | 2.1 | - |
| get_linkrating | 1.0.1 | 2.1 | sanitize_bookmark_field |
| get_linkcatname | 0.71 | 2.1 | get_category |
| comments_rss_link | 1.0.1 | 2.5 | post_comments_feed_link |
| get_category_rss_link | 1.2 | 2.5 | get_category_feed_link |
| get_author_rss_link | 1.2 | 2.5 | get_author_feed_link |
| comments_rss | 1.5 | 2.2 | get_post_comments_feed_link |
| create_user | 2.0 | 2.0 | wp_create_user |
| gzip_compression | - | 2.5 | - |
| get_commentdata | 0.71 | 2.7 | get_comment |
| get_catname | 0.71 | 2.8 | get_cat_name |
| get_category_children | 1.2.0 | 2.8 | get_term_children |
| get_the_author_description | 1.5 | 2.8 | get_the_author_meta |
| the_author_description | 1.0.0 | 2.8 | the_author_meta |
| get_the_author_login | 1.5 | 2.8 | get_the_author_meta |
| the_author_login | 0.71 | 2.8 | the_author_meta |
| get_the_author_firstname | 1.5 | 2.8 | get_the_author_meta |
| the_author_firstname | 0.71 | 2.8 | the_author_meta |
| get_the_author_lastname | 1.5 | 2.8 | get_the_author_meta |
| the_author_lastname | 0.71 | 2.8 | the_author_meta |
| get_the_author_nickname | 1.5 | 2.8 | get_the_author_meta |
| the_author_nickname | 0.71 | 2.8 | the_author_meta |
| get_the_author_email | 1.5 | 2.8 | get_the_author_meta |
| the_author_email | 0.71 | 2.8 | the_author_meta |
| get_the_author_icq | 1.5 | 2.8 | get_the_author_meta |
| the_author_icq | 0.71 | 2.8 | the_author_meta |
| get_the_author_yim | 1.5 | 2.8 | get_the_author_meta |
| the_author_yim | 0.71 | 2.8 | the_author_meta |
| get_the_author_msn | 1.5 | 2.8 | get_the_author_meta |
| the_author_msn | 0.71 | 2.8 | the_author_meta |
| get_the_author_aim | 1.5 | 2.8 | get_the_author_meta |
| the_author_aim | 0.71 | 2.8 | the_author_meta |
| get_author_name | 1.0.0 | 2.8 | get_the_author_meta |
| get_the_author_url | 1.5 | 2.8 | get_the_author_meta |
| the_author_url | 0.71 | 2.8 | the_author_meta |
| get_the_author_ID | 1.5 | 2.8 | get_the_author_meta |
| the_author_ID | 0.71 | 2.8 | the_author_meta |
| the_content_rss | 0.71 | 2.9.0 | the_content_feed |
| make_url_footnote | 0.71 | 2.9.0 | - |
| _c | 2.2.0 | 2.9.0 | _x |
| translate_with_context | 2.5 | 3.0.0 | _x |
| _nc | 2.7.0 | 3.0.0 | _nx |
| __ngettext | 1.2.0 | 2.8.0 | _n |
| __ngettext_noop | 2.5 | 2.8.0 | _n_noop |
| get_alloptions | 1.0.0 | 3.0.0 | wp_load_alloptions |
| get_the_attachment_link | 2.0.0 | 2.5.0 | wp_get_attachment_link |
| get_attachment_icon_src | 2.1.0 | 2.5.0 | wp_get_attachment_image_src |
| get_attachment_icon | 2.0.0 | 2.5.0 | wp_get_attachment_image |
| get_attachment_innerHTML | 2.0.0 | 2.5.0 | wp_get_attachment_image |
| get_link | 2.0.0 | 2.1.0 | get_bookmark |
| 2.3.1 | 2.8.0 | ||
| clean_url | 1.2.0 | 3.0.0 | esc_url |
| js_escape | 2.0.4 | 2.8.0 | esc_js |
| wp_specialchars | - | 2.8.0 | esc_html |
| attribute_escape | 2.0.6 | 2.8.0 | esc_attr |
| register_sidebar_widget | 2.2.0 | 2.8.0 | wp_register_sidebar_widget |
| unregister_sidebar_widget | 2.2.0 | 2.8.0 | wp_unregister_sidebar_widget |
| register_widget_control | 2.2.0 | 2.8.0 | wp_register_widget_control |
| unregister_widget_control | 2.2.0 | 2.8.0 | wp_unregister_widget_control |
| delete_usermeta | 2.0.0 | 3.0.0 | delete_user_meta |
| get_usermeta | 2.0.0 | 3.0.0 | get_user_meta |
| update_usermeta | 2.0.0 | 3.0.0 | update_user_meta |
| get_users_of_blog | 2.2.0 | 3.1.0 | get_users |
| automatic_feed_links | 2.8.0 | 3.0.0 | add_theme_support |
| get_profile | 1.5.0 | 3.0.0 | get_the_author_meta |
| get_usernumposts | 0.71 | 3.0.0 | count_user_posts |
| is_taxonomy | 2.3.0 | 3.0.0 | taxonomy_exists |
| is_term | 2.3.0 | 3.0.0 | term_exists |
| is_plugin_page | 1.5.0 | 3.1 | - |
| update_category_cache | 1.5.0 | 3.1 | - |
| wp_timezone_supported | 2.9.0 | 3.2 | - |
| the_editor | 2.1.0 | 3.3.0 | wp_editor |
| get_user_metavalues | 3.0.0 | 3.3.0 | - |
| sanitize_user_object | 2.3.0 | 3.3.0 | - |
| get_boundary_post_rel_link | 2.8.0 | 3.3.0 | - |
| start_post_rel_link | 2.8.0 | 3.3.0 | - |
| get_index_rel_link | 2.8.0 | 3.3.0 | - |
| index_rel_link | 2.8.0 | 3.3.0 | - |
| get_parent_post_rel_link | 2.8.0 | 3.3.0 | - |
| parent_post_rel_link | 2.8.0 | 3.3.0 | - |
| wp_admin_bar_dashboard_view_site_menu | 3.2.0 | 3.3.0 | - |
| is_blog_user | MU | 3.3.0 | is_user_member_of_blog |
| debug_fopen | 0.71 | 3.4.0 | error_log |
| debug_fwrite | 0.71 | 3.4.0 | error_log |
| debug_fclose | 0.71 | 3.4.0 | error_log |
| get_themes | 1.5.0 | 3.4.0 | wp_get_themes |
| get_theme | 1.5.0 | 3.4.0 | wp_get_theme |
| get_current_theme | 1.5.0 | 3.4.0 | wp_get_theme |
| get_theme_data | 1.5.0 | 3.4.0 | wp_get_theme |
| clean_pre | 1.2.0 | 3.4.0 | - |
| add_custom_image_header | 2.1.0 | 3.4.0 | add_theme_support |
| remove_custom_image_header | 3.1.0 | 3.4.0 | remove_theme_support |
| add_custom_background | 3.0.0 | 3.4.0 | add_theme_support |
| remove_custom_background | 3.1.0 | 3.4.0 | remove_theme_support |
| update_page_cache | 1.5.1 | 3.4.0 | update_post_cache |
| clean_page_cache | 2.0.0 | 3.4.0 | clean_post_cache |
| wp_explain_nonce | 2.0.4 | 3.4.1 | wp_nonce_ays |
| sticky_class | 2.7.0 | 3.5.0 | post_class |
| wp_load_image | 2.1.0 | 3.5.0 | wp_get_image_editor |
| image_resize | 2.5.0 | 3.5.0 | wp_get_image_editor |
| wp_get_single_post | 1.0.0 | 3.5.0 | get_post |
| user_pass_ok | 0.71 | 3.5.0 | wp_authenticate |
| gd_edit_image_support | 0.71 | 2.9.0 | wp_image_editor_supports |
| gd_edit_image_support | 0.71 | 2.9.0 | wp_image_editor_supports |
| get_page | 0.71 | 3.5.1 | get_post |
| wp_convert_bytes_to_hr | 2.3.0 | 3.6.0 | size_format |
| rich_edit_exists | 2.1.0 | 3.9.0 | - |
| format_to_post | 0.71 | 3.9.0 | - |
| get_all_category_ids | 2.0.0 | 4.0.0 | get_terms |
| like_escape | 2.5.0 | 4.0.0 | wpdb::esc_like |
| url_is_accessable_via_ssl | 2.5.0 | 4.0.0 | - |
| preview_theme | 2.6.0 | 4.3.0 | - |
| wp_richedit_pre | 2.0.0 | 4.3.0 | format_for_editor |
| wp_htmledit_pre | 2.5.0 | 4.3.0 | format_for_editor |
| post_permalink | 1.0.0 | 4.4.0 | get_permalink |
| wp_get_http | 2.5.0 | 4.4.0 | WP_Httpクラス |
| force_ssl_login | 2.6.0 | 4.4.0 | force_ssl_admin |
| get_comments_popup_template | 1.5.0 | 4.5.0 | - |
| is_comments_popup | 1.5.0 | 4.5.0 | - |
| comments_popup_script | 1.5.0 | 4.5.0 | - |
| popuplinks | 1.5.0 | 4.5.0 | - |
| get_paged_template | 1.5.0 | 4.7.0 | - |
| wp_kses_js_entities | 1.0.0 | 4.7.0 | - |
| get_shortcut_link | 2.6.0 | 4.9.0 | - |
| wp_ajax_press_this_save_post | 4.2.0 | 4.9.0 | - |
| wp_ajax_press_this_add_category | 4.2.0 | 4.9.0 | - |
| readonly | 4.9.0 | 5.9.0 | wp_readonly |
| wp_add_iframed_editor_assets_html | 5.8.0 | 6.0.0 | - |
| get_page_by_title | 2.1.0 | 6.2.0 | WP_Query |
| wlwmanifest_link | 2.3.1 | 6.3.0 | - |
| wp_queue_comments_for_comment_meta_lazyload | 4.5.0 | 6.3.0 | wp_lazyload_comment_meta |
| wp_get_loading_attr_default | 5.9.0 | 6.3.0 | wp_get_loading_optimization_attributes |
| wp_img_tag_add_loading_attr | 5.5.0 | 6.3.0 | wp_img_tag_add_loading_optimization_attrs |
| wp_get_global_styles_svg_filters | 5.9.1 | 6.3.0 | - |
| wp_global_styles_render_svg_filters | 5.9.1 | 6.3.0 | - |
| block_core_navigation_submenu_build_css_colors | 5.9.0 | 6.3.0 | - |
| print_embed_styles | 4.4.0 | 6.4.0 | wp_enqueue_embed_styles |
| print_emoji_styles | 4.2.0 | 6.4.0 | wp_enqueue_emoji_styles |
| wp_admin_bar_header | 3.1.0 | 6.4.0 | wp_enqueue_admin_bar_header_styles |
| wp_update_https_detection_errors | 5.7.0 | 6.4.0 | - |
| wp_img_tag_add_decoding_attr | 6.1.0 | 6.4.0 | wp_img_tag_add_loading_optimization_attrs |
| block_core_query_ensure_interactivity_dependency | 6.4.0 | 6.5.0 | wp_register_script_module |
| block_core_file_ensure_interactivity_dependency | 6.4.0 | 6.5.0 | wp_register_script_module |
| block_core_image_ensure_interactivity_dependency | 6.4.0 | 6.5.0 | wp_register_script_module |
| wp_interactivity_process_directives_of_interactive_blocks | 6.5.0 | 6.6.0 | - |
| wp_get_global_styles_custom_css | 6.2.0 | 6.7.0 | wp_get_global_stylesheet |
| wp_enqueue_global_styles_custom_css | 6.2.0 | 6.7.0 | wp_enqueue_global_styles |
| wp_create_block_style_variation_instance_name | 6.6.0 | 6.7.0 | wp_unique_id |
| current_user_can_for_blog | 3.0.0 | 6.7.0 | current_user_can_for_site |
sanitize_url関数は2.8.0で非推奨になったが、5.9.0で復活した。
すでに100以上の関数が廃止予定になっています。自身が使っているテーマや自作したプラグインなどで使っていないか確認が必要ですね。
ソースファイル
/wp-includes/deprecated.php最終更新 : 2024年11月14日 15:52
関連
お勧め
wp_update_user_counts(2022年6月1日 更新)
bool wp_update_user_count( int $network_id = null )
ユーザー数を更新する。
wp_hash(2025年4月17日 更新)
string wp_hash( string $data [ , string $scheme = 'auth' [ , string $algo = 'md5' ] ] )
ハッシュを生成する。
wp_count_attachments(2013年10月31日 更新)
object wp_count_attachments( [ string $mime_type = '' ] )
添付ファイル数を取得する。
locate_block_template(2021年7月26日 更新)
string locate_block_template( string $template, string $type, array $templates )
ブロックテンプレートを探す。
load_child_theme_textdomain(2018年5月27日 更新)
bool load_child_theme_textdomain( string $domain [ , mixed $path = false ] )
子テーマ用の国際化用ファイル(MOファイル)をロードする。