Created
March 26, 2014 02:12
-
-
Save shazdeh/9775707 to your computer and use it in GitHub Desktop.
Parallax: unlink portfolio images in the portfolio expander and single portfolio views
This file contains hidden or 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
<?php | |
function custom_unlink_portfolio_images() { | |
global $post, $themify; | |
if( $post->post_type == 'portfolio' ) { | |
if( is_singular( 'portfolio' ) || ( ! empty( $_SERVER[ 'HTTP_X_REQUESTED_WITH' ] ) && strtolower( $_SERVER[ 'HTTP_X_REQUESTED_WITH' ]) == 'xmlhttprequest' ) ) { | |
$themify->unlink_image = 'yes'; | |
} | |
} | |
} | |
add_action( 'themify_post_before', 'custom_unlink_portfolio_images' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment