diff --git a/class/mtee.php b/class/mtee.php index 8f6bd46..5dcf31a 100644 --- a/class/mtee.php +++ b/class/mtee.php @@ -93,7 +93,7 @@ if (!class_exists('MTEE')) { } } if (!empty($id)) { - return ''; + return ''; } } diff --git a/class/mtee_canonical_setting.php b/class/mtee_canonical_setting.php index f4d42bf..bedf5dc 100644 --- a/class/mtee_canonical_setting.php +++ b/class/mtee_canonical_setting.php @@ -124,8 +124,8 @@ placeholder="' . $this->set_default_post_canonical_url($post->ID) . '" /> if (isset($tag->term_id) && empty($canonical_url)) { $placeholder = $this->set_default_tax_canonical_url($tag->term_id, $tag->taxonomy); } - $add_meta = ''; + $add_meta = ''; return str_replace('##CONTENTS##', $add_meta, $form); } diff --git a/class/mtee_meta_output_canonical.php b/class/mtee_meta_output_canonical.php index ef6fb58..a529fbf 100644 --- a/class/mtee_meta_output_canonical.php +++ b/class/mtee_meta_output_canonical.php @@ -63,7 +63,7 @@ if (!class_exists('mtee_meta_output_canonical')) { } if ($canonical) { - return '' . PHP_EOL; + return '' . PHP_EOL; } } diff --git a/class/mtee_meta_output_keydesc.php b/class/mtee_meta_output_keydesc.php index da9d976..de54c09 100644 --- a/class/mtee_meta_output_keydesc.php +++ b/class/mtee_meta_output_keydesc.php @@ -57,8 +57,8 @@ if (!class_exists('mtee_meta_output_keydesc')) { $type = 'custom_tax'; } $meta_data = array( - MTEE_CONFIG::MTEE_NAME_KEYWORDS => str_replace('、', ',', $this->post_output_get_meta_keywords($type)), - MTEE_CONFIG::MTEE_NAME_DESCRIPTION => $this->post_output_get_meta_desc($type), + MTEE_CONFIG::MTEE_NAME_KEYWORDS => esc_html(str_replace('、', ',', $this->post_output_get_meta_keywords($type))), + MTEE_CONFIG::MTEE_NAME_DESCRIPTION => esc_html($this->post_output_get_meta_desc($type)), ); return $this->create_meta_tags($meta_data); } @@ -82,8 +82,8 @@ if (!class_exists('mtee_meta_output_keydesc')) { public function create_default_keywords_description(): array { $this->description .= $this->create_default_description(); $meta_data = array( - MTEE_CONFIG::MTEE_NAME_KEYWORDS => implode(',', $this->create_default_keywords()), - MTEE_CONFIG::MTEE_NAME_DESCRIPTION => $this->description, + MTEE_CONFIG::MTEE_NAME_KEYWORDS => esc_html(implode(',', $this->create_default_keywords())), + MTEE_CONFIG::MTEE_NAME_DESCRIPTION => esc_html($this->description), ); return $this->create_meta_tags($meta_data); } diff --git a/class/mtee_meta_output_ogp.php b/class/mtee_meta_output_ogp.php index 5d66bd3..8f83d84 100644 --- a/class/mtee_meta_output_ogp.php +++ b/class/mtee_meta_output_ogp.php @@ -49,17 +49,17 @@ if (!class_exists('mtee_meta_output_ogp')) { public function set_ogp_tag() { - $tags = '' . PHP_EOL; - $tags .= '' . PHP_EOL; - $tags .= '' . PHP_EOL; - $tags .= '' . PHP_EOL; + $tags = '' . PHP_EOL; + $tags .= '' . PHP_EOL; + $tags .= '' . PHP_EOL; + $tags .= '' . PHP_EOL; if (!empty($this->ogp_img)) { - $tags .= '' . PHP_EOL; + $tags .= '' . PHP_EOL; } - $tags .= '' . PHP_EOL; + $tags .= '' . PHP_EOL; // $tags .= '' . PHP_EOL; // $tags .= '' . PHP_EOL; - $tags .= '' . "\n"; + $tags .= '' . "\n"; return $tags; } diff --git a/class/mtee_noindexnofolow_setting.php b/class/mtee_noindexnofolow_setting.php index 09f10e6..0ee3519 100644 --- a/class/mtee_noindexnofolow_setting.php +++ b/class/mtee_noindexnofolow_setting.php @@ -53,15 +53,15 @@ if (!class_exists('mtee_noindexnofolow_setting')) {
- - +
- - +
'; diff --git a/class/mtee_ogp_post_setting.php b/class/mtee_ogp_post_setting.php index 0d54c44..782e980 100644 --- a/class/mtee_ogp_post_setting.php +++ b/class/mtee_ogp_post_setting.php @@ -49,31 +49,31 @@ if (!class_exists('mtee_ogp_post_setting')) {
+name="' . esc_html(MTEE_CONFIG::MTEE_OGP_TITLE) . '" +value="' . esc_html(get_post_meta($post->ID, MTEE_CONFIG::MTEE_OGP_TITLE, true)) . '" +placeholder="' . esc_html($this->set_default_ogp_title()) . '"/>
+name="' . esc_html(MTEE_CONFIG::MTEE_OGP_DESC) . '" +value="' . esc_html(get_post_meta($post->ID, MTEE_CONFIG::MTEE_OGP_DESC, true)) . '" +placeholder="' . esc_html($this->set_default_ogp_desc()) . '"/>
- +
' . $this->set_ogp_thumb($post->ID) . '
'; } @@ -88,7 +88,7 @@ var ogp_img_name = ' . "'" . MTEE_CONFIG::MTEE_OGP_IMG . "'" . ' public function set_ogp_thumb($id): string { $ogp_thumb = get_post_meta($id, MTEE_CONFIG::MTEE_OGP_IMG, true); if (!empty($ogp_thumb)) { - return ''; + return ''; } return ''; } diff --git a/class/mtee_ogp_tax_setting.php b/class/mtee_ogp_tax_setting.php index 0fa1916..23d6718 100644 --- a/class/mtee_ogp_tax_setting.php +++ b/class/mtee_ogp_tax_setting.php @@ -50,26 +50,26 @@ if (!class_exists('mtee_ogp_tax_setting')) { echo '
OGP title
-
OGP description
-
image
- +
'; @@ -82,23 +82,23 @@ var ogp_img_name = ' . "'" . MTEE_CONFIG::MTEE_OGP_IMG . "'" . ' OGP - - - +
' . $this->set_ogp_thumb($tag->term_id) . '
@@ -135,7 +135,7 @@ var ogp_img_name = ' . "'" . MTEE_CONFIG::MTEE_OGP_IMG . "'" . ' public function set_ogp_thumb($id): string { $ogp_thumb = get_post_meta($id, MTEE_CONFIG::MTEE_OGP_IMG, true); if (!empty($ogp_thumb)) { - return ''; + return ''; } return ''; } diff --git a/class/mtee_post_setting.php b/class/mtee_post_setting.php index 68d7739..3a4454f 100644 --- a/class/mtee_post_setting.php +++ b/class/mtee_post_setting.php @@ -48,14 +48,14 @@ if (!class_exists('mtee_post_setting')) { global $post; echo '
-
+
'; echo ' -
+
'; } diff --git a/class/mtee_tax_setting.php b/class/mtee_tax_setting.php index 5671ebd..8e61391 100644 --- a/class/mtee_tax_setting.php +++ b/class/mtee_tax_setting.php @@ -45,16 +45,16 @@ if (!class_exists('mtee_tax_setting')) { echo '
meta keywords
-
meta description
-
'; @@ -67,14 +67,14 @@ class="tax-meta-field" /> meta keywords
meta description - - diff --git a/template/index.php b/template/index.php index a093630..5fc3e4b 100644 --- a/template/index.php +++ b/template/index.php @@ -1,15 +1,15 @@ get_key_setting('enabled'); -$noindex_nofollow = $this->get_key_setting('noindex_nofollow'); -$ogp_setting = $this->get_key_setting('ogp_setting'); -$canonical_setting = $this->get_key_setting('canonical_setting'); -$wp_ver_disabled = $this->get_key_setting('wp_ver_disabled'); -$asset_ver_disabled = $this->get_key_setting('asset_ver_disabled'); -$emoji_disabled = $this->get_key_setting('emoji_disabled'); -$rss_disabled = $this->get_key_setting('rss_disabled'); +//$mtee_set_nav = $_POST['mtee_set_nav'] ?? 'nav_metas'; +//$enabled = $this->get_key_setting('enabled'); +//$noindex_nofollow = $this->get_key_setting('noindex_nofollow'); +//$ogp_setting = $this->get_key_setting('ogp_setting'); +//$canonical_setting = $this->get_key_setting('canonical_setting'); +//$wp_ver_disabled = $this->get_key_setting('wp_ver_disabled'); +//$asset_ver_disabled = $this->get_key_setting('asset_ver_disabled'); +//$emoji_disabled = $this->get_key_setting('emoji_disabled'); +//$rss_disabled = $this->get_key_setting('rss_disabled'); ?>

meta keyword, description / バージョン情報 設定

@@ -24,55 +24,49 @@ $rss_disabled = $this->get_key_setting('rss_disabled');
- +

メタキーワード・ディスクリプション

meta keywords テンプレート設定

個別設定していない投稿やカテゴリー等は、このテンプレートを適用します。

- set_escape_str($opt, 'keywords_tmp', 'post'); - $page_meta_keywords_tmp = $this->set_escape_str($opt, 'keywords_tmp', 'page'); - $cat_meta_keywords_tmp = $this->set_escape_str($opt, 'keywords_tmp', 'category'); - $tag_meta_keywords_tmp = $this->set_escape_str($opt, 'keywords_tmp', 'tag'); - $tax_meta_keywords_tmp = $this->set_escape_str($opt, 'keywords_tmp', 'tax'); - ?>
投稿
ページ
カテゴリー
タグ
カスタム分類
@@ -96,36 +90,30 @@ $rss_disabled = $this->get_key_setting('rss_disabled');

meta description テンプレート設定

個別設定していない投稿やカテゴリー等は、このテンプレートを適用します。

- set_escape_str($opt, 'description_tmp', 'page'); - $cat_meta_desc_tmp = $this->set_escape_str($opt, 'description_tmp', 'category'); - $tag_meta_desc_tmp = $this->set_escape_str($opt, 'description_tmp', 'tag'); - $tax_meta_desc_tmp = $this->set_escape_str($opt, 'description_tmp', 'tax'); - ?>
ページ/投稿
カテゴリー
+ value="set_escape_str($opt, 'description_tmp', 'category'); ?>" + placeholder="##site_name##の##title##">
タグ
+ value="set_escape_str($opt, 'description_tmp', 'tag'); ?>" + placeholder="##site_name##の##title##">
カスタム分類
+ value="set_escape_str($opt, 'description_tmp', 'tax'); ?>" + placeholder="##site_name##の##title##">
    @@ -143,7 +131,7 @@ $rss_disabled = $this->get_key_setting('rss_disabled');
@@ -155,7 +143,7 @@ $rss_disabled = $this->get_key_setting('rss_disabled'); @@ -166,7 +154,7 @@ $rss_disabled = $this->get_key_setting('rss_disabled');
@@ -180,7 +168,7 @@ $rss_disabled = $this->get_key_setting('rss_disabled');
@@ -189,7 +177,7 @@ $rss_disabled = $this->get_key_setting('rss_disabled');
@@ -198,7 +186,7 @@ $rss_disabled = $this->get_key_setting('rss_disabled');
@@ -207,7 +195,7 @@ $rss_disabled = $this->get_key_setting('rss_disabled');
diff --git a/template/pages_canonical.php b/template/pages_canonical.php index f63153b..ad03e54 100644 --- a/template/pages_canonical.php +++ b/template/pages_canonical.php @@ -1,14 +1,11 @@

トップページ

-
@@ -17,9 +14,6 @@ $canonical_url = esc_html($opt['top_page']['canonical'] ?? ''); 0): ?>

カスタム投稿アーカイブ

-

@@ -31,7 +25,7 @@ $canonical_url = esc_html($opt['top_page']['canonical'] ?? '');

diff --git a/template/pages_meta.php b/template/pages_meta.php index dd14e82..1d2534b 100644 --- a/template/pages_meta.php +++ b/template/pages_meta.php @@ -1,21 +1,18 @@

トップページ

-
Canonical URL
Canonical URL
@@ -24,10 +21,6 @@ $description = esc_html($opt['top_page']['description'] ?? ''); 0): ?>

カスタム投稿アーカイブ

-

@@ -39,7 +32,8 @@ $description = esc_html($opt['top_page']['description'] ?? '');

@@ -47,7 +41,7 @@ $description = esc_html($opt['top_page']['description'] ?? ''); diff --git a/template/pages_ogp.php b/template/pages_ogp.php index 418de09..117a1c4 100644 --- a/template/pages_ogp.php +++ b/template/pages_ogp.php @@ -1,28 +1,24 @@

トップページ

-
meta keywords + value="" + placeholder="キーワード1,キーワード2,キーワード3">
キーワードはカンマ(,)区切りで入力してください
meta description
meta keywords + value="" + placeholder="キーワード1,キーワード2,キーワード3">
キーワードはカンマ(,)区切りで入力してください
meta description
OGP title + value="">
OGP description + value="">
OGP Image - +
get_ogp_img('top_page'); ?>
@@ -33,11 +29,6 @@ $ogp_img = esc_html($opt['top_page']['ogp_img'] ?? ''); 0): ?>

カスタム投稿アーカイブ

-

@@ -49,23 +40,23 @@ $ogp_img = esc_html($opt['top_page']['ogp_img'] ?? '');

OGP title + value="">
OGP description + value="">
OGP Image - + value=""/>
get_ogp_img('custom_post', $custom_post); ?>
@@ -76,6 +67,6 @@ $ogp_img = esc_html($opt['top_page']['ogp_img'] ?? '');