Version Description
- Adds compatibility with Draft It! add-on
- WP tested up to version 4.6.1
Download this release
Release Info
Developer | clevelandwebdeveloper |
Plugin | Spacer |
Version | 3.0.4 |
Comparing to | |
See all releases |
Code changes from version 3.0.3 to 3.0.4
- images/diart.png +0 -0
- index.php +40 -10
- readme.txt +8 -4
images/diart.png
ADDED
Binary file
|
index.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
Plugin Name: Spacer
|
5 |
Plugin URI: http://www.clevelandwebdeveloper.com/wordpress-plugins/spacer
|
6 |
Description: Adds a spacer button to the WYSIWYG visual editor which allows you to add precise custom spacing between lines in your posts and pages.
|
7 |
-
Version: 3.0.
|
8 |
Author: Justin Saad
|
9 |
Author URI: http://www.clevelandwebdeveloper.com
|
10 |
License: GPL2
|
@@ -111,19 +111,19 @@ class motech_spacer {
|
|
111 |
$user_id = get_current_user_id();
|
112 |
//there is no default spacer height set, and nag message not ignored...
|
113 |
//$checkdefault = get_option($this->plugin_slug . '_default_height_mobile','');
|
114 |
-
if ( ( ! get_user_meta($user_id, '
|
115 |
echo '<div id="message" class="updated fade notice"><p>';
|
116 |
-
echo "<b>".__(
|
117 |
echo "</p>";
|
118 |
-
echo "<p><strong><a href=\"http://www.clevelandwebdeveloper.com/?p=
|
119 |
}
|
120 |
}
|
121 |
|
122 |
function adminmessage_init()
|
123 |
{
|
124 |
-
if ( isset($_GET['
|
125 |
$user_id = get_current_user_id();
|
126 |
-
add_user_meta($user_id, '
|
127 |
if (wp_get_referer()) {
|
128 |
/* Redirects user to where they were before */
|
129 |
wp_safe_redirect(wp_get_referer());
|
@@ -493,7 +493,7 @@ function activespacer($id="") { #return attributes for active spacer based on id
|
|
493 |
</div>
|
494 |
|
495 |
|
496 |
-
<div class="grwrap panels">
|
497 |
|
498 |
<div id="green_ribbon_top">
|
499 |
<div id="green_ribbon_left">
|
@@ -552,6 +552,21 @@ function activespacer($id="") { #return attributes for active spacer based on id
|
|
552 |
|
553 |
|
554 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
555 |
|
556 |
|
557 |
<h2 class="nav-tab-wrapper">
|
@@ -681,7 +696,17 @@ if( is_plugin_active( 'spacer-panels/index.php' ) ) {
|
|
681 |
$actionbutton = '<a href="javascript:void(0)" title="'.__('Installed', 'motech-spacer').'" class="button-secondary msbutton">'.__('Installed', 'motech-spacer').'</a>';
|
682 |
}
|
683 |
?>
|
684 |
-
<div class="msaddon mscol"><img src="<?php echo plugins_url( 'images/part.png' , __FILE__ ) ?>"><h2><?php _e('Panels', 'motech-spacer') ?></h2><div class="msaddon-content"><p><?php _e('Style your own panels (think alerts, info boxes) and use them in your posts and pages whenever they are needed.', 'motech-spacer') ?></p><div class="msaddon-buttons"><a href="http://www.clevelandwebdeveloper.com/?p=931&utm_medium=plugin&utm_source=plugin-addons-page&utm_campaign=Spacers+Addons+Page&utm_content=Panels+Learn" target="_blank" class="button-secondary msdbutton"><?php _e('Learn More', 'motech-spacer') ?></a><?php echo $actionbutton ?></div></div></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
685 |
|
686 |
</div>
|
687 |
<div id="licenses" class="metabox-holder mainsection hidden wrap">
|
@@ -1856,8 +1881,13 @@ wp_get_current_user();
|
|
1856 |
// For some browsers, `attr` is undefined; for others, `attr` is false. Check for both.
|
1857 |
if (typeof addonname !== typeof undefined && addonname !== false) {
|
1858 |
// Element has this attribute
|
1859 |
-
|
1860 |
-
|
|
|
|
|
|
|
|
|
|
|
1861 |
}
|
1862 |
|
1863 |
});
|
4 |
Plugin Name: Spacer
|
5 |
Plugin URI: http://www.clevelandwebdeveloper.com/wordpress-plugins/spacer
|
6 |
Description: Adds a spacer button to the WYSIWYG visual editor which allows you to add precise custom spacing between lines in your posts and pages.
|
7 |
+
Version: 3.0.4
|
8 |
Author: Justin Saad
|
9 |
Author URI: http://www.clevelandwebdeveloper.com
|
10 |
License: GPL2
|
111 |
$user_id = get_current_user_id();
|
112 |
//there is no default spacer height set, and nag message not ignored...
|
113 |
//$checkdefault = get_option($this->plugin_slug . '_default_height_mobile','');
|
114 |
+
if ( ( ! get_user_meta($user_id, 'spacer2295_nag_ignore') ) && (current_user_can( 'manage_options' )) ) {
|
115 |
echo '<div id="message" class="updated fade notice"><p>';
|
116 |
+
echo "<b>".__("Take more time as you craft article updates. Designate 'draft' content with one-click! Try the new Spacer add-on, Draft It!", "motech-spacer")."</b>";
|
117 |
echo "</p>";
|
118 |
+
echo "<p><strong><a href=\"http://www.clevelandwebdeveloper.com/?p=1269&utm_medium=plugin&utm_source=plugin-notice-msg&utm_campaign=Spacer+Notice+Msg&utm_content=Draftit+Notice\" target=\"_blank\">".__('Start Drafting »', 'motech-spacer')."</a> | <a class=\"dismiss-notice\" style=\"color:red;\" href=\"".get_bloginfo( 'wpurl' ) . "/wp-admin/options-general.php?page=".$this->plugin_slug."-setting-admin&spacer2295_nag_ignore=0\" target=\"_parent\">".__('I got it. Thanks.', 'motech-spacer')." [X]</a></strong></p></div>";
|
119 |
}
|
120 |
}
|
121 |
|
122 |
function adminmessage_init()
|
123 |
{
|
124 |
+
if ( isset($_GET['spacer2295_nag_ignore']) && '0' == $_GET['spacer2295_nag_ignore'] ) {
|
125 |
$user_id = get_current_user_id();
|
126 |
+
add_user_meta($user_id, 'spacer2295_nag_ignore', 'true', true);
|
127 |
if (wp_get_referer()) {
|
128 |
/* Redirects user to where they were before */
|
129 |
wp_safe_redirect(wp_get_referer());
|
493 |
</div>
|
494 |
|
495 |
|
496 |
+
<div class="grwrap panels" style="display:none;">
|
497 |
|
498 |
<div id="green_ribbon_top">
|
499 |
<div id="green_ribbon_left">
|
552 |
|
553 |
|
554 |
</div>
|
555 |
+
|
556 |
+
<div class="grwrap draftit">
|
557 |
+
|
558 |
+
<div id="green_ribbon_top">
|
559 |
+
<div id="green_ribbon_left">
|
560 |
+
</div>
|
561 |
+
<div id="green_ribbon_base">
|
562 |
+
<span id="hms_get_premium" addonname="gotourl" useurl="http://www.clevelandwebdeveloper.com/?p=1269&utm_medium=plugin&utm_source=plugin-notice-msg&utm_campaign=Spacer+Notice+Msg&utm_content=Draftit+Notice"><?php _e('NEW! Get Draft It! »', 'motech-spacer')?></span>
|
563 |
+
<span class="hms_get_premium_meta"><?php _e('Draft It! Add-On now available for as low as $19!', 'motech-spacer')?></span>
|
564 |
+
</div>
|
565 |
+
<div id="green_ribbon_right">
|
566 |
+
</div>
|
567 |
+
</div>
|
568 |
+
|
569 |
+
</div>
|
570 |
|
571 |
|
572 |
<h2 class="nav-tab-wrapper">
|
696 |
$actionbutton = '<a href="javascript:void(0)" title="'.__('Installed', 'motech-spacer').'" class="button-secondary msbutton">'.__('Installed', 'motech-spacer').'</a>';
|
697 |
}
|
698 |
?>
|
699 |
+
<div class="msaddon mscol"><img src="<?php echo plugins_url( 'images/part.png' , __FILE__ ) ?>"><h2><?php _e('Panels', 'motech-spacer') ?></h2><div class="msaddon-content"><p><?php _e('Style your own panels (think alerts, info boxes) and use them in your posts and pages whenever they are needed.', 'motech-spacer') ?></p><div class="msaddon-buttons"><a href="http://www.clevelandwebdeveloper.com/?p=931&utm_medium=plugin&utm_source=plugin-addons-page&utm_campaign=Spacers+Addons+Page&utm_content=Panels+Learn" target="_blank" class="button-secondary msdbutton"><?php _e('Learn More', 'motech-spacer') ?></a><?php echo $actionbutton ?></div></div></div>
|
700 |
+
|
701 |
+
<?php
|
702 |
+
$actionbutton = '<a href="http://www.clevelandwebdeveloper.com/?p=1269&utm_medium=plugin&utm_source=plugin-addons-page&utm_campaign=Spacers+Addons+Page&utm_content=Draftit+Learn" target="_blank" title="'.__('Buy Draft It!', 'motech-spacer').'" class="button-primary msbutton">'.__('Buy Now', 'motech-spacer').'</a>';
|
703 |
+
if( is_plugin_active( 'spacer-draftit/index.php' ) ) {
|
704 |
+
$actionbutton = '<a href="javascript:void(0)" title="'.__('Active', 'motech-spacer').'" class="button-secondary msbutton">'.__('Active', 'motech-spacer').'</a>';
|
705 |
+
} elseif( file_exists(plugin_dir_path(__FILE__) . '../spacer-draftit/index.php') ) {
|
706 |
+
$actionbutton = '<a href="javascript:void(0)" title="'.__('Installed', 'motech-spacer').'" class="button-secondary msbutton">'.__('Installed', 'motech-spacer').'</a>';
|
707 |
+
}
|
708 |
+
?>
|
709 |
+
<div class="msaddon mscol"><img src="<?php echo plugins_url( 'images/diart.png' , __FILE__ ) ?>"><h2><?php _e('Draft It!', 'motech-spacer') ?></h2><div class="msaddon-content"><p><?php _e("Take more time as you craft article updates. Designate 'draft' content with one-click!", "motech-spacer") ?></p><div class="msaddon-buttons"><a href="http://www.clevelandwebdeveloper.com/?p=1269&utm_medium=plugin&utm_source=plugin-addons-page&utm_campaign=Spacers+Addons+Page&utm_content=Draftit+Learn" target="_blank" class="button-secondary msdbutton"><?php _e('Learn More', 'motech-spacer') ?></a><?php echo $actionbutton ?></div></div></div>
|
710 |
|
711 |
</div>
|
712 |
<div id="licenses" class="metabox-holder mainsection hidden wrap">
|
1881 |
// For some browsers, `attr` is undefined; for others, `attr` is false. Check for both.
|
1882 |
if (typeof addonname !== typeof undefined && addonname !== false) {
|
1883 |
// Element has this attribute
|
1884 |
+
if(addonname=="gotourl"){
|
1885 |
+
var useurl = jQuery(this).attr('useurl');
|
1886 |
+
window.open(useurl);
|
1887 |
+
}else{
|
1888 |
+
jQuery(".grwrap").hide();
|
1889 |
+
jQuery(".grwrap."+addonname).show();
|
1890 |
+
}
|
1891 |
}
|
1892 |
|
1893 |
});
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: clevelandwebdeveloper
|
|
3 |
Donate link: http://www.clevelandwebdeveloper.com/wordpress-plugins/donate.php
|
4 |
Tags: spacer, spacing, line space
|
5 |
Requires at least: 3.5
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag: 3.0.
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -85,6 +85,10 @@ Try adding <code>margin-bottom: 25px;</code> to the Spacer's Style setting.
|
|
85 |
|
86 |
== Changelog ==
|
87 |
|
|
|
|
|
|
|
|
|
88 |
= 3.0.3 =
|
89 |
* Adds a suggestion box! (Settings > Spacer > Suggestion Box [top tabs])
|
90 |
* Adds compatibility with Panels add-on
|
@@ -129,5 +133,5 @@ Try adding <code>margin-bottom: 25px;</code> to the Spacer's Style setting.
|
|
129 |
|
130 |
== Upgrade Notice ==
|
131 |
|
132 |
-
= 3.0.
|
133 |
-
New: This version adds
|
3 |
Donate link: http://www.clevelandwebdeveloper.com/wordpress-plugins/donate.php
|
4 |
Tags: spacer, spacing, line space
|
5 |
Requires at least: 3.5
|
6 |
+
Tested up to: 4.9.4
|
7 |
+
Stable tag: 3.0.4
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
85 |
|
86 |
== Changelog ==
|
87 |
|
88 |
+
= 3.0.4 =
|
89 |
+
* Adds compatibility with Draft It! add-on
|
90 |
+
* WP tested up to version 4.6.1
|
91 |
+
|
92 |
= 3.0.3 =
|
93 |
* Adds a suggestion box! (Settings > Spacer > Suggestion Box [top tabs])
|
94 |
* Adds compatibility with Panels add-on
|
133 |
|
134 |
== Upgrade Notice ==
|
135 |
|
136 |
+
= 3.0.4 =
|
137 |
+
New: This version adds compatibility with the new Draft It! add-on. Spacer is now tested up to WP version 4.6.1 - Enjoy!
|