From 60192377db61fe786a13f0fc9cf92477072a0a6d Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 12 Jun 2021 12:06:01 +0900 Subject: [PATCH] =?UTF-8?q?WP=20PLUGIN=20MTEE(Meta=20Tag=20etc=20Extend)?= =?UTF-8?q?=20=E8=A1=A8=E7=A4=BA=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・設定項目毎のタブを分割 ・トップページのmeta keywordsを復活 --- class/mtee.php | 11 -- template/index.php | 293 +++++------------------------ template/pages_canonical.php | 42 +++++ template/pages_noindexnofollow.php | 74 ++++++++ template/pages_ogp.php | 81 ++++++++ template/pages_other.php | 225 ++++++++++++++++++++++ 6 files changed, 466 insertions(+), 260 deletions(-) create mode 100644 template/pages_canonical.php create mode 100644 template/pages_noindexnofollow.php create mode 100644 template/pages_ogp.php create mode 100644 template/pages_other.php diff --git a/class/mtee.php b/class/mtee.php index adb49fd..54cce1d 100644 --- a/class/mtee.php +++ b/class/mtee.php @@ -39,17 +39,6 @@ if (!class_exists('MTEE')) { require_once MTEE_TEMPLATE_DIR . 'index.php'; } - public function pages_setting() { - //$_POST['_mtee'])があったら保存 - if (isset($_POST['_mtee'])) { - check_admin_referer('check_options'); - $opt = $_POST['_mtee']; - update_option('_mtee', $opt); - require_once MTEE_TEMPLATE_DIR . 'success.php'; - } - require_once MTEE_TEMPLATE_DIR . 'pages.php'; - } - public static function register_target(): array { $custom_posts = get_post_types(array('public' => true, '_builtin' => false)); $taxonomies = get_taxonomies(array('public' => true, '_builtin' => false)); diff --git a/template/index.php b/template/index.php index 3345873..00371c9 100644 --- a/template/index.php +++ b/template/index.php @@ -14,34 +14,26 @@ $rss_disabled = $this->get_key_setting('rss_disabled');

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

-

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

+

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

-

OGP出力

-
-

meta keywords テンプレート設定 - is_enable('enabled')): ?> - ※現在無効です - -

+

meta keywords テンプレート設定

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

get_key_setting('rss_disabled');
-

meta description テンプレート設定 - is_enable('enabled')): ?> - ※現在無効です -

+

meta description テンプレート設定

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

