Skip to content

Commit ecbc66e

Browse files
authored
Merge pull request #3 from JoryHogeveen/dev
v0.2.0.1
2 parents 6ce7d4f + c0e557b commit ecbc66e

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

includes/off-canvas-sidebars-menu-meta-box.class.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ function add_meta_box() {
4646
}
4747

4848
function meta_box() {
49-
global $_nav_menu_placeholder, $nav_menu_selected_id, $off_canvas_sidebars;
49+
global $_nav_menu_placeholder, $nav_menu_selected_id;
50+
$off_canvas_sidebars = Off_Canvas_Sidebars();
5051
$_nav_menu_placeholder = 0 > $_nav_menu_placeholder ? $_nav_menu_placeholder - 1 : -1;
5152
?>
5253
<div class="off-canvas-control-meta-box posttypediv" id="off-canvas-control-meta-box">
@@ -142,7 +143,7 @@ public function admin_enqueue_scripts() {
142143
* @param int $menu_item_db_id
143144
*/
144145
public function wp_update_nav_menu_item( $menu_id = 0, $menu_item_db_id = 0 ) {
145-
global $off_canvas_sidebars;
146+
$off_canvas_sidebars = Off_Canvas_Sidebars();
146147
if (empty($_POST['menu-item-url'][$menu_item_db_id]) || $_POST['menu-item-url'][$menu_item_db_id] != '#off_canvas_control')
147148
return;
148149

includes/off-canvas-sidebars-settings.class.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,15 @@ function enqueue_styles_scripts( $hook ) {
6262
}
6363

6464
function register_settings() {
65-
$this->plugin_tabs[ $this->settings_tab ] = esc_attr__( 'Off-Canvas Sidebars Settings', 'off-canvas-sidebars' );
65+
$this->plugin_tabs[ $this->settings_tab ] = esc_attr__( 'Settings', 'off-canvas-sidebars' );
6666
$this->plugin_tabs[ $this->sidebars_tab ] = esc_attr__( 'Sidebars', 'off-canvas-sidebars' );
6767

6868
register_setting( $this->settings_tab, $this->general_key, array( $this, 'validate_input' ) );
6969
register_setting( $this->sidebars_tab, $this->general_key, array( $this, 'validate_input' ) );
7070

7171
add_settings_section(
7272
'section_general',
73-
esc_attr__( 'Off-Canvas Sidebars Settings', 'off-canvas-sidebars' ),
73+
esc_attr__( 'Global Settings', 'off-canvas-sidebars' ),
7474
array( $this, 'register_general_settings' ),
7575
$this->settings_tab
7676
);
@@ -642,6 +642,7 @@ function plugin_options_page() {
642642
$tab = isset( $_GET['tab'] ) ? $_GET['tab'] : $this->settings_tab;
643643
?>
644644
<div class="wrap">
645+
<h1><?php _e( 'Off-Canvas Sidebars', 'off-canvas-sidebars' ) ?></h1>
645646
<?php $this->plugin_options_tabs(); ?>
646647
<div class="<?php echo $this->plugin_key ?> container">
647648

readme.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=YGPLM
44
Tags: genesis, off-canvas, sidebars, slidebars, jQuery, app, mobile, tablet, responsive
55
Requires at least: 3.8
66
Tested up to: 4.6
7-
Stable tag: 0.2
7+
Stable tag: 0.2.0.1
88

99
Add off-canvas sidebars using the Slidebars jQuery plugin.
1010

@@ -91,6 +91,11 @@ The final output of your theme should be similar to this:
9191

9292
== Changelog ==
9393

94+
= 0.2.0.1 =
95+
96+
* Fix: Global variable bug
97+
* UI: Improve settings page
98+
9499
= 0.2 =
95100

96101
* Update Slidebars plugin to v2.0.2: [click here for info](https://www.adchsm.com/slidebars/features/ "Slidebars Features")

widgets/off-canvas-sidebars-widget.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function widget( $args, $instance ) {
9595
* @param array $instance The widget options
9696
*/
9797
public function form( $instance ) {
98-
global $off_canvas_sidebars;
98+
$off_canvas_sidebars = Off_Canvas_Sidebars();
9999
$this->load_plugin_data();
100100
$instance = $this->merge_settings( $instance );
101101
//print_r($this);

0 commit comments

Comments
 (0)