All Meta Tags - Version 1.3

Version Description

  • Added new section with meta tags for Default Home Page and Blog Page.
  • Home Page section renamed to Static Home Page.
Download this release

Release Info

Developer Arthur Gareginyan
Plugin Icon 128x128 All Meta Tags
Version 1.3
Comparing to
See all releases

Code changes from version 1.2 to 1.3

Files changed (3) hide show
  1. all-meta-tags.php +28 -10
  2. inc/settings_page.php +28 -6
  3. readme.txt +14 -6
all-meta-tags.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: EASILY and SAFELY add your custom Meta Tags to WordPress website's header.
6
  * Author: Arthur "Berserkr" Gareginyan
7
  * Author URI: http://mycyberuniverse.com/author.html
8
- * Version: 1.2
9
  * License: GPL3
10
  * Text Domain: allmetatags
11
  * Domain Path: /languages/
@@ -121,7 +121,7 @@ function allmetatags_field($name, $label, $placeholder, $help=null, $link=null,
121
  $value = "";
122
  endif;
123
 
124
- // Generated the table
125
  if ( !empty($link) ) :
126
  $link_out = "<a href='$link' target='_blank'>$label</a>";
127
  else :
@@ -163,7 +163,7 @@ function allmetatags_field($name, $label, $placeholder, $help=null, $link=null,
163
  /**
164
  * Generate the Meta Tags
165
  *
166
- * @since 1.2
167
  */
168
  function allmetatags_add_meta_tags() {
169
 
@@ -185,6 +185,9 @@ function allmetatags_add_meta_tags() {
185
  $home_description = esc_textarea( $options['home_description'] );
186
  $home_keywords = esc_textarea( $options['home_keywords'] );
187
 
 
 
 
188
  $author = esc_textarea( $options['author'] );
189
  $designer = esc_textarea( $options['designer'] );
190
  $contact = esc_textarea( $options['contact'] );
@@ -228,16 +231,31 @@ function allmetatags_add_meta_tags() {
228
  $metatags_arr[] = "<meta name='wot-verification' content='$wot' />";
229
  }
230
 
231
- // Meta Tags for Home Page only
232
- if (!empty($home_description)) {
233
- if ( is_home() ) {
 
 
 
 
 
 
 
 
 
234
  $metatags_arr[] = "<meta name='description' content='$home_description' />";
235
  }
236
- }
237
- if (!empty($home_keywords)) {
238
- if ( is_home() ) {
239
  $metatags_arr[] = "<meta name='keywords' content='$home_keywords' />";
240
  }
 
 
 
 
 
 
 
 
241
  }
242
 
243
  // Meta Tags for all website
@@ -291,4 +309,4 @@ function allmetatags_uninstall() {
291
  register_uninstall_hook( __FILE__, 'allmetatags_uninstall' );
292
 
293
  /* That's all folks! */
294
- ?>
5
  * Description: EASILY and SAFELY add your custom Meta Tags to WordPress website's header.
6
  * Author: Arthur "Berserkr" Gareginyan
7
  * Author URI: http://mycyberuniverse.com/author.html
8
+ * Version: 1.3
9
  * License: GPL3
10
  * Text Domain: allmetatags
11
  * Domain Path: /languages/
121
  $value = "";
122
  endif;
123
 
124
+ // Generate the table
125
  if ( !empty($link) ) :
126
  $link_out = "<a href='$link' target='_blank'>$label</a>";
127
  else :
163
  /**
164
  * Generate the Meta Tags
165
  *
166
+ * @since 1.3
167
  */
168
  function allmetatags_add_meta_tags() {
169
 
185
  $home_description = esc_textarea( $options['home_description'] );
186
  $home_keywords = esc_textarea( $options['home_keywords'] );
187
 
188
+ $blog_description = esc_textarea( $options['blog_description'] );
189
+ $blog_keywords = esc_textarea( $options['blog_keywords'] );
190
+
191
  $author = esc_textarea( $options['author'] );
192
  $designer = esc_textarea( $options['designer'] );
193
  $contact = esc_textarea( $options['contact'] );
231
  $metatags_arr[] = "<meta name='wot-verification' content='$wot' />";
232
  }
233
 
234
+ // Meta Tags for specific pages
235
+ if ( is_front_page() && is_home() ) {
236
+ // Default Home Page
237
+ if (!empty($home_description)) {
238
+ $metatags_arr[] = "<meta name='description' content='$blog_description' />";
239
+ }
240
+ if (!empty($home_keywords)) {
241
+ $metatags_arr[] = "<meta name='keywords' content='$blog_keywords' />";
242
+ }
243
+ } elseif ( is_front_page() ) {
244
+ // Static Home Page
245
+ if (!empty($home_description)) {
246
  $metatags_arr[] = "<meta name='description' content='$home_description' />";
247
  }
248
+ if (!empty($home_keywords)) {
 
 
249
  $metatags_arr[] = "<meta name='keywords' content='$home_keywords' />";
250
  }
251
+ } elseif ( is_home() ) {
252
+ // Blog Page
253
+ if (!empty($home_description)) {
254
+ $metatags_arr[] = "<meta name='description' content='$blog_description' />";
255
+ }
256
+ if (!empty($home_keywords)) {
257
+ $metatags_arr[] = "<meta name='keywords' content='$blog_keywords' />";
258
+ }
259
  }
260
 
261
  // Meta Tags for all website
309
  register_uninstall_hook( __FILE__, 'allmetatags_uninstall' );
310
 
311
  /* That's all folks! */
312
+ ?>
inc/settings_page.php CHANGED
@@ -8,7 +8,7 @@ defined('ABSPATH') or die("Restricted access!");
8
  /**
9
  * Render Settings Page
10
  *
11
- * @since 1.2
12
  */
13
  function allmetatags_render_submenu_page() {
14
 
@@ -165,20 +165,42 @@ function allmetatags_render_submenu_page() {
165
  </div>
166
 
167
  <div class="postbox" id="Home">
168
- <h3 class="title">Meta Tags for Home Page only</h3>
169
  <div class="inside">
170
- <p>You can use the options below to add meta tags such as Description and Keywords only in Home Page of your website.</p>
171
  <table class="form-table">
172
  <?php allmetatags_field('home_description',
173
  'Home Description',
174
- 'My blog is about plants, nature, the sea and everything I love',
175
  'Enter a short description of your website (150-250 characters). Most search engines use a maximum of 160 chars for the home description.',
176
  '',
177
  'textarea');?>
178
  <?php allmetatags_field('home_keywords',
179
  'Home Keyword(s)',
180
  'blog, awesome, handmade, books, theater',
181
- 'Enter a comma-delimited list of keywords for only Home page of your website.',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
182
  '',
183
  'textarea');?>
184
  </table>
@@ -232,4 +254,4 @@ function allmetatags_render_submenu_page() {
232
 
233
  </div>
234
  <?php
235
- }
8
  /**
9
  * Render Settings Page
10
  *
11
+ * @since 1.3
12
  */
13
  function allmetatags_render_submenu_page() {
14
 
165
  </div>
166
 
167
  <div class="postbox" id="Home">
168
+ <h3 class="title">Meta Tags for Static Home Page only</h3>
169
  <div class="inside">
170
+ <p>You can use the options below to add meta tags such as Description and Keywords only in Static Home Page of your website.</p>
171
  <table class="form-table">
172
  <?php allmetatags_field('home_description',
173
  'Home Description',
174
+ 'My website is about plants, nature, the sea and everything I love',
175
  'Enter a short description of your website (150-250 characters). Most search engines use a maximum of 160 chars for the home description.',
176
  '',
177
  'textarea');?>
178
  <?php allmetatags_field('home_keywords',
179
  'Home Keyword(s)',
180
  'blog, awesome, handmade, books, theater',
181
+ 'Enter a comma-delimited list of keywords for only Static Home Page of your website.',
182
+ '',
183
+ 'textarea');?>
184
+ </table>
185
+ <?php submit_button( __( 'Save Changes', 'allmetatags' ), 'primary', 'submit', true ); ?>
186
+ </div>
187
+ </div>
188
+
189
+ <div class="postbox" id="Blog">
190
+ <h3 class="title">Meta Tags for Default Home Page and Blog Page only</h3>
191
+ <div class="inside">
192
+ <p>You can use the options below to add meta tags such as Description and Keywords only in Default Home Page and Blog Page of your website.</p>
193
+ <table class="form-table">
194
+ <?php allmetatags_field('blog_description',
195
+ 'Blog Description',
196
+ 'My blog is about plants, nature, the sea and everything I love',
197
+ 'Enter a short description of your website (150-250 characters). Most search engines use a maximum of 160 chars for the home description.',
198
+ '',
199
+ 'textarea');?>
200
+ <?php allmetatags_field('blog_keywords',
201
+ 'Blog Keyword(s)',
202
+ 'blog, awesome, handmade, books, theater',
203
+ 'Enter a comma-delimited list of keywords for only Blog Page of your website.',
204
  '',
205
  'textarea');?>
206
  </table>
254
 
255
  </div>
256
  <?php
257
+ }
readme.txt CHANGED
@@ -17,7 +17,7 @@ No need anymore to editing a files of your theme or plugins in order to add meta
17
 
18
  Third-party services like Google Webmaster Tools, Alexa, Pinterest and Google+ require you to verify your domain. This makes sure that you are the correct owner of your blog or store before they provide their services to you. You can use this plugin to easily verify your website or domain and get a more effective and efficient sharing results. Example with Pinterest. Once you completed the verification process, people will see a checkmark next to your domain in your Pinterest profile and in pinner search results. That check mark emphasis you have confirmed the ownership of your blog or website on Pinterest. This will help your website to rank better in google and other search engines. You can easily increase your blog traffic using this plugin. "All Meta Tags" is a simple but effective SEO plugin.
19
 
20
- Also you can use this plugin to add required meta tags such as Author, Designer, Contact, Copyright and Keywords in everywhere on your website (It adds the required meta tags to the header of all pages on your website) or the meta Description and Keywords only for Home Page.
21
 
22
 
23
  = Features =
@@ -38,7 +38,8 @@ Also you can use this plugin to add required meta tags such as Author, Designer,
38
  * Meta tag with name="designer".
39
  * Meta tag with name="contact".
40
  * Meta tag with name="copyright".
41
- * Meta tag with name="description" (Global and only for home page).
 
42
  * Ready for translation (.pot file included).
43
  * Added Russian translation.
44
 
@@ -106,10 +107,11 @@ Please visit [Dedicated Plugin Page](http://mycyberuniverse.com/my_programs/wp-p
106
 
107
 
108
  == Screenshots ==
109
- 1. Plugin’s page. Block "Web Master Tools".
110
- 2. Plugin’s page. Block "Domain Verification".
111
- 3. Plugin’s page. Block "Meta Tags for Home page only".
112
- 4. Plugin’s page. Block "Meta Tags for all website (Global)".
 
113
 
114
  == Other Notes ==
115
 
@@ -137,6 +139,9 @@ Commercial licensing (e.g. for projects that can’t use an open-source license)
137
  * [Dedicated Plugin Page on GitHub](https://github.com/ArthurGareginyan/all-meta-tags)
138
 
139
  == Changelog ==
 
 
 
140
  = 1.2 =
141
  * Added the option for "Web of Trust" (WOT) verification.
142
  = 1.1 =
@@ -152,6 +157,9 @@ Commercial licensing (e.g. for projects that can’t use an open-source license)
152
 
153
 
154
  == Upgrade Notice ==
 
 
 
155
  = 1.2 =
156
  * Added the option for "Web of Trust" (WOT) verification.
157
  = 1.1 =
17
 
18
  Third-party services like Google Webmaster Tools, Alexa, Pinterest and Google+ require you to verify your domain. This makes sure that you are the correct owner of your blog or store before they provide their services to you. You can use this plugin to easily verify your website or domain and get a more effective and efficient sharing results. Example with Pinterest. Once you completed the verification process, people will see a checkmark next to your domain in your Pinterest profile and in pinner search results. That check mark emphasis you have confirmed the ownership of your blog or website on Pinterest. This will help your website to rank better in google and other search engines. You can easily increase your blog traffic using this plugin. "All Meta Tags" is a simple but effective SEO plugin.
19
 
20
+ Also you can use this plugin to add required meta tags such as Author, Designer, Contact, Copyright and Keywords in everywhere on your website (It adds the required meta tags to the header of all pages on your website) or the meta Description and Keywords only for Static Home Page or the meta Description and Keywords only for Blog Page.
21
 
22
 
23
  = Features =
38
  * Meta tag with name="designer".
39
  * Meta tag with name="contact".
40
  * Meta tag with name="copyright".
41
+ * Meta tag with name="description" (Global, only for Static Home Page and only for Blog Page).
42
+ * Meta tag with name="keywords" (Global, only for Static Home Page and only for Blog Page).
43
  * Ready for translation (.pot file included).
44
  * Added Russian translation.
45
 
107
 
108
 
109
  == Screenshots ==
110
+ 1. Plugin’s page. Section "Web Master Tools".
111
+ 2. Plugin’s page. Section "Domain Verification".
112
+ 3. Plugin’s page. Section "Meta Tags for Static Home Page only".
113
+ 4. Plugin’s page. Section "Meta Tags for Default Home Page and Blog Page only".
114
+ 5. Plugin’s page. Section "Meta Tags for all website (Global)".
115
 
116
  == Other Notes ==
117
 
139
  * [Dedicated Plugin Page on GitHub](https://github.com/ArthurGareginyan/all-meta-tags)
140
 
141
  == Changelog ==
142
+ = 1.3 =
143
+ * Added new section with meta tags for Default Home Page and Blog Page.
144
+ * Home Page section renamed to Static Home Page.
145
  = 1.2 =
146
  * Added the option for "Web of Trust" (WOT) verification.
147
  = 1.1 =
157
 
158
 
159
  == Upgrade Notice ==
160
+ = 1.3 =
161
+ * Added new section with meta tags for Default Home Page and Blog Page.
162
+ * Home Page section renamed to Static Home Page.
163
  = 1.2 =
164
  * Added the option for "Web of Trust" (WOT) verification.
165
  = 1.1 =