WP-PageNavi - Version 2.93.1

Version Description

Download this release

Release Info

Developer GamerZ
Plugin Icon WP-PageNavi
Version 2.93.1
Comparing to
See all releases

Code changes from version 2.93 to 2.93.1

Files changed (4) hide show
  1. readme.txt +5 -2
  2. scb/AdminPage.php +0 -1
  3. scb/Options.php +2 -1
  4. wp-pagenavi.php +4 -4
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: GamerZ, scribu
3
  Donate link: https://lesterchan.net/site/donation/
4
  Tags: navigation, pagination, paging, pages
5
  Requires at least: 3.2
6
- Tested up to: 4.9
7
- Stable tag: 2.93
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -147,6 +147,9 @@ You can do that like so:
147
  `<?php wp_pagenavi( array( 'options' => PageNavi_Core::$options->get_defaults() ) ); ?>`
148
 
149
  ## Changelog
 
 
 
150
  ### 2.93
151
  * Remove screen_icon from SCB.
152
 
3
  Donate link: https://lesterchan.net/site/donation/
4
  Tags: navigation, pagination, paging, pages
5
  Requires at least: 3.2
6
+ Tested up to: 5.2
7
+ Stable tag: 2.93.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
147
  `<?php wp_pagenavi( array( 'options' => PageNavi_Core::$options->get_defaults() ) ); ?>`
148
 
149
  ## Changelog
150
+ ### 2.93.1
151
+ * FIXED: Duplicated Settings Saved admin_notices
152
+
153
  ### 2.93
154
  * Remove screen_icon from SCB.
155
 
scb/AdminPage.php CHANGED
@@ -130,7 +130,6 @@ abstract class scbAdminPage {
130
 
131
  if ( isset( $this->option_name ) ) {
132
  add_action( 'admin_init', array( $this, 'option_init' ) );
133
- add_action( 'admin_notices', 'settings_errors' );
134
  }
135
 
136
  add_action( 'admin_menu', array( $this, 'page_init' ), $this->args['admin_action_priority'] );
130
 
131
  if ( isset( $this->option_name ) ) {
132
  add_action( 'admin_init', array( $this, 'option_init' ) );
 
133
  }
134
 
135
  add_action( 'admin_menu', array( $this, 'page_init' ), $this->args['admin_action_priority'] );
scb/Options.php CHANGED
@@ -59,7 +59,8 @@ class scbOptions {
59
  * @return mixed Whatever is in those fields.
60
  */
61
  public function get( $field = null, $default = null ) {
62
- $data = array_merge( $this->defaults, get_option( $this->key, array() ) );
 
63
 
64
  return scbForms::get_value( $field, $data, $default );
65
  }
59
  * @return mixed Whatever is in those fields.
60
  */
61
  public function get( $field = null, $default = null ) {
62
+ $current_options = get_option( $this->key, array() );
63
+ $data = array_merge( $this->defaults, is_array( $current_options ) ? $current_options : array() );
64
 
65
  return scbForms::get_value( $field, $data, $default );
66
  }
wp-pagenavi.php CHANGED
@@ -3,18 +3,18 @@
3
  Plugin Name: WP-PageNavi
4
  Plugin URI: https://lesterchan.net/portfolio/programming/php/
5
  Description: Adds a more advanced paging navigation to your WordPress blog
6
- Version: 2.93
7
  Author: Lester 'GaMerZ' Chan
8
  Author URI: https://lesterchan.net
9
  Text Domain: wp-pagenavi
10
  */
11
 
12
- require_once dirname( __FILE__ ) . '/scb/load.php';
13
 
14
  function _pagenavi_init() {
15
  load_plugin_textdomain( 'wp-pagenavi' );
16
 
17
- require_once dirname( __FILE__ ) . '/core.php';
18
 
19
  $options = new scbOptions( 'pagenavi_options', __FILE__, array(
20
  'pages_text' => __( 'Page %CURRENT_PAGE% of %TOTAL_PAGES%', 'wp-pagenavi' ),
@@ -37,7 +37,7 @@ function _pagenavi_init() {
37
  PageNavi_Core::init( $options );
38
 
39
  if ( is_admin() ) {
40
- require_once dirname( __FILE__ ) . '/admin.php';
41
  new PageNavi_Options_Page( __FILE__, $options );
42
  }
43
  }
3
  Plugin Name: WP-PageNavi
4
  Plugin URI: https://lesterchan.net/portfolio/programming/php/
5
  Description: Adds a more advanced paging navigation to your WordPress blog
6
+ Version: 2.93.1
7
  Author: Lester 'GaMerZ' Chan
8
  Author URI: https://lesterchan.net
9
  Text Domain: wp-pagenavi
10
  */
11
 
12
+ require_once __DIR__ . '/scb/load.php';
13
 
14
  function _pagenavi_init() {
15
  load_plugin_textdomain( 'wp-pagenavi' );
16
 
17
+ require_once __DIR__ . '/core.php';
18
 
19
  $options = new scbOptions( 'pagenavi_options', __FILE__, array(
20
  'pages_text' => __( 'Page %CURRENT_PAGE% of %TOTAL_PAGES%', 'wp-pagenavi' ),
37
  PageNavi_Core::init( $options );
38
 
39
  if ( is_admin() ) {
40
+ require_once __DIR__ . '/admin.php';
41
  new PageNavi_Options_Page( __FILE__, $options );
42
  }
43
  }