Simplicityの特徴 › フォーラム › 要望・機能追加など › ウィジェットのPHP7.2対応
- このトピックには1件の返信、2人の参加者があり、最後ににより3年前に更新されました。
-
投稿者投稿
-
-
riscaゲスト
WordPress4.9がPHP7.2に対応とのことでPHP7.2を試してみたところ、
ウィジェットでDeprecated: Function create_function()が出ています。※debug:true
Deprecated: Function create_function() is deprecated in /var/www/html/wp-content/themes/simplicity2/lib/widgets/new-popular.php on line 243
Deprecated: Function create_function() is deprecated in /var/www/html/wp-content/themes/simplicity2/lib/widgets/new-entries.php on line 139
Deprecated: Function create_function() is deprecated in /var/www/html/wp-content/themes/simplicity2/lib/widgets/sns-follow-buttons.php on line 50
Deprecated: Function create_function() is deprecated in /var/www/html/wp-content/themes/simplicity2/lib/widgets/mobile-text.php on line 67
Deprecated: Function create_function() is deprecated in /var/www/html/wp-content/themes/simplicity2/lib/widgets/pc-text.php on line 68
Deprecated: Function create_function() is deprecated in /var/www/html/wp-content/themes/simplicity2/lib/widgets/mobile-ad.php on line 87
Deprecated: Function create_function() is deprecated in /var/www/html/wp-content/themes/simplicity2/lib/widgets/pc-ad.php on line 84
Deprecated: Function create_function() is deprecated in /var/www/html/wp-content/themes/simplicity2/lib/widgets/pc-double-ads.php on line 79
Deprecated: Function create_function() is deprecated in /var/www/html/wp-content/themes/simplicity2/lib/widgets/recent-comments.php on line 141
Deprecated: Function create_function() is deprecated in /var/www/html/wp-content/themes/simplicity2/lib/widgets/classic-text.php on line 61classic-text.phpで調べてみたところ、最終行のadd_actionを以下の通り修正することで特にトラブルなく解決しました。
※問題の記述
add_action(‘widgets_init’, create_function(”, ‘return register_widget(“SimplicityClassicTextWidget”);’));※修正案
add_action(‘widgets_init’, function(){register_widget(‘SimplicityClassicTextWidget’ );});以上、情報提供となります。
-
わいひらキーマスター
ご報告ありがとうございます。
手元のファイルは修正しました。
https://github.com/yhira/simplicity2/commit/a286fe7ef5bf7af6a75bea0e4084cda962adccbd
近日中にアップしておこうと思います。
-
-
投稿者投稿