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
add_filter('nav_menu_link_attributes' , 'att_add_menu_id', 3, 10); | |
if ( !function_exists( 'att_add_menu_id') ) { | |
function att_add_menu_id($atts, $item, $args) { | |
if( 'page' == $item->object ){ | |
$id = $item->object_id; | |
$id = 'page-'. esc_attr( basename( get_permalink( $id ) ) ); | |
$atts['id'] = $id; | |
} | |
return $atts; | |
} |
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
if ( ! function_exists('wpex_loginout_shortcode') ) { | |
function wpex_loginout_shortcode( $atts ) { | |
extract( shortcode_atts( array( | |
'login_url' => wp_login_url(), | |
'log_in_text' => __( 'log in', 'wpex' ), | |
'log_out_text' => __( 'log out', 'wpex' ), | |
), $atts ) ); | |
if ( is_user_logged_in() ) { | |
$url = wp_logout_url( home_url() ); | |
return '<a href="'. $url .'" title="'. $log_out_text .'">'. $log_out_text .'</a>'; |
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 | |
// Add video open graph metatag | |
add_action( 'wp_head', 'wpex_fb_video_opengraph'); | |
function wpex_fb_video_opengraph() { | |
if ( is_singular( 'post' ) ) { | |
global $post; | |
$output=''; | |
$postid = $post->ID; | |
$format = get_post_format( $post_id ); | |
if ( $format !== 'video' ) return; // not video post format, so exit |
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
/***WPML Translation Shortcode****/ | |
if(! function_exists('wpex_wpml_lang_translate')) { | |
function wpex_wpml_lang_translate( $atts, $content = null ) { | |
extract(shortcode_atts(array( | |
'lang' => '', | |
), $atts)); | |
$lang_active = ICL_LANGUAGE_CODE; | |
if($lang == $lang_active){ |
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
// Displays the first category of a given portfolio | |
if ( ! function_exists( 'wpex_portfolio_first_cat' ) ) { | |
function wpex_portfolio_first_cat($postid=false) { | |
global $post; | |
$postid = $postid ? $postid : $post->ID; | |
$cats = get_the_terms( $postid, 'portfolio_category' ); | |
$output = ''; | |
if( $cats ) { | |
$count=0; | |
foreach( $cats as $cat ) { |
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
array( 'glass','music','search','envelope-o','heart','star','star-o','user','film','th-large','th','th-list','check','times','search-plus','search-minus','power-off','signal','gear','trash-o','home','file-o','clock-o','road','download','arrow-circle-o-down','arrow-circle-o-up','inbox','play-circle-o','rotate-right','refresh','list-alt','lock','flag','headphones','volume-off','volume-down','volume-up','qrcode','barcode','tag','tags','book','bookmark','print','camera','font','bold','italic','text-height','text-width','align-left','align-center','align-right','align-justify','list','dedent','indent','video-camera','picture-o','pencil','map-marker','adjust','tint','edit','share-square-o','check-square-o','move','step-backward','fast-backward','backward','play','pause','stop','forward','fast-forward','step-forward','eject','chevron-left','chevron-right','plus-circle','minus-circle','times-circle','check-circle','question-circle','info-circle','crosshairs','times-circle-o','check-circle-o','ban','arrow-left','arrow |
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
if ( ! function_exists( 'wpex_portfolio_first_cat' ) ) { | |
function wpex_portfolio_first_cat($postid=false) { | |
global $post; | |
$postid = $postid ? $postid : $post->ID; | |
$cats = get_the_terms( $postid, 'portfolio_category' ); | |
$output = ''; | |
if( $cats ) { | |
$count=0; | |
foreach( $cats as $cat ) { | |
$count++; |
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
function wpex_portfolio_first_cat($postid=false) { | |
global $post; | |
$postid = $postid ? $postid : $post->ID; | |
$cats = get_the_terms( $postid, 'portfolio_category' ); | |
$output = ''; | |
if( $cats ) { | |
$cats_count = count($cats); | |
if ( is_singular('portfolio') ) { | |
$count=0; | |
foreach( $cats as $cat ) { |
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
<ul class="blog-post-pagination clr"> | |
<?php next_post_link( '<li class="post-prev">%link</li>', '<span class="icon-arrow-left"></span>', false); ?> | |
<?php previous_post_link( '<li class="post-next">%link</li>', '<span class="icon-arrow-right"></span>', false ); ?> | |
</ul><!-- .blog-post-pagination --> |
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 | |
class ReduxFramework_spacing extends ReduxFramework{ | |
/** | |
* Field Constructor. | |
* | |
* Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function | |
* | |
* @since ReduxFramework 1.0.0 | |
*/ |
OlderNewer