Submit
Path:
~
/
/
proc
/
thread-self
/
root
/
home
/
getwphos
/
www
/
techniquetechs
/
wp-content
/
themes
/
plexify
/
inc
/
File Content:
theme-functions.php
<?php /** * Helper functions for the theme * * @package Plexify */ function plexify_html($html){ return $html; } function plexify_get_menu_location(){ $menu_locations = ['primary' => esc_html__( 'Primary', 'plexify' )]; $add_menu_location = plexify()->get_theme_opt('add_menu_location',[]); if( !empty( $add_menu_location)){ foreach($add_menu_location as $location){ if( !empty($location) ){ $menu_locations[sanitize_title($location)] = ucfirst($location); } } } return $menu_locations; } /** * Google Fonts */ function plexify_fonts_url() { $fonts_url = ''; $fonts = array(); $subsets = 'latin,latin-ext'; if ( 'off' !== _x( 'on', 'Kanit font: on or off', 'plexify' ) ) { $fonts[] = 'Kanit:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900'; } if ( 'off' !== _x( 'on', 'Space Mono font: on or off', 'plexify' ) ) { $fonts[] = 'Space+Mono:ital,wght@0,400;0,700;1,400;1,700'; } if ( 'off' !== _x( 'on', 'Space Grotesk font: on or off', 'plexify' ) ) { $fonts[] = 'Space+Grotesk:wght@300..700'; } if ( $fonts ) { $fonts_url = add_query_arg( array( 'family' => implode( '&family=', $fonts ), 'subset' => urlencode( $subsets ), ), '//fonts.googleapis.com/css2' ); } return $fonts_url; } function plexify_svgs_icon($args = []){ global $wp_filesystem; $args = wp_parse_args($args, [ 'icon' => 'core/arrow-next', 'class' => '', 'before' => '', 'after' => '', 'tag' => 'span', 'echo' => true ]); ob_start(); printf('%s', $args['before']); if(!empty($args['tag'])) printf('%s', '<'.$args['tag'].' class="pxl-svg-icon pxl-icon rtl-flip lh-0 '.$args['class'].'">'); printf('%s',$wp_filesystem->get_contents( get_template_directory() . '/assets/svgs/'.$args['icon'].'.svg' )); if(!empty($args['tag'])) printf('%s', '</'.$args['tag'].'>'); printf('%s', $args['after']); if($args['echo']){ echo ob_get_clean(); } else { return ob_get_clean(); } } /* * Get page ID by Slug */ function plexify_get_id_by_slug($slug, $post_type){ $content = get_page_by_path($slug, OBJECT, $post_type); $id = $content->ID; return $id; } /** * get content by slug **/ function plexify_get_content_by_slug($slug, $post_type){ $contents = get_posts( array( 'name' => $slug, 'post_type' => $post_type ) ); if(!empty($contents)){ $content = $contents[0]->post_content; } echo apply_filters('the_content', $content); } function plexify_get_mega_menu_builder_id(){ $mn_id = []; $menus = get_terms( 'nav_menu', array( 'hide_empty' => false ) ); if ( is_array( $menus ) && ! empty( $menus ) ) { foreach ( $menus as $menu ) { if ( is_object( $menu )){ $menu_obj = get_term( $menu->term_id, 'nav_menu' ); $menu = wp_get_nav_menu_object( $menu_obj ) ; $menu_items = wp_get_nav_menu_items( $menu->term_id, array( 'update_post_term_cache' => false ) ); foreach ($menu_items as $menu_item) { if( !empty($menu_item->pxl_megaprofile)){ if(!in_array((int)$menu_item->pxl_megaprofile, $mn_id)) $mn_id[] = (int)$menu_item->pxl_megaprofile; } } } } } return $mn_id; } function plexify_get_page_active_filters_url( $filters = array(), $link = '' ) { if ( empty( $link ) ) { $link = get_permalink(); } if ( empty( $filters ) ) { $filters = $_GET; } if ( isset( $filters['max_price'] ) ) { $link = add_query_arg( 'max_price', wp_unslash( $filters['max_price'] ), $link ); } if ( get_search_query() ) { $link = add_query_arg( 's', rawurlencode( wp_specialchars_decode( get_search_query() ) ), $link ); } if ( ! empty( $filters['date_checkin'] ) ) { $link = add_query_arg( 'date_checkin', wp_unslash( $filters['date_checkin'] ) , $link ); } if ( ! empty( $filters['date_checkout'] ) ) { $link = add_query_arg( 'date_checkout', wp_unslash( $filters['date_checkout'] ) , $link ); } if ( ! empty( $filters['adults_number'] ) ) { $link = add_query_arg( 'adults_number', wp_unslash( $filters['adults_number'] ) , $link ); } if ( ! empty( $filters['children_number'] ) ) { $link = add_query_arg( 'children_number', wp_unslash( $filters['children_number'] ) , $link ); } return $link; } function plexify_hex_rgb($color) { $default = '0,0,0'; //Return default if no color provided if(empty($color)) return $default; //Sanitize $color if "#" is provided if ($color[0] == '#' ) { $color = substr( $color, 1 ); } //Check if color has 6 or 3 characters and get values if (strlen($color) == 6) { $hex = array( $color[0] . $color[1], $color[2] . $color[3], $color[4] . $color[5] ); } elseif ( strlen( $color ) == 3 ) { $hex = array( $color[0] . $color[0], $color[1] . $color[1], $color[2] . $color[2] ); } else { return $default; } //Convert hexadec to rgb $rgb = array_map('hexdec', $hex); $output = implode(",",$rgb); //Return rgb(a) color string return $output; } function plexify_hook_anchor_custom(){ return; } function plexify_header_popup_cart(){ if(!class_exists('Woocommerce')) return; ?> <div class="pxl-hidden-template pxl-side-cart"> <div class="pxl-hidden-template-wrap"> <div class="pxl-panel-header"> <div class="panel-header-inner"> <span class="pxl-title h3"><?php echo esc_html__( 'Cart', 'plexify' ) ?></span> <span class="pxl-close" title="<?php echo esc_attr__( 'Close', 'plexify' ) ?>"></span> </div> </div> <div class="pxl-panel-content widget_shopping_cart custom_scroll"> <div class="widget_shopping_cart_content"> <?php woocommerce_mini_cart(); ?> </div> </div> </div> </div> <?php } function plexify_search_popup_normal(){ ?> <div class="pxl-search-popup pxl-search-popup-normal pxl-modal-html pxl-transition"> <a href="#" class="pxl-modal-close pxl-transition" title="<?php echo esc_attr__( 'Close', 'plexify' ) ?>"></a> <div class="pxl-search-popup-inner pxl-modal-inner container"> <form method="get" class="search-form pxl-search-form-popup" action="<?php echo esc_url( home_url( '/' ) ); ?>"> <div class="text-search-wrap"> <input type="search" class="search-field" placeholder="<?php echo esc_attr__( 'Search Here...','plexify'); ?>" value="<?php echo get_search_query(); ?>" name="s" /> <button type="submit" class="search-submit" value=""><span class="kngi-search-400"></span></button> </div> </form> </div> </div> <?php } function plexify_search_popup_product(){ ?> <div class="pxl-search-popup pxl-search-popup-product pxl-modal-html pxl-transition"> <a href="#" class="pxl-modal-close pxl-transition" title="<?php echo esc_attr__( 'Close', 'plexify' ) ?>"></a> <div class="pxl-search-popup-inner pxl-modal-inner container"> <form method="get" class="search-form pxl-search-form-popup" action="<?php echo esc_url( home_url( '/' ) ); ?>"> <input type="hidden" name="post_type" value="product"/> <div class="pxl-search-inner d-flex gutters-30"> <div class="cat-search-wrap col-auto"> <?php if(class_exists('Woocommerce')){ $args = array( 'show_option_all' => esc_html__('All Categories','plexify'), 'orderby' => 'ID', 'order' => 'ASC', 'show_count' => 0, 'hide_empty' => 1, 'child_of' => 0, 'exclude' => '', 'include' => '', 'echo' => 1, 'selected' => 0, 'hierarchical' => 1, 'name' => 'product_cat', 'id' => 'p_cat', 'class' => 'postform woo_cat_search', 'depth' => 0, 'tab_index' => 0, 'taxonomy' => 'product_cat', 'hide_if_empty' => false, 'value_field' => 'slug', ); wp_dropdown_categories( $args ); } ?> </div> <div class="text-search-wrap col"> <input type="search" class="search-field" placeholder="<?php echo esc_attr__( 'Search Here...','plexify'); ?>" value="<?php echo get_search_query(); ?>" name="s" /> <button type="submit" class="search-submit" value=""><span class="kngi-search-400"></span></button> </div> </div> </form> </div> </div> <?php } if(function_exists( 'pxl_register_shortcode' )) { function greenola_image_highlight_shortcode( $atts = array() ) { extract(shortcode_atts(array( 'id_image' => '', ), $atts)); ob_start(); if(!empty($id_image)) : $img = pxl_get_image_by_size( array( 'attach_id' => $id_image, 'thumb_size' => 'full', ) ); $thumbnail = $img['thumbnail']; ?> <span class="pxl-image--highlight bg-image" > <?php echo wp_kses_post($thumbnail); ?> </span> <?php endif; $output = ob_get_clean(); return $output; } pxl_register_shortcode('highlight_image', 'greenola_image_highlight_shortcode'); }
Submit
FILE
FOLDER
Name
Size
Permission
Action
admin
---
0755
classes
---
0755
theme-options
---
0755
widgets
---
0755
theme-actions.php
22122 bytes
0644
theme-config.php
9274 bytes
0644
theme-filters.php
15458 bytes
0644
theme-functions.php
11108 bytes
0644
N4ST4R_ID | Naxtarrr