| Server IP : 172.67.159.97 / Your IP : 216.73.217.154 Web Server : nginx/1.24.0 System : Linux wordpress-sites 6.8.0-134-generic #134-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 26 18:43:11 UTC 2026 x86_64 User : www-data ( 33) PHP Version : 8.1.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/rebeccaone.com/wp-content/themes/x/framework/legacy/functions/frontend/ |
Upload File : |
<?php
// =============================================================================
// FUNCTIONS/GLOBAL/PORTFOLIO.PHP
// -----------------------------------------------------------------------------
// Portfolio template tags for use in theme templates.
// Portfolio functionality is inside Cornerstone plugin.
// =============================================================================
// =============================================================================
// TABLE OF CONTENTS
// -----------------------------------------------------------------------------
// 01. Get Parent Portfolio Link
// 02. Get Parent Portfolio Title
// 03. Output Portfolio Filters
// 04. Output Portfolio Item Project Link
// 05. Output Portfolio Item Tags
// 06. Output Portfolio Item Social
// 07. Entry Class
// =============================================================================
// Get Parent Portfolio Link
// =============================================================================
function x_get_parent_portfolio_link() {
return ( function_exists( 'cs_get_parent_portfolio_link' ) ) ? cs_get_parent_portfolio_link() : '';
}
// Get Parent Portfolio Title
// =============================================================================
function x_get_parent_portfolio_title() {
return ( function_exists( 'cs_get_parent_portfolio_title' ) ) ? cs_get_parent_portfolio_title() : '';
}
// Output Portfolio Filters
// =============================================================================
function x_portfolio_filters() {
return ( function_exists( 'cs_portfolio_filters' ) ) ? cs_portfolio_filters() : '';
}
// Output Portfolio Item Project Link
// =============================================================================
function x_portfolio_item_project_link() {
return ( function_exists( 'cs_portfolio_item_project_link' ) ) ? cs_portfolio_item_project_link() : '';
}
// Output Portfolio Item Tags
// =============================================================================
function x_portfolio_item_tags() {
return ( function_exists( 'cs_portfolio_item_tags' ) ) ? cs_portfolio_item_tags() : '';
}
// Output Portfolio Item Social Wrapper
// =============================================================================
function x_portfolio_item_social_output() {
if (empty(x_get_option("x_portfolio_enable_social", true))) {
return;
}
?>
<div class="entry-extra">
<?php x_portfolio_item_tags(); ?>
<?php x_portfolio_item_project_link(); ?>
<?php x_portfolio_item_social(); ?>
</div>
<?php
}
// Output Portfolio Item Social
// =============================================================================
function x_portfolio_item_social() {
return ( function_exists( 'cs_portfolio_item_social' ) ) ? cs_portfolio_item_social() : '';
}
// Entry Class
// =============================================================================
if ( ! function_exists( 'x_portfolio_entry_classes' ) ) :
function x_portfolio_entry_classes( $classes ) {
GLOBAL $post;
$terms = is_a( $post, 'WP_Post' ) ? wp_get_object_terms( $post->ID, 'portfolio-category' ) : array();
foreach ( $terms as $term ) {
if ( isset( $term->slug ) ) {
$classes[] = 'x-portfolio-' . md5( $term->slug );
}
}
return $classes;
}
add_filter( 'post_class', 'x_portfolio_entry_classes' );
endif;