Ordercss/front-end-rtl.css000064400000002436147577726670010602 0ustar00.container:not(.penci_sidebar) .post-entry.portfolio-style-3 .portfolio-page-content { padding-left: 0; padding-right: 60px; } ul.portfolio-meta-lists span.title { padding-right: 0; padding-left: 10px; } .portfolio-share-box .list-posts-share a:not(:last-child) { margin-right: 0; margin-left: 10px; } .penci-portfolio-meta-wrapper .penci-page-header { text-align: right; } .project-pagination .prev-post a:before { float: left; } .project-pagination .next-post a:after { float: right; } .post-entry blockquote cite, .post-entry blockquote .author, .wpb_text_column blockquote cite, .wpb_text_column blockquote .author, .woocommerce .page-description blockquote cite, .woocommerce .page-description blockquote .author, .post-entry blockquote, .post-entry blockquote p, .wpb_text_column blockquote, .wpb_text_column blockquote p, .woocommerce .page-description blockquote, .woocommerce .page-description blockquote p { text-align: right; } .post-entry blockquote, .wpb_text_column blockquote, .woocommerce .page-description blockquote { padding: 0 46px 0 0; } .post-entry blockquote::before, .wpb_text_column blockquote::before, .woocommerce .page-description blockquote::before { transform: scaleX(-1); left: auto; right: 0; } /*# sourceMappingURL=front-end-rtl.css.map */ css/front-end.css000064400000023232147577726670010000 0ustar00.portfolio-page-content .portfolio-detail { margin-left: 0; margin-right: 0; } .penci-portfolio-meta-wrapper { display: flex; flex-wrap: wrap; flex-direction: row; margin: 30px -15px; --pc-pf-ct-w: 60%; --pc-pf-mt-w: 40%; } .penci-portfolio-meta-wrapper .penci-page-header { text-align: left; padding-left: 15px; padding-right: 15px; } .penci-portfolio-meta-wrapper .penci-portfolio-col { width: var(--pc-pf-ct-w); padding-left: 15px; padding-right: 15px; } .penci-portfolio-meta-wrapper .penci-meta-lists { width: var(--pc-pf-mt-w); } @media only screen and (max-width: 767px) { .penci-portfolio-meta-wrapper .penci-meta-lists { width: 100%; } } .penci-portfolio-meta-wrapper .penci-shortdesc { width: var(--pc-pf-ct-w); } @media only screen and (max-width: 767px) { .penci-portfolio-meta-wrapper .penci-shortdesc { width: 100%; } } ul.portfolio-meta-lists { list-style: none; margin: 0; padding: 0; display: table; width: 100%; } ul.portfolio-meta-lists li { display: table-row; } ul.portfolio-meta-lists li:not(:last-child) span { padding-bottom: 10px; } ul.portfolio-meta-lists span { display: table-cell; } ul.portfolio-meta-lists span.title { font-weight: bold; min-width: 70px; padding-right: 10px; } .container:not(.penci_sidebar) .post-entry.portfolio-style-3 { display: flex; flex-wrap: wrap; flex-direction: row; } @media only screen and (max-width: 767px) { .container:not(.penci_sidebar) .post-entry.portfolio-style-3 { flex-direction: column-reverse; } } .container:not(.penci_sidebar) .post-entry.portfolio-style-3 .penci-portfolio-meta-wrapper { flex-direction: column; margin-top: 0; margin-bottom: 0; } .container:not(.penci_sidebar) .post-entry.portfolio-style-3 .penci-portfolio-meta-wrapper .penci-portfolio-col { width: 100%; } .container:not(.penci_sidebar) .post-entry.portfolio-style-3 .penci-portfolio-meta-wrapper, .container:not(.penci_sidebar) .post-entry.portfolio-style-3 .portfolio-page-content { flex: 0 0 auto; } .container:not(.penci_sidebar) .post-entry.portfolio-style-3 .penci-portfolio-meta-wrapper { width: 29.06%; } @media only screen and (max-width: 767px) { .container:not(.penci_sidebar) .post-entry.portfolio-style-3 .penci-portfolio-meta-wrapper { width: 100%; } } .container:not(.penci_sidebar) .post-entry.portfolio-style-3 .portfolio-page-content { width: 70.94%; padding-left: 60px; } @media only screen and (max-width: 767px) { .container:not(.penci_sidebar) .post-entry.portfolio-style-3 .portfolio-page-content { width: 100%; padding-left: 0; } } .container.no_content .post-entry.portfolio-style-3 .portfolio-page-content { width: 100%; padding-left: 0; } .penci-sidebar-content .penci-portfolio-meta-wrapper { flex-direction: column; margin-top: 0; margin-bottom: 60px; } .penci-sidebar-content .penci-portfolio-meta-wrapper .penci-portfolio-col { width: 100%; } .portfolio-bottom-share { text-align: center; } .portfolio-bottom-share.has-border { border-bottom: 1px solid #dedede; } .portfolio-share-box > span { border-top: 1px solid var(--pcborder-cl); padding-top: 10px; margin-top: 10px; } .portfolio-bottom-share .portfolio-share-box > span { border-top: 0; padding-top: 0; margin-top: 0; } .portfolio-share-box.tags-share-box { padding-right: 0; } .portfolio-share-box .share-title { font-weight: var(--pchead-wei); font-family: var(--pchead-font); font-size: 12px; text-transform: uppercase; margin-right: 10px; } .portfolio-share-box .list-posts-share a { color: var(--pcheading-cl); text-decoration: none; } .portfolio-share-box .list-posts-share a:hover { color: var(--pcaccent-cl); } .portfolio-share-box .list-posts-share a span { display: none; } .portfolio-share-box .list-posts-share a:not(:last-child) { margin-right: 10px; } .portfolio-share-box.style-2 .list-posts-share a, .portfolio-share-box.style-3 .list-posts-share a, .portfolio-share-box.style-4 .list-posts-share a { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; margin-right: 5px; transition: all 0.3s ease-in-out; color: black; border: 1px solid var(--pcborder-cl); border-radius: 50%; } .portfolio-share-box.style-2 .list-posts-share a:hover, .portfolio-share-box.style-3 .list-posts-share a, .portfolio-share-box.style-3 .list-posts-share a:hover, .portfolio-share-box.style-4 .list-posts-share a:hover { color: #fff; } .portfolio-share-box.style-2 a.post-share-facebook:hover, .portfolio-share-box.style-3 a.post-share-facebook, .portfolio-share-box.style-3 a.post-share-facebook:hover, .portfolio-share-box.style-4 a.post-share-facebook:hover { background-color: #0d47a1; border-color: #0d47a1; } .portfolio-share-box.style-2 a.post-share-twitter:hover, .portfolio-share-box.style-3 a.post-share-twitter, .portfolio-share-box.style-3 a.post-share-twitter:hover, .portfolio-share-box.style-4 a.post-share-twitter:hover { background-color: #40c4ff; border-color: #40c4ff; } .portfolio-share-box.style-2 a.post-share-pinterest:hover, .portfolio-share-box.style-3 a.post-share-pinterest, .portfolio-share-box.style-3 a.post-share-pinterest:hover, .portfolio-share-box.style-4 a.post-share-pinterest:hover { background-color: #bd081c; border-color: #bd081c; } .portfolio-share-box.style-2 a.post-share-email:hover, .portfolio-share-box.style-3 a.post-share-email, .portfolio-share-box.style-3 a.post-share-email:hover, .portfolio-share-box.style-4 a.post-share-email:hover { background-color: #0084ff; border-color: #0084ff; } .portfolio-share-box.style-2 a.post-share-linkedin:hover, .portfolio-share-box.style-3 a.post-share-linkedin, .portfolio-share-box.style-3 a.post-share-linkedin:hover, .portfolio-share-box.style-4 a.post-share-linkedin:hover { background-color: #0077b5; border-color: #0077b5; } .portfolio-share-box.style-2 a.post-share-tumblr:hover, .portfolio-share-box.style-3 a.post-share-tumblr, .portfolio-share-box.style-3 a.post-share-tumblr:hover, .portfolio-share-box.style-4 a.post-share-tumblr:hover { background-color: #34465d; border-color: #34465d; } .portfolio-share-box.style-2 a.post-share-vk:hover, .portfolio-share-box.style-3 a.post-share-vk, .portfolio-share-box.style-3 a.post-share-vk:hover, .portfolio-share-box.style-4 a.post-share-vk:hover { background-color: #5181b8; border-color: #5181b8; } .portfolio-share-box.style-2 a.post-share-pocket:hover, .portfolio-share-box.style-3 a.post-share-pocket, .portfolio-share-box.style-3 a.post-share-pocket:hover, .portfolio-share-box.style-4 a.post-share-pocket:hover { background-color: #ef4056; border-color: #ef4056; } .portfolio-share-box.style-2 a.post-share-skype:hover, .portfolio-share-box.style-3 a.post-share-skype, .portfolio-share-box.style-3 a.post-share-skype:hover, .portfolio-share-box.style-4 a.post-share-skype:hover { background-color: #00aff0; border-color: #00aff0; } .portfolio-share-box.style-2 a.post-share-whatsapp:hover, .portfolio-share-box.style-3 a.post-share-whatsapp, .portfolio-share-box.style-3 a.post-share-whatsapp:hover, .portfolio-share-box.style-4 a.post-share-whatsapp:hover { background-color: #00E676; border-color: #00E676; } .portfolio-share-box.style-2 a.post-share-telegram:hover, .portfolio-share-box.style-3 a.post-share-telegram, .portfolio-share-box.style-3 a.post-share-telegram:hover, .portfolio-share-box.style-4 a.post-share-telegram:hover { background-color: #289FD9; border-color: #289FD9; } .portfolio-share-box.style-2 a.post-share-reddit:hover, .portfolio-share-box.style-3 a.post-share-reddit, .portfolio-share-box.style-3 a.post-share-reddit:hover, .portfolio-share-box.style-4 a.post-share-reddit:hover { background-color: #F74300; border-color: #F74300; } .portfolio-share-box.style-2 a.post-share-ok:hover, .portfolio-share-box.style-3 a.post-share-ok, .portfolio-share-box.style-3 a.post-share-ok:hover, .portfolio-share-box.style-4 a.post-share-ok:hover { background-color: #F18F00; border-color: #F18F00; } .portfolio-share-box.style-2 a.post-share-stumbleupon:hover, .portfolio-share-box.style-3 a.post-share-stumbleupon, .portfolio-share-box.style-3 a.post-share-stumbleupon:hover, .portfolio-share-box.style-4 a.post-share-stumbleupon:hover { background-color: #EB4823; border-color: #EB4823; } .portfolio-share-box.style-2 a.post-share-viber:hover, .portfolio-share-box.style-3 a.post-share-viber, .portfolio-share-box.style-3 a.post-share-viber:hover, .portfolio-share-box.style-4 a.post-share-viber:hover { background-color: #7d51a0; border-color: #7d51a0; } .portfolio-share-box.style-2 a.post-share-line:hover, .portfolio-share-box.style-3 a.post-share-line, .portfolio-share-box.style-3 a.post-share-line:hover, .portfolio-share-box.style-4 a.post-share-line:hover { background-color: #01b901; border-color: #01b901; } .portfolio-share-box.style-3 .list-posts-share a:hover { opacity: 0.85; } .portfolio-share-box.style-4 .list-posts-share a { background-color: #eee; border-color: #eee; } .portfolio-share-box.style-4 .list-posts-share a:hover { color: #fff; } @media only screen and (min-width: 768px) { .container.portfolio-single-width-no-sidebar-small-container { max-width: 770px; margin-left: auto; margin-right: auto; } } .container.portfolio-single-width-fullwidth { width: 100%; padding-left: 15px; padding-right: 15px; } .portfolio-releated-area .item-related h3 a { letter-spacing: 0; text-transform: none; font-size: 16px; } .portfolio-releated-area .item-related .portfolio-cat { display: block; margin-top: 6px; } .portfolio-releated-area .item-related .portfolio-cat a { color: var(--pcmeta-cl); } .portfolio-releated-area .item-related .portfolio-cat a:hover { color: var(--pcaccent-cl); } .portfolio-releated-area .item-related .portfolio-cat a:not(:last-child):after { content: ","; display: inline-block; } .portfolio-page-content .portfolio-detail { max-width: unset; } css/admin.css000064400000002175147577726670007177 0ustar00.penci-portfolio-meta-settings-wrap label { font-weight: bold; display: block; margin-bottom: 10px; } .penci-portfolio-meta-settings-wrap .penci-portfolio-description { margin-top: 10px; font-style: italic; display: block; } .penci-portfolio-meta-settings-wrap .penci-grid-2 { display: flex; flex-wrap: wrap; flex-direction: row; margin-left: -15px; margin-right: -15px; } .penci-portfolio-meta-settings-wrap .penci-grid-2 > p { flex: 0 0 auto; width: calc(50% - 30px); padding-left: 15px; padding-right: 15px; } @media only screen and (max-width: 767px) { .penci-portfolio-meta-settings-wrap .penci-grid-2 > p { width: 100%; } } .penci-portfolio-meta-settings-wrap .penci-grid-3 { display: flex; flex-wrap: wrap; flex-direction: row; margin-left: -15px; margin-right: -15px; } .penci-portfolio-meta-settings-wrap .penci-grid-3 > p { flex: 0 0 auto; width: calc(33.3333333333% - 30px); padding-left: 15px; padding-right: 15px; } @media only screen and (max-width: 767px) { .penci-portfolio-meta-settings-wrap .penci-grid-3 > p { width: 100%; } } /*# sourceMappingURL=admin.css.map */ customizer/panel.php000064400000002060147577726670010612 0ustar00set_panel(); $this->set_section(); } public function set_panel() { $this->customizer->add_panel( [ 'id' => $this->panelID, 'title' => esc_html__( 'Portfolio', 'penci-portfolio' ), 'priority' => $this->id, ] ); } public function set_section() { $this->add_lazy_section( 'pencidesign_portfolio_sgeneral_section', esc_html__( 'General', 'penci-portfolio' ), $this->panelID ); $this->add_lazy_section( 'pencidesign_portfolio_scolor_section', esc_html__( 'Colors', 'penci-portfolio' ), $this->panelID ); $this->add_lazy_section( 'pencidesign_portfolio_sfontsize_section', esc_html__( 'Font Size', 'penci-portfolio' ), $this->panelID ); $this->add_lazy_section( 'pencidesign_portfolio_sadvanced_section', esc_html__( 'Advanced', 'penci-portfolio' ), $this->panelID ); } } customizer/settings.php000064400000003277147577726670011366 0ustar00customizer = \SoledadFW\Customizer\Customizer::get_instance(); } if ( is_customize_preview() || ! is_admin() ) { add_filter( 'soledad_fw_register_lazy_section', array( $this, 'register_lazy_section' ) ); add_action( 'soledad_fw_register_customizer_option', array( $this, 'load_customizer' ), 95 ); } } /** * @return Customizer */ public static function getInstance() { if ( null === static::$instance ) { static::$instance = new static(); } return static::$instance; } public function register_lazy_section( $result ) { $array = $this->list_section; $path = dirname( __DIR__ ) . '/customizer/'; foreach ( $array as $id ) { $result[ $id ][] = "{$path}{$id}.php"; } return $result; } public function load_customizer() { $this->customizer = Customizer\Customizer::get_instance(); new Customizer\PortfolioOption( $this->customizer, 208 ); } } customizer/pencidesign_portfolio_sfontsize_section.php000064400000012202147577726670017727 0ustar00 '', 'id' => 'penci_portfolio_single_title_mfz', 'type' => 'soledad-fw-hidden', 'sanitize' => 'absint', ); $options[] = array( 'label' => __( 'Font Size for Portfolio Title', 'soledad' ), 'id' => 'penci_portfolio_single_title_fz', 'type' => 'soledad-fw-size', 'sanitize' => 'absint', 'ids' => array( 'desktop' => 'penci_portfolio_single_title_fz', 'mobile' => 'penci_portfolio_single_title_mfz', ), 'choices' => array( 'desktop' => array( 'min' => 1, 'max' => 100, 'step' => 1, 'edit' => true, 'unit' => 'px', ), 'mobile' => array( 'min' => 1, 'max' => 100, 'step' => 1, 'edit' => true, 'unit' => 'px', ), ), ); $options[] = array( 'label' => '', 'id' => 'penci_portfolio_single_txt_mfz', 'type' => 'soledad-fw-hidden', 'sanitize' => 'absint', ); $options[] = array( 'label' => __( 'Font Size for Portfolio Content', 'soledad' ), 'id' => 'penci_portfolio_single_txt_fz', 'type' => 'soledad-fw-size', 'sanitize' => 'absint', 'ids' => array( 'desktop' => 'penci_portfolio_single_txt_fz', 'mobile' => 'penci_portfolio_single_txt_mfz', ), 'choices' => array( 'desktop' => array( 'min' => 1, 'max' => 100, 'step' => 1, 'edit' => true, 'unit' => 'px', ), 'mobile' => array( 'min' => 1, 'max' => 100, 'step' => 1, 'edit' => true, 'unit' => 'px', ), ), ); $options[] = array( 'label' => '', 'id' => 'penci_portfolio_single_txt_lh_mfz', 'type' => 'soledad-fw-hidden', 'sanitize' => 'absint', ); $options[] = array( 'label' => __( 'Line Height for Portfolio Content', 'soledad' ), 'id' => 'penci_portfolio_single_txt_lh_fz', 'type' => 'soledad-fw-size', 'sanitize' => 'absint', 'ids' => array( 'desktop' => 'penci_portfolio_single_txt_lh_fz', 'mobile' => 'penci_portfolio_single_txt_lh_mfz', ), 'choices' => array( 'desktop' => array( 'min' => 1, 'max' => 100, 'step' => 1, 'edit' => true, 'unit' => 'px', ), 'mobile' => array( 'min' => 1, 'max' => 100, 'step' => 1, 'edit' => true, 'unit' => 'px', ), ), ); $options[] = array( 'label' => '', 'id' => 'penci_portfolio_single_meta_mfz', 'type' => 'soledad-fw-hidden', 'sanitize' => 'absint', ); $options[] = array( 'label' => __( 'Font Size for Portfolio Meta', 'soledad' ), 'id' => 'penci_portfolio_single_meta_mfz', 'type' => 'soledad-fw-size', 'sanitize' => 'absint', 'ids' => array( 'desktop' => 'penci_portfolio_single_meta_fz', 'mobile' => 'penci_portfolio_single_meta_mfz', ), 'choices' => array( 'desktop' => array( 'min' => 1, 'max' => 100, 'step' => 1, 'edit' => true, 'unit' => 'px', ), 'mobile' => array( 'min' => 1, 'max' => 100, 'step' => 1, 'edit' => true, 'unit' => 'px', ), ), ); $options[] = array( 'label' => '', 'id' => 'penci_portfolio_single_nextprev_mfz', 'type' => 'soledad-fw-hidden', 'sanitize' => 'absint', ); $options[] = array( 'label' => __( 'Font Size for Next/Previous Title', 'soledad' ), 'id' => 'penci_portfolio_single_nextprev_fz', 'type' => 'soledad-fw-size', 'sanitize' => 'absint', 'ids' => array( 'desktop' => 'penci_portfolio_single_nextprev_fz', 'mobile' => 'penci_portfolio_single_nextprev_mfz', ), 'choices' => array( 'desktop' => array( 'min' => 1, 'max' => 100, 'step' => 1, 'edit' => true, 'unit' => 'px', ), 'mobile' => array( 'min' => 1, 'max' => 100, 'step' => 1, 'edit' => true, 'unit' => 'px', ), ), ); $options[] = array( 'label' => '', 'id' => 'penci_portfolio_single_related_tt_mfz', 'type' => 'soledad-fw-hidden', 'sanitize' => 'absint', ); $options[] = array( 'label' => __( 'Font Size for Relate Project Title', 'soledad' ), 'id' => 'penci_portfolio_single_related_tt_fz', 'type' => 'soledad-fw-size', 'sanitize' => 'absint', 'ids' => array( 'desktop' => 'penci_portfolio_single_related_tt_fz', 'mobile' => 'penci_portfolio_single_related_tt_mfz', ), 'choices' => array( 'desktop' => array( 'min' => 1, 'max' => 100, 'step' => 1, 'edit' => true, 'unit' => 'px', ), 'mobile' => array( 'min' => 1, 'max' => 100, 'step' => 1, 'edit' => true, 'unit' => 'px', ), ), ); $options[] = array( 'label' => '', 'id' => 'penci_portfolio_single_related_cat_mfz', 'type' => 'soledad-fw-hidden', 'sanitize' => 'absint', ); $options[] = array( 'label' => __( 'Font Size for Relate Project Category', 'soledad' ), 'id' => 'penci_portfolio_single_related_cat_fz', 'type' => 'soledad-fw-size', 'sanitize' => 'absint', 'ids' => array( 'desktop' => 'penci_portfolio_single_related_cat_fz', 'mobile' => 'penci_portfolio_single_related_cat_mfz', ), 'choices' => array( 'desktop' => array( 'min' => 1, 'max' => 100, 'step' => 1, 'edit' => true, 'unit' => 'px', ), 'mobile' => array( 'min' => 1, 'max' => 100, 'step' => 1, 'edit' => true, 'unit' => 'px', ), ), ); return $options; customizer/pencidesign_portfolio_sgeneral_section.php000064400000017115147577726670017513 0ustar00 false, 'sanitize' => 'penci_sanitize_checkbox_field', 'label' => __( 'Use Classic Editor for Edit Portfolio Projects?', 'soledad' ), 'description' => __( 'Edit the portfolio projects using WP Block Editor by default, if you want to use Classic Editor to edit it, check this option.', 'soledad' ), 'id' => 'penci_portfolio_classic_editor', 'type' => 'soledad-fw-toggle', ); $options[] = array( 'id' => 'penci_portfolio_cspage', 'default' => '', 'sanitize' => 'penci_sanitize_number_field', 'label' => __( 'Custom Portfolio Main Page', 'soledad' ), 'description' => __( 'Fill the ID of Page you want to display as portoflio main page here (Eg: 10). You can check this guide to know how to find ID of a Page.', 'soledad' ), 'type' => 'soledad-fw-number', ); $options[] = array( 'default' => false, 'sanitize' => 'penci_sanitize_checkbox_field', 'label' => __( 'Enable Sidebar On Portfolio Categories', 'soledad' ), 'id' => 'penci_portfolio_cat_enable_sidebar', 'type' => 'soledad-fw-toggle', ); $options[] = array( 'default' => false, 'sanitize' => 'penci_sanitize_checkbox_field', 'label' => __( 'Enable Sidebar On Single Portfolio', 'soledad' ), 'id' => 'penci_portfolio_single_enable_sidebar', 'type' => 'soledad-fw-toggle', ); $options[] = array( 'id' => 'penci_portfolio_single_enable_left_sidebar', 'default' => false, 'sanitize' => 'penci_sanitize_checkbox_field', 'label' => __( 'Enable Left Sidebar On Single Portfolio', 'soledad' ), 'type' => 'soledad-fw-toggle', ); $options[] = array( 'default' => false, 'sanitize' => 'penci_sanitize_checkbox_field', 'label' => __( 'Enable Two Sidebars On Single Portfolio', 'soledad' ), 'id' => 'penci_portfolio_single_enable_2sidebar', 'type' => 'soledad-fw-toggle', ); $options[] = array( 'default' => 'main-sidebar', 'sanitize' => 'penci_sanitize_choices_field', 'label' => __( 'Custom Sidebar for Single Portfolio', 'soledad' ), 'id' => 'penci_sidebar_single_portfolio', 'description'=>__('If sidebar your choice is empty, will display Main Sidebar','soledad'), 'type' => 'soledad-fw-select', 'choices' => get_list_custom_sidebar_option() ); $options[] = array( 'default' => 'style-1', 'sanitize' => 'penci_sanitize_choices_field', 'label' => __( 'Single Portfolio Style', 'soledad' ), 'id' => 'penci_single_portfolio_style', 'type' => 'soledad-fw-select', 'choices' => array( 'style-1' => __( 'Style 1', 'soledad' ), 'style-2' => __( 'Style 2', 'soledad' ), 'style-3' => __( 'Style 3', 'soledad' ), ) ); $options[] = array( 'default' => 'style-1', 'sanitize' => 'penci_sanitize_choices_field', 'label' => __( 'Single Portfolio Social Share Style', 'soledad' ), 'id' => 'penci_single_portfolio_social_share_style', 'type' => 'soledad-fw-select', 'choices' => array( 'style-1' => __( 'Style 1', 'soledad' ), 'style-2' => __( 'Style 2', 'soledad' ), 'style-3' => __( 'Style 3', 'soledad' ), 'style-4' => __( 'Style 4', 'soledad' ), ) ); $options[] = array( 'default' => 'main-sidebar-left', 'sanitize' => 'penci_sanitize_choices_field', 'label' => __( 'Custom Sidebar Left for Single Portfolio', 'soledad' ), 'id' => 'penci_sidebar_left_single_portfolio', 'description'=>__('If sidebar your choice is empty, will display Main Sidebar Left. This option just use when you enable 2 sidebars for Single Portfolio','soledad'), 'type' => 'soledad-fw-select', 'choices' => get_list_custom_sidebar_option() ); $options[] = array( 'default' => false, 'sanitize' => 'penci_sanitize_checkbox_field', 'label' => __( 'Hide Featured Image on Single Portfolio', 'soledad' ), 'id' => 'penci_portfolio_hide_featured_image_single', 'type' => 'soledad-fw-toggle', ); $options[] = array( 'default' => false, 'sanitize' => 'penci_sanitize_checkbox_field', 'label' => __( 'Hide Share Box on Single Portfolio', 'soledad' ), 'id' => 'penci_portfolio_share_box', 'type' => 'soledad-fw-toggle', ); $options[] = array( 'default' => false, 'sanitize' => 'penci_sanitize_checkbox_field', 'label' => __( 'Enable Next/Prev Project on Single Portfolio', 'soledad' ), 'id' => 'penci_portfolio_next_prev_project', 'type' => 'soledad-fw-toggle', ); $options[] = array( 'default' => false, 'sanitize' => 'penci_sanitize_checkbox_field', 'label' => __( 'Enable Related Project on Single Portfolio', 'soledad' ), 'id' => 'penci_portfolio_related_project', 'type' => 'soledad-fw-toggle', ); $options[] = array( 'default' => 'Next Project', 'sanitize' => 'sanitize_text_field', 'label' => __( 'Custom Text for Next Project Button', 'soledad' ), 'id' => 'penci_portfolio_next_text', 'type' => 'soledad-fw-text', ); $options[] = array( 'default' => 'Previous Project', 'sanitize' => 'sanitize_text_field', 'label' => __( 'Custom Text for Previous Project Button', 'soledad' ), 'id' => 'penci_portfolio_prev_text', 'type' => 'soledad-fw-text', ); $options[] = array( 'default' => __( 'Related Projects', 'soledad' ), 'sanitize' => 'sanitize_text_field', 'label' => __( 'Custom Text for Related Projects Text', 'soledad' ), 'id' => 'penci_portfolio_related_text', 'type' => 'soledad-fw-text', ); $options[] = array( 'default' => false, 'sanitize' => 'penci_sanitize_checkbox_field', 'label' => __( 'Enable Comment on Single Portfolio', 'soledad' ), 'id' => 'penci_portfolio_enable_comment', 'type' => 'soledad-fw-toggle', ); $options[] = array( 'default' => 'masonry', 'sanitize' => 'penci_sanitize_choices_field', 'label' => __( 'Portfolio Category Layout', 'soledad' ), 'id' => 'penci_portfolio_layout', 'type' => 'soledad-fw-select', 'choices' => array( 'masonry' => __('Masonry Layout','soledad' ), 'grid' => __('Grid Layout','soledad' ), ) ); $options[] = array( 'default' => 'text_overlay', 'sanitize' => 'penci_sanitize_choices_field', 'label' => __( 'Portfolio Category Layout', 'soledad' ), 'id' => 'penci_portfolio_item_style', 'type' => 'soledad-fw-select', 'choices' => array( 'text_overlay' => __('Text Overlay','soledad' ), 'below_img' => __('Text Below Image','soledad' ), ) ); $options[] = array( 'id' => 'penci_portfolio_layout', 'default' => 'carousel', 'sanitize' => 'penci_sanitize_choices_field', 'label' => __( 'Portfolio Category Layout', 'soledad' ), 'type' => 'soledad-fw-select', 'choices' => array( 'grid' => __('Grid','soledad' ), 'carousel' => __('Carousel','soledad' ), ) ); $options[] = array( 'default' => '3', 'id' => 'penci_single_portfolio_related_col', 'sanitize' => 'penci_sanitize_choices_field', 'label' => __( 'Single Portfolio Related Projects Columns', 'soledad' ), 'type' => 'soledad-fw-select', 'choices' => array( '2' => __( '2 Columns', 'soledad' ), '3' => __( '3 Columns', 'soledad' ), '4' => __( '4 Columns', 'soledad' ), ) ); $options[] = array( 'default' => '3', 'type' => 'soledad-fw-size', 'sanitize' => 'absint', 'label' => __( 'Single Portfolio Related Projects Item', 'soledad' ), 'id' => 'penci_single_portfolio_related_num', 'ids' => array( 'desktop' => 'penci_single_portfolio_related_num', ), 'choices' => array( 'desktop' => array( 'min' => 1, 'max' => 100, 'step' => 1, 'edit' => true, 'unit' => '', ), ), ); return $options; customizer/pencidesign_portfolio_scolor_section.php000064400000013037147577726670017213 0ustar00 '', 'sanitize' => 'sanitize_hex_color', 'type' => 'soledad-fw-color', 'label' => __( 'Portfolio Overlay Hover Color', 'soledad' ), 'id' => 'penci_portfolio_overlay_color', ); $options[] = array( 'default' => '0.85', 'sanitize' => 'penci_sanitize_choices_field', 'label' => __( 'Portfolio Overlay Hover Opacity', 'soledad' ), 'id' => 'penci_portfolio_overlay_opacity', 'type' => 'soledad-fw-select', 'choices' => array( '0.05' => '0.05', '0.1' => '0.1', '0.15' => '0.15', '0.2' => '0.2', '0.25' => '0.25', '0.3' => '0.3', '0.35' => '0.35', '0.4' => '0.4', '0.45' => '0.45', '0.5' => '0.5', '0.55' => '0.55', '0.6' => '0.6', '0.65' => '0.65', '0.7' => '0.7', '0.75' => '0.75', '0.8' => '0.8', '0.85' => '0.85', '0.9' => '0.9', '0.95' => '0.95', '1' => '1', ) ); $options[] = array( 'default' => '', 'sanitize' => 'sanitize_hex_color', 'type' => 'soledad-fw-color', 'label' => __( 'Portfolio Post Title Color', 'soledad' ), 'id' => 'penci_portfolio_title_color', ); $options[] = array( 'default' => '', 'sanitize' => 'sanitize_hex_color', 'type' => 'soledad-fw-color', 'label' => __( 'Portfolio Post Title Hover Color', 'soledad' ), 'id' => 'penci_portfolio_title_hcolor', ); $options[] = array( 'default' => '', 'sanitize' => 'sanitize_hex_color', 'type' => 'soledad-fw-color', 'label' => __( 'Portfolio Post Categories Color', 'soledad' ), 'id' => 'penci_portfolio_cate_color', ); $options[] = array( 'default' => '', 'sanitize' => 'sanitize_hex_color', 'type' => 'soledad-fw-color', 'label' => __( 'Portfolio Post Categories Hover Color', 'soledad' ), 'id' => 'penci_portfolio_cate_hcolor', ); $options[] = array( 'sanitize' => 'sanitize_text_field', 'label' => __( 'Single Portfolio Color', 'soledad' ), 'id' => 'penci_portfolio_single_color', 'type' => 'soledad-fw-header', ); $options[] = array( 'id' => 'penci_portfolio_single_title_color', 'default' => '', 'sanitize' => 'sanitize_hex_color', 'type' => 'soledad-fw-color', 'label' => __( 'Portfolio Title Color', 'soledad' ), ); $options[] = array( 'default' => '', 'id' => 'penci_portfolio_single_text_color', 'sanitize' => 'sanitize_hex_color', 'type' => 'soledad-fw-color', 'label' => __( 'Portfolio General Text Color', 'soledad' ), ); $options[] = array( 'default' => '', 'id' => 'penci_portfolio_single_text_link_color', 'sanitize' => 'sanitize_hex_color', 'type' => 'soledad-fw-color', 'label' => __( 'Portfolio Text Link Color', 'soledad' ), ); $options[] = array( 'default' => '', 'id' => 'penci_portfolio_single_text_link_hover_color', 'sanitize' => 'sanitize_hex_color', 'type' => 'soledad-fw-color', 'label' => __( 'Portfolio Text Link Hover Color', 'soledad' ), ); $options[] = array( 'default' => '', 'id' => 'penci_portfolio_single_meta_label_color', 'sanitize' => 'sanitize_hex_color', 'type' => 'soledad-fw-color', 'label' => __( 'Meta Text: Label Color', 'soledad' ), ); $options[] = array( 'default' => '', 'id' => 'penci_portfolio_single_meta_value_color', 'sanitize' => 'sanitize_hex_color', 'type' => 'soledad-fw-color', 'label' => __( 'Meta Text: Value Color', 'soledad' ), ); $options[] = array( 'default' => '', 'id' => 'penci_portfolio_single_border_color', 'sanitize' => 'sanitize_hex_color', 'type' => 'soledad-fw-color', 'label' => __( 'General Border Color', 'soledad' ), ); $options[] = array( 'default' => '', 'id' => 'penci_portfolio_single_relate_title_color', 'sanitize' => 'sanitize_hex_color', 'type' => 'soledad-fw-color', 'label' => __( 'Relate Project Title Color', 'soledad' ), ); $options[] = array( 'default' => '', 'id' => 'penci_portfolio_single_relate_title_hover_color', 'sanitize' => 'sanitize_hex_color', 'type' => 'soledad-fw-color', 'label' => __( 'Relate Project Title Hover Color', 'soledad' ), ); $options[] = array( 'default' => '', 'id' => 'penci_portfolio_single_relate_cat_color', 'sanitize' => 'sanitize_hex_color', 'type' => 'soledad-fw-color', 'label' => __( 'Relate Project Category Color', 'soledad' ), ); $options[] = array( 'default' => '', 'id' => 'penci_portfolio_single_relate_cat_hover_color', 'sanitize' => 'sanitize_hex_color', 'type' => 'soledad-fw-color', 'label' => __( 'Relate Project Category Hover Color', 'soledad' ), ); $options[] = array( 'default' => '', 'id' => 'penci_portfolio_single_carousel_background_color', 'sanitize' => 'sanitize_hex_color', 'type' => 'soledad-fw-color', 'label' => __( 'Relate Project Carousel Background Color', 'soledad' ), ); $options[] = array( 'default' => '', 'id' => 'penci_portfolio_single_carousel_border_color', 'sanitize' => 'sanitize_hex_color', 'type' => 'soledad-fw-color', 'label' => __( 'Relate Project Carousel Border Color', 'soledad' ), ); $options[] = array( 'default' => '', 'id' => 'penci_portfolio_single_carousel_active_background_color', 'sanitize' => 'sanitize_hex_color', 'type' => 'soledad-fw-color', 'label' => __( 'Relate Project Carousel Active Background Color', 'soledad' ), ); $options[] = array( 'default' => '', 'id' => 'penci_portfolio_single_carousel_active_border_color', 'sanitize' => 'sanitize_hex_color', 'type' => 'soledad-fw-color', 'label' => __( 'Relate Project Carousel Active Border Color', 'soledad' ), ); return $options; customizer/pencidesign_portfolio_sadvanced_section.php000064400000002634147577726670017643 0ustar00 'sanitize_text_field', 'label' => esc_html__( 'Custom portfolio item URL prefix', 'soledad' ), 'id' => 'penci_pfl_custom_slug', 'type' => 'soledad-fw-text', 'description' => sprintf( __( 'When you change this setting you need to Save Changes again the %s permalinks rules here. %s', 'soledad' ), '', '' ), 'input_attrs' => array( 'placeholder' => __( 'Current portfolio slug: portfolio', 'soledad' ), ), ); $options[] = array( 'sanitize' => 'sanitize_text_field', 'type' => 'soledad-fw-text', 'label' => esc_html__( 'Custom portfolio category URL prefix', 'soledad' ), 'id' => 'penci_pfl_custom_catslug', 'description' => sprintf( __( 'When you change this setting you need to Save Changes again the %s permalinks rules here. %s', 'soledad' ), '', '' ), 'input_attrs' => array( 'placeholder' => __( 'Current category slug: portfolio-category', 'soledad' ), ), ); $options[] = array( 'sanitize' => 'sanitize_text_field', 'label' => esc_html__( 'Custom "Portfolio" name', 'soledad' ), 'id' => 'penci_pfl_custom_name', 'type' => 'soledad-fw-text', ); return $options; images/no-thumbnail.jpg000064400000015722147577726670011153 0ustar00JFIFAdobedC C     I R !16AQatq"RSsu2r#34Ufb$57BTF% ?۽k+Lś^btm≪{ހJ/_jv_y~~Ne smvhw???ֲZ|@;Z kk'%/W_ֲZ|@;Z kk'%/W_ֲZ|@X?}.uxUZrvSM[bf#X3a׵lLzy,h*iǂ6Nfض,^ʿgݿ~mٵOUU;"#ِ^?UUj*+\mETOz*ue2t QfpnU˦Grx|&&bcd4U]F癲 |zQ^2 Kt3[_GQ;6c{4y˹ͪl :2N6j5s6vqryʶlwz2E\^?{G'vy|+"=gc=n f}sK=(frӺ-2,ܷzsnW)MTؘH.<:Qk[Żk&'wf4h<;upmWz) 鉞ٞ);ͽ7/.*٫8TqDٵj6,ZDlc"ƽfly7mU1; ߽ۣyFnd v)gfOi>Fnd i;ÉӫUxת\hvFLg7<͐Tҍoj j ONn罧,}[ozx6 m ;#`vGO??\d~?tp0~;#`7_w{ s=.+^M܊Qi9Ul;{ǛgPu\yX]VkTA[Iu]W񦽜 g*@?-il#HOc@/z~[i{F;Kޟ4^? v?-il#H9Zb\F5q4Ÿ;M<3 w|jHx.ۣGYelNfG rt;:k*YTG*&")᪨sFѢ:WM)dm('n6hVnZMqnoE1DWnMTUM[ ;[Cbj^~cro5l [{=+O;Q3o"@7̝'E.Q>nyxw'ǣ׬Wi/n[+'ܴT'`Tw]6wOG&W;ҽkuC/}nDǷTF/9Yc-q;}$mѾbH;=VZ͜o*jŷed,>4g&ΝhTɮ-uNEU~&jO jSLхkjgo"TT1uՖ5ֱ/˳U1> wL| >~w:mU=Nݓ o^o^CY6ӓjy5G+632wjէdڹTEAygz?hs+Ѿv7X;]htSV XWSP Xh4Ǧ^˴ڮj}DfAc}8}S}kOv1"#܀B]\DSDO)Q@-gx[>.骽XUy5E1TpwV5MUs؝DKY>|??3b z=_4n;_6+:}tw]\v~eOQq1mZv3[_1wƤ~骽XUy5E1TSF\?#WoL.S{&ꙢLG"8fx5Z`W`ZTሮM;{P UͽWmUTD-S j8s?kSn/l]#j~z<]ZaNڽ1 omsqdzO*~ݎZ{#mxItF`uZ=N׍X+cu_ZN@%Z=ao=rrMtډoU?tγӏf=35Sc6ͺj9l]7<ֺwg'ڹ.|i1OU4L؏o"/b~~׋P);S꾪5靕QT>NAw{nec[VQrňTD[h?Z˪9xf1f#*}J&G>&6Ld݉.]CQj*1=ݹO qW|~n\ާ6 -O~ig55&Nn*)3ۧtoRUUFWL쪌Ūv)T8j4gb^Enj4ͺi፻xAGH1mSfunFMFț>g~b`z=z~f~z˵iUi9SF^bg؞TOG:wgX&?xR 2j;9kU5U;v a_x[94dݢU< ;@+^CzW 꿤s7"&j9V*^ɵv]ꨢ}UqɦGzconfְ5c2~TSzfٶ8xbA߭kJ0WHND["*vi L x^RŬRwKsՏGX _?@.EVOh Tgo]*EsdC+ZϽa1k .~ݪhL^W<|R6e/v4_6"uEtQEETpL`^?LUn͙oaD[.Grnߦ6{T@<m~ۣ|vzеk{y`ޮN>T.W{vb"gثdHzI/V9Y3.Y^>'ژ@:=geqs3O'wاe9-_؎nM3z=_4n;_nSG_Bf<1~,sANjs_lE{o'W#inc/metabox.php000064400000024516147577726670007531 0ustar00ID, 'penci_portfolio_desc', true ); ?>

true, 'textarea_rows' => 5 ) ); ?>

