Version Description
Download this release
Release Info
Developer | hearken |
Plugin | Custom CSS and Javascript |
Version | 2.0.4 |
Comparing to | |
See all releases |
Code changes from version 2.0.3 to 2.0.4
- custom-css-and-javascript.php +32 -2
- readme.txt +1 -1
custom-css-and-javascript.php
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
/**
|
3 |
* Plugin Name: Custom CSS and Javascript
|
4 |
* Description: Easily add custom CSS and Javascript code to your WordPress site.
|
5 |
-
* Version: 2.0.
|
6 |
* Author: Potent Plugins
|
7 |
-
* Author URI: http://potentplugins.com/?utm_source=custom-css-and-javascript&utm_medium=link&utm_campaign=wp-plugin-
|
8 |
* License: GNU General Public License version 2 or later
|
9 |
* License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html
|
10 |
*/
|
@@ -304,4 +304,34 @@ function hm_custom_css_js_page($mode) {
|
|
304 |
</div>
|
305 |
');
|
306 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
307 |
?>
|
2 |
/**
|
3 |
* Plugin Name: Custom CSS and Javascript
|
4 |
* Description: Easily add custom CSS and Javascript code to your WordPress site.
|
5 |
+
* Version: 2.0.4
|
6 |
* Author: Potent Plugins
|
7 |
+
* Author URI: http://potentplugins.com/?utm_source=custom-css-and-javascript&utm_medium=link&utm_campaign=wp-plugin-author-uri
|
8 |
* License: GNU General Public License version 2 or later
|
9 |
* License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html
|
10 |
*/
|
304 |
</div>
|
305 |
');
|
306 |
}
|
307 |
+
|
308 |
+
/* Review/donate notice */
|
309 |
+
|
310 |
+
register_activation_hook(__FILE__, 'hm_custom_css_js_first_activate');
|
311 |
+
function hm_custom_css_js_first_activate() {
|
312 |
+
$pre = 'hm_custom_css_js';
|
313 |
+
$firstActivate = get_option($pre.'_first_activate');
|
314 |
+
if (empty($firstActivate)) {
|
315 |
+
update_option($pre.'_first_activate', time());
|
316 |
+
}
|
317 |
+
}
|
318 |
+
if (is_admin() && get_option('hm_custom_css_js_rd_notice_hidden') != 1 && time() - get_option('hm_custom_css_js_first_activate') >= (14*86400)) {
|
319 |
+
add_action('admin_notices', 'hm_custom_css_js_rd_notice');
|
320 |
+
add_action('wp_ajax_hm_custom_css_js_rd_notice_hide', 'hm_custom_css_js_rd_notice_hide');
|
321 |
+
}
|
322 |
+
function hm_custom_css_js_rd_notice() {
|
323 |
+
$pre = 'hm_custom_css_js';
|
324 |
+
$slug = 'custom-css-and-javascript';
|
325 |
+
echo('
|
326 |
+
<div id="'.$pre.'_rd_notice" class="updated notice is-dismissible"><p>Does the <strong>Custom CSS and Javascript</strong> plugin make your life easier?
|
327 |
+
Please support our free plugin by <a href="https://wordpress.org/support/view/plugin-reviews/'.$slug.'" target="_blank">writing a review</a> and/or <a href="https://potentplugins.com/donate/?utm_source='.$slug.'&utm_medium=link&utm_campaign=wp-plugin-notice-donate-link" target="_blank">making a donation</a>!
|
328 |
+
Thanks!</p></div>
|
329 |
+
<script>jQuery(document).ready(function($){$(\'#'.$pre.'_rd_notice\').on(\'click\', \'.notice-dismiss\', function(){jQuery.post(ajaxurl, {action:\'hm_custom_css_js_rd_notice_hide\'})});});</script>
|
330 |
+
');
|
331 |
+
}
|
332 |
+
function hm_custom_css_js_rd_notice_hide() {
|
333 |
+
$pre = 'hm_custom_css_js';
|
334 |
+
update_option($pre.'_rd_notice_hidden', 1);
|
335 |
+
}
|
336 |
+
|
337 |
?>
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://potentplugins.com/donate/?utm_source=custom-css-and-javascr
|
|
4 |
Tags: css, custom css, styles, custom styles, stylesheet, custom stylesheet, javascript, custom javascript, js, custom js
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 4.5
|
7 |
-
Stable tag: 2.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
4 |
Tags: css, custom css, styles, custom styles, stylesheet, custom stylesheet, javascript, custom javascript, js, custom js
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 4.5
|
7 |
+
Stable tag: 2.0.4
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|