Cryout Serious Theme Settings - Version 0.5.8.1

Version Description

  • Fixed compatibility mode malfunctioning
  • Fixed misssing theme images in compatibility mode info
Download this release

Release Info

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

Code changes from version 0.5.8 to 0.5.8.1

Files changed (5) hide show
  1. cryout-theme-settings.php +190 -190
  2. inc/settings.php +145 -145
  3. media/verbosa.jpg +0 -0
  4. readme.txt +87 -83
  5. style.css +4 -0
cryout-theme-settings.php CHANGED
@@ -1,190 +1,190 @@
1
- <?php
2
- /*
3
- Plugin Name: Cryout Serious Theme Settings
4
- Plugin URI: https://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, Tempera or Mantra.
6
- Version: 0.5.8
7
- Author: Cryout Creations
8
- Author URI: https://www.cryoutcreations.eu
9
- License: GPLv3
10
- License URI: http://www.gnu.org/licenses/gpl.html
11
- */
12
-
13
- class Cryout_Theme_Settings {
14
- public $version = "0.5.8";
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, 5 = theme requires update
18
-
19
- private $supported_themes = array(
20
- 'nirvana' => '1.2',
21
- 'tempera' => '1.4',
22
- 'parabola' => '1.6',
23
- 'mantra' => '2.5',
24
- );
25
- private $compatibility_themes = array(
26
- 'tempera' => '0.9',
27
- 'parabola' => '0.9',
28
- 'mantra' => '2.0',
29
- );
30
- private $requires_update = array(
31
- 'nirvana' => '0.9',
32
- );
33
- private $slug = 'cryout-theme-settings';
34
- private $title = '';
35
- public $current_theme = array();
36
- public $plugin_page = array();
37
- public $renamed_theme = false;
38
-
39
- public function __construct(){
40
- add_action( 'init', array( $this, 'register' ) );
41
- } // __construct()
42
-
43
- public function register(){
44
-
45
- $this->title = __( 'Cryout Serious Theme Settings', 'cryout-theme-settings' );
46
- if ( $this->supported_theme() ):
47
-
48
- switch ($this->status):
49
- case 1: // restore theme settings
50
-
51
- include_once( plugin_dir_path( __FILE__ ) . 'inc/' . strtolower($this->current_theme['slug']) . '.php' );
52
-
53
- break;
54
- case 4: // repair wrong headings
55
-
56
- add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_script' ) );
57
-
58
- break;
59
-
60
- default:
61
- break;
62
- endswitch;
63
-
64
- endif;
65
-
66
- $cryout_theme_settings_slug = plugin_basename(__FILE__);
67
- add_filter( 'plugin_action_links_'.$cryout_theme_settings_slug, array( $this, 'settings_link' ) );
68
- add_filter( 'plugin_row_meta', array( $this, 'meta_links' ), 10, 2 );
69
- add_action( 'admin_menu', array( $this, 'settings_menu' ) );
70
- add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_style' ) );
71
-
72
- } // register()
73
-
74
- function supported_theme(){
75
- global $wp_version;
76
-
77
- $current_theme_slug = strtolower( wp_get_theme()->Template );
78
- $current_theme_version = wp_get_theme($current_theme_slug)->Version;
79
-
80
- if (!in_array( $current_theme_slug, array_keys( $this->supported_themes) )) {
81
- // theme slug does not match supported themes
82
- // perform additional checks for theme constants
83
-
84
- if (defined('MANTRA_VERSION')) {
85
- if ($current_theme_slug != 'mantra') $this->renamed_theme = true;
86
- $current_theme_slug = 'mantra';
87
- $current_theme_version = MANTRA_VERSION;
88
- }
89
- if (defined('PARABOLA_VERSION')) {
90
- if ($current_theme_slug != 'parabola') $this->renamed_theme = true;
91
- $current_theme_slug = 'parabola';
92
- $current_theme_version = PARABOLA_VERSION;
93
- }
94
- if (defined('TEMPERA_VERSION')) {
95
- if ($current_theme_slug != 'tempera') $this->renamed_theme = true;
96
- $current_theme_slug = 'tempera';
97
- $current_theme_version = TEMPERA_VERSION;
98
- }
99
- if (defined('NIRVANA_VERSION')) {
100
- if ($current_theme_slug != 'nirvana') $this->renamed_theme = true;
101
- $current_theme_slug = 'nirvana';
102
- $current_theme_version = NIRVANA_VERSION;
103
- }
104
- if (defined('_CRYOUT_THEME_NAME')) {
105
- if ($current_theme_slug != _CRYOUT_THEME_NAME) $this->renamed_theme = true;
106
- $current_theme_slug = _CRYOUT_THEME_NAME;
107
- if (defined('_CRYOUT_THEME_VERSION')) $current_theme_version = _CRYOUT_THEME_VERSION;
108
- }
109
- } // end additional checks
110
-
111
- $this->current_theme = array(
112
- 'slug' => $current_theme_slug,
113
- 'version' => $current_theme_version,
114
- );
115
-
116
- if (in_array( $current_theme_slug, array_keys( $this->supported_themes) )) {
117
- // supported theme, check version
118
- if ( version_compare( $current_theme_version, $this->supported_themes[$current_theme_slug], '>=' ) ):
119
- // supported version
120
- $this->status = 1;
121
- return 1;
122
- elseif ( isset($this->compatibility_themes[$current_theme_slug]) && (version_compare( $current_theme_version, $this->compatibility_themes[$current_theme_slug], '>=' ) ) &&
123
- (version_compare($wp_version, '4.3.9999') >= 0) ):
124
- // compatibility mode
125
- $this->status = 4;
126
- return 4;
127
- elseif ( isset($this->requires_update[$current_theme_slug])):
128
- // theme requires update to be supported
129
- $this->status = 5;
130
- return 0;
131
- else:
132
- // unsupported version
133
- $this->status = 2;
134
- return 0;
135
- endif;
136
- } else {
137
- // unsupported theme
138
- $this->status = 3;
139
- return 0;
140
- };
141
-
142
- } // supported_theme()
143
-
144
- public function enqueue_script($hook) {
145
- if ( $hook == $this->current_theme['slug'] . '-page' ) {
146
- wp_enqueue_script( 'cryout-theme-settings-code', plugins_url( 'code.js', __FILE__ ), NULL, $this->version );
147
- }
148
- } // enqueue_script()
149
-
150
- public function enqueue_style($hook) {
151
- if ( $hook == $this->plugin_page ) {
152
- wp_enqueue_style( 'cryout-theme-settings-style', plugins_url( 'style.css', __FILE__ ), NULL, $this->version );
153
- }
154
- }
155
-
156
- // register settings page to dashboard menu
157
- public function settings_menu() {
158
- $this->plugin_page = add_submenu_page('themes.php', $this->title, $this->title, 'manage_options', $this->slug, array( $this, 'settings_page' ) );
159
- }
160
-
161
- // add settings link on plugin page
162
- public function settings_link($links) {
163
- $settings_link = '<a href="themes.php?page=' . $this->slug . '">' . __( 'About Plugin', 'cryout-theme-settings' ) . '</a>';
164
- array_unshift($links, $settings_link);
165
- return $links;
166
- }
167
-
168
- // add plugin meta links
169
- public function meta_links( $links, $file ) {
170
- // Check plugin
171
- if ( $file === plugin_basename( __FILE__ ) ) {
172
- unset( $links[2] );
173
- $links[] = '<a href="http://www.cryoutcreations.eu/cryout-theme-settings/" target="_blank">' . __( 'Plugin homepage', 'cryout-serious-slider' ) . '</a>';
174
- $links[] = '<a href="https://www.cryoutcreations.eu/forums/f/wordpress/plugins/serious-settings" target="_blank">' . __( 'Support forum', 'cryout-serious-slider' ) . '</a>';
175
- $links[] = '<a href="http://wordpress.org/plugins/cryout-theme-settings/#developers" target="_blank">' . __( 'Changelog', 'cryout-serious-slider' ) . '</a>';
176
- }
177
- return $links;
178
- }
179
-
180
- public function settings_page() {
181
- require_once( plugin_dir_path( __FILE__ ) . 'inc/settings.php' );
182
- }
183
-
184
- } // class Cryout_Theme_Settings
185
-
186
-
187
- /* * * * get things going * * * */
188
- if (is_admin()) $cryout_theme_settings = new Cryout_Theme_Settings;
189
-
190
- // EOF
1
+ <?php
2
+ /*
3
+ Plugin Name: Cryout Serious Theme Settings
4
+ Plugin URI: https://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, Tempera or Mantra.
6
+ Version: 0.5.8.1
7
+ Author: Cryout Creations
8
+ Author URI: https://www.cryoutcreations.eu
9
+ License: GPLv3
10
+ License URI: http://www.gnu.org/licenses/gpl.html
11
+ */
12
+
13
+ class Cryout_Theme_Settings {
14
+ public $version = "0.5.8.1";
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, 5 = theme requires update
18
+
19
+ private $supported_themes = array(
20
+ 'nirvana' => '1.2',
21
+ 'tempera' => '1.4',
22
+ 'parabola' => '1.6',
23
+ 'mantra' => '2.5',
24
+ );
25
+ private $compatibility_themes = array(
26
+ 'tempera' => '0.9',
27
+ 'parabola' => '0.9',
28
+ 'mantra' => '2.0',
29
+ );
30
+ private $requires_update = array(
31
+ 'nirvana' => '0.9',
32
+ );
33
+ private $slug = 'cryout-theme-settings';
34
+ private $title = '';
35
+ public $current_theme = array();
36
+ public $plugin_page = array();
37
+ public $renamed_theme = false;
38
+
39
+ public function __construct(){
40
+ add_action( 'init', array( $this, 'register' ) );
41
+ } // __construct()
42
+
43
+ public function register(){
44
+
45
+ $this->title = __( 'Cryout Serious Theme Settings', 'cryout-theme-settings' );
46
+ if ( $this->supported_theme() ):
47
+
48
+ switch ($this->status):
49
+ case 1: // restore theme settings
50
+
51
+ include_once( plugin_dir_path( __FILE__ ) . 'inc/' . strtolower($this->current_theme['slug']) . '.php' );
52
+
53
+ break;
54
+ case 4: // repair wrong headings
55
+
56
+ add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_script' ) );
57
+
58
+ break;
59
+
60
+ default:
61
+ break;
62
+ endswitch;
63
+
64
+ endif;
65
+
66
+ $cryout_theme_settings_slug = plugin_basename(__FILE__);
67
+ add_filter( 'plugin_action_links_'.$cryout_theme_settings_slug, array( $this, 'settings_link' ) );
68
+ add_filter( 'plugin_row_meta', array( $this, 'meta_links' ), 10, 2 );
69
+ add_action( 'admin_menu', array( $this, 'settings_menu' ) );
70
+ add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_style' ) );
71
+
72
+ } // register()
73
+
74
+ function supported_theme(){
75
+ global $wp_version;
76
+
77
+ $current_theme_slug = strtolower( wp_get_theme()->Template );
78
+ $current_theme_version = wp_get_theme($current_theme_slug)->Version;
79
+
80
+ if (!in_array( $current_theme_slug, array_keys( $this->supported_themes) )) {
81
+ // theme slug does not match supported themes
82
+ // perform additional checks for theme constants
83
+
84
+ if (defined('MANTRA_VERSION')) {
85
+ if ($current_theme_slug != 'mantra') $this->renamed_theme = true;
86
+ $current_theme_slug = 'mantra';
87
+ $current_theme_version = MANTRA_VERSION;
88
+ }
89
+ if (defined('PARABOLA_VERSION')) {
90
+ if ($current_theme_slug != 'parabola') $this->renamed_theme = true;
91
+ $current_theme_slug = 'parabola';
92
+ $current_theme_version = PARABOLA_VERSION;
93
+ }
94
+ if (defined('TEMPERA_VERSION')) {
95
+ if ($current_theme_slug != 'tempera') $this->renamed_theme = true;
96
+ $current_theme_slug = 'tempera';
97
+ $current_theme_version = TEMPERA_VERSION;
98
+ }
99
+ if (defined('NIRVANA_VERSION')) {
100
+ if ($current_theme_slug != 'nirvana') $this->renamed_theme = true;
101
+ $current_theme_slug = 'nirvana';
102
+ $current_theme_version = NIRVANA_VERSION;
103
+ }
104
+ if (defined('_CRYOUT_THEME_NAME')) {
105
+ if ($current_theme_slug != _CRYOUT_THEME_NAME) $this->renamed_theme = true;
106
+ $current_theme_slug = _CRYOUT_THEME_NAME;
107
+ if (defined('_CRYOUT_THEME_VERSION')) $current_theme_version = _CRYOUT_THEME_VERSION;
108
+ }
109
+ } // end additional checks
110
+
111
+ $this->current_theme = array(
112
+ 'slug' => $current_theme_slug,
113
+ 'version' => $current_theme_version,
114
+ );
115
+
116
+ if (in_array( $current_theme_slug, array_keys( $this->supported_themes) )) {
117
+ // supported theme, check version
118
+ if ( version_compare( $current_theme_version, $this->supported_themes[$current_theme_slug], '>=' ) ):
119
+ // supported version
120
+ $this->status = 1;
121
+ return 1;
122
+ elseif ( isset($this->compatibility_themes[$current_theme_slug]) && (version_compare( $current_theme_version, $this->compatibility_themes[$current_theme_slug], '>=' ) ) &&
123
+ (version_compare($wp_version, '4.3.9999') >= 0) ):
124
+ // compatibility mode
125
+ $this->status = 4;
126
+ return 4;
127
+ elseif ( isset($this->requires_update[$current_theme_slug])):
128
+ // theme requires update to be supported
129
+ $this->status = 5;
130
+ return 0;
131
+ else:
132
+ // unsupported version
133
+ $this->status = 2;
134
+ return 0;
135
+ endif;
136
+ } else {
137
+ // unsupported theme
138
+ $this->status = 3;
139
+ return 0;
140
+ };
141
+
142
+ } // supported_theme()
143
+
144
+ public function enqueue_script($hook) {
145
+ if ( strpos( $hook, $this->current_theme['slug'] ) !== false ) {
146
+ wp_enqueue_script( 'cryout-theme-settings-code', plugins_url( 'code.js', __FILE__ ), NULL, $this->version );
147
+ }
148
+ } // enqueue_script()
149
+
150
+ public function enqueue_style($hook) {
151
+ if ( $hook == $this->plugin_page ) {
152
+ wp_enqueue_style( 'cryout-theme-settings-style', plugins_url( 'style.css', __FILE__ ), NULL, $this->version );
153
+ }
154
+ }
155
+
156
+ // register settings page to dashboard menu
157
+ public function settings_menu() {
158
+ $this->plugin_page = add_submenu_page('themes.php', $this->title, $this->title, 'manage_options', $this->slug, array( $this, 'settings_page' ) );
159
+ }
160
+
161
+ // add settings link on plugin page
162
+ public function settings_link($links) {
163
+ $settings_link = '<a href="themes.php?page=' . $this->slug . '">' . __( 'About Plugin', 'cryout-theme-settings' ) . '</a>';
164
+ array_unshift($links, $settings_link);
165
+ return $links;
166
+ }
167
+
168
+ // add plugin meta links
169
+ public function meta_links( $links, $file ) {
170
+ // Check plugin
171
+ if ( $file === plugin_basename( __FILE__ ) ) {
172
+ unset( $links[2] );
173
+ $links[] = '<a href="http://www.cryoutcreations.eu/cryout-theme-settings/" target="_blank">' . __( 'Plugin homepage', 'cryout-serious-slider' ) . '</a>';
174
+ $links[] = '<a href="https://www.cryoutcreations.eu/forums/f/wordpress/plugins/serious-settings" target="_blank">' . __( 'Support forum', 'cryout-serious-slider' ) . '</a>';
175
+ $links[] = '<a href="http://wordpress.org/plugins/cryout-theme-settings/#developers" target="_blank">' . __( 'Changelog', 'cryout-serious-slider' ) . '</a>';
176
+ }
177
+ return $links;
178
+ }
179
+
180
+ public function settings_page() {
181
+ require_once( plugin_dir_path( __FILE__ ) . 'inc/settings.php' );
182
+ }
183
+
184
+ } // class Cryout_Theme_Settings
185
+
186
+
187
+ /* * * * get things going * * * */
188
+ if (is_admin()) $cryout_theme_settings = new Cryout_Theme_Settings;
189
+
190
+ // EOF
inc/settings.php CHANGED
@@ -1,145 +1,145 @@
1
- <?php
2
- $theme_page_url = admin_url( 'themes.php?page=' . $this->current_theme['slug'] . '-page' );
3
- $theme_slug = $this->current_theme['slug'];
4
- $theme_name = ucwords($this->current_theme['slug']);
5
- $url = plugin_dir_url( dirname(__FILE__) ) . 'media';
6
- ?>
7
-
8
- <div class="wrap">
9
- <h2><?php _e('Cryout Serious Theme Settings Status', 'cryout-theme-settings') ?></h2>
10
-
11
- <?php if ($this->status == 1): ?>
12
- <div class="updated"><p>Current active (or parent) theme is: <strong><?php echo $theme_name; ?></strong>.
13
- The plugin is <strong style="color: #008000;">active</strong>.<br>
14
- <br>
15
- Go <a href="<?php echo $theme_page_url ?>"><strong>configure <?php echo $theme_name ?></strong></a>.
16
- </p></div>
17
- <?php elseif ($this->status == 4): ?>
18
- <div class="updated"><p>Current active (or parent) theme is: <strong><?php echo $theme_name; ?></strong> and you are running WordPress 4.4 or newer.
19
- The plugin is <strong style="color: #008000;">active</strong> in compatibility mode.<br>
20
- <br>
21
- Go <a href="<?php echo $theme_page_url ?>"><strong>configure <?php echo $theme_name ?></strong></a>.
22
- </p></div>
23
- <?php else: ?>
24
- <div class="error"><p>
25
- <?php
26
- switch ($this->status):
27
- case 5:
28
- // theme requires update ?>
29
- Current active (or parent) theme is: <strong><?php echo $theme_name; ?></strong>.<br>
30
- This plugin cannot work with this version of the theme. Please update the theme first. <br>
31
- The plugin is <strong style="color: #800000;">INACTIVE</strong>. <?php
32
- break;
33
- case 3:
34
- // unsupported theme ?>
35
- Current active (or parent) theme is: <strong><?php echo $theme_name; ?></strong>.<br>
36
- This plugin is designed to work only with the supported themes. <br>
37
- The plugin is <strong style="color: #800000;">INACTIVE</strong>. <?php
38
- break;
39
- case 2:
40
- // unsupported version ?>
41
- Current active (or parent) theme is: <strong><?php echo $theme_name ?></strong>, however the plugin is designed to work with version <b><?php echo $this->supported_themes[$this->current_theme['slug']] ?></b> or newer of <em><?php echo $theme_name ?></em>.<br>
42
- You are running <em><?php echo $theme_name ?> version <?php echo $this->current_theme['version'] ?></em> which does not need this plugin.</br>
43
- The plugin is <strong style="color: #800000;">INACTIVE</strong>. <?php
44
- break;
45
- case 0:
46
- default:
47
- // inactive/undefined ?>
48
- Current active (or parent) theme is: <strong><?php echo $theme_name; ?></strong>.<br>
49
- This plugin is designed to work only with the supported themes. <br>
50
- The plugin is <strong style="color: #800000;">INACTIVE</strong>. <?php
51
- break; ?>
52
- <?php endswitch; ?>
53
- </p></div>
54
- <?php endif; ?>
55
- <?php if ($this->renamed_theme) :?>
56
- <div class="error">
57
- <p>The plugin has detected that you have renamed the theme folder - this will limit your ability to update the theme.<br>
58
- If you need to customize the theme code, we strongly recommend creating a <a href="http://www.cryoutcreations.eu/wordpress-themes/wordpress-tutorials/wordpress-child-themes" target="_blank">child theme</a>.</p>
59
- </div>
60
- <?php endif; ?>
61
-
62
- <div id="poststuff">
63
- <div id="post-body" class="metabox-holder columns-2">
64
-
65
- <div id="post-body-content">
66
-
67
- <div class="postbox">
68
-
69
- <div class="handlediv"><br></div>
70
- <h3 class="hndle"><span>About</span></h3>
71
- <div class="inside">
72
- <?php if ($this->status != 4) { ?>
73
- <p>This plugin is designed to inter-operate with our supported themes:</p>
74
- <ul> <li><a href="http://wordpress.org/themes/mantra" target="_blank"><img src="<?php echo $url . '/mantra.jpg'; ?>" /><span>Mantra</span></a> version 2.5 and newer</li>
75
- <li><a href="http://wordpress.org/themes/nirvana" target="_blank"><img src="<?php echo $url . '/nirvana.jpg'; ?>" /><span>Nirvana</span></a> version 1.2 and newer</li>
76
- <li><a href="http://wordpress.org/themes/parabola" target="_blank"><img src="<?php echo $url . '/parabola.jpg'; ?>" /><span>Parabola</span></a> version 1.6 and newer</li>
77
- <li><a href="http://wordpress.org/themes/tempera" target="_blank"><img src="<?php echo $url . '/tempera.jpg'; ?>" /><span>Tempera</span></a> version 1.4 and newer</li> </ul>
78
- <p>To restore their theme settings pages which we had to remove due to the Customize-based settings enforcement.</p>
79
- <p>If you are using a different theme or a theme version not listed here this plugin will not activate.</p>
80
- <?php } else { ?>
81
- <p>
82
- This plugin will restore the settings page to working condition on WordPress 4.4-RC1 and newer with:
83
- <ul> <li><a href="http://wordpress.org/themes/mantra" target="_blank">Mantra</a> versions 2.0 - 2.4.1.1</li>
84
- <li><a href="http://wordpress.org/themes/parabola" target="_blank">Parabola</a> versions 0.9 - 1.5.1</li>
85
- <li><a href="http://wordpress.org/themes/tempera" target="_blank">Tempera</a> versions 0.9 - 1.3.3</li> </ul>
86
- </p>
87
- <p>If you are using a different theme or a theme version not listed here this plugin will not activate.</p>
88
- <?php } ?>
89
- </div>
90
- </div>
91
-
92
- <div class="postbox">
93
-
94
- <div class="handlediv"><br></div>
95
- <h3 class="hndle"><span>Our Latest Themes</span></h3>
96
- <div class="inside">
97
-
98
- <ul> <li><a href="https://www.cryoutcreations.eu/wordpress-themes/anima" target="_blank"><img src="<?php echo $url . '/anima.jpg'; ?>" /><span>Anima</span></a></li>
99
- <li><a href="https://www.cryoutcreations.eu/wordpress-themes/septera" target="_blank"><img src="<?php echo $url . '/septera.jpg'; ?>" /><span>Septera</span></a></li>
100
- <li><a href="https://www.cryoutcreations.eu/wordpress-themes/verbosa" target="_blank"><img src="<?php echo $url . '/verbosa.jpg'; ?>" /><span>Verbosa</span></a></li>
101
- <li><a href="https://www.cryoutcreations.eu/wordpress-themes/fluida" target="_blank"><img src="<?php echo $url . '/fluida.jpg'; ?>" /><span>Fluida</span></a></li> </ul>
102
-
103
- </div>
104
- </div>
105
-
106
- </div> <!-- post-body-content-->
107
-
108
- <div class="postbox-container" id="postbox-container-1">
109
-
110
- <div class="meta-box-sortables">
111
-
112
- <div class="postbox">
113
- <div class="handlediv"><br></div>
114
- <h3 style="text-align: center;" class="hndle">
115
- <span><strong>Cryout Serious Theme Settings</strong></span>
116
- </h3>
117
-
118
- <div class="inside">
119
- <div style="text-align: center; margin: auto">
120
- <strong>version: <?php echo $this->version ?></strong><br>
121
- by Cryout Creations<br>
122
- <a target="_blank" href="http://www.cryoutcreations.eu/cryout-theme-settings/">www.cryoutcreations.eu</a>
123
- </div>
124
- </div>
125
- </div>
126
-
127
- <div class="postbox">
128
- <div class="handlediv"><br></div>
129
- <h3 style="text-align: center;" class="hndle">
130
- <span>Support</span>
131
- </h3><div class="inside">
132
- <div style="text-align: center; margin: auto">
133
- For support questions,<br>
134
- please use <a target="_blank" href="http://www.cryoutcreations.eu/forum">our forum</a>.
135
- </div>
136
- </div>
137
- </div>
138
- </div>
139
- </div> <!-- postbox-container -->
140
-
141
- </div> <!-- post-body -->
142
- <br class="clear">
143
- </div> <!-- poststuff -->
144
-
145
- </div><!--end wrap-->
1
+ <?php
2
+ $theme_page_url = admin_url( 'themes.php?page=' . $this->current_theme['slug'] . '-page' );
3
+ $theme_slug = $this->current_theme['slug'];
4
+ $theme_name = ucwords($this->current_theme['slug']);
5
+ $url = plugin_dir_url( dirname(__FILE__) ) . 'media';
6
+ ?>
7
+
8
+ <div class="wrap">
9
+ <h2><?php _e('Cryout Serious Theme Settings Status', 'cryout-theme-settings') ?></h2>
10
+
11
+ <?php if ($this->status == 1): ?>
12
+ <div class="notice updated"><p>Current active (or parent) theme is: <strong><?php echo $theme_name; ?></strong>.
13
+ The plugin is <strong style="color: #008000;">active</strong>.<br>
14
+ <br>
15
+ Go <a href="<?php echo $theme_page_url ?>"><strong>configure <?php echo $theme_name ?></strong></a>.
16
+ </p></div>
17
+ <?php elseif ($this->status == 4): ?>
18
+ <div class="notice updated"><p>Current active (or parent) theme is: <strong><?php echo $theme_name; ?></strong> and you are running WordPress 4.4 or newer.
19
+ The plugin is <strong style="color: #008000;">active</strong> in compatibility mode.<br>
20
+ <br>
21
+ Go <a href="<?php echo $theme_page_url ?>"><strong>configure <?php echo $theme_name ?></strong></a>.
22
+ </p></div>
23
+ <?php else: ?>
24
+ <div class="notice error"><p>
25
+ <?php
26
+ switch ($this->status):
27
+ case 5:
28
+ // theme requires update ?>
29
+ Current active (or parent) theme is: <strong><?php echo $theme_name; ?></strong>.<br>
30
+ This plugin cannot work with this version of the theme. Please update the theme first. <br>
31
+ The plugin is <strong style="color: #800000;">INACTIVE</strong>. <?php
32
+ break;
33
+ case 3:
34
+ // unsupported theme ?>
35
+ Current active (or parent) theme is: <strong><?php echo $theme_name; ?></strong>.<br>
36
+ This plugin is designed to work only with the supported themes. <br>
37
+ The plugin is <strong style="color: #800000;">INACTIVE</strong>. <?php
38
+ break;
39
+ case 2:
40
+ // unsupported version ?>
41
+ Current active (or parent) theme is: <strong><?php echo $theme_name ?></strong>, however the plugin is designed to work with version <b><?php echo $this->supported_themes[$this->current_theme['slug']] ?></b> or newer of <em><?php echo $theme_name ?></em>.<br>
42
+ You are running <em><?php echo $theme_name ?> version <?php echo $this->current_theme['version'] ?></em> which does not need this plugin.</br>
43
+ The plugin is <strong style="color: #800000;">INACTIVE</strong>. <?php
44
+ break;
45
+ case 0:
46
+ default:
47
+ // inactive/undefined ?>
48
+ Current active (or parent) theme is: <strong><?php echo $theme_name; ?></strong>.<br>
49
+ This plugin is designed to work only with the supported themes. <br>
50
+ The plugin is <strong style="color: #800000;">INACTIVE</strong>. <?php
51
+ break; ?>
52
+ <?php endswitch; ?>
53
+ </p></div>
54
+ <?php endif; ?>
55
+ <?php if ($this->renamed_theme) :?>
56
+ <div class="notice error">
57
+ <p style="font-size: 1.4em; ">The plugin has detected that you have renamed the theme folder - this will limit your ability to update the theme.<br>
58
+ If you need to customize the theme code, we strongly recommend creating a <a href="http://www.cryoutcreations.eu/wordpress-themes/wordpress-tutorials/wordpress-child-themes" target="_blank">child theme</a>.</p>
59
+ </div>
60
+ <?php endif; ?>
61
+
62
+ <div id="poststuff">
63
+ <div id="post-body" class="metabox-holder columns-2">
64
+
65
+ <div id="post-body-content">
66
+
67
+ <div class="postbox">
68
+
69
+ <div class="handlediv"><br></div>
70
+ <h3 class="hndle"><span>About</span></h3>
71
+ <div class="inside">
72
+ <?php if ($this->status != 4) { ?>
73
+ <p>This plugin is designed to inter-operate with our supported themes:</p>
74
+ <ul> <li><a href="http://wordpress.org/themes/mantra" target="_blank"><img src="<?php echo $url . '/mantra.jpg'; ?>" /><span>Mantra</span></a> version 2.5 and newer</li>
75
+ <li><a href="http://wordpress.org/themes/nirvana" target="_blank"><img src="<?php echo $url . '/nirvana.jpg'; ?>" /><span>Nirvana</span></a> version 1.2 and newer</li>
76
+ <li><a href="http://wordpress.org/themes/parabola" target="_blank"><img src="<?php echo $url . '/parabola.jpg'; ?>" /><span>Parabola</span></a> version 1.6 and newer</li>
77
+ <li><a href="http://wordpress.org/themes/tempera" target="_blank"><img src="<?php echo $url . '/tempera.jpg'; ?>" /><span>Tempera</span></a> version 1.4 and newer</li> </ul>
78
+ <p>To restore their theme settings pages which we had to remove due to the Customize-based settings enforcement.</p>
79
+ <p>If you are using a different theme or a theme version not listed here this plugin will not activate.</p>
80
+ <?php } else { ?>
81
+ <p>
82
+ This plugin restores the settings page to working condition on WordPress 4.4-RC1 and newer with:
83
+ <ul> <li><a href="http://wordpress.org/themes/mantra" target="_blank"><img src="<?php echo $url . '/mantra.jpg'; ?>" /><span>Mantra</span></a> versions 2.0 - 2.4.1.1</li>
84
+ <li><a href="http://wordpress.org/themes/parabola" target="_blank"><img src="<?php echo $url . '/parabola.jpg'; ?>" /><span>Parabola</span></a> versions 0.9 - 1.5.1</li>
85
+ <li><a href="http://wordpress.org/themes/tempera" target="_blank"><img src="<?php echo $url . '/tempera.jpg'; ?>" /><span>Tempera</span></a> versions 0.9 - 1.3.3</li> </ul>
86
+ </p>
87
+ <p>If you are using a different theme or a theme version not listed here this plugin will not activate.</p>
88
+ <?php } ?>
89
+ </div>
90
+ </div>
91
+
92
+ <div class="postbox">
93
+
94
+ <div class="handlediv"><br></div>
95
+ <h3 class="hndle"><span>Our Latest Themes</span></h3>
96
+ <div class="inside">
97
+
98
+ <ul> <li><a href="https://www.cryoutcreations.eu/wordpress-themes/anima" target="_blank"><img src="<?php echo $url . '/anima.jpg'; ?>" /><span>Anima</span></a></li>
99
+ <li><a href="https://www.cryoutcreations.eu/wordpress-themes/septera" target="_blank"><img src="<?php echo $url . '/septera.jpg'; ?>" /><span>Septera</span></a></li>
100
+ <li><a href="https://www.cryoutcreations.eu/wordpress-themes/verbosa" target="_blank"><img src="<?php echo $url . '/verbosa.jpg'; ?>" /><span>Verbosa</span></a></li>
101
+ <li><a href="https://www.cryoutcreations.eu/wordpress-themes/fluida" target="_blank"><img src="<?php echo $url . '/fluida.jpg'; ?>" /><span>Fluida</span></a></li> </ul>
102
+
103
+ </div>
104
+ </div>
105
+
106
+ </div> <!-- post-body-content-->
107
+
108
+ <div class="postbox-container" id="postbox-container-1">
109
+
110
+ <div class="meta-box-sortables">
111
+
112
+ <div class="postbox">
113
+ <div class="handlediv"><br></div>
114
+ <h3 style="text-align: center;" class="hndle">
115
+ <span><strong>Cryout Serious Theme Settings</strong></span>
116
+ </h3>
117
+
118
+ <div class="inside">
119
+ <div style="text-align: center; margin: auto">
120
+ <strong>version: <?php echo $this->version ?></strong><br>
121
+ by Cryout Creations<br>
122
+ <a target="_blank" href="http://www.cryoutcreations.eu/cryout-theme-settings/">www.cryoutcreations.eu</a>
123
+ </div>
124
+ </div>
125
+ </div>
126
+
127
+ <div class="postbox">
128
+ <div class="handlediv"><br></div>
129
+ <h3 style="text-align: center;" class="hndle">
130
+ <span>Support</span>
131
+ </h3><div class="inside">
132
+ <div style="text-align: center; margin: auto">
133
+ For support questions,<br>
134
+ please use <a target="_blank" href="http://www.cryoutcreations.eu/forum">our forum</a>.
135
+ </div>
136
+ </div>
137
+ </div>
138
+ </div>
139
+ </div> <!-- postbox-container -->
140
+
141
+ </div> <!-- post-body -->
142
+ <br class="clear">
143
+ </div> <!-- poststuff -->
144
+
145
+ </div><!--end wrap-->
media/verbosa.jpg CHANGED
Binary file
readme.txt CHANGED
@@ -1,83 +1,87 @@
1
- === Plugin Name ===
2
- Contributors: Cryout Creations
3
- Donate link: https://www.cryoutcreations.eu/donate/
4
- Tags: theme, admin
5
- Requires at least: 4.0
6
- Tested up to: 4.8.0
7
- Stable tag: 0.5.8
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
-
15
- This plugin is designed to inter-operate with our [Nirvana](https://wordpress.org/themes/nirvana/), [Tempera](https://wordpress.org/themes/tempera/), [Parabola](https://wordpress.org/themes/parabola/), [Mantra](https://wordpress.org/themes/mantra/) themes and restore their advanced settings pages which we had to remove due to the Customize-based settings transition.
16
-
17
- Additionally, it fixes an incompatibility between the older version of listed themes and Wordpress 4.4 and newer.
18
-
19
- = Compatibility =
20
- The plugin is meant to be used with the following theme releases regardless of WordPress version:
21
-
22
- * Nirvana version 1.2 and newer
23
- * Tempera version 1.4 and newer
24
- * Parabola version 1.6 and newer
25
- * Mantra version 2.5 and newer
26
-
27
- Additionally, it is needed to correct an incompatibility between WordPress 4.4 and newer and the following theme versions:
28
-
29
- * Tempera versions 0.9 - 1.3.3
30
- * Parabola versions 0.9 - 1.5.1
31
- * Mantra versions 2.0 - 2.4.1.1
32
-
33
- You do not need this plugin if you use do not use any of the listed themes.
34
-
35
- == Installation ==
36
-
37
- = Automatic installation =
38
-
39
- 0. Have one of our supported themes activated with a non-working or disabled settings page.
40
- 1. Navigate to Plugins in your dashboard and click the Add New button.
41
- 2. Type in "Cryout Theme Settings" in the search box on the right and press Enter, then click the Install button next to the plugin title.
42
- 3. After installation Activate the plugin, then navigate to Appearance > [Theme] Settings to access the restored theme settings page.
43
-
44
- = Manual installation =
45
-
46
- 0. Have one of our supported themes activated with a non-working or disabled settings page.
47
- 1. Upload `cryout-theme-settings` folder to the `/wp-content/plugins/` directory
48
- 2. Activate the plugin through the 'Plugins' menu in WordPress
49
- 3. Navigate to Appearance > [Theme] Settings to access the restored theme settings page.
50
-
51
- == Changelog ==
52
-
53
- = 0.5.8 =
54
- * Added meta links
55
- * Updated plugin's about page
56
- * Added 'featured themes' and 'priority support' panels
57
-
58
- = 0.5.7 =
59
- * Fixed incorrect status for Nirvana versions before 1.2
60
-
61
- = 0.5.6 =
62
- * Added support for Mantra 2.5
63
-
64
- = 0.5.5 =
65
- * Added support for Parabola 1.6
66
- * Added detection of supported themes when the theme folder is renamed
67
-
68
- = 0.5.4 =
69
- * Fixed compatibility support for Mantra
70
-
71
- = 0.5.3 =
72
- * Added support for Tempera 1.4
73
- * Fixed typo causing error in compatibility code
74
-
75
- = 0.5.2 =
76
- * Added themes compatibility fix for WordPress 4.4-RC1 and newer
77
-
78
- = 0.5.1 =
79
- * Fixed detection of parent theme name and version when using a child theme
80
- * Clarified plugin information
81
-
82
- = 0.5 =
83
- * Initial release. Currently Nirvana 1.2 implements support for this plugin.
 
 
 
 
1
+ === Plugin Name ===
2
+ Contributors: Cryout Creations
3
+ Donate link: https://www.cryoutcreations.eu/donate/
4
+ Tags: theme, admin
5
+ Requires at least: 4.2
6
+ Tested up to: 4.8.1
7
+ Stable tag: 0.5.8.1
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
+
15
+ This plugin is designed to inter-operate with our [Nirvana](https://wordpress.org/themes/nirvana/), [Tempera](https://wordpress.org/themes/tempera/), [Parabola](https://wordpress.org/themes/parabola/), [Mantra](https://wordpress.org/themes/mantra/) themes and restore their advanced settings pages which we had to remove due to the Customize-based settings transition.
16
+
17
+ Additionally, it fixes an incompatibility between the older version of listed themes and Wordpress 4.4 and newer.
18
+
19
+ = Compatibility =
20
+ The plugin is meant to be used with the following theme releases regardless of WordPress version:
21
+
22
+ * Nirvana version 1.2 and newer
23
+ * Tempera version 1.4 and newer
24
+ * Parabola version 1.6 and newer
25
+ * Mantra version 2.5 and newer
26
+
27
+ Additionally, it is needed to correct an incompatibility between WordPress 4.4 and newer and the following theme versions:
28
+
29
+ * Tempera versions 0.9 - 1.3.3
30
+ * Parabola versions 0.9 - 1.5.1
31
+ * Mantra versions 2.0 - 2.4.1.1
32
+
33
+ You do not need this plugin if you use do not use any of the listed themes.
34
+
35
+ == Installation ==
36
+
37
+ = Automatic installation =
38
+
39
+ 0. Have one of our supported themes activated with a non-working or disabled settings page.
40
+ 1. Navigate to Plugins in your dashboard and click the Add New button.
41
+ 2. Type in "Cryout Theme Settings" in the search box on the right and press Enter, then click the Install button next to the plugin title.
42
+ 3. After installation Activate the plugin, then navigate to Appearance > [Theme] Settings to access the restored theme settings page.
43
+
44
+ = Manual installation =
45
+
46
+ 0. Have one of our supported themes activated with a non-working or disabled settings page.
47
+ 1. Upload `cryout-theme-settings` folder to the `/wp-content/plugins/` directory
48
+ 2. Activate the plugin through the 'Plugins' menu in WordPress
49
+ 3. Navigate to Appearance > [Theme] Settings to access the restored theme settings page.
50
+
51
+ == Changelog ==
52
+
53
+ = 0.5.8.1 =
54
+ * Fixed compatibility mode malfunctioning
55
+ * Fixed misssing theme images in compatibility mode info
56
+
57
+ = 0.5.8 =
58
+ * Added meta links
59
+ * Updated plugin's about page
60
+ * Added 'featured themes' and 'priority support' panels
61
+
62
+ = 0.5.7 =
63
+ * Fixed incorrect status for Nirvana versions before 1.2
64
+
65
+ = 0.5.6 =
66
+ * Added support for Mantra 2.5
67
+
68
+ = 0.5.5 =
69
+ * Added support for Parabola 1.6
70
+ * Added detection of supported themes when the theme folder is renamed
71
+
72
+ = 0.5.4 =
73
+ * Fixed compatibility support for Mantra
74
+
75
+ = 0.5.3 =
76
+ * Added support for Tempera 1.4
77
+ * Fixed typo causing error in compatibility code
78
+
79
+ = 0.5.2 =
80
+ * Added themes compatibility fix for WordPress 4.4-RC1 and newer
81
+
82
+ = 0.5.1 =
83
+ * Fixed detection of parent theme name and version when using a child theme
84
+ * Clarified plugin information
85
+
86
+ = 0.5 =
87
+ * Initial release. Currently Nirvana 1.2 implements support for this plugin.
style.css CHANGED
@@ -1,5 +1,9 @@
1
  /* About page styling */
2
 
 
 
 
 
3
  #post-body-content ul {
4
  display: inline-block;
5
  margin-bottom: 2em;
1
  /* About page styling */
2
 
3
+ div.notice p {
4
+ font-size: 1.2em;
5
+ }
6
+
7
  #post-body-content ul {
8
  display: inline-block;
9
  margin-bottom: 2em;