Version Description
- Oct 3, 2020 =
- New feature: Restoring screen position after saving changes. No more annoying return to the top of the page after clicking the "Save" button.
- Maintenance: Loading of dynamic content on the settings page has been updated to more versatile.
Download this release
Release Info
Developer | Arthur Gareginyan |
Plugin | All Meta Tags |
Version | 4.41 |
Comparing to | |
See all releases |
Code changes from version 4.40 to 4.41
- all-meta-tags.php +1 -1
- inc/js/admin.js +2 -2
- inc/php/controls.php +21 -0
- inc/php/inline-js.php +38 -0
- inc/php/messages.php +8 -0
- inc/php/page.php +3 -0
- inc/php/tabs/settings.php +8 -0
- readme.txt +5 -1
all-meta-tags.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Description: Easily and safely add your custom meta tags to the WordPress website's head section. This is a must have tool for authors and website's owners.
|
6 |
* Author: Space X-Chimp
|
7 |
* Author URI: https://www.spacexchimp.com
|
8 |
-
* Version: 4.
|
9 |
* License: GPL3
|
10 |
* Text Domain: all-meta-tags
|
11 |
* Domain Path: /languages/
|
5 |
* Description: Easily and safely add your custom meta tags to the WordPress website's head section. This is a must have tool for authors and website's owners.
|
6 |
* Author: Space X-Chimp
|
7 |
* Author URI: https://www.spacexchimp.com
|
8 |
+
* Version: 4.41
|
9 |
* License: GPL3
|
10 |
* Text Domain: all-meta-tags
|
11 |
* Domain Path: /languages/
|
inc/js/admin.js
CHANGED
@@ -19,8 +19,8 @@ jQuery(document).ready(function($) {
|
|
19 |
}, 3000);
|
20 |
}
|
21 |
|
22 |
-
// Add dynamic content to page
|
23 |
-
$('.include-tab-store').load('https://
|
24 |
|
25 |
// Add questions and answers into spoilers and color them in different colors
|
26 |
$('.panel-group .panel').each(function(i) {
|
19 |
}, 3000);
|
20 |
}
|
21 |
|
22 |
+
// Add a dynamic content to the plugin settings page. Needed for having an up to date banners
|
23 |
+
$('.include-tab-store').load('https://resources.spacexchimp.com/wordpress/plugins/dynamic-content/page.html');
|
24 |
|
25 |
// Add questions and answers into spoilers and color them in different colors
|
26 |
$('.panel-group .panel').each(function(i) {
|
inc/php/controls.php
CHANGED
@@ -99,3 +99,24 @@ function spacexchimp_p004_control_textarea( $name, $label, $placeholder, $help=n
|
|
99 |
// Print a help text
|
100 |
spacexchimp_p004_control_help( $help );
|
101 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
// Print a help text
|
100 |
spacexchimp_p004_control_help( $help );
|
101 |
}
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Generator of the hidden option for saving plugin settings to database
|
105 |
+
*/
|
106 |
+
function spacexchimp_p004_control_hidden( $name, $value ) {
|
107 |
+
|
108 |
+
// Put value of plugin constants into an array for easier access
|
109 |
+
$plugin = spacexchimp_p004_plugin();
|
110 |
+
|
111 |
+
// Generate a part of table
|
112 |
+
$out = "<input
|
113 |
+
type='hidden'
|
114 |
+
name='" . $plugin['settings'] . "_settings[$name]'
|
115 |
+
id='" . $plugin['settings'] . "_settings[$name]'
|
116 |
+
value='$value'
|
117 |
+
class='control-hidden $name'
|
118 |
+
>";
|
119 |
+
|
120 |
+
// Print the generated part of table
|
121 |
+
echo $out;
|
122 |
+
}
|
inc/php/inline-js.php
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Prevent Direct Access
|
5 |
+
*/
|
6 |
+
defined( 'ABSPATH' ) or die( "Restricted access!" );
|
7 |
+
|
8 |
+
// Retrieve options from database and declare variables
|
9 |
+
$options = get_option( $plugin['settings'] . '_settings' );
|
10 |
+
|
11 |
+
// Make the "$options" array if the plugin options data in the database is not exist
|
12 |
+
if ( ! is_array( $options ) ) {
|
13 |
+
$options = array();
|
14 |
+
}
|
15 |
+
|
16 |
+
$hidden_scrollto = !empty( $options['hidden_scrollto'] ) ? $options['hidden_scrollto'] : '0';
|
17 |
+
|
18 |
+
?>
|
19 |
+
<script type="text/javascript">
|
20 |
+
jQuery(document).ready(function($) {
|
21 |
+
|
22 |
+
// Scroll to previouse position
|
23 |
+
var hidden_scrollto = <?php echo $hidden_scrollto; ?>;
|
24 |
+
$(document).scrollTop(hidden_scrollto);
|
25 |
+
|
26 |
+
// Update the value of the scroll position option
|
27 |
+
$(window).scroll(function() {
|
28 |
+
$('input:hidden.control-hidden.hidden_scrollto').val($(document).scrollTop());
|
29 |
+
});
|
30 |
+
});
|
31 |
+
</script>
|
32 |
+
<?php
|
33 |
+
|
34 |
+
// Update the plugin options data in the database
|
35 |
+
if ( $hidden_scrollto != '0' ) {
|
36 |
+
$options['hidden_scrollto'] = '0';
|
37 |
+
update_option( $plugin['settings'] . '_settings', $options );
|
38 |
+
}
|
inc/php/messages.php
CHANGED
@@ -126,5 +126,13 @@ function spacexchimp_p004_message_save() {
|
|
126 |
<?php _e( 'Settings saved successfully.', $plugin['text'] ); ?>
|
127 |
</p>
|
128 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
<?php
|
130 |
}
|
126 |
<?php _e( 'Settings saved successfully.', $plugin['text'] ); ?>
|
127 |
</p>
|
128 |
</div>
|
129 |
+
<style>
|
130 |
+
#message.updated {
|
131 |
+
z-index: 9999;
|
132 |
+
position: fixed;
|
133 |
+
top: 40px;
|
134 |
+
right: 40px;
|
135 |
+
}
|
136 |
+
</style>
|
137 |
<?php
|
138 |
}
|
inc/php/page.php
CHANGED
@@ -55,6 +55,9 @@ function spacexchimp_p004_render_submenu_page() {
|
|
55 |
<?php require_once( $plugin['path'] . 'inc/php/sidebar.php' ); ?>
|
56 |
|
57 |
<?php require_once( $plugin['path'] . 'inc/php/tabs/settings.php' ); ?>
|
|
|
|
|
|
|
58 |
</div>
|
59 |
<!-- END-TAB MAIN -->
|
60 |
|
55 |
<?php require_once( $plugin['path'] . 'inc/php/sidebar.php' ); ?>
|
56 |
|
57 |
<?php require_once( $plugin['path'] . 'inc/php/tabs/settings.php' ); ?>
|
58 |
+
|
59 |
+
<!-- INCLUDE PHP-JS FILE -->
|
60 |
+
<?php require_once( $plugin['path'] . 'inc/php/inline-js.php' ); ?>
|
61 |
</div>
|
62 |
<!-- END-TAB MAIN -->
|
63 |
|
inc/php/tabs/settings.php
CHANGED
@@ -204,6 +204,14 @@ defined( 'ABSPATH' ) or die( "Restricted access!" );
|
|
204 |
</div>
|
205 |
</div>
|
206 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
207 |
<!-- SUBMIT -->
|
208 |
<input type="submit" name="submit" id="submit" class="btn btn-default btn-lg button-save-main" value="<?php _e( 'Save changes', $plugin['text'] ); ?>">
|
209 |
<!-- END SUBMIT -->
|
204 |
</div>
|
205 |
</div>
|
206 |
|
207 |
+
<!-- HIDDEN -->
|
208 |
+
<?php
|
209 |
+
spacexchimp_p004_control_hidden( 'hidden_scrollto',
|
210 |
+
'0'
|
211 |
+
);
|
212 |
+
?>
|
213 |
+
<!-- END HIDDEN -->
|
214 |
+
|
215 |
<!-- SUBMIT -->
|
216 |
<input type="submit" name="submit" id="submit" class="btn btn-default btn-lg button-save-main" value="<?php _e( 'Save changes', $plugin['text'] ); ?>">
|
217 |
<!-- END SUBMIT -->
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Donate link: https://www.spacexchimp.com/donate.html
|
|
5 |
Requires at least: 4.9
|
6 |
Tested up to: 5.5
|
7 |
Requires PHP: 5.6
|
8 |
-
Stable tag: 4.
|
9 |
License: GPL3
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
@@ -224,6 +224,10 @@ Commercial licensing (e.g. for projects that can’t use an open-source license)
|
|
224 |
|
225 |
== Changelog ==
|
226 |
|
|
|
|
|
|
|
|
|
227 |
= 4.40 - Aug 10, 2020 =
|
228 |
* Maintenance: Ensure compatibility with upcoming WordPress 5.5.
|
229 |
* Enhancement: Change the color of some links on the "Plugins" page to the right emotional colors. (Thanks to Abdulla Hussain)
|
5 |
Requires at least: 4.9
|
6 |
Tested up to: 5.5
|
7 |
Requires PHP: 5.6
|
8 |
+
Stable tag: 4.41
|
9 |
License: GPL3
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
224 |
|
225 |
== Changelog ==
|
226 |
|
227 |
+
= 4.41 - Oct 3, 2020 =
|
228 |
+
* New feature: Restoring screen position after saving changes. No more annoying return to the top of the page after clicking the "Save" button.
|
229 |
+
* Maintenance: Loading of dynamic content on the settings page has been updated to more versatile.
|
230 |
+
|
231 |
= 4.40 - Aug 10, 2020 =
|
232 |
* Maintenance: Ensure compatibility with upcoming WordPress 5.5.
|
233 |
* Enhancement: Change the color of some links on the "Plugins" page to the right emotional colors. (Thanks to Abdulla Hussain)
|