Skip to content

Commit

Permalink
[ 不具合修正 ][ タイトルタグ書き換え ] カスタム投稿タイプで入力欄が表示されない不具合を修正 #915
Browse files Browse the repository at this point in the history
  • Loading branch information
kurudrive committed Feb 2, 2023
1 parent 72fb5cb commit 17de101
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
12 changes: 11 additions & 1 deletion admin/class-veu-metabox.php
Expand Up @@ -2,6 +2,16 @@

class VEU_Metabox {

/**
* @var array {
* slug : string
* cf_name : string
* title : string
* priority : int
* individual : bool
* poat_types : array
* } $args
*/
public $args;
public $veu_get_common_options;

Expand Down Expand Up @@ -52,7 +62,7 @@ public function __construct( $args = array() ) {

public function add_sub_parent_metabox_insert_items() {
// 子ページリストやサイトマップなど「挿入アイテムの設定」を読み込むための子metaboxを読み込む
require_once( dirname( __FILE__ ) . '/class-veu-metabox-insert-items.php' );
require_once dirname( __FILE__ ) . '/class-veu-metabox-insert-items.php';
}


Expand Down
16 changes: 14 additions & 2 deletions inc/wp-title/config.php
Expand Up @@ -5,5 +5,17 @@
* @package WP Title
*/
require dirname( __FILE__ ) . '/package/wp-title.php';
require dirname( __FILE__ ) . '/package/class-veu-metabox-head-title.php';
$VEU_Metabox_Head_Title = new VEU_Metabox_Head_Title();
/*
VEU_Metabox 内の get_post_type が実行タイミングによっては
カスタム投稿タイプマネージャーで作成した投稿タイプが取得できず、
カスタム投稿タイプの投稿の編集画面で設定欄が表示されないために
admin_menu のタイミングで読み込んでいる
*/
add_action(
'admin_menu',
function() {
require_once dirname( __FILE__ ) . '/package/class-veu-metabox-head-title.php';
$VEU_Metabox_Head_Title = new VEU_Metabox_Head_Title();
}
);

0 comments on commit 17de101

Please sign in to comment.