WP-PageNavi - Version 2.93

Version Description

Download this release

Release Info

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

Code changes from version 2.92 to 2.93

Files changed (4) hide show
  1. core.php +5 -5
  2. readme.txt +5 -2
  3. scb/AdminPage.php +0 -3
  4. wp-pagenavi.php +3 -3
core.php CHANGED
@@ -125,7 +125,7 @@ function wp_pagenavi( $args = array() ) {
125
  if ( $larger_page < ($start_page - $half_page_start) && $larger_page_start < $larger_page_to_show ) {
126
  $out .= $instance->get_single( $larger_page, $options['page_text'], array(
127
  'class' => "{$class_names['smaller']} {$class_names['page']}",
128
- 'title' => sprintf( __( 'Page %d', 'wp-pagenavi' ), number_format_i18n( $larger_page ) ),
129
  ) );
130
  $larger_page_start++;
131
  }
@@ -139,12 +139,12 @@ function wp_pagenavi( $args = array() ) {
139
  foreach ( range( $start_page, $end_page ) as $i ) {
140
  if ( $i == $paged && !empty( $options['current_text'] ) ) {
141
  $current_page_text = str_replace( '%PAGE_NUMBER%', number_format_i18n( $i ), $options['current_text'] );
142
- $out .= "<span class='{$class_names['current']}'>$current_page_text</span>";
143
  $timeline = 'larger';
144
  } else {
145
  $out .= $instance->get_single( $i, $options['page_text'], array(
146
  'class' => "{$class_names['page']} {$class_names[$timeline]}",
147
- 'title' => sprintf( __( 'Page %d', 'wp-pagenavi' ), number_format_i18n( $i ) ),
148
  ) );
149
  }
150
  }
@@ -156,7 +156,7 @@ function wp_pagenavi( $args = array() ) {
156
  if ( $larger_page > ($end_page + $half_page_end) && $larger_page_end < $larger_page_to_show ) {
157
  $larger_page_out .= $instance->get_single( $larger_page, $options['page_text'], array(
158
  'class' => "{$class_names['larger']} {$class_names['page']}",
159
- 'title' => sprintf( __( 'Page %d', 'wp-pagenavi' ), number_format_i18n( $larger_page ) ),
160
  ) );
161
  $larger_page_end++;
162
  }
@@ -211,7 +211,7 @@ function wp_pagenavi( $args = array() ) {
211
  $out .= "</form>\n";
212
  break;
213
  }
214
- $out = $before . "<" . $wrapper_tag . " class='" . $wrapper_class . "'>\n$out\n</" . $wrapper_tag . ">" . $after;
215
 
216
  $out = apply_filters( 'wp_pagenavi', $out );
217
 
125
  if ( $larger_page < ($start_page - $half_page_start) && $larger_page_start < $larger_page_to_show ) {
126
  $out .= $instance->get_single( $larger_page, $options['page_text'], array(
127
  'class' => "{$class_names['smaller']} {$class_names['page']}",
128
+ 'title' => sprintf( __( 'Page %s', 'wp-pagenavi' ), number_format_i18n( $larger_page ) ),
129
  ) );
130
  $larger_page_start++;
131
  }
139
  foreach ( range( $start_page, $end_page ) as $i ) {
140
  if ( $i == $paged && !empty( $options['current_text'] ) ) {
141
  $current_page_text = str_replace( '%PAGE_NUMBER%', number_format_i18n( $i ), $options['current_text'] );
142
+ $out .= "<span aria-current='page' class='{$class_names['current']}'>$current_page_text</span>";
143
  $timeline = 'larger';
144
  } else {
145
  $out .= $instance->get_single( $i, $options['page_text'], array(
146
  'class' => "{$class_names['page']} {$class_names[$timeline]}",
147
+ 'title' => sprintf( __( 'Page %s', 'wp-pagenavi' ), number_format_i18n( $i ) ),
148
  ) );
149
  }
150
  }
156
  if ( $larger_page > ($end_page + $half_page_end) && $larger_page_end < $larger_page_to_show ) {
157
  $larger_page_out .= $instance->get_single( $larger_page, $options['page_text'], array(
158
  'class' => "{$class_names['larger']} {$class_names['page']}",
159
+ 'title' => sprintf( __( 'Page %s', 'wp-pagenavi' ), number_format_i18n( $larger_page ) ),
160
  ) );
161
  $larger_page_end++;
162
  }
211
  $out .= "</form>\n";
212
  break;
213
  }
214
+ $out = $before . "<" . $wrapper_tag . " class='" . $wrapper_class . "' role='navigation'>\n$out\n</" . $wrapper_tag . ">" . $after;
215
 
216
  $out = apply_filters( 'wp_pagenavi', $out );
217
 
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.8
7
- Stable tag: 2.92
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.92
151
  * Add title attr to pages link. Props @Mahjouba91.
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: 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
  `<?php wp_pagenavi( array( 'options' => PageNavi_Core::$options->get_defaults() ) ); ?>`
148
 
149
  ## Changelog
150
+ ### 2.93
151
+ * Remove screen_icon from SCB.
152
+
153
  ### 2.92
154
  * Add title attr to pages link. Props @Mahjouba91.
155
 
scb/AdminPage.php CHANGED
@@ -13,7 +13,6 @@ abstract class scbAdminPage {
13
  * $toplevel (string) If not empty, will create a new top level menu (for expected values see http://codex.wordpress.org/Administration_Menus#Using_add_submenu_page)
14
  * - $icon_url (string) URL to an icon for the top level menu
15
  * - $position (int) Position of the toplevel menu (caution!)
16
- * $screen_icon (string) The icon type to use in the screen header
17
  * $nonce string (default: $page_slug)
18
  * $action_link (string|bool) Text of the action link on the Plugins page (default: 'Settings')
19
  * $admin_action_priority int The priority that the admin_menu action should be executed at (default: 10)
@@ -186,7 +185,6 @@ abstract class scbAdminPage {
186
  */
187
  protected function page_header() {
188
  echo "<div class='wrap'>\n";
189
- screen_icon( $this->args['screen_icon'] );
190
  echo html( 'h2', $this->args['page_title'] );
191
  }
192
 
@@ -510,7 +508,6 @@ abstract class scbAdminPage {
510
  'toplevel' => '',
511
  'position' => null,
512
  'icon_url' => '',
513
- 'screen_icon' => '',
514
  'parent' => 'options-general.php',
515
  'capability' => 'manage_options',
516
  'menu_title' => $this->args['page_title'],
13
  * $toplevel (string) If not empty, will create a new top level menu (for expected values see http://codex.wordpress.org/Administration_Menus#Using_add_submenu_page)
14
  * - $icon_url (string) URL to an icon for the top level menu
15
  * - $position (int) Position of the toplevel menu (caution!)
 
16
  * $nonce string (default: $page_slug)
17
  * $action_link (string|bool) Text of the action link on the Plugins page (default: 'Settings')
18
  * $admin_action_priority int The priority that the admin_menu action should be executed at (default: 10)
185
  */
186
  protected function page_header() {
187
  echo "<div class='wrap'>\n";
 
188
  echo html( 'h2', $this->args['page_title'] );
189
  }
190
 
508
  'toplevel' => '',
509
  'position' => null,
510
  'icon_url' => '',
 
511
  'parent' => 'options-general.php',
512
  'capability' => 'manage_options',
513
  'menu_title' => $this->args['page_title'],
wp-pagenavi.php CHANGED
@@ -1,11 +1,11 @@
1
  <?php
2
  /*
3
  Plugin Name: WP-PageNavi
4
- Plugin URI: http://lesterchan.net/portfolio/programming/php/
5
  Description: Adds a more advanced paging navigation to your WordPress blog
6
- Version: 2.92
7
  Author: Lester 'GaMerZ' Chan
8
- Author URI: http://lesterchan.net
9
  Text Domain: wp-pagenavi
10
  */
11
 
1
  <?php
2
  /*
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