Cryout Serious Theme Settings - Version 0.5.3

Version Description

  • Added support for Tempera 1.4
  • Fixed typo causing error in compatibility code
Download this release

Release Info

Developer Cryout Creations
Plugin Icon wp plugin Cryout Serious Theme Settings
Version 0.5.3
Comparing to
See all releases

Code changes from version 0.5.2 to 0.5.3

Files changed (4) hide show
  1. cryout-theme-settings.php +7 -6
  2. inc/nirvana.php +1 -1
  3. inc/tempera.php +22 -0
  4. readme.txt +15 -8
cryout-theme-settings.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Cryout Serious Theme Settings
4
  Plugin URI: http://www.cryoutcreations.eu/serious-theme-settings
5
  Description: This plugin is designed to restore our theme's settings page functionality after the enforcement of the Customize-based theme settings. It is only compatible with and will only function when one of our themes is active: Nirvana, Parabola or Tempera.
6
- Version: 0.5.2
7
  Author: Cryout Creations
8
  Author URI: http://www.cryoutcreations.eu
9
  License: GPLv3
@@ -11,7 +11,7 @@
11
  */
12
 
13
  class Cryout_Theme_Settings {
14
- public $version = "0.5.2";
15
  public $settings = array();
16
 
17
  private $status = 0; // 0 = inactive, 1 = active, 2 = good theme, wrong version, 3 = wrong theme, 4 = compatibility for wp4.4
@@ -83,7 +83,7 @@ class Cryout_Theme_Settings {
83
  // supported version
84
  $this->status = 1;
85
  return 1;
86
- elseif ( ($version_compare( $current_theme_version, $this->compatibility_themes[$current_theme_slug] ) >=0 ) &&
87
  (version_compare($wp_version, '4.4') >= 0) ):
88
  // compatibility mode
89
  $this->status = 4;
@@ -101,8 +101,9 @@ class Cryout_Theme_Settings {
101
 
102
  } // supported_theme()
103
 
104
- public function enqueue_script() {
105
- wp_enqueue_script( 'cryout-theme-settings-code', plugins_url( 'code.js', __FILE__ ) );
 
106
  } // enqueue_script()
107
 
108
  /* currently not used
@@ -151,6 +152,6 @@ class Cryout_Theme_Settings {
151
 
152
 
153
  /* * * * get things going * * * */
154
- $cryout_theme_settings = new Cryout_Theme_Settings;
155
 
156
  // EOF
3
  Plugin Name: Cryout Serious Theme Settings
4
  Plugin URI: http://www.cryoutcreations.eu/serious-theme-settings
5
  Description: This plugin is designed to restore our theme's settings page functionality after the enforcement of the Customize-based theme settings. It is only compatible with and will only function when one of our themes is active: Nirvana, Parabola or Tempera.
6
+ Version: 0.5.3
7
  Author: Cryout Creations
8
  Author URI: http://www.cryoutcreations.eu
9
  License: GPLv3
11
  */
12
 
13
  class Cryout_Theme_Settings {
14
+ public $version = "0.5.3";
15
  public $settings = array();
16
 
17
  private $status = 0; // 0 = inactive, 1 = active, 2 = good theme, wrong version, 3 = wrong theme, 4 = compatibility for wp4.4
83
  // supported version
84
  $this->status = 1;
85
  return 1;
86
+ elseif ( (version_compare( $current_theme_version, $this->compatibility_themes[$current_theme_slug] ) >=0 ) &&
87
  (version_compare($wp_version, '4.4') >= 0) ):
88
  // compatibility mode
89
  $this->status = 4;
101
 
102
  } // supported_theme()
103
 
104
+ public function enqueue_script($hook) {
105
+ if ( $GLOBALS['plugin_page'] == $this->current_theme['slug'] . '-page' )
106
+ wp_enqueue_script( 'cryout-theme-settings-code', plugins_url( 'code.js', __FILE__ ), NULL, $this->version );
107
  } // enqueue_script()
108
 
109
  /* currently not used
152
 
153
 
154
  /* * * * get things going * * * */
155
+ if (is_admin()) $cryout_theme_settings = new Cryout_Theme_Settings;
156
 
157
  // EOF
inc/nirvana.php CHANGED
@@ -10,7 +10,7 @@ function nirvana_theme_settings_restore($class='') {
10
  <form name="nirvana_form" id="nirvana_form" action="options.php" method="post" enctype="multipart/form-data">
11
  <div id="accordion" class="<?php echo $class; ?>">
12
  <?php settings_fields('nirvana_settings'); ?>
13
- <?php do_settings_sections($cryout_theme_settings->current_theme['slug'] . '-page'); ?>
14
  </div>
15
  <div id="submitDiv">
16
  <br>
10
  <form name="nirvana_form" id="nirvana_form" action="options.php" method="post" enctype="multipart/form-data">
11
  <div id="accordion" class="<?php echo $class; ?>">
12
  <?php settings_fields('nirvana_settings'); ?>
13
+ <?php do_settings_sections('nirvana-page'); ?>
14
  </div>
15
  <div id="submitDiv">
16
  <br>
inc/tempera.php CHANGED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (function_exists('tempera_init_fn')):
3
+ add_action('admin_init', 'tempera_init_fn');
4
+ endif;
5
+
6
+ function tempera_theme_settings_restore($class='') {
7
+ global $wp_version;
8
+ global $cryout_theme_settings;
9
+ ?>
10
+ <form name="tempera_form" id="tempera_form" action="options.php" method="post" enctype="multipart/form-data">
11
+ <div id="accordion">
12
+ <?php settings_fields('tempera_settings'); ?>
13
+ <?php do_settings_sections('tempera-page'); ?>
14
+ </div>
15
+ <div id="submitDiv">
16
+ <br>
17
+ <input class="button" name="tempera_settings[tempera_submit]" type="submit" id="tempera_sumbit" style="float:right;" value="<?php _e('Save Changes','tempera'); ?>" />
18
+ <input class="button" name="tempera_settings[tempera_defaults]" id="tempera_defaults" type="submit" style="float:left;" value="<?php _e('Reset to Defaults','tempera'); ?>" />
19
+ </div>
20
+ </form>
21
+ <?php
22
+ } // tempera_theme_settings_buttons()
readme.txt CHANGED
@@ -4,12 +4,11 @@ Donate link: http://www.cryoutcreations.eu/donate/
4
  Tags: theme, admin
5
  Requires at least: 4.0
6
  Tested up to: 4.4-RC1
7
- Stable tag: 0.5.2
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl.html
10
 
11
- This plugin is designed to inter-operate with our Mantra, Parabola, Tempera, Nirvana themes and restore their advanced settings pages.
12
- It will also return the themes' settings pages to working condition after a problematic functionality change in Wordpress 4.4-RC1 and newer.
13
 
14
  == Description ==
15
 
@@ -19,24 +18,32 @@ Additionally, it returns the themes' settings pages to working condition in Mant
19
 
20
  = Compatibility =
21
  The plugin is meant to be used with the following theme releases:
 
22
  * Parabola version 1.6 and newer
23
  * Tempera version 1.4 and newer
24
  * Nirvana version 1.2 and newer
25
 
26
  On Wordpress 4.4-RC1 or newer it will restore the settings pages to working condition in:
27
- * Parabola versions up to 1.5.1
28
- * Tempera versions up to 1.3.3
29
- * Mantra versions between 2.0 and 2.4.1.1
 
 
 
30
 
31
  == Installation ==
32
 
33
- 0. Have one of our supported themes activated.
34
  1. Upload `cryout-theme-settings` folder to the `/wp-content/plugins/` directory
35
  2. Activate the plugin through the 'Plugins' menu in WordPress
36
  3. Navigate to Appearance > "Theme" Settings to access the restored theme settings page.
37
 
38
  == Changelog ==
39
 
 
 
 
 
40
  = 0.5.2 =
41
  * Added themes compatibility fix for WordPress 4.4-RC1 and newer
42
 
@@ -45,4 +52,4 @@ On Wordpress 4.4-RC1 or newer it will restore the settings pages to working cond
45
  * Clarified plugin information
46
 
47
  = 0.5 =
48
- * Initial release. Currently only Nirvana implements support for this plugin.
4
  Tags: theme, admin
5
  Requires at least: 4.0
6
  Tested up to: 4.4-RC1
7
+ Stable tag: 0.5.3
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl.html
10
 
11
+ This plugin is designed to inter-operate with our Mantra, Parabola, Tempera, Nirvana themes to restore their settings pages.
 
12
 
13
  == Description ==
14
 
18
 
19
  = Compatibility =
20
  The plugin is meant to be used with the following theme releases:
21
+
22
  * Parabola version 1.6 and newer
23
  * Tempera version 1.4 and newer
24
  * Nirvana version 1.2 and newer
25
 
26
  On Wordpress 4.4-RC1 or newer it will restore the settings pages to working condition in:
27
+
28
+ * Parabola versions 0.9 - 1.5.1
29
+ * Tempera versions 0.9 - 1.3.3
30
+ * Mantra versions 2.0 - 2.4.1.1
31
+
32
+ You do not need this plugin if you do not use one of the listed themes and do not use Wordpress 4.4
33
 
34
  == Installation ==
35
 
36
+ 0. Have one of our supported themes activated with a non-working or missing settings page.
37
  1. Upload `cryout-theme-settings` folder to the `/wp-content/plugins/` directory
38
  2. Activate the plugin through the 'Plugins' menu in WordPress
39
  3. Navigate to Appearance > "Theme" Settings to access the restored theme settings page.
40
 
41
  == Changelog ==
42
 
43
+ = 0.5.3 =
44
+ * Added support for Tempera 1.4
45
+ * Fixed typo causing error in compatibility code
46
+
47
  = 0.5.2 =
48
  * Added themes compatibility fix for WordPress 4.4-RC1 and newer
49
 
52
  * Clarified plugin information
53
 
54
  = 0.5 =
55
+ * Initial release. Currently only Nirvana 1.2 implements support for this plugin.