ID, $title_setting_name, true ); $value_setting_value = get_post_meta( $post->ID, $value_setting_name, true ); ?>

esc_attr( 'Follow Customize Settings', 'penci-portfolio' ), 'no-sidebar' => esc_attr( 'No Sidebar', 'penci-portfolio' ), 'no-sidebar-small-container' => esc_attr( 'No Sidebar with Small Container', 'penci-portfolio' ), 'left-sidebar' => esc_attr( 'Left Sidebar', 'penci-portfolio' ), 'right-sidebar' => esc_attr( 'Right Sidebar', 'penci-portfolio' ), 'both-sidebar' => esc_attr( 'Both Sidebar', 'penci-portfolio' ), 'fullwidth' => esc_attr( 'Full Width', 'penci-portfolio' ), ); $list_content_width_value = get_post_meta( $post->ID, 'penci_portfolio_content_width', true ); ?>

esc_attr( 'Follow Customize Settings', 'penci-portfolio' ), 'style-1' => esc_attr( 'Style 1', 'penci-portfolio' ), 'style-2' => esc_attr( 'Style 2', 'penci-portfolio' ), 'style-3' => esc_attr( 'Style 3', 'penci-portfolio' ), ); $list_content_style_value = get_post_meta( $post->ID, 'penci_portfolio_content_style', true ); ?>

esc_html__( 'Featured Image on Portfolio', 'penci-portfolio' ), 'penci_portfolio_hide_sharebox' => esc_html__( 'Share Box on Portfolio', 'penci-portfolio' ), 'penci_portfolio_hide_relared_portfolio' => esc_html__( 'Related Portfolio', 'penci-portfolio' ), 'penci_portfolio_hide_nextprev_nav' => esc_html__( 'Portfolio Next/Prev Navigation', 'penci-portfolio' ), ); $portfolio_options_meta = get_post_meta( $post->ID, 'portfolio_options_meta', true ); foreach ( $portfolio_list_checkbox as $id => $title ) { $checkbox_value = isset( $portfolio_options_meta[ $id ] ) ? $portfolio_options_meta[ $id ] : ''; ?>

'masonry', 'image_type' => 'landscape', 'item_style' => 'text_overlay', 'number' => '-1', 'lightbox' => 'false', 'column' => '3', 'cat' => '', 'filter' => 'true', 'all_text' => __( 'All', 'penci-portfolio' ), 'pagination' => 'number', 'numbermore' => 6, 'loop' => '', 'elementor_query' => '' ), $atts ) ); /* Set default value when properties is not valid */ $image_thumb = 'penci-masonry-thumb'; if ( $style == 'grid' ): $image_thumb = 'penci-thumb'; endif; if ( ! is_numeric( $number ) ): $number = '-1'; endif; if ( ! in_array( $column, array( '2', '3' ) ) ): $column = '3'; endif; if ( $filter != 'false' ): $filter = 'true'; endif; if ( empty( $all_text ) ): $all_text = __( 'All', 'penci-portfolio' ); endif; $image_thumb_pre = ''; $padding = false; if ( $style == 'grid' ) { $padding = '66.6666667'; if ( 'square' == $image_type ) { $image_thumb_pre = 'penci-thumb-square'; $padding = '100'; } elseif ( 'vertical' == $image_type ) { $image_thumb_pre = 'penci-thumb-vertical'; $padding = '135.4'; } } if ( $image_thumb_pre ) { $image_thumb = $image_thumb_pre; } /* Display Portfolio */ global $wp_query, $post; if ( get_query_var( 'paged' ) ) { $paged = get_query_var( 'paged' ); } elseif ( get_query_var( 'page' ) ) { $paged = get_query_var( 'page' ); } else { $paged = 1; } $query = array( 'post_type' => 'portfolio', 'posts_per_page' => $number, 'paged' => $paged ); $data_query = array( 'post_type' => 'portfolio' ); if ( ( ! $loop || 'post_type:portfolio' == $loop ) && $cat ) { $cat_array = array(); if ( ! empty ( $cat ) ) { $cat = str_replace( ' ', '', $cat ); $cat_array = explode( ',', $cat ); $query['tax_query'] = array( array( 'taxonomy' => 'portfolio-category', 'field' => 'slug', 'terms' => $cat_array ), ); $_cat_array_id = ''; $_cat_array_id_i = 0; foreach ( $cat_array as $cat_array_item ) { $cat_array_term = get_term_by( 'slug', $cat_array_item, 'portfolio-category' ); if ( isset( $cat_array_term->term_id ) && $cat_array_term->term_id ) { if ( $_cat_array_id_i > 0 ) { $_cat_array_id .= ','; } $_cat_array_id .= $cat_array_term->term_id; $_cat_array_id_i ++; } } if ( $_cat_array_id ) { $data_query['tax_query'] = $_cat_array_id; } } } if ( $elementor_query ) { $data_query = $elementor_query; if ( isset( $elementor_query['filter_bar_ids'] ) ) { $data_query['tax_query'] = $elementor_query['filter_bar_ids']; unset( $elementor_query['filter_bar_ids'] ); } $query = $elementor_query; if ( $paged > 1 && isset( $query['posts_per_page'] ) ) { $query_offset_el = isset( $query['offset'] ) ? intval( $query['offset'] ) : 0; $page_offset = $query_offset_el + ( ( $paged - 1 ) * intval( $query['posts_per_page'] ) ); $query['offset'] = $page_offset; } } elseif ( $loop ) { $data_query = PenciSoledadLoopSettings::parseData( $loop ); $query_builder = new PenciSoledadLoopQueryBuilder( $data_query ); $loop_query = $query_builder->build_args(); $query = wp_parse_args( $loop_query, $query ); if ( $paged > 1 && isset( $query['offset'] ) && isset( $query['posts_per_page'] ) ) { $page_offset = intval( $query['offset'] ) + ( ( $paged - 1 ) * intval( $query['posts_per_page'] ) ); $query['offset'] = $page_offset; } } $portfolio_query = new WP_Query( $query ); if ( ! $portfolio_query->have_posts() ) { return; } $portfolio_tax = $this->get_taxs_by_post_type( $data_query ); // Get filter by post //$portfolio_terms = $this->get_terms_by_query2( $query, $portfolio_tax ); // Get filter with category user choose $portfolio_terms = $this->get_terms_by_query( $data_query ); $cat_select = $this->get_only_cat_select( $data_query ); $unique_id = 'penci-portfolio' . '--' . rand( 1000, 100000 ); ob_start(); /* Portfolio Filter */ ?>
  • term_id ) ? $term->term_id : ''; $term_slug = isset( $term->slug ) ? esc_attr( $term->slug ) : ''; $term_name = isset( $term->name ) ? esc_attr( $term->name ) : ''; $taxonomy = isset( $term->taxonomy ) ? esc_attr( $term->taxonomy ) : ''; if ( $cat_select && ! in_array( $term_id, $cat_select ) ) { continue; } $term_arrayss[ $term_name ] = array( $term_slug, $taxonomy ); } if ( ! empty( $term_arrayss ) ) { foreach ( $term_arrayss as $keyx => $valx ) { printf( '
  • %s
  • ', $valx[0], $valx[0], $valx[1], $keyx ); } } ?>
0, 'posts_per_page' => - 1, 'portfolio_category' => '', 'fields' => 'ids' ) ); $all_items_count = count( get_posts( $category_query ) ); $category_tax_query = isset( $category_query['tax_query'] ) ? $category_query['tax_query'] : array(); foreach ( $portfolio_terms as $term ) { $category_query['tax_query'] = array_merge( $category_tax_query, array( 'relation' => 'AND', array( 'taxonomy' => $portfolio_tax, 'field' => 'term_id', 'terms' => $term->term_id, 'include_children' => false ) ) ); $get_posts_category_query2 = get_posts( $category_query ); $category_post_count[ $term->slug ] = count( (array) $get_posts_category_query2 ); } $portfolio_data_js = array( 'instanceId' => $unique_id, 'atts' => $atts, 'query' => $query, 'layout' => $style, 'imagetype' => $image_type, 'count' => $all_items_count, 'countByTerms' => $category_post_count, 'currentTerm' => '*', 'currentTax' => $portfolio_tax, 'lightbox' => $lightbox, ); ?>
get_custom_css( $unique_id, $atts ); return $return; } public function get_custom_css( $block_id, $atts ) { $atts = wp_parse_args( $atts, array( 'pbgoverlay_color' => '', 'ptitle_color' => '', 'ptitle_hcolor' => '', 'ptitle_fsize' => '', 'use_ptitle_typo' => '', 'ptitle_typo' => '', 'pcat_color' => '', 'pcat_hcolor' => '', 'pcat_fsize' => '', 'use_pcat_typo' => '', 'pcat_typo' => '', 'pfilter_color' => '', 'pfilter_hcolor' => '', 'pfilter_fsize' => '', 'use_pfilter_typo' => '', 'pfilter_typo' => '', ) ); $css_custom = ''; $block_id = '#' . $block_id; if ( $atts['pfilter_color'] ) { $css_custom .= $block_id . ' .penci-portfolio-filter ul li a,'; $css_custom .= $block_id . ' .post-entry .penci-portfolio-filter ul li a{ color:' . esc_attr( $atts['pfilter_color'] ) . ' }'; } if ( $atts['pfilter_hcolor'] ) { $css_custom .= $block_id . ' .penci-portfolio-filter ul li a:hover,'; $css_custom .= $block_id . ' .post-entry .penci-portfolio-filter ul li a:hover{ color:' . esc_attr( $atts['pfilter_hcolor'] ) . ' }'; } if ( class_exists( 'Penci_Vc_Helper' ) ) { $css_custom .= Penci_Vc_Helper::vc_google_fonts_parse_attributes( array( 'font_size' => $atts['pfilter_fsize'], 'font_style' => $atts['use_pfilter_typo'] ? $atts['pfilter_typo'] : '', 'template' => $block_id . ' .penci-portfolio-filter ul li a,' . $block_id . ' .post-entry .penci-portfolio-filter ul li a{ %s }', ) ); } if ( $atts['pbgoverlay_color'] ) { $css_custom .= $block_id . ' .penci-portfolio-thumbnail a:after{ background-color:' . esc_attr( $atts['pbgoverlay_color'] ) . ' }'; } if ( $atts['ptitle_color'] ) { $css_custom .= $block_id . ' .inner-item-portfolio .portfolio-desc h3{ color:' . esc_attr( $atts['ptitle_color'] ) . ' }'; } if ( $atts['ptitle_hcolor'] ) { $css_custom .= $block_id . ' .inner-item-portfolio .portfolio-desc h3:hover{ color:' . esc_attr( $atts['ptitle_hcolor'] ) . ' }'; } if ( class_exists( 'Penci_Vc_Helper' ) ) { $css_custom .= Penci_Vc_Helper::vc_google_fonts_parse_attributes( array( 'font_size' => $atts['ptitle_fsize'], 'font_style' => $atts['use_ptitle_typo'] ? $atts['ptitle_typo'] : '', 'template' => $block_id . ' .inner-item-portfolio .portfolio-desc h3{ %s }', ) ); } if ( $atts['pcat_color'] ) { $css_custom .= $block_id . ' .inner-item-portfolio .portfolio-desc span{ color:' . esc_attr( $atts['pcat_color'] ) . ' }'; } if ( $atts['pcat_hcolor'] ) { $css_custom .= $block_id . ' .inner-item-portfolio .portfolio-desc span:hover{ color:' . esc_attr( $atts['pcat_hcolor'] ) . ' }'; } if ( class_exists( 'Penci_Vc_Helper' ) ) { $css_custom .= Penci_Vc_Helper::vc_google_fonts_parse_attributes( array( 'font_size' => $atts['pcat_fsize'], 'font_style' => $atts['use_pcat_typo'] ? $atts['pcat_typo'] : '', 'template' => $block_id . ' .inner-item-portfolio .portfolio-desc span{ %s }', ) ); } if ( $css_custom ) { return ''; } return ''; } public function get_only_cat_select( $data_query ) { $post_type = $this->get_only_post_type( $data_query ); $cats = array(); if ( 'post' == $post_type ) { $cats = $this->get_vc_category( $data_query ); } elseif ( $post_type ) { $cats = $this->get_vc_tax_query( $data_query ); } $cats = $this->remove_exclude_param( $cats ); return $cats; } public function get_terms_by_query( $data_query ) { $object_terms = array(); $tax = ''; $post_type = $this->get_only_post_type( $data_query ); $id_categories = ''; if ( 'post' == $post_type ) { $tax = 'category'; if ( isset( $data_query['categories'] ) && $data_query['categories'] ) { $id_categories = $data_query['categories']; } elseif ( isset( $data_query['tax_query'] ) && $data_query['tax_query'] ) { $id_categories = $data_query['tax_query']; } else { $object_terms = get_categories( array( 'hide_empty' => true ) ); } } elseif ( 'portfolio' == $post_type ) { $tax = 'portfolio-category'; if ( isset( $data_query['tax_query'] ) && $data_query['tax_query'] ) { $id_categories = $data_query['tax_query']; } else { $object_terms = get_terms( $tax, array( 'hide_empty' => true ) ); } } elseif ( 'product' == $post_type ) { $tax = 'product_cat'; if ( isset( $data_query['tax_query'] ) && $data_query['tax_query'] ) { $id_categories = $data_query['tax_query']; } else { $object_terms = get_terms( $tax, array( 'hide_empty' => true ) ); } } elseif ( $post_type ) { $taxonomy_objects = get_object_taxonomies( $post_type ); if ( isset( $taxonomy_objects[0] ) ) { $tax = $taxonomy_objects[0]; } if ( isset( $data_query['tax_query'] ) && $data_query['tax_query'] ) { $id_categories = $data_query['tax_query']; } } if ( $id_categories && $tax ) { $id_categories = $this->stringToArray( $id_categories ); foreach ( (array) $id_categories as $id_category ) { $object_terms[] = get_term( $id_category, $tax ); } } return $object_terms; } /** * @param $args * @param string $tax * * @return array|void|WP_Error */ public function get_terms_by_query2( $args, $tax = 'portfolio-category' ) { if ( ! $tax ) { return array(); } // Remove param paged if ( isset( $args['paged'] ) ) { unset( $args['paged'] ); } $args['fields'] = 'ids'; $args['posts_per_page'] = 50; $posts = new WP_Query( $args ); if ( ! $posts->have_posts() ) { return; } $object_terms = wp_get_object_terms( $posts->posts, $tax ); if ( is_wp_error( $object_terms ) ) { return array(); } $term_ids = array(); if ( $object_terms ) { foreach ( (array) $object_terms as $term ) { $term_ids[] = $term->term_id; } foreach ( (array) $object_terms as $term ) { if ( ! in_array( $term->parent, $term_ids ) ) { $term->parent = 0; } } } return $object_terms; } public function get_taxs_by_post_type( $data ) { $tax = ''; $post_type = $this->get_only_post_type( $data ); if ( 'post' == $post_type ) { $tax = 'category'; } elseif ( 'portfolio' == $post_type ) { $tax = 'portfolio-category'; } elseif ( 'product' == $post_type ) { $tax = 'product_cat'; } elseif ( $post_type ) { $taxonomy_objects = get_object_taxonomies( $post_type ); if ( isset( $taxonomy_objects[0] ) ) { $tax = $taxonomy_objects[0]; } } return $tax; } public function get_only_post_type( $data ) { $post_type = $this->get_vc_post_type( $data ); $count_post_type = count( (array) $post_type ); if ( $count_post_type > 1 ) { return ''; } $post_type = reset( $post_type ); return $post_type; } public function get_vc_post_type( $data ) { $post_type = isset( $data['post_type'] ) ? $data['post_type'] : ''; if ( ! $post_type ) { return ''; } $post_type = $this->stringToArray( $post_type ); $post_type = array_filter( $post_type ); return $post_type; } public function get_vc_category( $data ) { $cats = isset( $data['categories'] ) ? $data['categories'] : ''; if ( ! $cats ) { return array(); } $cats = $this->stringToArray( $cats ); $cats = array_filter( $cats ); return $cats; } public function get_vc_tax_query( $data ) { $tax_query = isset( $data['tax_query'] ) ? $data['tax_query'] : ''; if ( ! $tax_query ) { return array(); } $tax_query = $this->stringToArray( $tax_query ); $tax_query = array_filter( $tax_query ); return $tax_query; } public function remove_exclude_param( $data ) { if ( ! $data ) { return $data; } foreach ( (array) $data as $key => $value ) { $value = (int) $value; if ( $value < 0 ) { unset( $data[ $key ] ); } } return $data; } public function get_first_item_array( $array ) { return isset( $array[0] ) ? $array[0] : ''; } public function stringToArray( $value ) { $valid_values = array(); if ( is_string( $value ) ) { $list = preg_split( '/\,[\s]*/', $value ); if ( $list ) { foreach ( (array) $list as $v ) { if ( strlen( $v ) > 0 ) { $valid_values[] = $v; } } } } else { $valid_values = $value; } return $valid_values; } } new Penci_Soledad_Portfolio_Shortcode; endif; if ( ! function_exists( 'penci_portfolio_shortcode' ) ) { function penci_portfolio_shortcode( $atts, $content = null ) { return ''; } } if ( ! function_exists( 'penci_pfl_more_post_ajax_func' ) ): add_action( 'wp_ajax_nopriv_penci_pfl_more_post_ajax', 'penci_pfl_more_post_ajax_func' ); add_action( 'wp_ajax_penci_pfl_more_post_ajax', 'penci_pfl_more_post_ajax_func' ); function penci_pfl_more_post_ajax_func() { if ( is_user_logged_in() ) { $nonce = isset( $_POST['nonce'] ) ? $_POST['nonce'] : ''; if ( ! wp_verify_nonce( $nonce, 'ajax-nonce' ) ) { die ( 'Nope!' ); } } $datafilter = isset( $_POST['datafilter'] ) ? $_POST['datafilter'] : ''; $query = isset( $datafilter['query'] ) ? $datafilter['query'] : ''; $shown_ids = isset( $datafilter['pflShowIds'] ) ? $datafilter['pflShowIds'] : ''; $currentTerm = isset( $datafilter['currentTerm'] ) ? $datafilter['currentTerm'] : ''; $portfolio_tax = isset( $datafilter['currentTax'] ) ? $datafilter['currentTax'] : 'portfolio-category'; $atts = isset( $datafilter['atts'] ) ? $datafilter['atts'] : ''; $numbermore = isset( $atts['numbermore'] ) ? $atts['numbermore'] : '6'; $style = ( isset( $datafilter['layout'] ) ) ? $datafilter['layout'] : 'grid'; $lightbox = ( isset( $datafilter['lightbox'] ) ) ? $datafilter['lightbox'] : 'false'; $image_type = ( isset( $datafilter['imagetype'] ) ) ? $datafilter['imagetype'] : ''; $pre_query = array_merge( $query, array( 'ignore_sticky_posts' => true, 'post__not_in' => $shown_ids, 'paged' => 0, 'post_status' => 'publish', 'posts_per_page' => $numbermore, ) ); if ( $currentTerm && '*' != $currentTerm ) { $pre_query['tax_query'] = array( array( 'taxonomy' => $portfolio_tax, 'field' => 'slug', 'terms' => $currentTerm ) ); } $portfolio_query = new WP_Query( $pre_query ); if ( ! $portfolio_query->have_posts() ) { wp_send_json_success( array( 'items' => '' ) ); } $image_thumb = 'penci-masonry-thumb'; $padding = false; if ( $style == 'grid' ): $image_thumb = 'penci-thumb'; $padding = '66.6666667'; endif; $image_thumb_pre = ''; if ( $style == 'grid' && 'square' == $image_type ) { $image_thumb_pre = 'penci-thumb-square'; $padding = '100'; } elseif ( $style == 'grid' && 'vertical' == $image_type ) { $image_thumb_pre = 'penci-thumb-vertical'; $padding = '135.4'; } if ( $image_thumb_pre ) { $image_thumb = $image_thumb_pre; } ob_start(); while ( $portfolio_query->have_posts() ): $portfolio_query->the_post(); ?> slug; $tfl_item_terms[] = $item_cat->slug; } } $item_classes = implode( ' ', $item_classes ); $tfl_item_terms = implode( ' ', $tfl_item_terms ); ?>
$content_items ) ); } endif; ?> inc/project-nav.php000064400000000550147577726670010312 0ustar00
inc/taxonomy-portfolio-category.php000064400000011435147577726670013572 0ustar00 ', '', false ); } if ( function_exists( 'rank_math_get_breadcrumbs' ) ) { $rm_breadcrumb = rank_math_get_breadcrumbs( [ 'wrap_before' => '
', ] ); } if ( $rm_breadcrumb ) { echo $rm_breadcrumb; } elseif ( $yoast_breadcrumb ) { echo $yoast_breadcrumb; } else { ?>
' ); ?>
inc/single-portfolio.php000064400000023222147577726670011357 0ustar00 ', '', false ); } if ( function_exists( 'rank_math_get_breadcrumbs' ) ) { $rm_breadcrumb = rank_math_get_breadcrumbs( [ 'wrap_before' => '
', ] ); } if ( $rm_breadcrumb ) { echo $rm_breadcrumb; } elseif ( $yoast_breadcrumb ) { echo $yoast_breadcrumb; } else { ?>
' ); ?> ' . get_the_title( $id_page ) . ''; echo( function_exists( 'penci_icon_by_ver' ) ? penci_icon_by_ver( 'fas fa-angle-right' ) : '' ); } $penci_cats = wp_get_post_terms( get_the_ID(), 'portfolio-category' ); $wpseo_primary_term = function_exists( 'penci_get_wpseo_primary_term' ) ? penci_get_wpseo_primary_term( 'portfolio-category' ) : ''; if ( get_theme_mod( 'enable_pri_cat_yoast_seo' ) && $wpseo_primary_term ) { echo $wpseo_primary_term; } else if ( ! empty( $penci_cats ) ) { ?> ' . $penci_cats[0]->name . ''; ?> ' ); ?>
>

