SEO SIMPLE PACK - Version 2.2.0

Version Description

Added canonical tag settings for each page.

Download this release

Release Info

Developer looswebstudio
Plugin Icon 128x128 SEO SIMPLE PACK
Version 2.2.0
Comparing to
See all releases

Code changes from version 2.1.1 to 2.2.0

class/data.php CHANGED
@@ -134,6 +134,7 @@ class SSP_Data {
134
  'home_title' => '%_site_title_% %_sep_% %_tagline_%',
135
  'home_desc' => '',
136
  'home_keyword' => '',
 
137
  'separator' => 'line',
138
  'webmaster_bing' => '',
139
  'webmaster_google' => '',
134
  'home_title' => '%_site_title_% %_sep_% %_tagline_%',
135
  'home_desc' => '',
136
  'home_keyword' => '',
137
+ 'reuse_keyword' => '1',
138
  'separator' => 'line',
139
  'webmaster_bing' => '',
140
  'webmaster_google' => '',
class/metabox.php CHANGED
@@ -16,6 +16,7 @@ class SSP_MetaBox {
16
  'title' => 'ssp_meta_title',
17
  'description' => 'ssp_meta_description',
18
  'keyword' => 'ssp_meta_keyword',
 
19
  'image' => 'ssp_meta_image',
20
  ];
21
 
@@ -26,6 +27,7 @@ class SSP_MetaBox {
26
  'robots' => 'ssp_meta_robots',
27
  'title' => 'ssp_meta_title',
28
  'description' => 'ssp_meta_description',
 
29
  'image' => 'ssp_meta_image',
30
  ];
31
 
@@ -103,6 +105,7 @@ class SSP_MetaBox {
103
  $val_title = get_post_meta( $post->ID, self::POST_META_KEYS['title'], true );
104
  $val_description = get_post_meta( $post->ID, self::POST_META_KEYS['description'], true );
105
  $val_keyword = get_post_meta( $post->ID, self::POST_META_KEYS['keyword'], true );
 
106
  $val_image = get_post_meta( $post->ID, self::POST_META_KEYS['image'], true );
107
 
108
  // 更新に伴う調節
@@ -144,7 +147,7 @@ class SSP_MetaBox {
144
  self::output_field( self::POST_META_KEYS['description'], [
145
  'title' => __( 'Description of this page', 'loos-ssp' ),
146
  'type' => 'textarea',
147
- 'desc' => __( 'If blank, a description tag will be automatically generated from the content.', 'loos-ssp' ),
148
  ], $val_description );
149
 
150
  // og:image
@@ -153,13 +156,19 @@ class SSP_MetaBox {
153
  'type' => 'media',
154
  ], $val_image );
155
 
 
 
 
 
 
 
156
  // keywords
157
  self::output_field( self::POST_META_KEYS['keyword'], [
158
  'title' => __( 'Keywords of this page', 'loos-ssp' ),
159
- 'desc' => sprintf(
160
- __( 'If blank, the "Keyword" setting of %s is used.', 'loos-ssp' ),
161
- '<a href="' . esc_url( $ssp_page_url ) . '" target="_blank">' . __( '"Basic settings"', 'loos-ssp' ) . '</a>'
162
- ),
163
  ], $val_keyword );
164
  ?>
165
  </div>
@@ -217,6 +226,7 @@ class SSP_MetaBox {
217
  $val_robots = get_term_meta( $term->term_id, self::TERM_META_KEYS['robots'], true );
218
  $val_title = get_term_meta( $term->term_id, self::TERM_META_KEYS['title'], true );
219
  $val_description = get_term_meta( $term->term_id, self::TERM_META_KEYS['description'], true );
 
220
  $val_image = get_term_meta( $term->term_id, self::TERM_META_KEYS['image'], true );
221
 
222
  // @codingStandardsIgnoreStart
@@ -256,6 +266,16 @@ class SSP_MetaBox {
256
  <?php self::textarea( self::TERM_META_KEYS['description'], $val_description ) ?>
257
  </td>
258
  </tr>
 
 
 
 
 
 
 
 
 
 
259
  <tr class="form-field">
260
  <th>
261
  <label for="<?=self::TERM_META_KEYS['image']?>">
16
  'title' => 'ssp_meta_title',
17
  'description' => 'ssp_meta_description',
18
  'keyword' => 'ssp_meta_keyword',
19
+ 'canonical' => 'ssp_meta_canonical',
20
  'image' => 'ssp_meta_image',
21
  ];
22
 
27
  'robots' => 'ssp_meta_robots',
28
  'title' => 'ssp_meta_title',
29
  'description' => 'ssp_meta_description',
30
+ 'canonical' => 'ssp_meta_canonical',
31
  'image' => 'ssp_meta_image',
32
  ];
33
 
105
  $val_title = get_post_meta( $post->ID, self::POST_META_KEYS['title'], true );
106
  $val_description = get_post_meta( $post->ID, self::POST_META_KEYS['description'], true );
107
  $val_keyword = get_post_meta( $post->ID, self::POST_META_KEYS['keyword'], true );
108
+ $val_canonical = get_post_meta( $post->ID, self::POST_META_KEYS['canonical'], true );
109
  $val_image = get_post_meta( $post->ID, self::POST_META_KEYS['image'], true );
110
 
111
  // 更新に伴う調節
147
  self::output_field( self::POST_META_KEYS['description'], [
148
  'title' => __( 'Description of this page', 'loos-ssp' ),
149
  'type' => 'textarea',
150
+ 'desc' => __( 'If blank, the description tag will be automatically generated from the content.', 'loos-ssp' ),
151
  ], $val_description );
152
 
153
  // og:image
156
  'type' => 'media',
157
  ], $val_image );
158
 
159
+ // canonical
160
+ self::output_field( self::POST_META_KEYS['canonical'], [
161
+ 'title' => __( '"canonical" URL of this page', 'loos-ssp' ),
162
+ 'desc' => __( 'If blank, the canonical tag will be automatically generated.', 'loos-ssp' ),
163
+ ], $val_canonical );
164
+
165
  // keywords