get_key_setting('rss_disabled');
  • ##title##:投稿、ページ、カテゴリー等のタイトル
  • -
    -

    個別設定 NOINDEX/NOFOLLOW

    + +

    +
    +
    +
    +

    OGP

    +
    + +

    +
    +
    +

    noindex/nofollow

    + + +
    +
    +
    +

    Canonical URL 出力

    +
    + +

    +
    +
    +

    バージョン情報等

    RSS

    -
    -

    トップページ

    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    meta keywords - is_enable('enabled')): ?> - ※現在無効です - - -
    キーワードはカンマ(,)区切りで入力してください -
    meta description - is_enable('enabled')): ?> - ※現在無効です - - -
    noindex nofollow - is_enable('noindex_nofollow')): ?> - ※現在無効です - - -
    - - -
    -
    Canonical URL - is_enable('canonical_setting')): ?> - ※現在無効です - -
    OGP title - is_enable('enabled')): ?> - ※現在無効です - - -
    OGP description - is_enable('enabled')): ?> - ※現在無効です - - -
    OGP Image - - - -
    get_ogp_img('top_page'); ?>
    -
    -
    - 0): ?> -

    カスタム投稿アーカイブ

    - - - -
    -

    - label; ?> - () -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    meta keywords - is_enable('enabled')): ?> - ※現在無効です - -
    キーワードはカンマ(,)区切りで入力してください -
    meta description - is_enable('enabled')): ?> - ※現在無効です - -
    noindex nofollow - is_enable('noindex_nofollow')): ?> - ※現在無効です - -
    - - -
    -
    Canonical URL - is_enable('canonical_setting')): ?> - ※現在無効です - -
    OGP keywords - is_enable('enabled')): ?> - ※現在無効です - -
    OGP description - is_enable('enabled')): ?> - ※現在無効です - -
    OGP Image - - - -
    get_ogp_img('custom_post', $custom_post); ?>
    -
    -
    - - -

    - -
    \ No newline at end of file diff --git a/template/pages_canonical.php b/template/pages_canonical.php new file mode 100644 index 0000000..23d9367 --- /dev/null +++ b/template/pages_canonical.php @@ -0,0 +1,42 @@ +

    トップページ

    + +
    + + + + + +
    Canonical URL +
    +
    + 0): ?> +

    カスタム投稿アーカイブ

    + + + +
    +

    + label; ?> + () +

    + + + + + +
    Canonical URL +
    +
    + + + diff --git a/template/pages_noindexnofollow.php b/template/pages_noindexnofollow.php new file mode 100644 index 0000000..5d519eb --- /dev/null +++ b/template/pages_noindexnofollow.php @@ -0,0 +1,74 @@ +

    トップページ

    + +
    + + + + + +
    noindex nofollow +
    + + +
    +
    +
    + 0): ?> +

    カスタム投稿アーカイブ

    + + + +
    +

    + label; ?> + () +

    + + + + + +
    noindex nofollow +
    + + +
    +
    +
    + + +

    diff --git a/template/pages_ogp.php b/template/pages_ogp.php new file mode 100644 index 0000000..dbd3cfd --- /dev/null +++ b/template/pages_ogp.php @@ -0,0 +1,81 @@ +

    トップページ

    + +
    + + + + + + + + + + + + + +
    OGP title +
    OGP description +
    OGP Image + + + +
    get_ogp_img('top_page'); ?>
    +
    +
    + 0): ?> +

    カスタム投稿アーカイブ

    + + + +
    +

    + label; ?> + () +

    + + + + + + + + + + + + + +
    OGP title +
    OGP description +
    OGP Image + + + +
    get_ogp_img('custom_post', $custom_post); ?>
    +
    +
    + + + + diff --git a/template/pages_other.php b/template/pages_other.php new file mode 100644 index 0000000..97ef1cf --- /dev/null +++ b/template/pages_other.php @@ -0,0 +1,225 @@ +

    トップページ

    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    meta keywords + is_enable('enabled')): ?> + ※現在無効です + + +
    キーワードはカンマ(,)区切りで入力してください +
    meta description + is_enable('enabled')): ?> + ※現在無効です + + +
    noindex nofollow + is_enable('noindex_nofollow')): ?> + ※現在無効です + + +
    + + +
    +
    Canonical URL + is_enable('canonical_setting')): ?> + ※現在無効です + +
    OGP title + is_enable('enabled')): ?> + ※現在無効です + + +
    OGP description + is_enable('enabled')): ?> + ※現在無効です + + +
    OGP Image + + + +
    get_ogp_img('top_page'); ?>
    +
    +
    + 0): ?> +

    カスタム投稿アーカイブ

    + + + +
    +

    + label; ?> + () +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    meta keywords + is_enable('enabled')): ?> + ※現在無効です + +
    キーワードはカンマ(,)区切りで入力してください +
    meta description + is_enable('enabled')): ?> + ※現在無効です + +
    noindex nofollow + is_enable('noindex_nofollow')): ?> + ※現在無効です + +
    + + +
    +
    Canonical URL + is_enable('canonical_setting')): ?> + ※現在無効です + +
    OGP keywords + is_enable('enabled')): ?> + ※現在無効です + +
    OGP description + is_enable('enabled')): ?> + ※現在無効です + +
    OGP Image + + + +
    get_ogp_img('custom_post', $custom_post); ?>
    +
    +
    + + +

    + +