当サイトで配布している以下の子テーマ、プラグインについてPHP8.1でWarningが出ることへの対応方法です。
対応が必要なのは以下の子テーマ・プラグインです。
- Twenty Twenty-Twoの子テーマ
- Twenty Twenty-Threeの子テーマ
- HA Alt Childthemeプラグイン
各子テーマ・プラグインとも1か所から数か所の変更で対応できますので、手動で更新を行ってください。
各配布ページでは対応を行った最新版をダウンロードできるようにしていますが、既にお使いの場合は、子テーマ・プラグインとも、そのまま最新版へ更新してしまうとカスタマイズした内容がすべて消失しますので、必ず手動で修正を行うようにしてください
Twenty Twenty-Twoの子テーマ
既にTT2の子テーマをお使いの方は、そのまま最新版へ更新すると、カスタマイズした内容が消失しますので、手動で以下の部分を変更ください。
「include-child」→「functions.php」の26行目付近にある以下の記述
function tt2_child_enqueue_admin_styles() {
を以下のように変更してください(赤字部分)
function tt2_child_enqueue_admin_styles($hook='null') {
Twenty Twenty-Threeの子テーマ
既にTT3の子テーマをお使いの方は、そのまま最新版へ更新すると、カスタマイズした内容が消失しますので、手動で以下の部分を変更ください。
「include-child」→「functions.php」の26行目付近にある以下の記述
function tt3_child_enqueue_admin_styles() {
を以下のように変更してください(赤字部分)
function tt3_child_enqueue_admin_styles($hook='null') {
HA Alt Childthemeプラグイン
既にプラグインをお使いの方は、そのまま最新版へ更新すると、カスタマイズした内容が消失しますので、手動で以下の部分を変更ください。
「ha-alt-chidtheme.php」の67行目付近にある以下の記述
function haac_enqueue_admin_custom_style(){
を以下のように変更してください(赤字部分)
function haac_enqueue_admin_custom_style($hook=''){
HA TT3 Theme Json Changerプラグイン
既にプラグインをお使いの方は、そのまま最新版へ更新すると、カスタマイズした内容が消失しますので、手動で以下の部分を変更ください。
1.「custom」→「change-setting.php」の6行目付近にある以下の記述
function hatt3tjc_change_theme_json_setting( $theme_json ) {
を以下のように変更してください(赤字部分)
function hatt3tjc_change_theme_json_setting( $theme_json , $schema ='' ) {
2.「custom」→「change-style.php」の6行目付近にある以下の記述
function hatt3tjc_change_theme_json_style( $theme_json ) {
を以下のように変更してください(赤字部分)
function hatt3tjc_change_theme_json_style( $theme_json , $schema ='' ) {
3.「custom」→「change-template.php」の6行目付近にある以下の記述
function hatt3tjc_change_theme_json_template( $theme_json ) {
を以下のように変更してください(赤字部分)
function hatt3tjc_change_theme_json_template( $theme_json , $schema ='' ) {
4.「custom」→「change-templateparts.php」の6行目付近にある以下の記述
function hatt3tjc_change_theme_json_templateparts( $theme_json ) {
を以下のように変更してください(赤字部分)
function hatt3tjc_change_theme_json_templateparts( $theme_json , $schema ='' ) {
HA TT2 Theme Json Changerプラグイン
既にプラグインをお使いの方は、そのまま最新版へ更新すると、カスタマイズした内容が消失しますので、手動で以下の部分を変更ください。
1.「custom」→「change-setting.php」の6行目付近にある以下の記述
function hatt2tjc_change_theme_json_setting( $theme_json ) {
を以下のように変更してください(赤字部分)
function hatt2tjc_change_theme_json_setting( $theme_json , $schema ='' ) {
2.「custom」→「change-style.php」の6行目付近にある以下の記述
function hatt2tjc_change_theme_json_style( $theme_json ) {
を以下のように変更してください(赤字部分)
function hatt2tjc_change_theme_json_style( $theme_json , $schema ='' ) {
3.「custom」→「change-template.php」の6行目付近にある以下の記述
function hatt2tjc_change_theme_json_template( $theme_json ) {
を以下のように変更してください(赤字部分)
function hatt2tjc_change_theme_json_template( $theme_json , $schema ='' ) {
4.「custom」→「change-templateparts.php」の6行目付近にある以下の記述
function hatt2tjc_change_theme_json_templateparts( $theme_json ) {
を以下のように変更してください(赤字部分)
function hatt2tjc_change_theme_json_templateparts( $theme_json , $schema ='' ) {
コメントを残す