-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
themefuse
committed
Sep 15, 2014
1 parent
8adcb6b
commit 679682f
Showing
16 changed files
with
126 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
scratch-parent/framework-customizations/extensions/portfolio/hooks.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php if ( ! defined( 'FW' ) ) { die( 'Forbidden' ); } | ||
|
||
/** | ||
* Display all existing portfolio posts on the page (without pagination) | ||
* Because in this theme we use the https://mixitup.kunkalabs.com/ plugin to display portfolio posts | ||
* If your theme displays portfolio posts in a different way, feel free to change or remove this function | ||
* @internal | ||
* @param WP_Query $query | ||
*/ | ||
function _fw_ext_portfolio_theme_action_set_posts_per_page( $query ) { | ||
if (!$query->is_main_query()) { | ||
return; | ||
} | ||
|
||
/** | ||
* @var FW_Extension_Portfolio $portfolio | ||
*/ | ||
$portfolio = fw()->extensions->get('portfolio'); | ||
|
||
$is_portfolio_taxonomy = $query->is_tax( $portfolio->get_taxonomy_name() ); | ||
$is_portfolio_archive = $query->is_archive() | ||
&& isset( $query->query['post_type'] ) | ||
&& $query->query['post_type'] == $portfolio->get_post_type_name(); | ||
|
||
if ($is_portfolio_taxonomy || $is_portfolio_archive) { | ||
$query->set( 'posts_per_page', -1 ); | ||
} | ||
} | ||
add_action( 'pre_get_posts', '_fw_ext_portfolio_theme_action_set_posts_per_page' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
$cfg = array( | ||
'sidebar_positions' => array( | ||
'full' => array( | ||
'icon_url' => 'full.png', | ||
'sidebars_number' => 0 | ||
), | ||
'left' => array( | ||
'icon_url' => 'left.png', | ||
'sidebars_number' => 1 | ||
), | ||
'right' => array( | ||
'icon_url' => 'right.png', | ||
'sidebars_number' => 1 | ||
), | ||
'left_right' => array( | ||
'icon_url' => 'left_right.png', | ||
'sidebars_number' => 2 | ||
), | ||
), | ||
|
||
'dynamic_sidebar_args' => array( | ||
'before_widget' => '<aside id="%1$s" class="widget %2$s">', | ||
'after_widget' => '</aside>', | ||
'before_title' => '<h1 class="widget-title">', | ||
'after_title' => '</h1>', | ||
), | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.