Version Description
Download this release
Release Info
| Developer | cbaldelomar |
| Plugin | |
| Version | 1.61 |
| Comparing to | |
| See all releases | |
Code changes from version 1.59 to 1.61
- README.md +8 -0
- includes/vendors/wpc-settings-framework/class-wpc-settings-framework.php +65 -1
- includes/vendors/wpc-settings-framework/css/options.css +19 -0
- includes/vendors/wpc-settings-framework/views/page.php +1 -1
- includes/vendors/wpc-settings-framework/views/settings-error.php +0 -5
- includes/vendors/wpc-settings-framework/views/settings/order-show-hide.php +1 -1
- includes/vendors/wpc-settings-framework/views/tabs.php +1 -1
- readme.txt +8 -0
- wc-gallery.php +2 -2
README.md
CHANGED
|
@@ -67,6 +67,14 @@ For more tutorials on our gallery plugin, go to our knowledge base.
|
|
| 67 |
|
| 68 |
## Changelog ##
|
| 69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 70 |
### Version 1.59 ###
|
| 71 |
|
| 72 |
* fixing image count when flexslider clones exist.
|
| 67 |
|
| 68 |
## Changelog ##
|
| 69 |
|
| 70 |
+
### Version 1.61 ###
|
| 71 |
+
|
| 72 |
+
* Updated WPC Settings Framework to 1.0.7
|
| 73 |
+
|
| 74 |
+
### Version 1.60 ###
|
| 75 |
+
|
| 76 |
+
* Updated WPC Settings Framework to 1.0.6
|
| 77 |
+
|
| 78 |
### Version 1.59 ###
|
| 79 |
|
| 80 |
* fixing image count when flexslider clones exist.
|
includes/vendors/wpc-settings-framework/class-wpc-settings-framework.php
CHANGED
|
@@ -17,7 +17,7 @@
|
|
| 17 |
*/
|
| 18 |
class WC_Gallery_Settings_Framework {
|
| 19 |
|
| 20 |
-
protected $version = '1.0.
|
| 21 |
|
| 22 |
/**
|
| 23 |
* Instance of this class.
|
|
@@ -68,6 +68,7 @@ class WC_Gallery_Settings_Framework {
|
|
| 68 |
$this->set_slug_prefix();
|
| 69 |
|
| 70 |
add_action( 'admin_init', array( &$this, 'set_plugin_info' ) );
|
|
|
|
| 71 |
|
| 72 |
add_action( 'init', array( &$this, 'set_options' ), 100 );
|
| 73 |
add_action( 'admin_init', array( &$this, 'register_settings' ) );
|
|
@@ -97,6 +98,17 @@ class WC_Gallery_Settings_Framework {
|
|
| 97 |
return self::$instance;
|
| 98 |
}
|
| 99 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
public function set_slug_prefix() {
|
| 101 |
$plugin_basename = plugin_basename( __FILE__ );
|
| 102 |
$plugin_name = substr( $plugin_basename, 0, strpos( $plugin_basename, '/' ) );
|
|
@@ -179,6 +191,57 @@ class WC_Gallery_Settings_Framework {
|
|
| 179 |
}
|
| 180 |
}
|
| 181 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 182 |
public function update_option( $option_name, $default ) {
|
| 183 |
update_option( $option_name, $default );
|
| 184 |
}
|
|
@@ -527,6 +590,7 @@ class WC_Gallery_Settings_Framework {
|
|
| 527 |
$args['display'] = 'default';
|
| 528 |
|
| 529 |
extract( $args );
|
|
|
|
| 530 |
$val = get_option( $option_name, $default );
|
| 531 |
|
| 532 |
switch ( $args['type'] ) {
|
| 17 |
*/
|
| 18 |
class WC_Gallery_Settings_Framework {
|
| 19 |
|
| 20 |
+
protected $version = '1.0.7';
|
| 21 |
|
| 22 |
/**
|
| 23 |
* Instance of this class.
|
| 68 |
$this->set_slug_prefix();
|
| 69 |
|
| 70 |
add_action( 'admin_init', array( &$this, 'set_plugin_info' ) );
|
| 71 |
+
add_action( 'admin_init', array( &$this, 'reset_options' ) );
|
| 72 |
|
| 73 |
add_action( 'init', array( &$this, 'set_options' ), 100 );
|
| 74 |
add_action( 'admin_init', array( &$this, 'register_settings' ) );
|
| 98 |
return self::$instance;
|
| 99 |
}
|
| 100 |
|
| 101 |
+
public function reset_options() {
|
| 102 |
+
if ( isset( $_POST['wpcsf_reset_options_' . $this->plugin_slug ] ) ) {
|
| 103 |
+
$this->reset_all_options();
|
| 104 |
+
add_settings_error( $menu_slug, 'settings_updated', __('Settings reset.'), 'updated' );
|
| 105 |
+
set_transient('settings_errors', get_settings_errors(), 30);
|
| 106 |
+
$goback = add_query_arg( 'settings-updated', 'true', wp_get_referer() );
|
| 107 |
+
wp_redirect( $goback );
|
| 108 |
+
exit;
|
| 109 |
+
}
|
| 110 |
+
}
|
| 111 |
+
|
| 112 |
public function set_slug_prefix() {
|
| 113 |
$plugin_basename = plugin_basename( __FILE__ );
|
| 114 |
$plugin_name = substr( $plugin_basename, 0, strpos( $plugin_basename, '/' ) );
|
| 191 |
}
|
| 192 |
}
|
| 193 |
|
| 194 |
+
public function reset_all_options() {
|
| 195 |
+
$this->set_options();
|
| 196 |
+
|
| 197 |
+
if ( true ) {
|
| 198 |
+
foreach ( $this->options as $menu_slug => $o ) {
|
| 199 |
+
if ( isset( $o['option_group'] ) ) {
|
| 200 |
+
if ( isset( $o['tabs'] ) &&
|
| 201 |
+
is_array( $o['tabs'] ) ) {
|
| 202 |
+
foreach( $o['tabs'] as $key => $oo ) {
|
| 203 |
+
if ( isset( $oo['sections'] ) &&
|
| 204 |
+
is_array( $oo['sections'] ) ) {
|
| 205 |
+
$this->loop_and_reset_all_options( $oo['sections'] );
|
| 206 |
+
}
|
| 207 |
+
}
|
| 208 |
+
}
|
| 209 |
+
else if ( isset( $o['sections'] ) &&
|
| 210 |
+
is_array( $o['sections'] ) ) {
|
| 211 |
+
$this->loop_and_reset_all_options( $o['sections'] );
|
| 212 |
+
}
|
| 213 |
+
}
|
| 214 |
+
}
|
| 215 |
+
}
|
| 216 |
+
|
| 217 |
+
}
|
| 218 |
+
|
| 219 |
+
public function loop_and_reset_all_options( $sections ) {
|
| 220 |
+
foreach( $sections as $o ) {
|
| 221 |
+
if ( isset( $o['id'] ) &&
|
| 222 |
+
isset( $o['title'] ) &&
|
| 223 |
+
isset( $o['options'] ) &&
|
| 224 |
+
is_array( $o['options'] ) ) {
|
| 225 |
+
foreach( $o['options'] as $oo ) {
|
| 226 |
+
if ( isset( $oo['group'] ) && is_array( $oo['group'] ) ) {
|
| 227 |
+
foreach ( $oo['group'] as $key => $ooo ) {
|
| 228 |
+
if ( isset( $ooo['option_name'] ) ) {
|
| 229 |
+
$ooo['option_name'] = $this->plugin_prefix . $ooo['option_name'];
|
| 230 |
+
$this->update_option( $ooo['option_name'], $ooo['default'] );
|
| 231 |
+
}
|
| 232 |
+
}
|
| 233 |
+
}
|
| 234 |
+
else {
|
| 235 |
+
if ( isset( $oo['option_name'] ) ) {
|
| 236 |
+
$oo['option_name'] = $this->plugin_prefix . $oo['option_name'];
|
| 237 |
+
$this->update_option( $oo['option_name'], $oo['default'] );
|
| 238 |
+
}
|
| 239 |
+
}
|
| 240 |
+
}
|
| 241 |
+
}
|
| 242 |
+
}
|
| 243 |
+
}
|
| 244 |
+
|
| 245 |
public function update_option( $option_name, $default ) {
|
| 246 |
update_option( $option_name, $default );
|
| 247 |
}
|
| 590 |
$args['display'] = 'default';
|
| 591 |
|
| 592 |
extract( $args );
|
| 593 |
+
|
| 594 |
$val = get_option( $option_name, $default );
|
| 595 |
|
| 596 |
switch ( $args['type'] ) {
|
includes/vendors/wpc-settings-framework/css/options.css
CHANGED
|
@@ -151,3 +151,22 @@
|
|
| 151 |
.wpcsf-group .wpcsf-input-field .description {
|
| 152 |
display: inline-block;
|
| 153 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 151 |
.wpcsf-group .wpcsf-input-field .description {
|
| 152 |
display: inline-block;
|
| 153 |
}
|
| 154 |
+
/**
|
| 155 |
+
* Reset Button
|
| 156 |
+
*/
|
| 157 |
+
.wpcsf-wrap .button.delete {
|
| 158 |
+
float: right;
|
| 159 |
+
}
|
| 160 |
+
@media screen and (max-width: 600px) {
|
| 161 |
+
.wpcsf-wrap #submit {
|
| 162 |
+
display: block;
|
| 163 |
+
float: left;
|
| 164 |
+
clear: both;
|
| 165 |
+
}
|
| 166 |
+
.wpcsf-wrap .button.delete {
|
| 167 |
+
float: left;
|
| 168 |
+
display: block;
|
| 169 |
+
margin-top: 1.5em;
|
| 170 |
+
clear: both;
|
| 171 |
+
}
|
| 172 |
+
}
|
includes/vendors/wpc-settings-framework/views/page.php
CHANGED
|
@@ -24,7 +24,7 @@
|
|
| 24 |
|
| 25 |
<p class="submit">
|
| 26 |
<?php submit_button( null, 'primary', 'submit', false ); ?>
|
| 27 |
-
<?php
|
| 28 |
</p>
|
| 29 |
</form>
|
| 30 |
</div>
|
| 24 |
|
| 25 |
<p class="submit">
|
| 26 |
<?php submit_button( null, 'primary', 'submit', false ); ?>
|
| 27 |
+
<?php submit_button( 'Restore Default Settings', 'delete', 'wpcsf_reset_options_' . $menu_slug, false, array( 'onclick' => 'return confirm("Are you sure you want to reset your settings?");' ) ); ?>
|
| 28 |
</p>
|
| 29 |
</form>
|
| 30 |
</div>
|
includes/vendors/wpc-settings-framework/views/settings-error.php
CHANGED
|
@@ -1,10 +1,5 @@
|
|
| 1 |
<?php
|
| 2 |
wp_reset_vars( array( 'action' ) );
|
| 3 |
|
| 4 |
-
if ( isset( $_GET['updated'] ) && isset( $_GET['page'] ) ) {
|
| 5 |
-
// For backwards compat with plugins that don't use the Settings API and just set updated=1 in the redirect
|
| 6 |
-
add_settings_error( $menu_slug, 'settings_updated', __('Settings saved.'), 'updated' );
|
| 7 |
-
}
|
| 8 |
-
|
| 9 |
settings_errors();
|
| 10 |
?>
|
| 1 |
<?php
|
| 2 |
wp_reset_vars( array( 'action' ) );
|
| 3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
settings_errors();
|
| 5 |
?>
|
includes/vendors/wpc-settings-framework/views/settings/order-show-hide.php
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
<?php
|
| 2 |
-
$not_selected = $
|
| 3 |
?>
|
| 4 |
|
| 5 |
<?php if ( isset( $label ) ) : ?>
|
| 1 |
<?php
|
| 2 |
+
$not_selected = $selection;
|
| 3 |
?>
|
| 4 |
|
| 5 |
<?php if ( isset( $label ) ) : ?>
|
includes/vendors/wpc-settings-framework/views/tabs.php
CHANGED
|
@@ -86,7 +86,7 @@ if ( empty( $active_tab ) && isset( $_COOKIE[ $cookie_name ] ) && ! empty( $_COO
|
|
| 86 |
|
| 87 |
<p class="submit">
|
| 88 |
<?php submit_button( null, 'primary', 'submit', false ); ?>
|
| 89 |
-
<?php
|
| 90 |
</p>
|
| 91 |
</form>
|
| 92 |
</div>
|
| 86 |
|
| 87 |
<p class="submit">
|
| 88 |
<?php submit_button( null, 'primary', 'submit', false ); ?>
|
| 89 |
+
<?php submit_button( 'Restore Default Settings', 'delete', 'wpcsf_reset_options_' . $menu_slug, false, array( 'onclick' => 'return confirm("Are you sure you want to reset your settings?");' ) ); ?>
|
| 90 |
</p>
|
| 91 |
</form>
|
| 92 |
</div>
|
readme.txt
CHANGED
|
@@ -67,6 +67,14 @@ For more tutorials on our gallery plugin, go to our knowledge base.
|
|
| 67 |
|
| 68 |
== Changelog ==
|
| 69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 70 |
= Version 1.59 =
|
| 71 |
|
| 72 |
* fixing image count when flexslider clones exist.
|
| 67 |
|
| 68 |
== Changelog ==
|
| 69 |
|
| 70 |
+
= Version 1.61 =
|
| 71 |
+
|
| 72 |
+
* Updated WPC Settings Framework to 1.0.7
|
| 73 |
+
|
| 74 |
+
= Version 1.60 =
|
| 75 |
+
|
| 76 |
+
* Updated WPC Settings Framework to 1.0.6
|
| 77 |
+
|
| 78 |
= Version 1.59 =
|
| 79 |
|
| 80 |
* fixing image count when flexslider clones exist.
|
wc-gallery.php
CHANGED
|
@@ -5,11 +5,11 @@ Plugin URI: http://angiemakes.com/feminine-wordpress-blog-themes-women/
|
|
| 5 |
Description: Extend WordPress galleries to display masonry gallery, carousel gallery, and slider gallery
|
| 6 |
Author: Chris Baldelomar
|
| 7 |
Author URI: http://angiemakes.com/
|
| 8 |
-
Version: 1.
|
| 9 |
License: GPLv2 or later
|
| 10 |
*/
|
| 11 |
|
| 12 |
-
define( 'WC_GALLERY_VERSION', '1.
|
| 13 |
define( 'WC_GALLERY_PREFIX', 'wc_gallery_' );
|
| 14 |
define( '_WC_GALLERY_PREFIX', '_wc_gallery_' );
|
| 15 |
define( 'WC_GALLERY_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
| 5 |
Description: Extend WordPress galleries to display masonry gallery, carousel gallery, and slider gallery
|
| 6 |
Author: Chris Baldelomar
|
| 7 |
Author URI: http://angiemakes.com/
|
| 8 |
+
Version: 1.61
|
| 9 |
License: GPLv2 or later
|
| 10 |
*/
|
| 11 |
|
| 12 |
+
define( 'WC_GALLERY_VERSION', '1.61' );
|
| 13 |
define( 'WC_GALLERY_PREFIX', 'wc_gallery_' );
|
| 14 |
define( '_WC_GALLERY_PREFIX', '_wc_gallery_' );
|
| 15 |
define( 'WC_GALLERY_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
