Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: justintadlock/hybrid-core
base: 52ab7591a6
...
head fork: justintadlock/hybrid-core
compare: 1.4.3
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Showing with 28 additions and 25 deletions.
  1. +26 −23 extensions/loop-pagination.php
  2. +2 −2 hybrid.php
View
49 extensions/loop-pagination.php
@@ -13,12 +13,12 @@
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
- * @package LoopPagination
- * @version 0.1.5
- * @author Justin Tadlock <justin@justintadlock.com>
+ * @package LoopPagination
+ * @version 0.1.6
+ * @author Justin Tadlock <justin@justintadlock.com>
* @copyright Copyright (c) 2010 - 2012, Justin Tadlock
- * @link http://devpress.com/blog/loop-pagination-for-theme-developers
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
+ * @link http://themehybrid.com/docs/tutorials/loop-pagination
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/
/**
@@ -46,34 +46,37 @@ function loop_pagination( $args = array() ) {
/* Set up some default arguments for the paginate_links() function. */
$defaults = array(
- 'base' => add_query_arg( 'paged', '%#%' ),
- 'format' => '',
- 'total' => $max_num_pages,
- 'current' => $current,
- 'prev_next' => true,
- //'prev_text' => __( '&laquo; Previous' ), // This is the WordPress default.
- //'next_text' => __( 'Next &raquo;' ), // This is the WordPress default.
- 'show_all' => false,
- 'end_size' => 1,
- 'mid_size' => 1,
+ 'base' => add_query_arg( 'paged', '%#%' ),
+ 'format' => '',
+ 'total' => $max_num_pages,
+ 'current' => $current,
+ 'prev_next' => true,
+ //'prev_text' => __( '&laquo; Previous' ), // This is the WordPress default.
+ //'next_text' => __( 'Next &raquo;' ), // This is the WordPress default.
+ 'show_all' => false,
+ 'end_size' => 1,
+ 'mid_size' => 1,
'add_fragment' => '',
- 'type' => 'plain',
- 'before' => '<div class="pagination loop-pagination">', // Begin loop_pagination() arguments.
- 'after' => '</div>',
- 'echo' => true,
+ 'type' => 'plain',
+
+ // Begin loop_pagination() arguments.
+ 'before' => '<div class="pagination loop-pagination">',
+ 'after' => '</div>',
+ 'echo' => true,
);
/* Add the $base argument to the array if the user is using permalinks. */
- if ( $wp_rewrite->using_permalinks() )
- $defaults['base'] = str_replace( 2, '%#%', esc_url( get_pagenum_link( 2 ) ) );
- //$defaults['base'] = user_trailingslashit( trailingslashit( get_pagenum_link() ) . 'page/%#%' );
+ if ( $wp_rewrite->using_permalinks() && !is_search() )
+ $defaults['base'] = user_trailingslashit( trailingslashit( get_pagenum_link() ) . 'page/%#%' );
- /* If we're on a search results page, we need to change this up a bit. */
+ /* @todo Find a way to make pretty links work for search in all cases. */
+ /**
if ( is_search() ) {
$search_permastruct = $wp_rewrite->get_search_permastruct();
if ( !empty( $search_permastruct ) )
$defaults['base'] = user_trailingslashit( trailingslashit( get_search_link() ) . 'page/%#%' );
}
+ /**/
/* Allow developers to overwrite the arguments with a filter. */
$args = apply_filters( 'loop_pagination_args', $args );
View
4 hybrid.php
@@ -24,7 +24,7 @@
* to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* @package HybridCore
- * @version 1.4.2
+ * @version 1.4.3
* @author Justin Tadlock <justin@justintadlock.com>
* @copyright Copyright (c) 2008 - 2012, Justin Tadlock
* @link http://themehybrid.com/hybrid-core
@@ -93,7 +93,7 @@ function __construct() {
function constants() {
/* Sets the framework version number. */
- define( 'HYBRID_VERSION', '1.4.2' );
+ define( 'HYBRID_VERSION', '1.4.3' );
/* Sets the path to the parent theme directory. */
define( 'THEME_DIR', get_template_directory() );

No commit comments for this range

Something went wrong with that request. Please try again.