Version Description
- Improved HTTPS support
Download this release
Release Info
Developer | hearken |
Plugin | Custom CSS and Javascript |
Version | 2.0.5 |
Comparing to | |
See all releases |
Code changes from version 2.0.4 to 2.0.5
- custom-css-and-javascript.php +5 -2
- readme.txt +5 -2
custom-css-and-javascript.php
CHANGED
@@ -2,7 +2,7 @@
|
|
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-author-uri
|
8 |
* License: GNU General Public License version 2 or later
|
@@ -11,11 +11,14 @@
|
|
11 |
|
12 |
add_action('wp_enqueue_scripts', 'hm_custom_css_js_scripts', 999999);
|
13 |
function hm_custom_css_js_scripts() {
|
14 |
-
$uploadDir = wp_upload_dir();
|
15 |
if (current_user_can('edit_theme_options')) {
|
16 |
wp_enqueue_script('hm_custom_js', get_site_url(null, '/index.php').'?hm_custom_js_draft=1', array(), time());
|
17 |
wp_enqueue_style('hm_custom_css', get_site_url(null, '/index.php').'?hm_custom_css_draft=1', array(), time());
|
18 |
} else {
|
|
|
|
|
|
|
|
|
19 |
if (file_exists($uploadDir['basedir'].'/hm_custom_css_js/custom.js'))
|
20 |
wp_enqueue_script('hm_custom_js', $uploadDir['baseurl'].'/hm_custom_css_js/custom.js', array(), get_option('hm_custom_javascript_ver', 1));
|
21 |
if (file_exists($uploadDir['basedir'].'/hm_custom_css_js/custom.css'))
|
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.5
|
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
|
11 |
|
12 |
add_action('wp_enqueue_scripts', 'hm_custom_css_js_scripts', 999999);
|
13 |
function hm_custom_css_js_scripts() {
|
|
|
14 |
if (current_user_can('edit_theme_options')) {
|
15 |
wp_enqueue_script('hm_custom_js', get_site_url(null, '/index.php').'?hm_custom_js_draft=1', array(), time());
|
16 |
wp_enqueue_style('hm_custom_css', get_site_url(null, '/index.php').'?hm_custom_css_draft=1', array(), time());
|
17 |
} else {
|
18 |
+
$uploadDir = wp_upload_dir();
|
19 |
+
if (is_ssl()) {
|
20 |
+
$uploadDir['baseurl'] = set_url_scheme($uploadDir['baseurl'], 'https');
|
21 |
+
}
|
22 |
if (file_exists($uploadDir['basedir'].'/hm_custom_css_js/custom.js'))
|
23 |
wp_enqueue_script('hm_custom_js', $uploadDir['baseurl'].'/hm_custom_css_js/custom.js', array(), get_option('hm_custom_javascript_ver', 1));
|
24 |
if (file_exists($uploadDir['basedir'].'/hm_custom_css_js/custom.css'))
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: hearken
|
|
3 |
Donate link: https://potentplugins.com/donate/?utm_source=custom-css-and-javascript&utm_medium=link&utm_campaign=wp-plugin-readme-donate-link
|
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 |
|
@@ -42,6 +42,9 @@ Alternatively, you can manually upload the plugin to your wp-content/plugins dir
|
|
42 |
|
43 |
== Changelog ==
|
44 |
|
|
|
|
|
|
|
45 |
= 2.0 =
|
46 |
* Added revisions
|
47 |
* Added drafts/previewing
|
3 |
Donate link: https://potentplugins.com/donate/?utm_source=custom-css-and-javascript&utm_medium=link&utm_campaign=wp-plugin-readme-donate-link
|
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.3
|
7 |
+
Stable tag: 2.0.5
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
42 |
|
43 |
== Changelog ==
|
44 |
|
45 |
+
= 2.0.5 =
|
46 |
+
* Improved HTTPS support
|
47 |
+
|
48 |
= 2.0 =
|
49 |
* Added revisions
|
50 |
* Added drafts/previewing
|