WordPress5.9動作確認

カスタム投稿アーカイブのNoticeエラー修正
This commit is contained in:
2022-02-06 11:25:55 +09:00
parent 5fd91acb2e
commit 7b67bdf5f4
3 changed files with 12 additions and 4 deletions
+2 -1
View File
@@ -92,7 +92,8 @@ if ( ! class_exists( 'APOP_POST' ) ) {
}
$archive_settings = get_option( '_apop_custompost_archive_sort_type' );
if ( array_key_exists( $post_type, $archive_settings ) && $archive_settings[ $post_type ] == 2 ) {
if ( $archive_settings && array_key_exists( $post_type, $archive_settings )
&& $archive_settings[ $post_type ] == 2 ) {
foreach ( $this->order_param_keys as $order_param_key ) {
if ( isset( $param[ $post_type ][ $order_param_key ]['field']['meta_key'] ) &&
! empty( $param[ $post_type ][ $order_param_key ]['field']['meta_key'] ) ) {