Cryout Serious Theme Settings - Version 0.5.11

Version Description

  • Updated for compatibility with the changes in Mantra 3.3.0
  • Some code cleanup and optimization
  • Bumped supported WordPress version to 5.5
Download this release

Release Info

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

Code changes from version 0.5.10 to 0.5.11

cryout-theme-settings.php CHANGED
@@ -1,9 +1,9 @@
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.10
7
  Author: Cryout Creations
8
  Author URI: https://www.cryoutcreations.eu
9
  License: GPLv3
@@ -14,7 +14,7 @@
14
  if ( !defined( 'ABSPATH' ) ) exit;
15
 
16
  class Cryout_Theme_Settings {
17
- public $version = "0.5.10";
18
  public $settings = array();
19
 
20
  private $status = 0; // 0 = inactive, 1 = active, 2 = good theme, wrong version, 3 = wrong theme, 4 = compatibility for wp4.4, 5 = theme requires update
@@ -38,6 +38,11 @@ class Cryout_Theme_Settings {
38
  public $current_theme = array();
39
  public $plugin_page = array();
40
  public $renamed_theme = false;
 
 
 
 
 
41
 
42
  public function __construct(){
43
  add_action( 'init', array( $this, 'register' ) );
@@ -45,7 +50,7 @@ class Cryout_Theme_Settings {
45
 
46
  public function register(){
47
 
48
- $this->title = __( 'Cryout Serious Theme Settings', 'cryout-theme-settings' );
49
  if ( $this->supported_theme() ):
50
 
51
  switch ($this->status):
@@ -183,6 +188,10 @@ class Cryout_Theme_Settings {
183
  public function settings_page() {
184
  require_once( plugin_dir_path( __FILE__ ) . 'inc/settings.php' );
185
  }
 
 
 
 
186
 
187
  } // class Cryout_Theme_Settings
188
 
1
  <?php
2
  /*
3
  Plugin Name: Cryout Serious Theme Settings
4
+ Plugin URI: https://www.cryoutcreations.eu/wordpress-plugins/serious-theme-settings
5
+ Description: This plugin is designed to enable the themes' settings page functionality. It will work with the following themes: Nirvana, Parabola, Tempera or Mantra.
6
+ Version: 0.5.11
7
  Author: Cryout Creations
8
  Author URI: https://www.cryoutcreations.eu
9
  License: GPLv3
14
  if ( !defined( 'ABSPATH' ) ) exit;
15
 
16
  class Cryout_Theme_Settings {
17
+ public $version = "0.5.11";
18
  public $settings = array();
19
 
20
  private $status = 0; // 0 = inactive, 1 = active, 2 = good theme, wrong version, 3 = wrong theme, 4 = compatibility for wp4.4, 5 = theme requires update
38
  public $current_theme = array();
39
  public $plugin_page = array();
40
  public $renamed_theme = false;
41
+
42
+ // by freshness
43
+ private $suggested_themes = array(
44
+ 'esotera', 'roseta', 'anima', 'kahuna', 'septera', 'fluida', 'verbosa',
45
+ );
46
 
47
  public function __construct(){
48
  add_action( 'init', array( $this, 'register' ) );
50
 
51
  public function register(){
52
 
53
+ $this->title = __( 'Serious Theme Settings', 'cryout-theme-settings' );
54
  if ( $this->supported_theme() ):
55
 
56
  switch ($this->status):
188
  public function settings_page() {
189
  require_once( plugin_dir_path( __FILE__ ) . 'inc/settings.php' );
190
  }
191
+
192
+ public function get_suggested_themes() {
193
+ return $this->suggested_themes;
194
+ }
195
 
196
  } // class Cryout_Theme_Settings
197
 
inc/extra.php CHANGED
@@ -1,6 +1,8 @@
1
  <?php
2
  // Exit if accessed directly
3
  if ( !defined( 'ABSPATH' ) ) exit;
 
 
4
  ?>
5
  <div id="latest-themes" class="postbox">
6
  <h3 class="hndle"> Our latest free themes </h3>
@@ -8,18 +10,20 @@ if ( !defined( 'ABSPATH' ) ) exit;
8
  <a href="#" class="control_next">&raquo;</a>
9
  <a href="#" class="control_prev">&laquo;</a>
10
  <ul>
11
- <li><a href="https://www.cryoutcreations.eu/wordpress-themes/roseta" target="_blank"><span class="item-title">Roseta WordPress Theme</span><img src="<?php echo $url ?>/roseta.jpg"></a></li>
12
- <li><a href="https://www.cryoutcreations.eu/wordpress-themes/kahuna" target="_blank"><span class="item-title">Kahuna WordPress Theme</span><img src="<?php echo $url ?>/kahuna.jpg"></a></li>
13
- <li><a href="https://www.cryoutcreations.eu/wordpress-themes/anima" target="_blank"><span class="item-title">Anima WordPress Theme</span><img src="<?php echo $url ?>/anima.jpg"></a></li>
14
- <li><a href="https://www.cryoutcreations.eu/wordpress-themes/septera" target="_blank"><span class="item-title">Septera WordPress Theme</span><img src="<?php echo $url ?>/septera.jpg"></a></li>
15
- <li><a href="https://www.cryoutcreations.eu/wordpress-themes/fluida" target="_blank"><span class="item-title">Fluida WordPress Theme</span><img src="<?php echo $url ?>/fluida.jpg"></a></li>
16
- <li><a href="https://www.cryoutcreations.eu/wordpress-themes/verbosa" target="_blank"><span class="item-title">Verbosa WordPress Theme</span><img src="<?php echo $url ?>/verbosa.jpg"></a></li>
 
 
 
17
  </ul>
18
  </div>
19
  </div>
20
 
21
  <div id="priority-support" class="postbox priority-support">
22
- <div title="Click to toggle" class="handlediv"><br /></div>
23
  <h3 class="hndle"> Need help? </h3>
24
  <div class="inside">
25
  <a href="https://www.cryoutcreations.eu/pricing" target="_blank"><img src="<?php echo $url ?>/priority-support.jpg"></a>
1
  <?php
2
  // Exit if accessed directly
3
  if ( !defined( 'ABSPATH' ) ) exit;
4
+
5
+
6
  ?>
7
  <div id="latest-themes" class="postbox">
8
  <h3 class="hndle"> Our latest free themes </h3>
10
  <a href="#" class="control_next">&raquo;</a>
11
  <a href="#" class="control_prev">&laquo;</a>
12
  <ul>
13
+ <?php
14
+ global $cryout_theme_settings;
15
+ $themes = $cryout_theme_settings->get_suggested_themes();
16
+ shuffle( $themes );
17
+ foreach ( $themes as $theme ) { ?>
18
+ <li>
19
+ <?php printf( '<a href="https://www.cryoutcreations.eu/wordpress-themes/%1$s" target="_blank"><span class="item-title">%2$s WordPress Theme</span><img src="%3$s/%1$s.jpg"></a>', $theme, ucwords( $theme ), $url ) ?>
20
+ </li>
21
+ <?php } // foreach ?>
22
  </ul>
23
  </div>
24
  </div>
25
 
26
  <div id="priority-support" class="postbox priority-support">
 
27
  <h3 class="hndle"> Need help? </h3>
28
  <div class="inside">
29
  <a href="https://www.cryoutcreations.eu/pricing" target="_blank"><img src="<?php echo $url ?>/priority-support.jpg"></a>
inc/mantra.php CHANGED
@@ -10,6 +10,8 @@ endif;
10
  function mantra_theme_settings_restore($class='') {
11
  global $cryout_theme_settings;
12
  ?>
 
 
13
  <form name="mantra_form" action="options.php" method="post" enctype="multipart/form-data">
14
  <div id="accordion">
15
  <?php settings_fields('ma_options'); ?>
@@ -25,6 +27,245 @@ function mantra_theme_settings_restore($class='') {
25
  } // mantra_theme_settings_buttons()
26
 
27
  function mantra_extra() {
28
- $url = plugin_dir_url( dirname(__FILE__) ) . '/media';
29
  include_once( plugin_dir_path( __FILE__ ) . 'extra.php' );
30
- } // mantra_extra()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  function mantra_theme_settings_restore($class='') {
11
  global $cryout_theme_settings;
12
  ?>
13
+ <div id="jsAlert" class=""><b>Checking jQuery functionality...</b><br/><em>If this message remains visible after the page has loaded then there is a problem with your WordPress jQuery library. This can have several causes, including incompatible plugins.
14
+ The Settings page cannot function without jQuery.</em></div>
15
  <form name="mantra_form" action="options.php" method="post" enctype="multipart/form-data">
16
  <div id="accordion">
17
  <?php settings_fields('ma_options'); ?>
27
  } // mantra_theme_settings_buttons()
28
 
29
  function mantra_extra() {
30
+ $url = untrailingslashit( plugin_dir_url( dirname(__FILE__) ) ) . '/media';
31
  include_once( plugin_dir_path( __FILE__ ) . 'extra.php' );
32
+ } // mantra_extra()
33
+
34
+
35
+ if ( version_compare( $this->current_theme['version'], '3.3.0', '>=' ) ) {
36
+ // all the functionality below is conditioned to running Mantra v3.3.0 or newer and is not needed in older versions
37
+
38
+ /**
39
+ * Export Mantra settings to file
40
+ */
41
+ function mantra_export_options(){
42
+
43
+ if (! isset( $_POST['mantra_export'] ) ) return;
44
+
45
+ if (ob_get_contents()) ob_clean();
46
+
47
+ // Check nonce
48
+ if ( ! wp_verify_nonce( $_POST['mantra-export'], 'mantra-export' ) ) return false;
49
+ // Check permissions
50
+ if ( ! current_user_can( 'edit_theme_options' ) ) return false;
51
+
52
+ global $mantra_options;
53
+ $name = sprintf( 'mantra-settings-%s-%s.txt',
54
+ preg_replace( '/[^a-z0-9-_]/i', '', preg_replace('/https?:\/\//i', '', get_option( 'siteurl' ) ) ),
55
+ date('Ymd-His')
56
+ );
57
+ $data = $mantra_options;
58
+ $data = json_encode( $data );
59
+ $size = strlen( $data );
60
+
61
+ header( 'Content-Type: text/plain' );
62
+ header( 'Content-Disposition: attachment; filename="'.$name.'"' );
63
+ header( "Content-Transfer-Encoding: binary" );
64
+ header( 'Accept-Ranges: bytes' );
65
+
66
+ /* The three lines below basically make the download non-cacheable */
67
+ header( "Cache-control: private" );
68
+ header( 'Pragma: private' );
69
+ header( "Expires: Mon, 26 Jul 1997 05:00:00 GMT" );
70
+
71
+ header( "Content-Length: " . $size);
72
+ print( $data );
73
+
74
+ die();
75
+ } // mantra_export_options()
76
+ add_action( 'admin_init', 'mantra_export_options' );
77
+
78
+ /**
79
+ * This file manages the theme settings uploading and import operations.
80
+ * Uses the theme page to create a new form for uplaoding the settings
81
+ * Uses WP_Filesystem
82
+ */
83
+ function mantra_import_form(){
84
+
85
+ $bytes = apply_filters( 'import_upload_size_limit', wp_max_upload_size() );
86
+ $size = size_format( $bytes );
87
+ $upload_dir = wp_upload_dir();
88
+ if ( ! empty( $upload_dir['error'] ) ) :
89
+ ?><div class="error"><p><?php _e('Before you can upload your import file, you will need to fix the following error:', 'mantra'); ?></p>
90
+ <p><strong><?php echo $upload_dir['error']; ?></strong></p></div><?php
91
+ else :
92
+ ?>
93
+
94
+ <div class="wrap">
95
+ <div style="width:400px;display:block;margin-left:30px;">
96
+ <div id="icon-tools" class="icon32"><br></div>
97
+ <h2><?php echo __( 'Import Mantra Settings', 'mantra' );?></h2>
98
+ <form enctype="multipart/form-data" id="import-upload-form" method="post" action="">
99
+ <p><?php _e('Only files obtained from Mantra\'s export process are supported.', 'mantra'); ?></p>
100
+ <p>
101
+ <label for="upload"><strong><?php printf( __('Select an existing theme settings file: %s', 'mantra'), '(mantra-settings.txt)' ) ?> </strong><i></i></label>
102
+ <input type="file" id="upload" name="import" size="25" />
103
+ <span style="font-size:10px;">(<?php printf( __( 'Maximum size: %s', 'mantra' ), $size ); ?> )</span>
104
+ <input type="hidden" name="action" value="save" />
105
+ <input type="hidden" name="max_file_size" value="<?php echo $bytes; ?>" />
106
+ <?php wp_nonce_field('mantra-import', 'mantra-import'); ?>
107
+ <input type="hidden" name="mantra_import_confirmed" value="true" />
108
+ </p>
109
+ <input type="submit" class="button" value="<?php _e('Import and replace existing theme options', 'mantra'); ?>" />
110
+ </form>
111
+ </div>
112
+ </div> <!-- end wrap -->
113
+ <?php
114
+ endif;
115
+ } // Closes the mantra_import_form() function definition
116
+
117
+
118
+ /**
119
+ * This actual import of the options from the file to the settings array.
120
+ */
121
+ function mantra_import_file() {
122
+ global $mantra_options;
123
+
124
+ /* Check authorization */
125
+ $authorized = true;
126
+ // Check nonce
127
+ if (!wp_verify_nonce($_POST['mantra-import'], 'mantra-import')) {$authorized = false;}
128
+ // Check permissions
129
+ if (!current_user_can('edit_theme_options')){ $authorized = false; }
130
+
131
+ // If the user is authorized, import the theme's options to the database
132
+ if ($authorized) {?>
133
+ <?php
134
+ // make sure there is an import file uploaded
135
+ if ( (isset($_FILES["import"]["size"]) && ($_FILES["import"]["size"] > 0) ) ) {
136
+
137
+ $form_fields = array('import');
138
+ $method = '';
139
+
140
+ $url = wp_nonce_url('themes.php?page=mantra-page', 'mantra-import');
141
+
142
+ // Get file writing credentials
143
+ if (false === ($creds = request_filesystem_credentials($url, $method, false, false, $form_fields) ) ) {
144
+ return true;
145
+ }
146
+
147
+ if ( ! WP_Filesystem($creds) ) {
148
+ // our credentials were no good, ask the user for them again
149
+ request_filesystem_credentials($url, $method, true, false, $form_fields);
150
+ return true;
151
+ }
152
+
153
+ // Write the file if credentials are good
154
+ $upload_dir = wp_upload_dir();
155
+ $filename = trailingslashit($upload_dir['path']).'mantra_options.txt';
156
+
157
+ // by this point, the $wp_filesystem global should be working, so let's use it to create a file
158
+ global $wp_filesystem;
159
+ if ( ! $wp_filesystem->move($_FILES['import']['tmp_name'], $filename, true) ) {
160
+ echo 'Error saving file!';
161
+ return;
162
+ }
163
+
164
+ $file = $_FILES['import'];
165
+
166
+ if ($file['type'] == 'text/plain') {
167
+ $data = $wp_filesystem->get_contents($filename);
168
+ // try to read the file
169
+ if ($data !== FALSE){
170
+ $settings = json_decode($data, true);
171
+ // try to read the settings array
172
+ if (isset($settings['mantra_db'])){ ?>
173
+ <div class="wrap">
174
+ <div id="icon-tools" class="icon32"><br></div>
175
+ <h2><?php echo __( 'Import Mantra Theme Options ', 'mantra' );?></h2> <?php
176
+ $settings = array_merge($mantra_options, $settings);
177
+ update_option('ma_options', $settings);
178
+ echo '<div class="updated fade"><p>'. __('Success! The options have been imported.', 'mantra').'<br />';
179
+ printf( '<a href="%s">%s<a></p></div>', admin_url( 'themes.php?page=mantra-page' ), __('Go back to the settings page and check them out!', 'mantra') );
180
+ }
181
+ else { // else: try to read the settings array
182
+ echo '<div class="error"><p><strong>'.__('Oops, there\'s a small problem.', 'mantra').'</strong><br />';
183
+ echo __('The uploaded file does not contain valid Mantra settings. Make sure the file is exported from Mantra.', 'mantra').'</p></div>';
184
+ mantra_import_form();
185
+ }
186
+ }
187
+ else { // else: try to read the file
188
+ echo '<div class="error"><p><strong>'.__('Oops, there\'s a small problem.', 'mantra').'</strong><br />';
189
+ echo __('The uploaded file could not be read.', 'mantra').'</p></div>';
190
+ mantra_import_form();
191
+ }
192
+ }
193
+ else { // else: make sure the file uploaded was a plain text file
194
+ echo '<div class="error"><p><strong>'.__('Oops, there\'s a small problem.', 'mantra').'</strong><br />';
195
+ echo __('The uploaded file is not supported. Make sure the file was exported from Mantra and that it is a text file.', 'mantra').'</p></div>';
196
+ mantra_import_form();
197
+ }
198
+
199
+ // Delete the file after we're done
200
+ $wp_filesystem->delete($filename);
201
+
202
+ }
203
+ else { // else: make sure there is an import file uploaded
204
+ echo '<div class="error"><p>'.__( 'Oops! The file is empty or there was no file. This error could also be caused by uploads being disabled in your php.ini or by the file being bigger than the limits set in PHP.', 'mantra' ).'</p></div>';
205
+ mantra_import_form();
206
+ }
207
+ echo '</div> <!-- end wrap -->';
208
+ }
209
+ else {
210
+ wp_die(__('ERROR: You are not authorized to perform this operation', 'mantra'));
211
+ }
212
+ } // Closes the mantra_import_file() function definition
213
+
214
+ function mantra_righty_below() {
215
+ ?>
216
+ <div class="postbox export non-essential-option" style="overflow:hidden;">
217
+ <div class="head-wrap">
218
+ <h3 class="hndle"><?php _e( 'Import/Export Settings', 'mantra' ); ?></h3>
219
+ </div><!-- head-wrap -->
220
+ <div class="panel-wrap inside">
221
+ <form action="" method="post">
222
+ <?php wp_nonce_field('mantra-export', 'mantra-export'); ?>
223
+ <input type="hidden" name="mantra_export" value="true" />
224
+ <input type="submit" class="button" value="<?php _e('Export Theme options', 'mantra'); ?>" />
225
+ </form>
226
+ <form action="" method="post">
227
+ <input type="hidden" name="mantra_import" value="true" />
228
+ <input type="submit" class="button" value="<?php _e('Import Theme options', 'mantra'); ?>" />
229
+ </form>
230
+ </div><!-- inside -->
231
+ </div><!-- export -->
232
+
233
+
234
+ <div class="postbox news" >
235
+ <div>
236
+ <h3 class="hndle"><?php _e( 'Mantra Latest News', 'mantra' ); ?></h3>
237
+ </div>
238
+ <div class="panel-wrap inside" style="height:200px;overflow:auto;">
239
+ <?php
240
+ $mantra_news = fetch_feed( array( 'http://www.cryoutcreations.eu/cat/wordpress-themes/mantra/feed') );
241
+ $maxitems = 0;
242
+ if ( ! is_wp_error( $mantra_news ) ) {
243
+ $maxitems = $mantra_news->get_item_quantity( 10 );
244
+ $news_items = $mantra_news->get_items( 0, (int)$maxitems );
245
+ }
246
+ ?>
247
+ <ul class="news-list">
248
+ <?php if ( $maxitems == 0 ) : echo '<li>' . __( 'No news items.', 'mantra' ) . '</li>'; else :
249
+ foreach( $news_items as $news_item ) : ?>
250
+ <li>
251
+ <a class="news-header" href='<?php echo esc_url( $news_item->get_permalink() ); ?>'><?php echo esc_html( $news_item->get_title() ); ?></a><br />
252
+ <span class="news-item-date"><?php _e('Posted on','mantra');echo $news_item->get_date(' j F Y'); ?></span><br />
253
+ <a class="news-read" href='<?php echo esc_url( $news_item->get_permalink() ); ?>'>Read more &raquo;</a>
254
+ </li>
255
+ <?php endforeach; endif; ?>
256
+ </ul>
257
+ </div><!-- inside -->
258
+ </div><!-- news -->
259
+ <?php
260
+ } // mantra_righty_below()
261
+ add_action( 'mantra_after_righty', 'mantra_righty_below' );
262
+
263
+ // Truncate function for use in the Admin RSS feed
264
+ function mantra_truncate_words($string,$words=20, $ellipsis=' ...') {
265
+ $new = preg_replace('/((\w+\W+\'*){'.($words-1).'}(\w+))(.*)/', '${1}', $string);
266
+ return $new.$ellipsis;
267
+ }
268
+
269
+ } // endif version_compare()
270
+
271
+ // FIN
inc/nirvana.php CHANGED
@@ -25,6 +25,6 @@ function nirvana_theme_settings_restore($class='') {
25
  } // nirvana_theme_settings_buttons()
26
 
27
  function nirvana_extra() {
28
- $url = plugin_dir_url( dirname(__FILE__) ) . '/media';
29
  include_once( plugin_dir_path( __FILE__ ) . 'extra.php' );
30
  } // nirvana_extra()
25
  } // nirvana_theme_settings_buttons()
26
 
27
  function nirvana_extra() {
28
+ $url = untrailingslashit( plugin_dir_url( dirname(__FILE__) ) ) . '/media';
29
  include_once( plugin_dir_path( __FILE__ ) . 'extra.php' );
30
  } // nirvana_extra()
inc/parabola.php CHANGED
@@ -25,6 +25,6 @@ function parabola_theme_settings_restore($class='') {
25
  } // parabola_theme_settings_buttons()
26
 
27
  function parabola_extra() {
28
- $url = plugin_dir_url( dirname(__FILE__) ) . '/media';
29
  include_once( plugin_dir_path( __FILE__ ) . 'extra.php' );
30
  } // parabola_extra()
25
  } // parabola_theme_settings_buttons()
26
 
27
  function parabola_extra() {
28
+ $url = untrailingslashit( plugin_dir_url( dirname(__FILE__) ) ) . '/media';
29
  include_once( plugin_dir_path( __FILE__ ) . 'extra.php' );
30
  } // parabola_extra()
inc/settings.php CHANGED
@@ -9,19 +9,15 @@ $url = plugin_dir_url( dirname(__FILE__) ) . 'media';
9
  ?>
10
 
11
  <div class="wrap">
12
- <h2><?php _e('Cryout Serious Theme Settings Status', 'cryout-theme-settings') ?></h2>
13
 
14
  <?php if ($this->status == 1): ?>
15
- <div class="notice updated"><p>Current active (or parent) theme is: <strong><?php echo $theme_name; ?></strong>.
16
- The plugin is <strong style="color: #008000;">active</strong>.<br>
17
- <br>
18
- Go <a href="<?php echo $theme_page_url ?>"><strong>configure <?php echo $theme_name ?></strong></a>.
19
  </p></div>
20
  <?php elseif ($this->status == 4): ?>
21
- <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.
22
- The plugin is <strong style="color: #008000;">active</strong> in compatibility mode.<br>
23
- <br>
24
- Go <a href="<?php echo $theme_page_url ?>"><strong>configure <?php echo $theme_name ?></strong></a>.
25
  </p></div>
26
  <?php else: ?>
27
  <div class="notice error"><p>
@@ -29,28 +25,28 @@ $url = plugin_dir_url( dirname(__FILE__) ) . 'media';
29
  switch ($this->status):
30
  case 5:
31
  // theme requires update ?>
32
- Current active (or parent) theme is: <strong><?php echo $theme_name; ?></strong>.<br>
33
  This plugin cannot work with this version of the theme. Please update the theme first. <br>
34
  The plugin is <strong style="color: #800000;">INACTIVE</strong>. <?php
35
  break;
36
  case 3:
37
  // unsupported theme ?>
38
- Current active (or parent) theme is: <strong><?php echo $theme_name; ?></strong>.<br>
39
  This plugin is designed to work only with the supported themes. <br>
40
- The plugin is <strong style="color: #800000;">INACTIVE</strong>. <?php
41
  break;
42
  case 2:
43
  // unsupported version ?>
44
- 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>
45
  You are running <em><?php echo $theme_name ?> version <?php echo $this->current_theme['version'] ?></em> which does not need this plugin.</br>
46
- The plugin is <strong style="color: #800000;">INACTIVE</strong>. <?php
47
  break;
48
  case 0:
49
  default:
50
  // inactive/undefined ?>
51
- Current active (or parent) theme is: <strong><?php echo $theme_name; ?></strong>.<br>
52
  This plugin is designed to work only with the supported themes. <br>
53
- The plugin is <strong style="color: #800000;">INACTIVE</strong>. <?php
54
  break; ?>
55
  <?php endswitch; ?>
56
  </p></div>
@@ -58,7 +54,7 @@ $url = plugin_dir_url( dirname(__FILE__) ) . 'media';
58
  <?php if ($this->renamed_theme) :?>
59
  <div class="notice error">
60
  <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>
61
- 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>
62
  </div>
63
  <?php endif; ?>
64
 
@@ -68,17 +64,14 @@ $url = plugin_dir_url( dirname(__FILE__) ) . 'media';
68
  <div id="post-body-content">
69
 
70
  <div class="postbox">
71
-
72
- <div class="handlediv"><br></div>
73
  <h3 class="hndle"><span>About</span></h3>
74
  <div class="inside">
75
  <?php if ($this->status != 4) { ?>
76
- <p>This plugin is designed to inter-operate with our supported themes:</p>
77
  <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>
78
  <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>
79
  <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>
80
  <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>
81
- <p>To restore their theme settings pages which we had to remove due to the Customize-based settings enforcement.</p>
82
  <p>If you are using a different theme or a theme version not listed here this plugin will not activate.</p>
83
  <?php } else { ?>
84
  <p>
@@ -93,16 +86,12 @@ $url = plugin_dir_url( dirname(__FILE__) ) . 'media';
93
  </div>
94
 
95
  <div class="postbox">
96
-
97
- <div class="handlediv"><br></div>
98
  <h3 class="hndle"><span>Our Latest Themes</span></h3>
99
  <div class="inside">
100
-
101
- <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>
102
- <li><a href="https://www.cryoutcreations.eu/wordpress-themes/septera" target="_blank"><img src="<?php echo $url . '/septera.jpg'; ?>" /><span>Septera</span></a></li>
103
- <li><a href="https://www.cryoutcreations.eu/wordpress-themes/verbosa" target="_blank"><img src="<?php echo $url . '/verbosa.jpg'; ?>" /><span>Verbosa</span></a></li>
104
- <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>
105
-
106
  </div>
107
  </div>
108
 
@@ -113,25 +102,25 @@ $url = plugin_dir_url( dirname(__FILE__) ) . 'media';
113
  <div class="meta-box-sortables">
114
 
115
  <div class="postbox">
116
- <div class="handlediv"><br></div>
117
  <h3 style="text-align: center;" class="hndle">
118
- <span><strong>Cryout Serious Theme Settings</strong></span>
119
  </h3>
120
 
121
  <div class="inside">
122
  <div style="text-align: center; margin: auto">
123
  <strong>version: <?php echo $this->version ?></strong><br>
124
  by Cryout Creations<br>
125
- <a target="_blank" href="http://www.cryoutcreations.eu/cryout-theme-settings/">www.cryoutcreations.eu</a>
126
  </div>
127
  </div>
128
  </div>
129
 
130
  <div class="postbox">
131
- <div class="handlediv"><br></div>
132
- <h3 style="text-align: center;" class="hndle">
133
- <span>Support</span>
134
- </h3><div class="inside">
 
135
  <div style="text-align: center; margin: auto">
136
  For support questions,<br>
137
  please use <a target="_blank" href="http://www.cryoutcreations.eu/forum">our forum</a>.
9
  ?>
10
 
11
  <div class="wrap">
12
+ <h2><?php _e('Serious Theme Settings Status', 'cryout-theme-settings') ?></h2>
13
 
14
  <?php if ($this->status == 1): ?>
15
+ <div class="notice updated"><p>Currently detected theme is: <strong><?php echo $theme_name; ?></strong>.<br>
16
+ The plugin is <strong style="color: #008000;">active</strong>. Go <a href="<?php echo $theme_page_url ?>"><strong>configure <?php echo $theme_name ?></strong></a>.
 
 
17
  </p></div>
18
  <?php elseif ($this->status == 4): ?>
19
+ <div class="notice updated"><p>Currently detected theme is: <strong><?php echo $theme_name; ?></strong> and you are running WordPress 4.4 or newer.<br>
20
+ The plugin is <strong style="color: #008000;">active</strong> in compatibility mode. Go <a href="<?php echo $theme_page_url ?>"><strong>configure <?php echo $theme_name ?></strong></a>.
 
 
21
  </p></div>
22
  <?php else: ?>
23
  <div class="notice error"><p>
25
  switch ($this->status):
26
  case 5:
27
  // theme requires update ?>
28
+ Currently detected theme is: <strong><?php echo $theme_name; ?></strong>.<br>
29
  This plugin cannot work with this version of the theme. Please update the theme first. <br>
30
  The plugin is <strong style="color: #800000;">INACTIVE</strong>. <?php
31
  break;
32
  case 3:
33
  // unsupported theme ?>
34
+ Currently detected theme is: <strong><?php echo $theme_name; ?></strong>.<br>
35
  This plugin is designed to work only with the supported themes. <br>
36
+ The plugin is <strong style="color: #800000;">INACTIVE</strong> and can be disabled and/or removed. <?php
37
  break;
38
  case 2:
39
  // unsupported version ?>
40
+ Currently detected 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>
41
  You are running <em><?php echo $theme_name ?> version <?php echo $this->current_theme['version'] ?></em> which does not need this plugin.</br>
42
+ The plugin is <strong style="color: #800000;">INACTIVE</strong> and can be disabled and/or removed. <?php
43
  break;
44
  case 0:
45
  default:
46
  // inactive/undefined ?>
47
+ Currently detected theme is: <strong><?php echo $theme_name; ?></strong>.<br>
48
  This plugin is designed to work only with the supported themes. <br>
49
+ The plugin is <strong style="color: #800000;">INACTIVE</strong> and can be disabled and/or removed. <?php
50
  break; ?>
51
  <?php endswitch; ?>
52
  </p></div>
54
  <?php if ($this->renamed_theme) :?>
55
  <div class="notice error">
56
  <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>
57
+ If you need to customize the theme code, we strongly recommend using a <a href="http://www.cryoutcreations.eu/wordpress-themes/wordpress-tutorials/wordpress-child-themes" target="_blank">child theme</a>.</p>
58
  </div>
59
  <?php endif; ?>
60
 
64
  <div id="post-body-content">
65
 
66
  <div class="postbox">
 
 
67
  <h3 class="hndle"><span>About</span></h3>
68
  <div class="inside">
69
  <?php if ($this->status != 4) { ?>
70
+ <p>This plugin is designed to inter-operate with our supported themes to enable their advanced theme settings pages:</p>
71
  <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>
72
  <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>
73
  <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>
74
  <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>
 
75
  <p>If you are using a different theme or a theme version not listed here this plugin will not activate.</p>
76
  <?php } else { ?>
77
  <p>
86
  </div>
87
 
88
  <div class="postbox">
 
 
89
  <h3 class="hndle"><span>Our Latest Themes</span></h3>
90
  <div class="inside">
91
+ <?php $themes = array_slice( $this->get_suggested_themes(), 0, 4 ); ?>
92
+ <ul> <?php foreach ( $themes as $theme ) { ?>
93
+ <li><?php printf( '<a href="https://www.cryoutcreations.eu/wordpress-themes/%1$s" target="_blank"><img src="%2$s/%1$s.jpg" /><span>%3$s</span></a> ', $theme, $url, ucwords( $theme ) ); ?> </li>
94
+ <?php } // foreach ?> </ul>
 
 
95
  </div>
96
  </div>
97
 
102
  <div class="meta-box-sortables">
103
 
104
  <div class="postbox">
 
105
  <h3 style="text-align: center;" class="hndle">
106
+ <span><strong>Serious Theme Settings</strong></span>
107
  </h3>
108
 
109
  <div class="inside">
110
  <div style="text-align: center; margin: auto">
111
  <strong>version: <?php echo $this->version ?></strong><br>
112
  by Cryout Creations<br>
113
+ <a target="_blank" href="https://www.cryoutcreations.eu/wordpress-plugins/cryout-theme-settings/">www.cryoutcreations.eu</a>
114
  </div>
115
  </div>
116
  </div>
117
 
118
  <div class="postbox">
119
+ <h3 style="text-align: center;" class="hndle">
120
+ <span>Support</span>
121
+ </h3>
122
+
123
+ <div class="inside">
124
  <div style="text-align: center; margin: auto">
125
  For support questions,<br>
126
  please use <a target="_blank" href="http://www.cryoutcreations.eu/forum">our forum</a>.
inc/tempera.php CHANGED
@@ -25,6 +25,6 @@ function tempera_theme_settings_restore($class='') {
25
  } // tempera_theme_settings_buttons()
26
 
27
  function tempera_extra() {
28
- $url = plugin_dir_url( dirname(__FILE__) ) . '/media';
29
  include_once( plugin_dir_path( __FILE__ ) . 'extra.php' );
30
  } // tempera_extra()
25
  } // tempera_theme_settings_buttons()
26
 
27
  function tempera_extra() {
28
+ $url = untrailingslashit( plugin_dir_url( dirname(__FILE__) ) ) . '/media';
29
  include_once( plugin_dir_path( __FILE__ ) . 'extra.php' );
30
  } // tempera_extra()
media/esotera.jpg ADDED
Binary file
readme.txt CHANGED
@@ -3,21 +3,19 @@ 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: 5.2
7
- Stable tag: 0.5.10
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
@@ -30,7 +28,7 @@ Additionally, it is needed to correct an incompatibility between WordPress 4.4 a
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
 
@@ -50,6 +48,11 @@ You do not need this plugin if you use do not use any of the listed themes.
50
 
51
  == Changelog ==
52
 
 
 
 
 
 
53
  = 0.5.10 =
54
  * Updated themes information
55
  * Bumped supported WordPress version to 5.2
3
  Donate link: https://www.cryoutcreations.eu/donate/
4
  Tags: theme, admin
5
  Requires at least: 4.2
6
+ Tested up to: 5.5
7
+ Stable tag: 0.5.11
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 enable 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/) and [Mantra](https://wordpress.org/themes/mantra/) themes and enable their advanced settings pages which we had to remove due to the Customize-based settings transition.
 
 
16
 
17
  = Compatibility =
18
+ The plugin is intended to be used with the following theme releases regardless of WordPress version:
19
 
20
  * Nirvana version 1.2 and newer
21
  * Tempera version 1.4 and newer
28
  * Parabola versions 0.9 - 1.5.1
29
  * Mantra versions 2.0 - 2.4.1.1
30
 
31
+ This plugin will do nothing if you do not use any of the listed themes.
32
 
33
  == Installation ==
34
 
48
 
49
  == Changelog ==
50
 
51
+ = 0.5.11 =
52
+ * Updated for compatibility with the changes in Mantra 3.3.0
53
+ * Some code cleanup and optimization
54
+ * Bumped supported WordPress version to 5.5
55
+
56
  = 0.5.10 =
57
  * Updated themes information
58
  * Bumped supported WordPress version to 5.2