Version Description
- Compatibility with PHP version 5.2 improved.
- PHP shorthands improved.
- Added function for generating the plugin constants.
- Some constants now get the value from the plugin header data.
- The "_plugin_version_number" function improved.
- Extra variable "$options" removed from the "settings.php" file.
- Added file "upgrade.php" for future upgrades.
Download this release
Release Info
Developer | Arthur Gareginyan |
Plugin | All Meta Tags |
Version | 4.2 |
Comparing to | |
See all releases |
Code changes from version 4.1.1 to 4.2
- all-meta-tags.php +25 -20
- inc/php/messages.php +2 -2
- inc/php/page.php +2 -2
- inc/php/settings.php +1 -6
- inc/php/upgrade.php +8 -0
- inc/php/version.php +10 -13
- readme.txt +13 -4
all-meta-tags.php
CHANGED
@@ -5,27 +5,25 @@
|
|
5 |
* Description: Easily and safely add your custom Meta Tags to WordPress website's header.
|
6 |
* Author: Arthur Gareginyan
|
7 |
* Author URI: http://www.arthurgareginyan.com
|
8 |
-
* Version: 4.
|
9 |
* License: GPL3
|
10 |
* Text Domain: all-meta-tags
|
11 |
* Domain Path: /languages/
|
12 |
*
|
13 |
* Copyright 2015-2017 Arthur Gareginyan (email : arthurgareginyan@gmail.com)
|
14 |
*
|
15 |
-
* This
|
16 |
-
*
|
17 |
-
* "All Meta Tags" is free software: you can redistribute it and/or modify
|
18 |
* it under the terms of the GNU General Public License as published by
|
19 |
* the Free Software Foundation, either version 3 of the License, or
|
20 |
* (at your option) any later version.
|
21 |
*
|
22 |
-
*
|
23 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
24 |
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
25 |
* GNU General Public License for more details.
|
26 |
*
|
27 |
* You should have received a copy of the GNU General Public License
|
28 |
-
* along with
|
29 |
*
|
30 |
*
|
31 |
* █████╗ ██████╗ ████████╗██╗ ██╗██╗ ██╗██████╗
|
@@ -55,27 +53,34 @@ defined( 'ABSPATH' ) or die( "Restricted access!" );
|
|
55 |
/**
|
56 |
* Define global constants
|
57 |
*
|
58 |
-
* @since 4.
|
59 |
*/
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
|
71 |
/**
|
72 |
* Load the plugin modules
|
73 |
*
|
74 |
-
* @since 4.
|
75 |
*/
|
76 |
require_once( ALLMT_PATH . 'inc/php/core.php' );
|
77 |
-
require_once( ALLMT_PATH . 'inc/php/
|
78 |
require_once( ALLMT_PATH . 'inc/php/version.php' );
|
|
|
79 |
require_once( ALLMT_PATH . 'inc/php/functional.php' );
|
80 |
require_once( ALLMT_PATH . 'inc/php/page.php' );
|
81 |
require_once( ALLMT_PATH . 'inc/php/messages.php' );
|
5 |
* Description: Easily and safely add your custom Meta Tags to WordPress website's header.
|
6 |
* Author: Arthur Gareginyan
|
7 |
* Author URI: http://www.arthurgareginyan.com
|
8 |
+
* Version: 4.2
|
9 |
* License: GPL3
|
10 |
* Text Domain: all-meta-tags
|
11 |
* Domain Path: /languages/
|
12 |
*
|
13 |
* Copyright 2015-2017 Arthur Gareginyan (email : arthurgareginyan@gmail.com)
|
14 |
*
|
15 |
+
* This plugin is free software: you can redistribute it and/or modify
|
|
|
|
|
16 |
* it under the terms of the GNU General Public License as published by
|
17 |
* the Free Software Foundation, either version 3 of the License, or
|
18 |
* (at your option) any later version.
|
19 |
*
|
20 |
+
* This plugin is distributed in the hope that it will be useful,
|
21 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
22 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
23 |
* GNU General Public License for more details.
|
24 |
*
|
25 |
* You should have received a copy of the GNU General Public License
|
26 |
+
* along with this plugin. If not, see <http://www.gnu.org/licenses/>.
|
27 |
*
|
28 |
*
|
29 |
* █████╗ ██████╗ ████████╗██╗ ██╗██╗ ██╗██████╗
|
53 |
/**
|
54 |
* Define global constants
|
55 |
*
|
56 |
+
* @since 4.2
|
57 |
*/
|
58 |
+
$plugin_data = get_file_data( __FILE__, array( 'name'=>'Plugin Name', 'version'=>'Version', 'text'=>'Text Domain' ) );
|
59 |
+
function allmetatags_define_constants( $constant_name, $value ) {
|
60 |
+
$constant_name = 'ALLMT_' . $constant_name;
|
61 |
+
if ( !defined( $constant_name ) )
|
62 |
+
define( $constant_name, $value );
|
63 |
+
}
|
64 |
+
allmetatags_define_constants( 'DIR', dirname( plugin_basename( __FILE__ ) ) );
|
65 |
+
allmetatags_define_constants( 'BASE', plugin_basename( __FILE__ ) );
|
66 |
+
allmetatags_define_constants( 'URL', plugin_dir_url( __FILE__ ) );
|
67 |
+
allmetatags_define_constants( 'PATH', plugin_dir_path( __FILE__ ) );
|
68 |
+
allmetatags_define_constants( 'SLUG', dirname( plugin_basename( __FILE__ ) ) );
|
69 |
+
allmetatags_define_constants( 'NAME', $plugin_data['name'] );
|
70 |
+
allmetatags_define_constants( 'VERSION', $plugin_data['version'] );
|
71 |
+
allmetatags_define_constants( 'TEXT', $plugin_data['text'] );
|
72 |
+
allmetatags_define_constants( 'PREFIX', 'allmetatags' );
|
73 |
+
allmetatags_define_constants( 'SETTINGS', 'allmetatags' );
|
74 |
|
75 |
/**
|
76 |
* Load the plugin modules
|
77 |
*
|
78 |
+
* @since 4.2
|
79 |
*/
|
80 |
require_once( ALLMT_PATH . 'inc/php/core.php' );
|
81 |
+
require_once( ALLMT_PATH . 'inc/php/upgrade.php' );
|
82 |
require_once( ALLMT_PATH . 'inc/php/version.php' );
|
83 |
+
require_once( ALLMT_PATH . 'inc/php/enqueue.php' );
|
84 |
require_once( ALLMT_PATH . 'inc/php/functional.php' );
|
85 |
require_once( ALLMT_PATH . 'inc/php/page.php' );
|
86 |
require_once( ALLMT_PATH . 'inc/php/messages.php' );
|
inc/php/messages.php
CHANGED
@@ -48,12 +48,12 @@ function allmetatags_hello_message() {
|
|
48 |
/**
|
49 |
* Error message (When the old version of plugin installed) - Bootstrap Modal
|
50 |
*
|
51 |
-
* @since 4.
|
52 |
*/
|
53 |
function allmetatags_error_message() {
|
54 |
|
55 |
$info = get_option( ALLMT_SETTINGS . '_service_info' );
|
56 |
-
$old_version =
|
57 |
|
58 |
if ( $old_version != '1' ) {
|
59 |
return;
|
48 |
/**
|
49 |
* Error message (When the old version of plugin installed) - Bootstrap Modal
|
50 |
*
|
51 |
+
* @since 4.2
|
52 |
*/
|
53 |
function allmetatags_error_message() {
|
54 |
|
55 |
$info = get_option( ALLMT_SETTINGS . '_service_info' );
|
56 |
+
$old_version = !empty( $info['old_version'] ) ? $info['old_version'] : '0';
|
57 |
|
58 |
if ( $old_version != '1' ) {
|
59 |
return;
|
inc/php/page.php
CHANGED
@@ -15,8 +15,8 @@ defined( 'ABSPATH' ) or die( "Restricted access!" );
|
|
15 |
function allmetatags_render_submenu_page() {
|
16 |
|
17 |
// Call messages
|
18 |
-
|
19 |
-
|
20 |
|
21 |
// Layout of page
|
22 |
?>
|
15 |
function allmetatags_render_submenu_page() {
|
16 |
|
17 |
// Call messages
|
18 |
+
allmetatags_hello_message();
|
19 |
+
allmetatags_error_message();
|
20 |
|
21 |
// Layout of page
|
22 |
?>
|
inc/php/settings.php
CHANGED
@@ -10,7 +10,7 @@ defined( 'ABSPATH' ) or die( "Restricted access!" );
|
|
10 |
/**
|
11 |
* Render Settings Tab
|
12 |
*
|
13 |
-
* @since 4.
|
14 |
*/
|
15 |
?>
|
16 |
<!-- SIDEBAR -->
|
@@ -53,11 +53,6 @@ defined( 'ABSPATH' ) or die( "Restricted access!" );
|
|
53 |
<form action="options.php" method="post" enctype="multipart/form-data">
|
54 |
<?php settings_fields( ALLMT_SETTINGS . '_settings_group' ); ?>
|
55 |
|
56 |
-
<?php
|
57 |
-
// Get options from the BD
|
58 |
-
$options = get_option( ALLMT_SETTINGS . '_settings' );
|
59 |
-
?>
|
60 |
-
|
61 |
<div class="postbox" id="WebMasterTools">
|
62 |
<h3 class="title"><?php _e( 'Web Master Tools', ALLMT_TEXT ); ?></h3>
|
63 |
<div class="inside">
|
10 |
/**
|
11 |
* Render Settings Tab
|
12 |
*
|
13 |
+
* @since 4.2
|
14 |
*/
|
15 |
?>
|
16 |
<!-- SIDEBAR -->
|
53 |
<form action="options.php" method="post" enctype="multipart/form-data">
|
54 |
<?php settings_fields( ALLMT_SETTINGS . '_settings_group' ); ?>
|
55 |
|
|
|
|
|
|
|
|
|
|
|
56 |
<div class="postbox" id="WebMasterTools">
|
57 |
<h3 class="title"><?php _e( 'Web Master Tools', ALLMT_TEXT ); ?></h3>
|
58 |
<div class="inside">
|
inc/php/upgrade.php
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Prevent Direct Access
|
5 |
+
*
|
6 |
+
* @since 0.1
|
7 |
+
*/
|
8 |
+
defined( 'ABSPATH' ) or die( "Restricted access!" );
|
inc/php/version.php
CHANGED
@@ -10,7 +10,7 @@ defined( 'ABSPATH' ) or die( "Restricted access!" );
|
|
10 |
/**
|
11 |
* Function for managing information about the version number of the plugin
|
12 |
*
|
13 |
-
* @since 4.
|
14 |
*/
|
15 |
function allmetatags_plugin_version_number() {
|
16 |
|
@@ -23,13 +23,16 @@ function allmetatags_plugin_version_number() {
|
|
23 |
if ( !is_array( $info ) ) {
|
24 |
$info = array();
|
25 |
}
|
26 |
-
$current_number =
|
27 |
$new_number = ALLMT_VERSION;
|
28 |
|
29 |
-
//
|
30 |
-
|
31 |
-
|
32 |
-
|
|
|
|
|
|
|
33 |
|
34 |
// If the version number in the database is same as the new version number:
|
35 |
// - Reset the "old_version" marker in the database
|
@@ -71,10 +74,4 @@ function allmetatags_plugin_version_number() {
|
|
71 |
}
|
72 |
|
73 |
}
|
74 |
-
|
75 |
-
|
76 |
-
// TEMPORARY FIX
|
77 |
-
function allmetatags_plugin_temp_fix() {
|
78 |
-
delete_option( ALLMT_SETTINGS . '_service_info' );
|
79 |
-
}
|
80 |
-
allmetatags_plugin_temp_fix();
|
10 |
/**
|
11 |
* Function for managing information about the version number of the plugin
|
12 |
*
|
13 |
+
* @since 4.2
|
14 |
*/
|
15 |
function allmetatags_plugin_version_number() {
|
16 |
|
23 |
if ( !is_array( $info ) ) {
|
24 |
$info = array();
|
25 |
}
|
26 |
+
$current_number = !empty( $info['version'] ) ? $info['version'] : '0';
|
27 |
$new_number = ALLMT_VERSION;
|
28 |
|
29 |
+
// Update the "_service_info" data in the database if the version number is not number
|
30 |
+
if ( !is_numeric($current_number) ) {
|
31 |
+
|
32 |
+
$info['version'] = $new_number;
|
33 |
+
update_option( ALLMT_SETTINGS . '_service_info', $info );
|
34 |
+
|
35 |
+
}
|
36 |
|
37 |
// If the version number in the database is same as the new version number:
|
38 |
// - Reset the "old_version" marker in the database
|
74 |
}
|
75 |
|
76 |
}
|
77 |
+
allmetatags_plugin_version_number();
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: Arthur Gareginyan
|
|
3 |
Tags: meta, tag,tags, custom, simple, plugin, twitter, facebook, g+, google, google+, google plus, meta, search engine optimization, seo, social, alexa, alexa rank, pinterest, norton safe web, webmaster, webmaster tool, webmaster tools, web master tools, web master tools, bing, yandex, bing webmaster, yandex webmaster, google webmaster, web tools, open graph, publisher profile, publisher, author, authors, description, keyword, keywords, copyright, designer, admin, meta tag, pinterest, pinterest meta tag, pinterest website verification, pinterest verification, pinterest verify, plugin, verification, verify, webmaster plugin, wot, web of trust, specificfeeds, specific feeds, feed, rss feed, google shopping, google merchant center, structured data, woocommerce, schemas
|
4 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8A88KC7TFF6CS
|
5 |
Requires at least: 3.9
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag: 4.
|
8 |
License: GPL3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -187,15 +187,24 @@ Commercial licensing (e.g. for projects that can’t use an open-source license)
|
|
187 |
|
188 |
== Changelog ==
|
189 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
= 4.1.1 =
|
191 |
-
* Fixed the bug due to which the
|
192 |
|
193 |
= 4.1 =
|
194 |
* Added new constants: "_SLUG", "_PREFIX", "_SETTINGS" and "_NAME".
|
195 |
* Value of the "_VERSION" constant replaced with information from the plugin header data.
|
196 |
* All references to the plugin name, slug, prefix are replaced with constants.
|
197 |
* The "allmetatags_field" function improved.
|
198 |
-
* The "name" attribute removed from the "
|
199 |
* Code formatting improved.
|
200 |
* F.A.Q. section updated.
|
201 |
|
3 |
Tags: meta, tag,tags, custom, simple, plugin, twitter, facebook, g+, google, google+, google plus, meta, search engine optimization, seo, social, alexa, alexa rank, pinterest, norton safe web, webmaster, webmaster tool, webmaster tools, web master tools, web master tools, bing, yandex, bing webmaster, yandex webmaster, google webmaster, web tools, open graph, publisher profile, publisher, author, authors, description, keyword, keywords, copyright, designer, admin, meta tag, pinterest, pinterest meta tag, pinterest website verification, pinterest verification, pinterest verify, plugin, verification, verify, webmaster plugin, wot, web of trust, specificfeeds, specific feeds, feed, rss feed, google shopping, google merchant center, structured data, woocommerce, schemas
|
4 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8A88KC7TFF6CS
|
5 |
Requires at least: 3.9
|
6 |
+
Tested up to: 4.8
|
7 |
+
Stable tag: 4.2
|
8 |
License: GPL3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
187 |
|
188 |
== Changelog ==
|
189 |
|
190 |
+
= 4.2 =
|
191 |
+
* Compatibility with PHP version 5.2 improved.
|
192 |
+
* PHP shorthands improved.
|
193 |
+
* Added function for generating the plugin constants.
|
194 |
+
* Some constants now get the value from the plugin header data.
|
195 |
+
* The "_plugin_version_number" function improved.
|
196 |
+
* Extra variable "$options" removed from the "settings.php" file.
|
197 |
+
* Added file "upgrade.php" for future upgrades.
|
198 |
+
|
199 |
= 4.1.1 =
|
200 |
+
* Fixed the bug due to which the "Warning: Constants may only evaluate to scalar values in" warning are displayed.
|
201 |
|
202 |
= 4.1 =
|
203 |
* Added new constants: "_SLUG", "_PREFIX", "_SETTINGS" and "_NAME".
|
204 |
* Value of the "_VERSION" constant replaced with information from the plugin header data.
|
205 |
* All references to the plugin name, slug, prefix are replaced with constants.
|
206 |
* The "allmetatags_field" function improved.
|
207 |
+
* The "name" attribute removed from the "form" tag.
|
208 |
* Code formatting improved.
|
209 |
* F.A.Q. section updated.
|
210 |
|