166
  self::output_field( self::POST_META_KEYS['keyword'], [
167
  'title' => __( 'Keywords of this page', 'loos-ssp' ),
168
+ // 'desc' => sprintf(
169
+ // __( 'If blank, the "Keyword" setting of %s is used.', 'loos-ssp' ),
170
+ // '<a href="' . esc_url( $ssp_page_url ) . '" target="_blank">' . __( '"Basic settings"', 'loos-ssp' ) . '</a>'
171
+ // ),
172
  ], $val_keyword );
173
  ?>
174
  </div>
226
  $val_robots = get_term_meta( $term->term_id, self::TERM_META_KEYS['robots'], true );
227
  $val_title = get_term_meta( $term->term_id, self::TERM_META_KEYS['title'], true );
228
  $val_description = get_term_meta( $term->term_id, self::TERM_META_KEYS['description'], true );
229
+ $val_canonical = get_term_meta( $term->term_id, self::TERM_META_KEYS['canonical'], true );
230
  $val_image = get_term_meta( $term->term_id, self::TERM_META_KEYS['image'], true );
231
 
232
  // @codingStandardsIgnoreStart
266
  <?php self::textarea( self::TERM_META_KEYS['description'], $val_description ) ?>
267
  </td>
268
  </tr>
269
+ <tr class="form-field">
270
+ <th>
271
+ <label for="<?=self::TERM_META_KEYS['canonical']?>">
272
+ <?=esc_html__( '"canonical" URL of this page', 'loos-ssp' )?>
273
+ </label>
274
+ </th>
275
+ <td>
276
+ <?php self::text_input( self::TERM_META_KEYS['canonical'], $val_canonical ) ?>
277
+ </td>
278
+ </tr>
279
  <tr class="form-field">
280
  <th>
281
  <label for="<?=self::TERM_META_KEYS['image']?>">
class/output.php CHANGED
@@ -386,18 +386,24 @@ class SSP_Output {
386
 
387
  $keyword = SSP_Data::$settings['home_keyword'];
388
 
389
- } elseif ( is_singular() || ( ! is_front_page() && is_home() ) ) {
 
 
 
 
 
 
 
 
 
390
 
391
- // メタボックスが入力されていれば上書きする
392
- $the_id = isset( self::$obj->ID ) ? self::$obj->ID : 0;
393
- $meta_keyword = get_post_meta( $the_id, SSP_MetaBox::POST_META_KEYS['keyword'], true );
394
- if ( $meta_keyword ) {
395
- $keyword = $meta_keyword;
396
  }
397
  }
398
 
399
  return apply_filters( 'ssp_output_keyword', $keyword );
400
-
401
  }
402
 
403
 
@@ -504,6 +510,8 @@ class SSP_Output {
504
  */
505
  private static function generate_canonical() {
506
 
 
 
507
  switch ( true ) {
508
 
509
  case is_front_page():
@@ -511,13 +519,23 @@ class SSP_Output {
511
  break;
512
 
513
  case is_singular():
514
- $canonical = get_permalink();
 
 
515
  break;
516
 
517
  case is_tax() || is_tag() || is_category():
518
- $term = self::$obj;
519
- $term_link = get_term_link( $term, $term->taxonomy );
520
- $canonical = ( is_wp_error( $term_link ) ) ? '' : $term_link;
 
 
 
 
 
 
 
 
521
  break;
522
 
523
  case is_post_type_archive():
@@ -550,10 +568,13 @@ class SSP_Output {
550
 
551
  default:
552
  // is_home() もここに来る。
553
- $canonical = get_permalink( get_queried_object_id() );
554
  break;
555
  }
556
 
 
 
 
 
557
  return apply_filters( 'ssp_output_canonical', $canonical );
558
  }
559
 
386
 
387
  $keyword = SSP_Data::$settings['home_keyword'];
388
 
389
+ } else {
390
+ if ( is_singular() || ( ! is_front_page() && is_home() ) ) {
391
+
392
+ // メタボックスが入力されていれば上書きする
393
+ $the_id = isset( self::$obj->ID ) ? self::$obj->ID : 0;
394
+ $meta_keyword = get_post_meta( $the_id, SSP_MetaBox::POST_META_KEYS['keyword'], true );
395
+ if ( $meta_keyword ) {
396
+ $keyword = $meta_keyword;
397
+ }
398
+ }
399
 
400
+ // キーワードが空の時、かつ、フロントと同じキーワードを出力する指定があれば
401
+ if ( ! $keyword && SSP_Data::$settings['reuse_keyword'] ) {
402
+ $keyword = SSP_Data::$settings['home_keyword'];
 
 
403
  }
404
  }
405
 
406
  return apply_filters( 'ssp_output_keyword', $keyword );
 
407
  }
408
 
409
 
510
  */
511
  private static function generate_canonical() {
512
 
513
+ $canonical = '';
514
+
515
  switch ( true ) {
516
 
517
  case is_front_page():
519
  break;
520
 
521
  case is_singular():
522
+ $the_id = isset( self::$obj->ID ) ? self::$obj->ID : 0;
523
+ $meta_canonical = get_post_meta( $the_id, SSP_MetaBox::POST_META_KEYS['canonical'], true );
524
+ $canonical = $meta_canonical ?? get_permalink();
525
  break;
526
 
527
  case is_tax() || is_tag() || is_category():
528
+ $term = self::$obj;
529
+ if ( ! isset( $term->term_id ) ) break;
530
+
531
+ $meta_canonical = get_term_meta( $term->term_id, SSP_MetaBox::TERM_META_KEYS['canonical'], true );
532
+ $canonical = $meta_canonical ?: get_term_link( $term, $term->taxonomy );
533
+
534
+ // get_term_link() がエラーだった場合
535
+ if ( is_wp_error( $canonical ) ) {
536
+ $canonical = '';
537
+ }
538
+
539
  break;
540
 
541
  case is_post_type_archive():
568
 
569
  default:
570
  // is_home() もここに来る。
 
571
  break;
572
  }
573
 
574
+ if ( empty( $canonical ) ) {
575
+ $canonical = get_permalink( get_queried_object_id() ) ?: '';
576
+ }
577
+
578
  return apply_filters( 'ssp_output_canonical', $canonical );
579
  }
580
 
class/trait/field.php CHANGED
@@ -55,6 +55,7 @@ trait Field {
55
  'preview' => false,
56
  'desc' => '',
57
  'choices' => [],
 
58
  'item' => '',
59
  ], $args );
