PATH:
home
/
letacommog
/
lenazen
/
wp-content
/
themes
/
Avada
/
includes
<?php /** * Portfolios main class. * * @author ThemeFusion * @copyright (c) Copyright by ThemeFusion * @link http://theme-fusion.com * @package Avada * @subpackage Core */ // Do not allow directly accessing this file. if ( ! defined( 'ABSPATH' ) ) { exit( 'Direct script access denied.' ); } /** * Portfolio tweaks for Avada. */ class Avada_Portfolio { /** * The class constructor */ public function __construct() { add_filter( 'fusion_content_class', array( $this, 'set_portfolio_single_width' ) ); add_filter( 'pre_get_posts', array( $this, 'set_post_filters' ) ); } /** * Modify the query (using the 'pre_get_posts' filter) * * @param object $query The WP Query object. * @return object */ public function set_post_filters( $query ) { if ( ! is_admin() && $query->is_main_query() && ( $query->is_post_type_archive( 'avada_portfolio' ) || $query->is_tax( array( 'portfolio_category', 'portfolio_skills', 'portfolio_tags' ) ) ) ) { // If TO setting is set to 0, all items should show. $number_of_portfolio_items = Avada()->settings->get( 'portfolio_archive_items' ); $query->set( 'posts_per_page', $number_of_portfolio_items ); } return $query; } /** * Set portfolio width and assign a class to the content div * * @param array $classes The CSS classes. * @return array */ public function set_portfolio_single_width( $classes ) { if ( is_singular( 'avada_portfolio' ) ) { $portfolio_width = ( 'half' === fusion_get_option( 'portfolio_featured_image_width', 'width', Avada()->fusion_library->get_page_id() ) ) ? 'half' : 'full'; if ( ! Avada()->settings->get( 'portfolio_featured_images' ) && 'half' === $portfolio_width ) { $portfolio_width = 'full'; } $classes[] = 'portfolio-' . $portfolio_width; } return $classes; } } /* Omit closing PHP tag to avoid "Headers already sent" issues. */
[+]
..
[-] class-fusion-builder-redux-options.php
[edit]
[-] class-avada-megamenu.php
[edit]
[-] wc-functions.php
[edit]
[-] class-avada-privacy-embeds.php
[edit]
[-] class-avada-template.php
[edit]
[+]
options
[-] class-avada-multiple-featured-images.php
[edit]
[-] class-avada-googlemap.php
[edit]
[-] fusion-functions.php
[edit]
[-] class-avada-nav-walker.php
[edit]
[-] fusion-shared-options.php
[edit]
[-] class-avada-migrate.php
[edit]
[+]
upgrade
[-] avada-functions.php
[edit]
[-] class-avada-breadcrumbs.php
[edit]
[-] class-avada-remote-installer.php
[edit]
[-] class-avada-contact.php
[edit]
[-] class-avada-sermon-manager.php
[edit]
[+]
importer
[-] class-avada-maintenance.php
[edit]
[-] class-avada-avadaredux.php
[edit]
[-] class-avada-admin.php
[edit]
[-] class-avada-blog.php
[edit]
[-] class-avada-nav-walker-megamenu.php
[edit]
[+]
metaboxes
[-] class-avada-head.php
[edit]
[+]
ls-skins
[-] class-avada-options-conditionals.php
[edit]
[-] class-avada-tgm-plugin-activation.php
[edit]
[-] class-fusion-builder-migrate.php
[edit]
[-] class-avada-social-sharing.php
[edit]
[-] class-fusion-builder-filters.php
[edit]
[+]
lib
[+]
typography
[-] class-avada-dynamic-css.php
[edit]
[-] class-avada-page-options.php
[edit]
[-] custom_functions.php
[edit]
[-] class-avada-options.php
[edit]
[-] avada-tgm.php
[edit]
[-] class-avada-portfolio.php
[edit]
[-] class-avada-upgrade.php
[edit]
[-] dynamic_css_helpers.php
[edit]
[-] class-avada-eventscalendar.php
[edit]
[-] class-avada-taxonomy-meta.php
[edit]
[-] class-avada-sidebars.php
[edit]
[-] class-fusion-gfonts-downloader.php
[edit]
[-] class-avada-widget-style.php
[edit]
[-] class-avada-admin-notices.php
[edit]
[-] class-avada-social-icons.php
[edit]
[-] class-avada-fonts.php
[edit]
[-] class-avada-scripts.php
[edit]
[-] class-avada-autoload.php
[edit]
[-] class-avada-social-icon.php
[edit]
[-] class-avada-woocommerce.php
[edit]
[-] class-avada-images.php
[edit]
[-] class-fusion-image-resizer.php
[edit]
[-] class-avada-system-status.php
[edit]
[-] class-avada-google-fonts.php
[edit]
[-] dynamic_css.php
[edit]
[+]
widget
[-] class-avada-helper.php
[edit]
[-] class-avada-layout.php
[edit]
[-] class-avada-megamenu-framework.php
[edit]
[-] class-avada-avadaredux-migration.php
[edit]
[-] class-avada-gravity-forms-tags-merger.php
[edit]
[-] deprecated.php
[edit]
[+]
admin-screens
[-] class-avada-layout-bbpress.php
[edit]
[-] class-avada-settings.php
[edit]
[-] class-avada-init.php
[edit]
[-] class-avada.php
[edit]
[-] class-fusion-builder-demos-importer.php
[edit]
[+]
plugins
[+]
recaptcha