この記事は最後に更新してから1年以上経過しています。
説明
先週末にWordPress 5.2 Beta3(以降5.2Beta3)が公開され、正式リリースまであとわずか。ソースコードの変更点を見ていくと、wp-login.phpの中に非推奨となったフィルターが目に留まった。
フィルター名の変更
5.2Beta3のwp-login.phpでは'login_headertitle'フィルターが非推奨となり、その代わりに'login_headertext'フィルターが追加されている。気になったソースコードを一通り調べてみると、非推奨になっているフィルターがほかにも見つかった。
フィルター名 | 定義 | 非推奨 | 代替フィルター名 |
---|---|---|---|
auth_{$type}_{$subtype}_meta_{$meta_key} | 4.6.0 | 4.9.8 | auth_{$type}_meta_{$meta_key}_for_{$subtype} |
'htmledit_pre' | 4.3.0 | 'format_for_editor' | |
'richedit_pre' | 4.3.0 | 'format_for_editor' | |
'blog_details' | MU (3.0.0) | 4.7.0 | 'site_details' |
'rest_enabled' | 4.4.0 | 4.7.0 | 'rest_authentication_errors' |
'login_headertitle' | 2.1.0 | 5.2.0 | 'login_headertext' |
自身が使っているテーマや自作したプラグインなどでこれらのフィルターを使っている場合は、適当な段階で代替フィルターに書き換えるべきだろう。
最終更新 : 2019年04月24日 21:54
お勧め
wp_save_post_revision(2024年1月10日 更新)
int | WP_Error | void wp_save_post_revision( int $post_id )
現状の投稿のリビジョンを作成する。
get_the_author_posts_link(2019年8月21日 更新)
string get_the_author_posts_link( )
投稿者アーカイブページのリンクを取得する。
get_year_link(2012年2月2日 更新)
string get_year_link( mixed $year )
年アーカイブのURLを取得する。
register_taxonomy(2022年6月1日 更新)
WP_Taxonomy | WP_Error register_taxonomy( string $taxonomy, array | string $object_type, array | string $args = array() )
タクソノミーを登録する。
wp_add_object_terms(2013年8月6日 更新)
mixed wp_add_object_terms( int $object_id, mixed $terms, mixed $taxonomy )
投稿情報などにタクソノミーを追加する。