60
 
@@ -71,16 +72,18 @@ trait Field {
71
 
72
  ?>
73
  <div class="ssp-field"<?=$add_data?>>
74
- <label for="<?=esc_attr( $name )?>" class="ssp-field__title">
75
- <?=esc_html( $args['title'] ) ?>
76
- </label>
 
 
77
  <div class="<?=esc_attr( trim( 'ssp-field__body ' . $args['class'] ) )?>">
78
  <div class="ssp_item ssp-field__item -<?=$args['type']?>">
79
  <?php
80
  if ( $args['item'] ) :
81
  echo $args['item'];
82
  else :
83
- self::the_setting_field( $name, $now_value, $args['type'], $args['choices'] );
84
  endif;
85
  ?>
86
  </div>
@@ -106,23 +109,29 @@ trait Field {
106
  /**
107
  * 設定フィールドを取得
108
  */
109
- public static function the_setting_field( $name, $now_value, $type, $choices ) {
 
 
110
 
111
  if ( 'text' === $type ) {
112
 
113
  self::text_input( $name, $now_value );
114
 
 
 
 
 
115
  } elseif ( 'switch' === $type ) {
116
 
117
  self::switch_box( $name, $now_value );
118
 
119
  } elseif ( 'select' === $type ) {
120
 
121
- self::select_box( $name, $now_value, $choices );
122
 
123
  } if ( 'radio_btn' === $type ) {
124
 
125
- self::radio_btns( $name, $now_value, $choices );
126
 
127
  } if ( 'media' === $type ) {
128
 
@@ -170,6 +179,20 @@ trait Field {
170
  }
171
 
172
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
173
  /**
174
  * select_box
175
  */
55
  'preview' => false,
56
  'desc' => '',
57
  'choices' => [],
58
+ 'label' => '',
59
  'item' => '',
60
  ], $args );
61
 
72
 
73
  ?>
74
  <div class="ssp-field"<?=$add_data?>>
75
+ <?php if ( $args['title'] ) : ?>
76
+ <label for="<?=esc_attr( $name )?>" class="ssp-field__title">
77
+ <?=esc_html( $args['title'] ) ?>
78
+ </label>
79
+ <?php endif; ?>
80
  <div class="<?=esc_attr( trim( 'ssp-field__body ' . $args['class'] ) )?>">
81
  <div class="ssp_item ssp-field__item -<?=$args['type']?>">
82
  <?php
83
  if ( $args['item'] ) :
84
  echo $args['item'];
85
  else :
86
+ self::the_setting_field( $name, $now_value, $args );
87
  endif;
88
  ?>
89
  </div>
109
  /**
110
  * 設定フィールドを取得
111
  */
112
+ public static function the_setting_field( $name, $now_value, $args ) {
113
+
114
+ $type = $args['type'];
115
 
116
  if ( 'text' === $type ) {
117
 
118
  self::text_input( $name, $now_value );
119
 
120
+ } elseif ( 'checkbox' === $type ) {
121
+
122
+ self::checkbox( $name, $now_value, $args['label'] );
123
+
124
  } elseif ( 'switch' === $type ) {
125
 
126
  self::switch_box( $name, $now_value );
127
 
128
  } elseif ( 'select' === $type ) {
129
 
130
+ self::select_box( $name, $now_value, $args['choices'] );
131
 
132
  } if ( 'radio_btn' === $type ) {
133
 
134
+ self::radio_btns( $name, $now_value, $args['choices'] );
135
 
136
  } if ( 'media' === $type ) {
137
 
179
  }
180
 
181
 
182
+ /**
183
+ * checkbox
184
+ */
185
+ public static function checkbox( $name, $is_checked, $label ) {
186
+ ?>
187
+ <label class="ssp_checkbox" for="<?=esc_attr( $name )?>">
188
+ <input type="hidden" name="<?=esc_attr( $name )?>" value="">
189
+ <input type="checkbox" name="<?=esc_attr( $name )?>" id="<?=esc_attr( $name )?>" value="1" <?php checked( $is_checked, '1' ); ?>>
190
+ <span><?=esc_html( $label )?></span>
191
+ </label>
192
+ <?php
193
+ }
194
+
195
+
196
  /**
197
  * select_box
198
  */
dist/css/ssp.css CHANGED
@@ -1 +1 @@
1
- .ssp-field+.ssp-field{margin-top:40px}.ssp-field[data-disable="1"]~.ssp-field{display:none}.ssp-field[data-active="0"]~.ssp-field{opacity:.5;pointer-events:none}.ssp-field input[type=text],.ssp-field textarea{width:100%;padding:4px 8px}.ssp-field .hide{display:none}.ssp-field code{margin:0;padding:2px 6px;font-size:inherit;font-style:normal;background:#eee}.ssp-field__body{padding:0 8px}.ssp-field__title{display:block;margin-bottom:16px;padding-left:8px;font-weight:700;font-size:14px;border-left:2px solid #87ab87}.ssp-field__desc{color:#666;font-size:13px;font-style:italic}.ssp-field__item.-radio_btn{display:flex;flex-wrap:wrap}.ssp-field__item.-radio_btn .ssp-field__radioInput{display:none}.ssp-field__item.-radio_btn .ssp-field__radioLabel{width:40px;height:40px;margin:4px;padding:0;line-height:34px;text-align:center;vertical-align:middle;background:#fcfcfc;border:1px solid #ccc;box-shadow:inset 0 0 2px #fff}.ssp-field__item.-radio_btn :checked+.ssp-field__radioLabel{border:2px solid #eba170}.ssp-helpButton{display:inline-block;width:24px;height:24px;margin-left:16px;padding:0;color:#fff!important;font-weight:700;font-size:12px;line-height:24px;text-align:center;text-decoration:none;vertical-align:middle;background:#556158;border-radius:50%;box-shadow:inset 0 0 4px hsla(0,0%,78.4%,.5);transition:transform .25s}.ssp-helpButton:hover{transform:scale(1.1)}.ssp-helpTable{width:100%;max-width:560px;margin:0 0 24px}.ssp-helpTable thead{background:#e3e4e3}.ssp-helpTable td,.ssp-helpTable th{padding:6px 8px;text-align:left}.ssp-field__preview{display:flex;flex-wrap:wrap;align-items:center;width:100%;padding:4px}.ssp-field__preview__label{margin-right:8px}.ssp-field__preview__content{display:inline-block;margin:0;padding:8px 12px;background:#ececec;border-radius:2px;box-shadow:inset 0 0 4px #ddd}.ssp-field__preview__content span{margin:0 2px;padding:4px 8px;color:#fff;font-size:13px;background:#87ab87;border-radius:4px}.ssp-page .nav-tab-wrapper{border-bottom:1px solid #ddd}.ssp-page .nav-tab{background:rgba(0,0,0,.05);border:none;border-radius:2px 2px 0 0;cursor:pointer}.ssp-page .nav-tab.act_,.ssp-page .nav-tab:hover{color:#000;background:#fdfdfd}.ssp-page .tab-contents{display:none;padding:16px}.ssp-page .tab-contents.act_{display:block}.ssp_switch_box{position:relative;display:inline-block;width:64px;height:28px;margin:0 8px}.ssp_switch_box input{display:none}.ssp_switch_box__slider{position:absolute;top:0;right:0;bottom:0;left:0;background-color:#ccc;cursor:pointer;transition:.4s}.ssp_switch_box__slider:before{position:absolute;right:4px;bottom:4px;width:20px;height:20px;background-color:#fff;transition:.4s;content:""}input:checked+.ssp_switch_box__slider{background-color:#2196f3}input:checked+.ssp_switch_box__slider:before{right:40px}.ssp_switch_box__slider.-round{border-radius:34px}.ssp_switch_box__slider.-round:before{border-radius:50%}.ssp-page{margin:0 20px 20px 0;padding:8px}.ssp-page,.ssp-page *{box-sizing:border-box}.ssp-page .ssp-page__savedMessage{margin:24px 0}h1.ssp-page__title{line-height:1.5}.ssp-page__section+.ssp-page__section{margin-top:48px}.ssp-page__section__title{position:relative;padding:8px 0 8px 16px;line-height:1.5;letter-spacing:.5px}.ssp-page__section__title:before{position:absolute;top:50%;left:0;z-index:-1;display:block;width:40px;height:40px;background-image:linear-gradient(-45deg,transparent 25%,#87ab87 0,#87ab87 50%,transparent 0,transparent 75%,#87ab87 0,#87ab87);background-size:6px 6px;border-radius:50%;transform:translateY(-50%);opacity:.4;content:""}.ssp-page__section__body{padding:24px;background:#fff;border-radius:3px;box-shadow:0 2px 4px rgba(0,0,0,.05),0 4px 4px -4px rgba(0,0,0,.1)}.ssp-page__note{padding-left:4px;font-style:italic}textarea[name=home_desc]{max-width:1000px;height:12em}[name=home_keyword]{max-width:1000px}.-webmaster input{max-width:800px}.-webmaster code b{margin:0 2px;padding:2px 4px;color:#fff;font-weight:400;font-size:.9em;background:#87ab87;border-radius:4px}@media screen and (min-width:768px){.ssp-page .ssp-field__body{display:flex;flex-wrap:wrap;justify-content:space-between}.ssp-page .ssp-field__item{width:40%}.ssp-page .ssp-field__desc{width:57%}.ssp-page .ssp-field__body.-wide .ssp-field__desc,.ssp-page .ssp-field__body.-wide .ssp-field__item{width:100%}}@media screen and (max-width:767px){.ssp-field__body{padding:0}}
1
+ .ssp-field+.ssp-field{margin-top:40px}.ssp-field[data-disable="1"]~.ssp-field{display:none}.ssp-field[data-active="0"]~.ssp-field{opacity:.5;pointer-events:none}.ssp-field input[type=text],.ssp-field textarea{width:100%;padding:4px 8px}.ssp-field .hide{display:none}.ssp-field code{margin:0;padding:2px 6px;font-size:inherit;font-style:normal;background:#eee}.ssp-field__body{padding:0 8px}.ssp-field__title{display:block;margin-bottom:16px;padding-left:8px;font-weight:700;font-size:14px;border-left:2px solid #87ab87}.ssp-field__desc{color:#666;font-size:13px;font-style:italic}.ssp-field__item.-radio_btn{display:flex;flex-wrap:wrap}.ssp-field__item.-radio_btn .ssp-field__radioInput{display:none}.ssp-field__item.-radio_btn .ssp-field__radioLabel{width:40px;height:40px;margin:4px;padding:0;line-height:34px;text-align:center;vertical-align:middle;background:#fcfcfc;border:1px solid #ccc;box-shadow:inset 0 0 2px #fff}.ssp-field__item.-radio_btn :checked+.ssp-field__radioLabel{border:2px solid #eba170}.ssp-helpButton{display:inline-block;width:24px;height:24px;margin-left:16px;padding:0;color:#fff!important;font-weight:700;font-size:12px;line-height:24px;text-align:center;text-decoration:none;vertical-align:middle;background:#556158;border-radius:50%;box-shadow:inset 0 0 4px hsla(0,0%,78.4%,.5);transition:transform .25s}.ssp-helpButton:hover{transform:scale(1.1)}.ssp-helpTable{width:100%;max-width:560px;margin:0 0 24px}.ssp-helpTable thead{background:#e3e4e3}.ssp-helpTable td,.ssp-helpTable th{padding:6px 8px;text-align:left}.ssp-field__preview{display:flex;flex-wrap:wrap;align-items:center;width:100%;padding:4px}.ssp-field__preview__label{margin-right:8px}.ssp-field__preview__content{display:inline-block;margin:0;padding:8px 12px;background:#ececec;border-radius:2px;box-shadow:inset 0 0 4px #ddd}.ssp-field__preview__content span{margin:0 2px;padding:4px 8px;color:#fff;font-size:13px;background:#87ab87;border-radius:4px}.ssp-page .nav-tab-wrapper{border-bottom:1px solid #ddd}.ssp-page .nav-tab{background:rgba(0,0,0,.05);border:none;border-radius:2px 2px 0 0;cursor:pointer}.ssp-page .nav-tab.act_,.ssp-page .nav-tab:hover{color:#000;background:#fdfdfd}.ssp-page .tab-contents{display:none;padding:16px}.ssp-page .tab-contents.act_{display:block}.ssp_switch_box{position:relative;display:inline-block;width:64px;height:28px;margin:0 8px}.ssp_switch_box input{display:none}.ssp_switch_box__slider{position:absolute;top:0;right:0;bottom:0;left:0;background-color:#ccc;cursor:pointer;transition:.4s}.ssp_switch_box__slider:before{position:absolute;right:4px;bottom:4px;width:20px;height:20px;background-color:#fff;transition:.4s;content:""}input:checked+.ssp_switch_box__slider{background-color:#2196f3}input:checked+.ssp_switch_box__slider:before{right:40px}.ssp_switch_box__slider.-round{border-radius:34px}.ssp_switch_box__slider.-round:before{border-radius:50%}.ssp-page{margin:0 20px 20px 0;padding:8px}.ssp-page,.ssp-page *{box-sizing:border-box}.ssp-page .ssp-page__savedMessage{margin:24px 0}h1.ssp-page__title{line-height:1.5}.ssp-page__section+.ssp-page__section{margin-top:48px}.ssp-page__section__title{position:relative;padding:8px 0 8px 16px;line-height:1.5;letter-spacing:.5px}.ssp-page__section__title:before{position:absolute;top:50%;left:0;z-index:-1;display:block;width:40px;height:40px;background-image:linear-gradient(-45deg,transparent 25%,#87ab87 0,#87ab87 50%,transparent 0,transparent 75%,#87ab87 0,#87ab87);background-size:6px 6px;border-radius:50%;transform:translateY(-50%);opacity:.4;content:""}.ssp-page__section__body{padding:24px;background:#fff;border-radius:3px;box-shadow:0 2px 4px rgba(0,0,0,.05),0 4px 4px -4px rgba(0,0,0,.1)}.ssp-page__note{padding-left:4px;font-style:italic}textarea[name=home_desc]{max-width:1000px;height:12em}[name=home_keyword]{max-width:1000px}.-webmaster input{max-width:800px}.-webmaster code b{margin:0 2px;padding:2px 4px;color:#fff;font-weight:400;font-size:.9em;background:#87ab87;border-radius:4px}@media screen and (min-width:768px){.ssp-page .ssp-field__body{display:flex;flex-wrap:wrap;justify-content:space-between}.ssp-page .ssp-field__item{width:40%}.ssp-page .ssp-field__desc{width:57%}.ssp-page .ssp-field__body.-wide .ssp-field__desc,.ssp-page .ssp-field__body.-wide .ssp-field__item{width:100%}.ssp-page .ssp-field__body.-mt-shorten{margin-top:-24px}}@media screen and (max-width:767px){.ssp-field__body{padding:0}}
inc/tab/top_basic.php CHANGED
@@ -63,6 +63,11 @@ self::output_section( __( 'Basic setting', 'loos-ssp' ), [
63
  'class' => '-wide',
64
  'desc' => '*' . __( 'If there are multiple, enter them separated by ",".', 'loos-ssp' ),
65
  ],
 
 
 
 
 
66
  ] );
67
 
68
  // 特殊ページ設定
63
  'class' => '-wide',
64
  'desc' => '*' . __( 'If there are multiple, enter them separated by ",".', 'loos-ssp' ),
65
  ],
66
+ 'reuse_keyword' => [
67
+ 'class' => '-mt-shorten',
68
+ 'type' => 'checkbox',
69
+ 'label' => __( 'Output the same keywords as above when the keywords setting of each post is empty', 'loos-ssp' ),
70
+ ],
71
  ] );
72
 
73
  // 特殊ページ設定
languages/loos-ssp-ja.mo CHANGED
Binary file
languages/loos-ssp-ja.po CHANGED
@@ -1,8 +1,8 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: SEO SIMPLE PACK\n"
4
- "POT-Creation-Date: 2020-12-22 16:36+0900\n"
5
- "PO-Revision-Date: 2020-12-22 16:36+0900\n"
6
  "Last-Translator: \n"
7
  "Language-Team: \n"
8
  "Language: ja\n"
@@ -102,11 +102,11 @@ msgstr "%sに反映されます。"
102
  msgid "This is the archive page for %s."
103
  msgstr "%sの記事一覧ページです。"
104
 
105
- #: class/data.php:174
106
  msgid "Page not found"
107
  msgstr "ページが見つかりませんでした"
108
 
109
- #: class/data.php:175
110
  msgid "Searched:"
111
  msgstr "検索結果:"
112
 
@@ -150,155 +150,155 @@ msgstr "設定を保存しました。"
150
  msgid "Hide this notification."
151
  msgstr "この通知を非表示にする。"
152
 
153
- #: class/metabox.php:45
154
  msgid "Keep default settings"
155
  msgstr "デフォルト設定のまま"
156
 
157
- #: class/metabox.php:46
158
  msgid "Index"
159
  msgstr "インデックスさせる"
160
 
161
- #: class/metabox.php:47
162
  msgid "Don't index"
163
  msgstr "インデックスさせない"
164
 
165
- #: class/metabox.php:48
166
  msgid "Don't follow links"
167
  msgstr "リンクを辿らせない"
168
 
169
- #: class/metabox.php:49
170
  msgid "Don't cache"
171
  msgstr "キャッシュさせない"
172
 
173
- #: class/metabox.php:86 class/metabox.php:226
174
  msgid "SEO SIMPLE PACK Settings"
175
  msgstr "SEO SIMPLE PACK 設定"
176
 
177
- #: class/metabox.php:125 class/metabox.php:232
178
  msgid "\"robots\" tag of this page"
179
  msgstr "このページの”robots”タグ"
180
 
181
- #: class/metabox.php:129
182
  #, php-format
183
  msgid "If you want to know the default settings, see %s."
184
  msgstr "デフォルト設定を確認したい場合、%s をご覧ください。"
185
 
186
- #: class/metabox.php:130
187
  msgid "\"Post page\" tab in \"General Settings\""
188
  msgstr "「一般設定」の「投稿ページ」タブ"
189
 
190
- #: class/metabox.php:136 class/metabox.php:242
191
  msgid "Title tag of this page"
192
  msgstr "このページのタイトルタグ"
193
 
194
- #: class/metabox.php:138
195
  #, php-format
196
  msgid "%s is available."
197
  msgstr "%s が使用可能です。"
198
 
199
- #: class/metabox.php:139
200
  msgid "Snippet tags"
201
  msgstr "スニペットタグ"
202
 
203
- #: class/metabox.php:145 class/metabox.php:252
204
  msgid "Description of this page"
205
  msgstr "このページのディスクリプション"
206
 
207
- #: class/metabox.php:147
208
  msgid ""
209
- "If blank, a description tag will be automatically generated from the content."
210
- msgstr "空白の場合、ディスクリプションタグがコンテンツから自動で生成されます。"
 
211
 
212
- #: class/metabox.php:152 class/metabox.php:262
213
  msgid "\"og:image\" of this page"
214
  msgstr "このページの”og:image”"
215
 
216
- #: class/metabox.php:158
217
- msgid "Keywords of this page"
218
- msgstr "このページのキーワード"
219
 
220
- #: class/metabox.php:160
221
- #, php-format
222
- msgid "If blank, the \"Keyword\" setting of %s is used."
223
- msgstr "空白の場合、%s の「キーワード」設定が使用されます。"
224
 
225
- #: class/metabox.php:161
226
- msgid "\"Basic settings\""
227
- msgstr "「基本設定」"
228
 
229
- #: class/trait/field.php:93
230
  msgid "Preview"
231
  msgstr "プレビュー"
232
 
233
- #: class/trait/field.php:98
234
  msgid "About available snippet tags"
235
  msgstr "使用可能なスニペットタグについて"
236
 
237
- #: class/trait/field.php:162
238
  msgid "Yes"
239
  msgstr "はい"
240
 
241
- #: class/trait/field.php:167
242
  msgid "No"
243
  msgstr "いいえ"
244
 
245
- #: class/trait/field.php:221
246
  msgid "No image has been set yet."
247
  msgstr "まだ画像が設定されていません。"
248
 
249
- #: class/trait/field.php:225
250
  msgid "Select image"
251
  msgstr "画像を選択"
252
 
253
- #: class/trait/field.php:228
254
  msgid "Delete image"
255
  msgstr "画像を削除"
256
 
257
- #: class/trait/field.php:245 inc/page_help.php:10
258
  msgid "Post title"
259
  msgstr "投稿のタイトル"
260
 
261
- #: class/trait/field.php:246 inc/page_help.php:11
262
  msgid "Category name"
263
  msgstr "カテゴリー名"
264
 
265
- #: class/trait/field.php:247 inc/page_help.php:12
266
  msgid "Tag name"
267
  msgstr "タグ名"
268
 
269
- #: class/trait/field.php:248 inc/page_help.php:13
270
  msgid "Term name"
271
  msgstr "ターム名"
272
 
273
- #: class/trait/field.php:249 inc/page_help.php:15
274
  msgid "Taxonomy name"
275
  msgstr "タクソノミー名"
276
 
277
- #: class/trait/field.php:250 inc/page_help.php:19
278
  msgid "Author name"
279
  msgstr "著者名"
280
 
281
- #: class/trait/field.php:251 inc/page_help.php:20
282
  msgid "Search word"
283
  msgstr "検索ワード"
284
 
285
- #: class/trait/field.php:252 inc/page_help.php:16
286
  msgid "Post type name"
287
  msgstr "投稿タイプ名"
288
 
289
- #: class/trait/field.php:253 inc/page_help.php:17
290
  msgid "Page content"
291
  msgstr "ページコンテンツ"
292
 
293
- #: class/trait/field.php:254 inc/tab/top_archive.php:34
294
  msgid "Date"
295
  msgstr "日付"
296
 
297
- #: class/trait/field.php:255 inc/page_help.php:21
298
  msgid "Post format name"
299
  msgstr "投稿フォーマット名"
300
 
301
- #: class/trait/field.php:256 inc/page_help.php:14
302
  msgid "Term description"
303
  msgstr "タームの説明"
304
 
@@ -529,14 +529,20 @@ msgid "If there are multiple, enter them separated by \",\"."
529
  msgstr "複数の場合は “,” 区切りで入力してください。"
530
 
531
  #: inc/tab/top_basic.php:69
 
 
 
 
 
 
532
  msgid "Search result page"
533
  msgstr "検索結果ページ"
534
 
535
- #: inc/tab/top_basic.php:72
536
  msgid "404 page"
537
  msgstr "404ページ"
538
 
539
- #: inc/tab/top_basic.php:75
540
  msgid "Particular page settings"
541
  msgstr "特殊ページ設定"
542
 
@@ -617,12 +623,19 @@ msgstr ""
617
 
618
  #. Author of the plugin/theme
619
  msgid "LOOS,Inc."
620
- msgstr ""
621
 
622
  #. Author URI of the plugin/theme
623
  msgid "https://loos-web-studio.com/"
624
  msgstr "https://loos-web-studio.com/"
625
 
 
 
 
 
 
 
 
626
  #~ msgid "LOOS WEB STUDIO"
627
  #~ msgstr "LOOS WEB STUDIO"
628
 
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: SEO SIMPLE PACK\n"
4
+ "POT-Creation-Date: 2021-02-10 12:46+0900\n"
5
+ "PO-Revision-Date: 2021-02-10 12:46+0900\n"
6
  "Last-Translator: \n"
7
  "Language-Team: \n"
8
  "Language: ja\n"
102
  msgid "This is the archive page for %s."
103
  msgstr "%sの記事一覧ページです。"
104
 
105
+ #: class/data.php:175
106
  msgid "Page not found"
107
  msgstr "ページが見つかりませんでした"
108
 
109
+ #: class/data.php:176
110
  msgid "Searched:"
111
  msgstr "検索結果:"
112
 
150
  msgid "Hide this notification."
151
  msgstr "この通知を非表示にする。"
152
 
153
+ #: class/metabox.php:47
154
  msgid "Keep default settings"
155
  msgstr "デフォルト設定のまま"
156
 
157
+ #: class/metabox.php:48
158
  msgid "Index"
159
  msgstr "インデックスさせる"
160
 
161
+ #: class/metabox.php:49
162
  msgid "Don't index"
163
  msgstr "インデックスさせない"
164
 
165
+ #: class/metabox.php:50
166
  msgid "Don't follow links"
167
  msgstr "リンクを辿らせない"
168
 
169
+ #: class/metabox.php:51
170
  msgid "Don't cache"
171
  msgstr "キャッシュさせない"
172
 
173
+ #: class/metabox.php:88 class/metabox.php:236
174
  msgid "SEO SIMPLE PACK Settings"
175
  msgstr "SEO SIMPLE PACK 設定"
176
 
177
+ #: class/metabox.php:128 class/metabox.php:242
178
  msgid "\"robots\" tag of this page"
179
  msgstr "このページの”robots”タグ"
180
 
181
+ #: class/metabox.php:132
182
  #, php-format
183
  msgid "If you want to know the default settings, see %s."
184
  msgstr "デフォルト設定を確認したい場合、%s をご覧ください。"
185
 
186
+ #: class/metabox.php:133
187
  msgid "\"Post page\" tab in \"General Settings\""
188
  msgstr "「一般設定」の「投稿ページ」タブ"
189
 
190
+ #: class/metabox.php:139 class/metabox.php:252
191
  msgid "Title tag of this page"
192
  msgstr "このページのタイトルタグ"
193
 
194
+ #: class/metabox.php:141
195
  #, php-format
196
  msgid "%s is available."
197
  msgstr "%s が使用可能です。"
198
 
199
+ #: class/metabox.php:142
200
  msgid "Snippet tags"
201
  msgstr "スニペットタグ"
202
 
203
+ #: class/metabox.php:148 class/metabox.php:262
204
  msgid "Description of this page"
205
  msgstr "このページのディスクリプション"
206
 
207
+ #: class/metabox.php:150
208
  msgid ""
209
+ "If blank, the description tag will be automatically generated from the "
210
+ "content."
211
+ msgstr "空白の場合、ディスクリプションタグはコンテンツから自動で生成されます。"
212
 
213
+ #: class/metabox.php:155 class/metabox.php:282
214
  msgid "\"og:image\" of this page"
215
  msgstr "このページの”og:image”"
216
 
217
+ #: class/metabox.php:161 class/metabox.php:272
218
+ msgid "\"canonical\" URL of this page"
219
+ msgstr "このページの”canonical” URL"
220
 
221
+ #: class/metabox.php:162
222
+ msgid "If blank, the canonical tag will be automatically generated."
223
+ msgstr "空白の場合、canonicalタグは自動で生成されます。"
 
224
 
225
+ #: class/metabox.php:167
226
+ msgid "Keywords of this page"
227
+ msgstr "このページのキーワード"
228
 
229
+ #: class/trait/field.php:96
230
  msgid "Preview"
231
  msgstr "プレビュー"
232
 
233
+ #: class/trait/field.php:101
234
  msgid "About available snippet tags"
235
  msgstr "使用可能なスニペットタグについて"
236
 
237
+ #: class/trait/field.php:171
238
  msgid "Yes"
239
  msgstr "はい"
240
 
241
+ #: class/trait/field.php:176
242
  msgid "No"
243
  msgstr "いいえ"
244
 
245
+ #: class/trait/field.php:244
246
  msgid "No image has been set yet."
247
  msgstr "まだ画像が設定されていません。"
248
 
249
+ #: class/trait/field.php:248
250
  msgid "Select image"
251
  msgstr "画像を選択"
252
 
253
+ #: class/trait/field.php:251
254
  msgid "Delete image"
255
  msgstr "画像を削除"
256
 
257
+ #: class/trait/field.php:268 inc/page_help.php:10
258
  msgid "Post title"
259
  msgstr "投稿のタイトル"
260
 
261
+ #: class/trait/field.php:269 inc/page_help.php:11
262
  msgid "Category name"
263
  msgstr "カテゴリー名"
264
 
265
+ #: class/trait/field.php:270 inc/page_help.php:12
266
  msgid "Tag name"
267
  msgstr "タグ名"
268
 
269
+ #: class/trait/field.php:271 inc/page_help.php:13
270
  msgid "Term name"
271
  msgstr "ターム名"
272
 
273
+ #: class/trait/field.php:272 inc/page_help.php:15
274
  msgid "Taxonomy name"
275
  msgstr "タクソノミー名"
276
 
277
+ #: class/trait/field.php:273 inc/page_help.php:19
278
  msgid "Author name"
279
  msgstr "著者名"
280
 
281
+ #: class/trait/field.php:274 inc/page_help.php:20
282
  msgid "Search word"
283
  msgstr "検索ワード"
284
 
285
+ #: class/trait/field.php:275 inc/page_help.php:16
286
  msgid "Post type name"
287
  msgstr "投稿タイプ名"
288
 
289
+ #: class/trait/field.php:276 inc/page_help.php:17
290
  msgid "Page content"
291
  msgstr "ページコンテンツ"
292
 
293
+ #: class/trait/field.php:277 inc/tab/top_archive.php:34
294
  msgid "Date"
295
  msgstr "日付"
296
 
297
+ #: class/trait/field.php:278 inc/page_help.php:21
298
  msgid "Post format name"
299
  msgstr "投稿フォーマット名"
300
 
301
+ #: class/trait/field.php:279 inc/page_help.php:14
302
  msgid "Term description"
303
  msgstr "タームの説明"
304
 
529
  msgstr "複数の場合は “,” 区切りで入力してください。"
530
 
531
  #: inc/tab/top_basic.php:69
532
+ msgid ""
533
+ "Output the same keywords as above when the keywords setting of each post is "
534
+ "empty"
535
+ msgstr "各投稿のキーワード設定が空の時、上記と同じキーワードを出力する"
536
+
537
+ #: inc/tab/top_basic.php:74
538
  msgid "Search result page"
539
  msgstr "検索結果ページ"
540
 
541
+ #: inc/tab/top_basic.php:77
542
  msgid "404 page"
543
  msgstr "404ページ"
544
 
545
+ #: inc/tab/top_basic.php:80
546
  msgid "Particular page settings"
547
  msgstr "特殊ページ設定"
548
 
623
 
624
  #. Author of the plugin/theme
625
  msgid "LOOS,Inc."
626
+ msgstr "LOOS,Inc."
627
 
628
  #. Author URI of the plugin/theme
629
  msgid "https://loos-web-studio.com/"
630
  msgstr "https://loos-web-studio.com/"
631
 
632
+ #, php-format
633
+ #~ msgid "If blank, the \"Keyword\" setting of %s is used."
634
+ #~ msgstr "空白の場合、%s の「キーワード」設定が使用されます。"
635
+
636
+ #~ msgid "\"Basic settings\""
637
+ #~ msgstr "「基本設定」"
638
+
639
  #~ msgid "LOOS WEB STUDIO"
640
  #~ msgstr "LOOS WEB STUDIO"
641
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://loos-web-studio.com/
4
  Tags: SEO, meta, analytics, webmaster, simple, japan, meta tag
5
  Requires at least: 4.6
6
  Tested up to: 5.6
7
- Stable tag: 2.1.1
8
  Requires PHP: 5.6
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -121,6 +121,9 @@ The following hooks are available.
121
 
122
  == Changelog ==
123
 
 
 
 
124
  = 2.1.1 =
125
  Bug fixes
126
 
4
  Tags: SEO, meta, analytics, webmaster, simple, japan, meta tag
5
  Requires at least: 4.6
6
  Tested up to: 5.6
7
+ Stable tag: 2.2.0
8
  Requires PHP: 5.6
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
121
 
122
  == Changelog ==
123
 
124
+ = 2.2.0 =
125
+ Added canonical tag settings for each page.
126
+
127
  = 2.1.1 =
128
  Bug fixes
129
 
seo-simple-pack.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: SEO SIMPLE PACK
4
  * Plugin URI: https://wemo.tech/1670
5
  * Description: A very simple SEO plugin. You can easily set and customize meta tags and OGP tags for each page.
6
- * Version: 2.1.1
7
  * Author: LOOS,Inc.
8
  * Author URI: https://loos-web-studio.com/
9
  * License: GPL2 or later
@@ -17,7 +17,7 @@ defined( 'ABSPATH' ) || exit;
17
  * 定数宣言
18
  */
19
  if ( ! defined( 'SSP_VERSION' ) ) {
20
- define( 'SSP_VERSION', ( defined( 'WP_DEBUG' ) && WP_DEBUG ) ? date_i18n( 'mdGis' ) : '2.1.1' );
21
  }
22
  if ( ! defined( 'SSP_PATH' ) ) {
23
  define( 'SSP_PATH', plugin_dir_path( __FILE__ ) );
3
  * Plugin Name: SEO SIMPLE PACK
4
  * Plugin URI: https://wemo.tech/1670
5
  * Description: A very simple SEO plugin. You can easily set and customize meta tags and OGP tags for each page.
6
+ * Version: 2.2.0
7
  * Author: LOOS,Inc.
8
  * Author URI: https://loos-web-studio.com/
9
  * License: GPL2 or later
17
  * 定数宣言
18
  */
19
  if ( ! defined( 'SSP_VERSION' ) ) {
20
+ define( 'SSP_VERSION', ( defined( 'WP_DEBUG' ) && WP_DEBUG ) ? date_i18n( 'mdGis' ) : '2.2.0' );
21
  }
22
  if ( ! defined( 'SSP_PATH' ) ) {
23
  define( 'SSP_PATH', plugin_dir_path( __FILE__ ) );
src/scss/ssp.scss CHANGED
@@ -46,6 +46,10 @@ $color_main : #87ab87;
46
  width: 100%;
47
  }
48
  }
 
 
 
 
49
  }
50
 
51
  }
46
  width: 100%;
47
  }
48
  }
49
+
50
+ .ssp-field__body.-mt-shorten {
51
+ margin-top: -24px;
52
+ }
53
  }
54
 
55
  }