'; the_post_thumbnail( 'penci-full-thumb' ); echo '
'; } ?>
'; echo penci_portfolio_share_html( $single_share_style, ! $hide_sharebox, 'div' ); echo '
'; } ?>
js/penci-portfolio.js000064400000002262147577726670010665 0ustar00;;;(function ($) { "use strict"; var PENCI = PENCI || {}; PENCI.portfolio_extra = function () { if ($().theiaStickySidebar) { var top_margin = 90, pbody = $('body'); if (pbody.hasClass('admin-bar') && pbody.hasClass('penci-vernav-enable')) { top_margin = 62; } else if (!$('body').hasClass('admin-bar') && $('body').hasClass('penci-vernav-enable')) { top_margin = 30; } else if ($('body').hasClass('admin-bar') && !$('body').hasClass('penci-vernav-enable')) { top_margin = 122; } if ($('body.single-portfolio').find('.portfolio-page-content.portfolio-sticky-content').length > 0) { $('.post-entry.portfolio-style-3 .penci-portfolio-meta-wrapper,.post-entry.portfolio-style-3 .portfolio-sticky-content').theiaStickySidebar({ additionalMarginTop: top_margin, }); } } // if sticky } /* Init functions ---------------------------------------------------------------*/ $(document).ready(function () { PENCI.portfolio_extra(); }); })(jQuery); // EOFlanguages/xx_XX.po000064400000006032147577726670010165 0ustar00msgid "" msgstr "" "Project-Id-Version: Penci Portfolio v1.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: \n" "PO-Revision-Date: 2015-11-17 04:16:45+0000\n" "Last-Translator: admin \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Generator: CSL v1.x\n" "X-Poedit-Language: Your language\n" "X-Poedit-Country: YOUR COUNTRY\n" "X-Poedit-SourceCharset: utf-8\n" "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n" "X-Poedit-Basepath: ../\n" "X-Poedit-Bookmarks: \n" "X-Poedit-SearchPath-0: .\n" "X-Textdomain-Support: yes" #: inc/portfolio.php:12 #: inc/portfolio.php:19 #@ pencidesign msgid "All" msgstr "" #: inc/portfolio.php:81 #: inc/taxonomy-portfolio-category.php:44 #@ pencidesign msgid "No Thumbnail" msgstr "" #: inc/single-portfolio.php:14 #: inc/taxonomy-portfolio-category.php:14 #@ pencidesign msgid "Home" msgstr "" #: inc/single-portfolio.php:54 #@ soledad msgid "Share" msgstr "" #: inc/single-portfolio.php:63 #@ soledad msgid "Facebook" msgstr "" #: inc/single-portfolio.php:64 #@ soledad msgid "Twitter" msgstr "" #: inc/single-portfolio.php:65 #@ soledad msgid "Google +" msgstr "" #: inc/single-portfolio.php:66 #@ soledad msgid "Pinterest" msgstr "" #: init.php:96 #: init.php:108 #@ pencidesign msgctxt "post type general name" msgid "Portfolio" msgstr "" #: init.php:97 #@ pencidesign msgctxt "post type singular name" msgid "Portfolio" msgstr "" #: init.php:98 #@ pencidesign msgid "Add New" msgstr "" #: init.php:99 #@ pencidesign msgid "Add New Project" msgstr "" #: init.php:100 #@ pencidesign msgid "Edit Project" msgstr "" #: init.php:101 #@ pencidesign msgid "New Project" msgstr "" #: init.php:102 #@ pencidesign msgid "All Projects" msgstr "" #: init.php:103 #@ pencidesign msgid "View Portfolio" msgstr "" #: init.php:104 #@ pencidesign msgid "Search Portfolio" msgstr "" #: init.php:105 #@ pencidesign msgid "No projects found" msgstr "" #: init.php:106 #@ pencidesign msgid "No projects found in Trash" msgstr "" #: init.php:134 #@ pencidesign msgctxt "taxonomy general name" msgid "Portfolio Categories" msgstr "" #: init.php:135 #@ pencidesign msgctxt "taxonomy singular name" msgid "Portfolio Category" msgstr "" #: init.php:136 #@ pencidesign msgid "Search Portfolio Categories" msgstr "" #: init.php:137 #@ pencidesign msgid "All Portfolio Categories" msgstr "" #: init.php:138 #@ pencidesign msgid "Parent Portfolio Category" msgstr "" #: init.php:139 #@ pencidesign msgid "Parent Portfolio Category:" msgstr "" #: init.php:140 #@ pencidesign msgid "Edit Portfolio Category" msgstr "" #: init.php:141 #@ pencidesign msgid "Update Portfolio Category" msgstr "" #: init.php:142 #@ pencidesign msgid "Add New Portfolio Category" msgstr "" #: init.php:143 #@ pencidesign msgid "New Portfolio Category Name" msgstr "" #: init.php:144 #@ pencidesign msgid "Portfolio Category" msgstr "" init.php000064400000055101147577726670006256 0ustar00 plugin_dir_path( __FILE__ ) . '/customizer/', 'priority' => 18, 'panel' => array( 'title' => esc_html__( 'Portfolio', 'soledad' ), 'icon' => 'fas fa-briefcase', ), 'pencidesign_portfolio_sgeneral_section' => array( 'title' => esc_html__( 'General', 'soledad' ) ), 'pencidesign_portfolio_scolor_section' => array( 'title' => esc_html__( 'Colors', 'soledad' ) ), 'pencidesign_portfolio_sfontsize_section' => array( 'title' => esc_html__( 'Font Size', 'soledad' ) ), 'pencidesign_portfolio_sadvanced_section' => array( 'title' => esc_html__( 'Advanced', 'soledad' ) ), ); return $options; } public function settings() { if ( class_exists( 'SoledadFW\Customizer\CustomizerOptionAbstract' ) ) { require_once plugin_dir_path( __FILE__ ) . 'customizer/panel.php'; require_once plugin_dir_path( __FILE__ ) . 'customizer/settings.php'; \SoledadFW\PenciPortfolioCustomizer::getInstance(); } } public function portfolio_archive_page() { $id_page = get_theme_mod( 'penci_portfolio_cspage' ); if ( $id_page && is_post_type_archive( 'portfolio' ) ) { wp_redirect( get_permalink( $id_page ), 301 ); exit(); } } /** * Add admin meta box style */ public function penci_load_admin_metabox_style() { $screen = get_current_screen(); if ( $screen->id == 'portfolio' ) { wp_enqueue_style( 'penci_portfolio_meta_box_styles', plugin_dir_url( __FILE__ ) . 'css/admin.css' ); } } /** * Add admin meta box style */ public function penci_load_portfolio_style() { wp_enqueue_script( 'penci_portfolio_extra', plugin_dir_url( __FILE__ ) . 'js/penci-portfolio.js', array( 'jquery' ), '1.0', true ); } function penci_global_js() { $output = ''; echo $output; } /** * Transition ready * * @access public * @return void * @since 1.0 */ public function load_text_domain() { load_plugin_textdomain( 'penci-portfolio', false, PENCI_PORTFOLIO_DIR . '/languages/' ); } /** * Register Portfolio Post Type */ public function register_portfolio_post_type() { $labels = array( 'name' => self::get_name(), 'singular_name' => self::get_name(), 'add_new' => __( 'Add New', 'penci-portfolio' ), 'add_new_item' => __( 'Add New Project', 'penci-portfolio' ), 'edit_item' => __( 'Edit Project', 'penci-portfolio' ), 'new_item' => __( 'New Project', 'penci-portfolio' ), 'all_items' => __( 'All Projects', 'penci-portfolio' ), 'view_item' => __( 'View Projects', 'penci-portfolio' ), 'search_items' => __( 'Search Projects', 'penci-portfolio' ), 'not_found' => __( 'No projects found', 'penci-portfolio' ), 'not_found_in_trash' => __( 'No projects found in Trash', 'penci-portfolio' ), 'parent_item_colon' => '', 'menu_name' => self::get_name(), ); $args = array( 'labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'show_in_menu' => true, 'query_var' => self::get_slug(), 'rewrite' => array( 'slug' => self::get_slug() ), 'capability_type' => 'post', 'has_archive' => true, 'hierarchical' => false, 'menu_position' => null, 'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' ) ); if ( ! get_theme_mod( 'penci_portfolio_classic_editor' ) ) { $args['show_in_rest'] = true; } register_post_type( 'portfolio', $args ); } /** * Register Portfolio Categories */ public function register_portfolio_category() { $labels = array( 'name' => self::get_name() . ' ' . __( 'Categories', 'penci-portfolio' ), 'singular_name' => self::get_name() . ' ' . __( 'Category', 'penci-portfolio' ), 'search_items' => __( 'Search Categories', 'penci-portfolio' ), 'all_items' => __( 'All Categories', 'penci-portfolio' ), 'parent_item' => __( 'Parent Category', 'penci-portfolio' ), 'parent_item_colon' => __( 'Parent Category:', 'penci-portfolio' ), 'edit_item' => __( 'Edit Category', 'penci-portfolio' ), 'update_item' => __( 'Update Category', 'penci-portfolio' ), 'add_new_item' => __( 'Add New Category', 'penci-portfolio' ), 'new_item_name' => __( 'New Category Name', 'penci-portfolio' ), 'menu_name' => self::get_name() . ' ' . __( 'Categories', 'penci-portfolio' ) ); $args = array( 'hierarchical' => true, 'labels' => $labels, 'show_ui' => true, 'show_admin_column' => true, 'query_var' => true, 'show_in_rest' => true, 'rewrite' => array( 'slug' => self::get_slug_tax() ) ); register_taxonomy( 'portfolio-category', array( 'portfolio' ), $args ); } /** * Register single portfolio template */ public function register_portfolio_single( $single_template ) { global $post; if ( $post->post_type == 'portfolio' ) { $single_template = dirname( __FILE__ ) . '/inc/single-portfolio.php'; } return $single_template; } /** * Register categories portfolio template */ public function register_portfolio_categories( $template ) { if ( is_tax( 'portfolio-category' ) ) { $template = dirname( __FILE__ ) . '/inc/taxonomy-portfolio-category.php'; } return $template; } /** * Custom posts per page portfolio categories listing */ public function portfolio_custom_posts_per_page( $query ) { if ( is_tax( 'portfolio-category' ) && $query->is_main_query() ) { $numpost = get_theme_mod( 'penci_portfolio_cat_showposts' ); if ( ! isset ( $numpost ) || empty( $numpost ) ): $numpost = '12'; endif; $query->set( 'posts_per_page', $numpost ); } } public static function get_image_ratio( $postid, $image_thumb, $padding = false, $echo = true ) { $ratio = '66.6666667'; $output = ''; if ( has_post_thumbnail( $postid ) ) { $image = get_the_post_thumbnail( $postid, $image_thumb ); $img_url = get_the_post_thumbnail_url( $postid, $image_thumb ); $image_type = substr( $img_url, - 4 ); if ( '.gif' == $image_type ) { $image = get_the_post_thumbnail( $postid, 'full' ); $img_url = get_the_post_thumbnail_url( $postid, 'full' ); } } else { $image = '' . __( '; $img_url = PENCI_PORTFOLIO_URL . '/images/no-thumbnail.jpg'; } if ( preg_match_all( '#(width|height)=(\'|")?(?[0-9]+)(\'|")?#i', $image, $image_dis ) && 2 == count( (array) $image_dis['dimensions'] ) ) { $ratio = self::get_pre_ratio( $image_dis['dimensions'][0], $image_dis['dimensions'][1] ); } if ( $padding && $ratio ) { $ratio = $padding; } $output = ''; if ( ! $echo ) { return $output; } echo $output; } public static function get_pre_ratio( $width, $height ) { return number_format( $height / $width * 100, 8 ); } public static function get_slug() { return get_theme_mod( 'penci_pfl_custom_slug' ) ? get_theme_mod( 'penci_pfl_custom_slug' ) : 'portfolio'; } public static function get_name() { return get_theme_mod( 'penci_pfl_custom_name' ) ? get_theme_mod( 'penci_pfl_custom_name' ) : __( 'Portfolio','penci-portfolio' ); } public static function get_slug_tax() { return get_theme_mod( 'penci_pfl_custom_catslug' ) ? get_theme_mod( 'penci_pfl_custom_catslug' ) : 'portfolio-category'; } public function single_portfolio_custom_style() { $settings_color = array( 'penci_portfolio_single_title_color' => array( 'color' => 'body.single-portfolio .penci-page-header h1' ), 'penci_portfolio_single_text_color' => array( 'color' => 'body.single-portfolio .post-entry p, body.single-portfolio .penci-shortdesc, body.single-portfolio .wpb_text_column p' ), 'penci_portfolio_single_meta_label_color' => array( 'color' => 'ul.portfolio-meta-lists span.title' ), 'penci_portfolio_single_meta_value_color' => array( 'color' => 'ul.portfolio-meta-lists span.value' ), 'penci_portfolio_single_border_color' => array( 'border-color' => '.portfolio-share-box > span,body.single-portfolio .post-pagination,body.single-portfolio .post-related' ), 'penci_portfolio_single_relate_title_color' => array( 'color' => '.portfolio-releated-area .item-related h3 a', ), 'penci_portfolio_single_relate_title_hover_color' => array( 'color' => '.portfolio-releated-area .item-related h3 a:hover', ), 'penci_portfolio_single_relate_cat_color' => array( 'color' => '.portfolio-releated-area .item-related .portfolio-cat a', ), 'penci_portfolio_single_relate_cat_hover_color' => array( 'color' => '.portfolio-releated-area .item-related .portfolio-cat a:hover', ), 'penci_portfolio_single_text_link_color' => array( 'color' => 'body.single-portfolio .post-entry a, body.single-portfolio .wpb_text_column a' ), 'penci_portfolio_single_text_link_hover_color' => array( 'color' => 'body.single-portfolio .post-entry a:hover, body.single-portfolio .wpb_text_column a:hover' ), 'penci_portfolio_single_carousel_background_color' => array( 'background-color' => '.penci-owl-carousel-slider .owl-dot span, .penci-related-carousel .owl-dot span', ), 'penci_portfolio_single_carousel_border_color' => array( 'border-color' => '.penci-owl-carousel-slider .owl-dot span, .penci-related-carousel .owl-dot span', ), 'penci_portfolio_single_carousel_active_background_color' => array( 'background-color' => '.penci-owl-carousel-slider .owl-dot.active span, .penci-related-carousel .owl-dot.active span', ), 'penci_portfolio_single_carousel_active_border_color' => array( 'border-color' => '.penci-owl-carousel-slider .owl-dot.active span, .penci-related-carousel .owl-dot.active span', ), ); $font_size = array( 'penci_portfolio_single_title_fz' => array( 'font-size' => 'body.single-portfolio .penci-page-header h1', ), 'penci_portfolio_single_txt_fz' => array( 'font-size' => 'body.single-portfolio .post-entry p, body.single-portfolio .penci-shortdesc, body.single-portfolio .wpb_text_column p' ), 'penci_portfolio_single_txt_lh_fz' => array( 'line-height' => 'body.single-portfolio .post-entry p, body.single-portfolio .penci-shortdesc, body.single-portfolio .wpb_text_column p' ), 'penci_portfolio_single_meta_fz' => array( 'font-size' => 'body.single-portfolio ul.portfolio-meta-lists span' ), 'penci_portfolio_single_nextprev_fz' => array( 'font-size' => 'body.single-portfolio .project-pagination a' ), 'penci_portfolio_single_related_tt_fz' => array( 'font-size' => 'body.single-portfolio .portfolio-releated-area .item-related h3 a' ), 'penci_portfolio_single_related_cat_fz' => array( 'font-size' => 'body.single-portfolio .portfolio-releated-area .item-related .portfolio-cat a' ), ); if ( is_singular( 'portfolio' ) ) { echo $this->css_parse( $settings_color ); echo $this->css_parse( $font_size ); echo $this->css_parse( $font_size, true ); } } public function css_parse( $css, $mobile = false ) { $css_out = $before = $after = ''; foreach ( $css as $setting => $props ) { $setting = $mobile ? str_replace( '_fz', '_mfz', $setting ) : $setting; $value = get_theme_mod( $setting ); $prefix = is_numeric( $value ) ? 'px' : ''; if ( ! empty( $value ) ) { foreach ( $props as $prop => $selector ) { $css_out .= $selector . '{' . $prop . ':' . $value . $prefix . '}'; } } } if ( $mobile ) { $before = '@media only screen and (max-width:767px){'; $after = '}'; } return $before . $css_out . $after; } } add_action( 'plugins_loaded', array( 'Penci_Portfolio', 'get_instance' ) ); endif; /* End check if class exists */ if ( ! function_exists( 'portfolio_meta_content' ) ) { function portfolio_meta_content( $social_style = 'style-1', $social_enable = true, $sticky = false, $page_title = false, $echo = true ) { $post_id = get_the_ID(); $portfolio_max_lists = apply_filters( 'penci_portfolio_list_numer', 5 ); $short_desc = get_post_meta( $post_id, 'penci_portfolio_desc', true ); $meta = ''; $out = ''; for ( $i = 1; $i <= $portfolio_max_lists; $i ++ ) { $title = get_post_meta( $post_id, 'penci_portfolio_label_' . $i, true ); $value = get_post_meta( $post_id, 'penci_portfolio_value_' . $i, true ); if ( $title && $value ) { $meta .= '
  • ' . esc_attr( $title ) . ' ' . esc_attr( $value ) . '
  • '; } } if ( $meta || $short_desc ) { $out .= '
    '; if ( $sticky ) { $out .= '
    '; } if ( $page_title ) { $out .= '

    ' . get_the_title() . '

    '; } if ( $short_desc ) { $out .= '
    ' . $short_desc . '
    '; } if ( $meta ) { $out .= '
      ' . $meta . penci_portfolio_share_html( $social_style, $social_enable ) . '
    '; } if ( $sticky ) { $out .= '
    '; } $out .= '
    '; } if ( $echo ) { echo $out; } else { $return = 'has_content'; if ( empty( $meta ) && empty( $short_desc ) ) { $return = 'no_content'; } elseif ( empty( $meta ) ) { $return = 'no_share'; } return $return; } } } if ( ! function_exists( 'penci_portfolio_single_settings' ) ) { function penci_portfolio_single_settings( $customize, $meta_key, $default ) { $customize_setting = get_theme_mod( $customize, $default ); $single_setting = get_post_meta( get_the_ID(), $meta_key, true ); return ! empty( $single_setting ) ? $single_setting : $customize_setting; } } if ( ! function_exists( 'penci_portfolio_option2logic' ) ) { function penci_portfolio_option2logic( $setting, $res = false ) { if ( $res ) { return 'enable' == $setting ? false : true; } else { return 'enable' == $setting; } } } if ( ! function_exists( 'penci_portfolio_share_html' ) ) { function penci_portfolio_share_html( $style = 'style-1', $enable = true, $format = 'li' ) { ob_start(); ?> < class="portfolio-share-box tags-share-box "> > 'portfolio', 'post__not_in' => array( get_the_ID() ), 'posts_per_page' => get_theme_mod( 'penci_single_portfolio_related_num', 3 ), ) ); $parent_class = 'penci-related-carousel penci-related-grid-display'; $parent_atts = array(); $lazy_class = 'penci-lazy'; if ( 'carousel' == $layout ) { $parent_atts[] = 'data-lazy="true"'; $parent_atts[] = 'data-item="' . esc_attr( $columns ) . '"'; $parent_atts[] = 'data-desktop="' . esc_attr( $columns ) . '"'; $parent_atts[] = 'data-tablet="2"'; $parent_atts[] = 'data-tabsmall="2"'; $parent_atts[] = 'data-auto="false"'; $parent_atts[] = 'data-speed="300"'; $parent_atts[] = 'data-dots="true"'; $parent_atts[] = 'data-nav="false"'; $parent_class = 'penci-owl-carousel penci-owl-carousel-slider penci-related-carousel'; $lazy_class = 'owl-lazy'; } $parent_atts = implode( ' ', $parent_atts ); if ( $relate_project_query ) { ?>

    > ID ); $project_title = get_the_title( $project->ID ); $get_terms = wp_get_post_terms( $project->ID, 'portfolio-category' ); ?>