qsdklsqkdmqskdmlqskd azoepqikdomlqskdjmlqs qpfklqjsfmklqsjdmqlsjdsqd PKH5\o{UZ.Z.starter-content.phpnuW+A array( // Place one core-defined widgets in the first footer widget area. 'sidebar-1' => array( 'text_about', ), // Place one core-defined widgets in the second footer widget area. 'sidebar-2' => array( 'text_business_info', ), ), // Create the custom image attachments used as post thumbnails for pages. 'attachments' => array( 'image-opening' => array( 'post_title' => _x( 'The New UMoMA Opens its Doors', 'Theme starter content', 'twentytwenty' ), 'file' => 'assets/images/2020-landscape-1.png', // URL relative to the template directory. ), ), // Specify the core-defined pages to create and add custom thumbnails to some of them. 'posts' => array( 'front' => array( 'post_type' => 'page', 'post_title' => __( 'The New UMoMA Opens its Doors', 'twentytwenty' ), // Use the above featured image with the predefined about page. 'thumbnail' => '{{image-opening}}', 'post_content' => implode( '', array( '', '
', '

' . __( 'The premier destination for modern art in Northern Sweden. Open from 10 AM to 6 PM every day during the summer months.', 'twentytwenty' ) . '

', '
', '', '', '
', '
', '
', '', '
', '', '', '

' . __( 'Works and Days', 'twentytwenty' ) . '

', '', '', '

' . __( 'August 1 -- December 1', 'twentytwenty' ) . '

', '', '', '', '
', '', '', '
', '', '
', '', '', '

' . __( 'Theatre of Operations', 'twentytwenty' ) . '

', '', '', '

' . __( 'October 1 -- December 1', 'twentytwenty' ) . '

', '', '', '', '
', '
', '', '', '
', '
', '', '
', '', '', '

' . __( 'The Life I Deserve', 'twentytwenty' ) . '

', '', '', '

' . __( 'August 1 -- December 1', 'twentytwenty' ) . '

', '', '', '', '
', '', '', '
', '', '
', '', '', '

' . __( 'From Signac to Matisse', 'twentytwenty' ) . '

', '', '', '

' . __( 'October 1 -- December 1', 'twentytwenty' ) . '

', '', '', '', '
', '
', '
', '', '', '
', '', '', '
', '

' . __( '“Cyborgs, as the philosopher Donna Haraway established, are not reverent. They do not remember the cosmos.”', 'twentytwenty' ) . '

', '
', '', '', '

' . __( 'With seven floors of striking architecture, UMoMA shows exhibitions of international contemporary art, sometimes along with art historical retrospectives. Existential, political and philosophical issues are intrinsic to our programme. As visitor you are invited to guided tours artist talks, lectures, film screenings and other events with free admission', 'twentytwenty' ) . '

', '', '', '

' . __( 'The exhibitions are produced by UMoMA in collaboration with artists and museums around the world and they often attract international attention. UMoMA has received a Special Commendation from the European Museum of the Year, and was among the top candidates for the Swedish Museum of the Year Award as well as for the Council of Europe Museum Prize.', 'twentytwenty' ) . '

', '', '', '

', '', '', '
', '
', '

' . __( 'Become a Member and Get Exclusive Offers!', 'twentytwenty' ) . '

', '', '', '

' . __( 'Members get access to exclusive exhibits and sales. Our memberships cost $99.99 and are billed annually.', 'twentytwenty' ) . '

', '', '', '', '
', '
', '', '', '', '', ) ), ), 'about', 'contact', 'blog', ), // Default to a static front page and assign the front and posts pages. 'options' => array( 'show_on_front' => 'page', 'page_on_front' => '{{front}}', 'page_for_posts' => '{{blog}}', ), // Set up nav menus for each of the two areas registered in the theme. 'nav_menus' => array( // Assign a menu to the "primary" location. 'primary' => array( 'name' => __( 'Primary', 'twentytwenty' ), 'items' => array( 'link_home', // Note that the core "home" page is actually a link in case a static front page is not used. 'page_about', 'page_blog', 'page_contact', ), ), // This replicates primary just to demonstrate the expanded menu. 'expanded' => array( 'name' => __( 'Primary', 'twentytwenty' ), 'items' => array( 'link_home', // Note that the core "home" page is actually a link in case a static front page is not used. 'page_about', 'page_blog', 'page_contact', ), ), // Assign a menu to the "social" location. 'social' => array( 'name' => __( 'Social Links Menu', 'twentytwenty' ), 'items' => array( 'link_yelp', 'link_facebook', 'link_twitter', 'link_instagram', 'link_email', ), ), ), ); /** * Filters Twenty Twenty array of starter content. * * @since Twenty Twenty 1.0 * * @param array $starter_content Array of starter content. */ return apply_filters( 'twentytwenty_starter_content', $starter_content ); } PKH5\cB back-compat.phpnuW+A

%s

', sprintf( /* translators: %s: WordPress version. */ __( 'Twenty Nineteen requires at least WordPress version 4.7. You are running version %s. Please upgrade and try again.', 'twentynineteen' ), $GLOBALS['wp_version'] ) ); } /** * Prevents the Customizer from being loaded on WordPress versions prior to 4.7. * * @since Twenty Nineteen 1.0.0 * * @global string $wp_version WordPress version. */ function twentynineteen_customize() { wp_die( sprintf( /* translators: %s: WordPress version. */ __( 'Twenty Nineteen requires at least WordPress version 4.7. You are running version %s. Please upgrade and try again.', 'twentynineteen' ), $GLOBALS['wp_version'] ), '', array( 'back_link' => true, ) ); } add_action( 'load-customize.php', 'twentynineteen_customize' ); /** * Prevents the Theme Preview from being loaded on WordPress versions prior to 4.7. * * @since Twenty Nineteen 1.0.0 * * @global string $wp_version WordPress version. */ function twentynineteen_preview() { if ( isset( $_GET['preview'] ) ) { wp_die( sprintf( /* translators: %s: WordPress version. */ __( 'Twenty Nineteen requires at least WordPress version 4.7. You are running version %s. Please upgrade and try again.', 'twentynineteen' ), $GLOBALS['wp_version'] ) ); } } add_action( 'template_redirect', 'twentynineteen_preview' ); PKH5\kO""template-functions.phpnuW+A'; } } add_action( 'wp_head', 'twentynineteen_pingback_header' ); /** * Changes comment form default fields. * * @param array $defaults The default comment form arguments. */ function twentynineteen_comment_form_defaults( $defaults ) { $comment_field = $defaults['comment_field']; // Adjust height of comment form. $defaults['comment_field'] = preg_replace( '/rows="\d+"/', 'rows="5"', $comment_field ); return $defaults; } add_filter( 'comment_form_defaults', 'twentynineteen_comment_form_defaults' ); /** * Filters the default archive titles. */ function twentynineteen_get_the_archive_title() { if ( is_category() ) { $title = __( 'Category Archives: ', 'twentynineteen' ) . '' . single_term_title( '', false ) . ''; } elseif ( is_tag() ) { $title = __( 'Tag Archives: ', 'twentynineteen' ) . '' . single_term_title( '', false ) . ''; } elseif ( is_author() ) { $title = __( 'Author Archives: ', 'twentynineteen' ) . '' . get_the_author_meta( 'display_name' ) . ''; } elseif ( is_year() ) { $title = __( 'Yearly Archives: ', 'twentynineteen' ) . '' . get_the_date( _x( 'Y', 'yearly archives date format', 'twentynineteen' ) ) . ''; } elseif ( is_month() ) { $title = __( 'Monthly Archives: ', 'twentynineteen' ) . '' . get_the_date( _x( 'F Y', 'monthly archives date format', 'twentynineteen' ) ) . ''; } elseif ( is_day() ) { $title = __( 'Daily Archives: ', 'twentynineteen' ) . '' . get_the_date() . ''; } elseif ( is_post_type_archive() ) { $title = __( 'Post Type Archives: ', 'twentynineteen' ) . '' . post_type_archive_title( '', false ) . ''; } elseif ( is_tax() ) { $tax = get_taxonomy( get_queried_object()->taxonomy ); /* translators: %s: Taxonomy singular name. */ $title = sprintf( esc_html__( '%s Archives:', 'twentynineteen' ), $tax->labels->singular_name ); } else { $title = __( 'Archives:', 'twentynineteen' ); } return $title; } add_filter( 'get_the_archive_title', 'twentynineteen_get_the_archive_title' ); /** * Adds custom 'sizes' attribute to responsive image functionality for post thumbnails. * * @since Twenty Nineteen 1.0 * * @param string[] $attr Array of attribute values for the image markup, keyed by attribute name. * See wp_get_attachment_image(). * @return string[] The filtered attributes for the image markup. */ function twentynineteen_post_thumbnail_sizes_attr( $attr ) { if ( is_admin() ) { return $attr; } if ( ! is_singular() ) { $attr['sizes'] = '(max-width: 34.9rem) calc(100vw - 2rem), (max-width: 53rem) calc(8 * (100vw / 12)), (min-width: 53rem) calc(6 * (100vw / 12)), 100vw'; } return $attr; } add_filter( 'wp_get_attachment_image_attributes', 'twentynineteen_post_thumbnail_sizes_attr' ); /** * Adds an extra menu to our nav for our priority+ navigation to use. * * @param string $nav_menu Nav menu. * @param object $args Nav menu args. * @return string More link for hidden menu items. */ function twentynineteen_add_ellipses_to_nav( $nav_menu, $args ) { if ( 'menu-1' === $args->theme_location ) : $nav_menu .= ' '; endif; return $nav_menu; } add_filter( 'wp_nav_menu', 'twentynineteen_add_ellipses_to_nav', 10, 2 ); /** * Handles WCAG 2.0 attributes for dropdown menus. * * Adjustments to menu attributes to support WCAG 2.0 recommendations * for flyout and dropdown menus. * * @link https://www.w3.org/WAI/tutorials/menus/flyout/ * * @param array $atts { * The HTML attributes applied to the menu item's `` element, empty strings are ignored. * * @type string $title Title attribute. * @type string $target Target attribute. * @type string $rel The rel attribute. * @type string $href The href attribute. * @type string $aria-current The aria-current attribute. * } * @param WP_Post $item The current menu item object. * @param stdClass $args An object of `wp_nav_menu()` arguments. * @return string[] Modified attributes. */ function twentynineteen_nav_menu_link_attributes( $atts, $item, $args ) { // Check that this is the primary menu. if ( isset( $args->theme_location ) && 'menu-1' === $args->theme_location ) { // Add [aria-haspopup] and [aria-expanded] to menu items that have children. $item_has_children = in_array( 'menu-item-has-children', $item->classes, true ); if ( $item_has_children ) { $atts['aria-haspopup'] = 'true'; $atts['aria-expanded'] = 'false'; } } return $atts; } add_filter( 'nav_menu_link_attributes', 'twentynineteen_nav_menu_link_attributes', 10, 3 ); /** * Creates a nav menu item to be displayed on mobile to navigate from submenu back to the parent. * * This duplicates each parent nav menu item and makes it the first child of itself. * * @param array $sorted_menu_items Sorted nav menu items. * @param object $args Nav menu args. * @return array Amended nav menu items. */ function twentynineteen_add_mobile_parent_nav_menu_items( $sorted_menu_items, $args ) { static $pseudo_id = 0; if ( ! isset( $args->theme_location ) || 'menu-1' !== $args->theme_location ) { return $sorted_menu_items; } $amended_menu_items = array(); foreach ( $sorted_menu_items as $nav_menu_item ) { $amended_menu_items[] = $nav_menu_item; if ( in_array( 'menu-item-has-children', $nav_menu_item->classes, true ) ) { $parent_menu_item = clone $nav_menu_item; $parent_menu_item->original_id = $nav_menu_item->ID; $parent_menu_item->ID = --$pseudo_id; $parent_menu_item->db_id = $parent_menu_item->ID; $parent_menu_item->object_id = $parent_menu_item->ID; $parent_menu_item->classes = array( 'mobile-parent-nav-menu-item' ); $parent_menu_item->menu_item_parent = $nav_menu_item->ID; $amended_menu_items[] = $parent_menu_item; } } return $amended_menu_items; } add_filter( 'wp_nav_menu_objects', 'twentynineteen_add_mobile_parent_nav_menu_items', 10, 2 ); /** * Adds a fragment identifier (to the content) to paginated links. * * @since Twenty Nineteen 2.6 * * @param string $link The page number HTML output. * @param int $i Page number for paginated posts' page links. * @return string Formatted output in HTML. */ function twentynineteen_link_pages_link( $link, $i ) { if ( $i > 1 && preg_match( '/href="([^"]*)"/', $link, $matches ) ) { $link = str_replace( $matches[1], $matches[1] . '#content', $link ); } return $link; } add_filter( 'wp_link_pages_link', 'twentynineteen_link_pages_link', 10, 2 ); PKH5\0|1|1block-patterns.phpnuW+A esc_html__( 'Twenty Nineteen', 'twentynineteen' ) ) ); } /** * Register Block Patterns. */ if ( function_exists( 'register_block_pattern' ) ) { // About. register_block_pattern( 'twentynineteen/about', array( 'title' => esc_html__( 'About', 'twentynineteen' ), 'categories' => array( 'twentynineteen' ), 'content' => implode( '', array( '', '

' . esc_html__( 'Advocating for Businesses and Entrepreneurs since 2014', 'twentynineteen' ) . '

', '', '', '

' . esc_html__( 'Eva Young Consulting was founded in 2014 to meet the needs of small businesses in the San Francisco Bay Area. We help startups define a clear brand identity and digital strategy that will carry them through their financing rounds and scale as their business grows. Discover how we can boost your brand with a unique and powerful digital marketing strategy.', 'twentynineteen' ) . '

', '', '', '
', '
' . esc_html__( 'Learn More', 'twentynineteen' ) . '
', '
', '', ) ), ) ); // Get In Touch. register_block_pattern( 'twentynineteen/get-in-touch', array( 'title' => esc_html__( 'Get In Touch', 'twentynineteen' ), 'categories' => array( 'twentynineteen' ), 'content' => implode( '', array( '', '

' . esc_html__( 'Get In Touch', 'twentynineteen' ) . '

', '', '', '
', '
', '

' . esc_html__( '20 Cooper Avenue', 'twentynineteen' ) . '
' . esc_html__( 'New York, New York 10023', 'twentynineteen' ) . '

', '
', '', '', '
', '

' . esc_html__( '(555) 555-5555', 'twentynineteen' ) . '
' . esc_html__( 'example@example.com', 'twentynineteen' ) . '

', '
', '
', '', '', '
', '
' . esc_html__( 'Contact Us', 'twentynineteen' ) . '
', '
', '', ) ), ) ); // Services. register_block_pattern( 'twentynineteen/services', array( 'title' => esc_html__( 'Services', 'twentynineteen' ), 'categories' => array( 'twentynineteen' ), 'content' => implode( '', array( '', '

' . esc_html__( 'Services', 'twentynineteen' ) . '

', '', '', '
', '
', '
' . esc_attr__( 'Gradient', 'twentynineteen' ) . '
', '

' . esc_html__( 'Website Design', 'twentynineteen' ) . '

', '
', '', '', '
' . esc_attr__( 'Gradient', 'twentynineteen' ) . '
', '

' . esc_html__( 'Mobile', 'twentynineteen' ) . '

', '
', '', '', '
' . esc_attr__( 'Gradient', 'twentynineteen' ) . '
', '

' . esc_html__( 'Social Media', 'twentynineteen' ) . '

', '
', '
', '', '', '
', '
' . esc_attr__( 'Gradient', 'twentynineteen' ) . '
', '

' . esc_html__( 'Marketing', 'twentynineteen' ) . '

', '
', '', '', '
' . esc_attr__( 'Gradient', 'twentynineteen' ) . '
', '

' . esc_html__( 'Copywriting', 'twentynineteen' ) . '

', '
', '', '', '
' . esc_attr__( 'Gradient', 'twentynineteen' ) . '
', '

' . esc_html__( 'Content Strategy', 'twentynineteen' ) . '

', '
', '
', '
', '', ) ), ) ); // Team. register_block_pattern( 'twentynineteen/team', array( 'title' => esc_html__( 'Team', 'twentynineteen' ), 'categories' => array( 'twentynineteen' ), 'viewportWidth' => 1400, 'content' => implode( '', array( '', '

' . esc_html__( 'Team', 'twentynineteen' ) . '

', '', '', '
' . esc_attr__( 'Gradient', 'twentynineteen' ) . '
', '

' . esc_html__( 'Eva Young', 'twentynineteen' ) . '

', '', '', '

' . esc_html__( 'Eva Young grew up working alongside her parents at their restaurant in Queens, NY. She opened Eva Young Consulting in 2014 to help small businesses like her parents’ restaurant adapt to the digital age.', 'twentynineteen' ) . '

', '
', '', '', '
' . esc_attr__( 'Gradient', 'twentynineteen' ) . '
', '

' . esc_html__( 'Doug Watson', 'twentynineteen' ) . '

', '', '', '

' . esc_html__( 'Oddly enough, Doug Watson also grew up working alongside his parents at a family-owned restaurant in Queens, NY. He  worked on digital campaigns for Fortune 500 Companies before joining Eva Green Consulting.', 'twentynineteen' ) . '

', '
', '', ) ), ) ); // What We Do. register_block_pattern( 'twentynineteen/what-we-do', array( 'title' => esc_html__( 'What We Do', 'twentynineteen' ), 'categories' => array( 'twentynineteen' ), 'viewportWidth' => 1400, 'content' => implode( '', array( '', '

' . esc_html__( 'What We Do', 'twentynineteen' ) . '

', '', '', '

' . esc_html__( 'Redefine brands', 'twentynineteen' ) . '

' . esc_html__( 'We help startups define (or refine) a clear brand identity.', 'twentynineteen' ) . '
', '', '', '

' . esc_html__( 'Activate new customers', 'twentynineteen' ) . '

' . esc_html__( 'We help businesses grow.', 'twentynineteen' ) . '
', '', '', '

' . esc_html__( 'Spark interest on social media', 'twentynineteen' ) . '

' . esc_html__( 'We help companies communicate with their customers.', 'twentynineteen' ) . '
', '', ) ), ) ); } PKH5\ menu-functions.phpnuW+Atheme_location && 0 === $depth && in_array( 'menu-item-has-children', $item->classes, true ) ) { // Add toggle button. $output .= ''; } return $output; } add_filter( 'walker_nav_menu_start_el', 'twenty_twenty_one_add_sub_menu_toggle', 10, 4 ); /** * Detects the social network from a URL and returns the SVG code for its icon. * * @since Twenty Twenty-One 1.0 * * @param string $uri Social link. * @param int $size The icon size in pixels. * @return string */ function twenty_twenty_one_get_social_link_svg( $uri, $size = 24 ) { return Twenty_Twenty_One_SVG_Icons::get_social_link_svg( $uri, $size ); } /** * Displays SVG icons in the footer navigation. * * @since Twenty Twenty-One 1.0 * * @param string $item_output The menu item's starting HTML output. * @param WP_Post $item Menu item data object. * @param int $depth Depth of the menu. Used for padding. * @param stdClass $args An object of wp_nav_menu() arguments. * @return string The menu item output with social icon. */ function twenty_twenty_one_nav_menu_social_icons( $item_output, $item, $depth, $args ) { // Change SVG icon inside social links menu if there is supported URL. if ( 'footer' === $args->theme_location ) { $svg = twenty_twenty_one_get_social_link_svg( $item->url, 24 ); if ( ! empty( $svg ) ) { $item_output = str_replace( $args->link_before, $svg, $item_output ); } } return $item_output; } add_filter( 'walker_nav_menu_start_el', 'twenty_twenty_one_nav_menu_social_icons', 10, 4 ); /** * Filters the arguments for a single nav menu item. * * @since Twenty Twenty-One 1.0 * * @param stdClass $args An object of wp_nav_menu() arguments. * @param WP_Post $item Menu item data object. * @param int $depth Depth of menu item. Used for padding. * @return stdClass */ function twenty_twenty_one_add_menu_description_args( $args, $item, $depth ) { if ( '' !== $args->link_after ) { $args->link_after = ''; } if ( 0 === $depth && isset( $item->description ) && $item->description ) { // The extra element is here for styling purposes: Allows the description to not be underlined on hover. $args->link_after = ''; } return $args; } add_filter( 'nav_menu_item_args', 'twenty_twenty_one_add_menu_description_args', 10, 3 ); PKH5\ block-styles.phpnuW+A 'twentytwentyone-columns-overlap', 'label' => esc_html__( 'Overlap', 'twentytwentyone' ), ) ); // Cover: Borders. register_block_style( 'core/cover', array( 'name' => 'twentytwentyone-border', 'label' => esc_html__( 'Borders', 'twentytwentyone' ), ) ); // Group: Borders. register_block_style( 'core/group', array( 'name' => 'twentytwentyone-border', 'label' => esc_html__( 'Borders', 'twentytwentyone' ), ) ); // Image: Borders. register_block_style( 'core/image', array( 'name' => 'twentytwentyone-border', 'label' => esc_html__( 'Borders', 'twentytwentyone' ), ) ); // Image: Frame. register_block_style( 'core/image', array( 'name' => 'twentytwentyone-image-frame', 'label' => esc_html__( 'Frame', 'twentytwentyone' ), ) ); // Latest Posts: Dividers. register_block_style( 'core/latest-posts', array( 'name' => 'twentytwentyone-latest-posts-dividers', 'label' => esc_html__( 'Dividers', 'twentytwentyone' ), ) ); // Latest Posts: Borders. register_block_style( 'core/latest-posts', array( 'name' => 'twentytwentyone-latest-posts-borders', 'label' => esc_html__( 'Borders', 'twentytwentyone' ), ) ); // Media & Text: Borders. register_block_style( 'core/media-text', array( 'name' => 'twentytwentyone-border', 'label' => esc_html__( 'Borders', 'twentytwentyone' ), ) ); // Separator: Thick. register_block_style( 'core/separator', array( 'name' => 'twentytwentyone-separator-thick', 'label' => esc_html__( 'Thick', 'twentytwentyone' ), ) ); // Social icons: Dark gray color. register_block_style( 'core/social-links', array( 'name' => 'twentytwentyone-social-icons-color', 'label' => esc_html__( 'Dark gray', 'twentytwentyone' ), ) ); } add_action( 'init', 'twenty_twenty_one_register_block_styles' ); } PKH5\hXIddtemplate-tags.phpnuW+A%2$s'; if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { $time_string = ''; } $time_string = sprintf( $time_string, esc_attr( get_the_date( DATE_W3C ) ), esc_html( get_the_date() ), esc_attr( get_the_modified_date( DATE_W3C ) ), esc_html( get_the_modified_date() ) ); printf( '%1$s%3$s', twentynineteen_get_icon_svg( 'watch', 16 ), esc_url( get_permalink() ), $time_string ); } endif; if ( ! function_exists( 'twentynineteen_posted_by' ) ) : /** * Prints HTML with meta information about theme author. */ function twentynineteen_posted_by() { printf( /* translators: 1: SVG icon. 2: Post author, only visible to screen readers. 3: Author link. */ '%1$s%2$s%4$s', twentynineteen_get_icon_svg( 'person', 16 ), /* translators: Hidden accessibility text. */ __( 'Posted by', 'twentynineteen' ), esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), esc_html( get_the_author() ) ); } endif; if ( ! function_exists( 'twentynineteen_comment_count' ) ) : /** * Prints HTML with the comment count for the current post. */ function twentynineteen_comment_count() { if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) { echo ''; echo twentynineteen_get_icon_svg( 'comment', 16 ); /* translators: %s: Post title. Only visible to screen readers. */ comments_popup_link( sprintf( __( 'Leave a comment on %s', 'twentynineteen' ), get_the_title() ) ); echo ''; } } endif; if ( ! function_exists( 'twentynineteen_entry_footer' ) ) : /** * Prints HTML with meta information for the categories, tags and comments. */ function twentynineteen_entry_footer() { // Hide author, post date, category and tag text for pages. if ( 'post' === get_post_type() ) { // Posted by. twentynineteen_posted_by(); // Posted on. twentynineteen_posted_on(); $categories_list = get_the_category_list( wp_get_list_item_separator() ); if ( $categories_list ) { printf( /* translators: 1: SVG icon. 2: Posted in label, only visible to screen readers. 3: List of categories. */ '%1$s%2$s%3$s', twentynineteen_get_icon_svg( 'archive', 16 ), /* translators: Hidden accessibility text. */ __( 'Posted in', 'twentynineteen' ), $categories_list ); } $tags_list = get_the_tag_list( '', wp_get_list_item_separator() ); if ( $tags_list && ! is_wp_error( $tags_list ) ) { printf( /* translators: 1: SVG icon. 2: Posted in label, only visible to screen readers. 3: List of tags. */ '%1$s%2$s %3$s', twentynineteen_get_icon_svg( 'tag', 16 ), /* translators: Hidden accessibility text. */ __( 'Tags:', 'twentynineteen' ), $tags_list ); } } // Comment count. if ( ! is_singular() ) { twentynineteen_comment_count(); } // Edit post link. edit_post_link( sprintf( wp_kses( /* translators: %s: Post title. Only visible to screen readers. */ __( 'Edit %s', 'twentynineteen' ), array( 'span' => array( 'class' => array(), ), ) ), get_the_title() ), '' . twentynineteen_get_icon_svg( 'edit', 16 ), '' ); } endif; if ( ! function_exists( 'twentynineteen_post_thumbnail' ) ) : /** * Displays an optional post thumbnail. * * Wraps the post thumbnail in an anchor element on index views, or a div * element when on single views. */ function twentynineteen_post_thumbnail() { if ( ! twentynineteen_can_show_post_thumbnail() ) { return; } if ( is_singular() ) : ?>
%s', get_avatar( $id_or_email, twentynineteen_get_avatar_size() ) ); } endif; if ( ! function_exists( 'twentynineteen_discussion_avatars_list' ) ) : /** * Displays a list of avatars involved in a discussion for a given post. */ function twentynineteen_discussion_avatars_list( $comment_authors ) { if ( empty( $comment_authors ) ) { return; } echo '
    ', "\n"; foreach ( $comment_authors as $id_or_email ) { printf( "
  1. %s
  2. \n", twentynineteen_get_user_avatar_markup( $id_or_email ) ); } echo '
', "\n"; } endif; if ( ! function_exists( 'twentynineteen_comment_form' ) ) : /** * Displays the comment form. */ function twentynineteen_comment_form( $order ) { if ( true === $order || strtolower( $order ) === strtolower( get_option( 'comment_order', 'asc' ) ) ) { comment_form( array( 'title_reply' => null, ) ); } } endif; if ( ! function_exists( 'twentynineteen_the_posts_navigation' ) ) : /** * Displays the next and previous posts navigation. */ function twentynineteen_the_posts_navigation() { $order = get_query_var( 'order', 'DESC' ); $new_posts_text = __( 'Newer posts', 'twentynineteen' ); $old_posts_text = __( 'Older posts', 'twentynineteen' ); the_posts_pagination( array( 'mid_size' => 2, 'prev_text' => sprintf( '%s %s', twentynineteen_get_icon_svg( 'chevron_left', 22 ), ( 'DESC' === $order ) ? $new_posts_text : $old_posts_text ), 'next_text' => sprintf( '%s %s', ( 'DESC' === $order ) ? $old_posts_text : $new_posts_text, twentynineteen_get_icon_svg( 'chevron_right', 22 ) ), ) ); } endif; if ( ! function_exists( 'wp_body_open' ) ) : /** * Fires the wp_body_open action. * * Added for backward compatibility to support pre-5.2.0 WordPress versions. * * @since Twenty Nineteen 1.4 */ function wp_body_open() { /** * Triggered after the opening tag. * * @since Twenty Nineteen 1.4 */ do_action( 'wp_body_open' ); } endif; PKH5\AGW($($custom-css.phpnuW+A $props ) { foreach ( $props as $key => $definitions ) { foreach ( $definitions as $property => $elements ) { /* * If we don't have an elements array or it is empty * then skip this iteration early; */ if ( ! is_array( $elements ) || empty( $elements ) ) { continue; } $val = twentytwenty_get_color_for_area( $context, $key ); if ( $val ) { twentytwenty_generate_css( implode( ',', $elements ), $property, $val ); } } } } if ( $cover && $cover !== $cover_default ) { twentytwenty_generate_css( '.overlay-header .header-inner', 'color', $cover ); twentytwenty_generate_css( '.cover-header .entry-header *', 'color', $cover ); } // Block Editor Styles. } elseif ( 'block-editor' === $type ) { // Colors. // Accent color. if ( $accent && $accent !== $accent_default ) { twentytwenty_generate_css( ':root .has-accent-color, .editor-styles-wrapper a, .editor-styles-wrapper .has-drop-cap:not(:focus)::first-letter, .editor-styles-wrapper .wp-block-button.is-style-outline .wp-block-button__link, .editor-styles-wrapper .wp-block-pullquote::before, .editor-styles-wrapper .wp-block-file .wp-block-file__textlink', 'color', $accent ); twentytwenty_generate_css( '.editor-styles-wrapper .wp-block-quote', 'border-color', $accent, '' ); twentytwenty_generate_css( '.has-accent-background-color, .editor-styles-wrapper .wp-block-button__link, .editor-styles-wrapper .wp-block-file__button', 'background-color', $accent ); } // Background color. if ( $background && $background !== $background_default ) { twentytwenty_generate_css( '.editor-styles-wrapper', 'background-color', '#' . $background ); twentytwenty_generate_css( '.has-background.has-primary-background-color:not(.has-text-color),.has-background.has-primary-background-color *:not(.has-text-color),.has-background.has-accent-background-color:not(.has-text-color),.has-background.has-accent-background-color *:not(.has-text-color)', 'color', '#' . $background ); } // Borders color. if ( $borders && $borders !== $borders_default ) { twentytwenty_generate_css( '.editor-styles-wrapper .wp-block-code, .editor-styles-wrapper pre, .editor-styles-wrapper .wp-block-preformatted pre, .editor-styles-wrapper .wp-block-verse pre, .editor-styles-wrapper fieldset, .editor-styles-wrapper .wp-block-table, .editor-styles-wrapper .wp-block-table *, .editor-styles-wrapper .wp-block-table.is-style-stripes, .editor-styles-wrapper .wp-block-latest-posts.is-grid li', 'border-color', $borders ); twentytwenty_generate_css( '.editor-styles-wrapper .wp-block-table caption, .editor-styles-wrapper .wp-block-table.is-style-stripes tbody tr:nth-child(odd)', 'background-color', $borders ); } // Text color. if ( $body && $body !== $body_default ) { twentytwenty_generate_css( 'html .editor-styles-wrapper, .editor-post-title__block .editor-post-title__input, .editor-post-title__block .editor-post-title__input:focus', 'color', $body ); } // Secondary color. if ( $secondary && $secondary !== $secondary_default ) { twentytwenty_generate_css( '.editor-styles-wrapper figcaption, .editor-styles-wrapper cite, .editor-styles-wrapper .wp-block-quote__citation, .editor-styles-wrapper .wp-block-quote cite, .editor-styles-wrapper .wp-block-quote footer, .editor-styles-wrapper .wp-block-pullquote__citation, .editor-styles-wrapper .wp-block-pullquote cite, .editor-styles-wrapper .wp-block-pullquote footer, .editor-styles-wrapper ul.wp-block-archives li, .editor-styles-wrapper ul.wp-block-categories li, .editor-styles-wrapper ul.wp-block-latest-posts li, .editor-styles-wrapper ul.wp-block-categories__list li, .editor-styles-wrapper .wp-block-latest-comments time, .editor-styles-wrapper .wp-block-latest-posts time', 'color', $secondary ); } // Header Footer Background Color. if ( $header_footer_background && $header_footer_background !== $header_footer_background_default ) { twentytwenty_generate_css( '.editor-styles-wrapper .wp-block-pullquote::before', 'background-color', $header_footer_background ); } } elseif ( 'classic-editor' === $type ) { // Colors. // Accent color. if ( $accent && $accent !== $accent_default ) { twentytwenty_generate_css( 'body#tinymce.wp-editor.content a, body#tinymce.wp-editor.content a:focus, body#tinymce.wp-editor.content a:hover', 'color', $accent ); twentytwenty_generate_css( 'body#tinymce.wp-editor.content blockquote, body#tinymce.wp-editor.content .wp-block-quote', 'border-color', $accent, '', ' !important' ); twentytwenty_generate_css( 'body#tinymce.wp-editor.content button, body#tinymce.wp-editor.content .faux-button, body#tinymce.wp-editor.content .wp-block-button__link, body#tinymce.wp-editor.content .wp-block-file__button, body#tinymce.wp-editor.content input[type=\'button\'], body#tinymce.wp-editor.content input[type=\'reset\'], body#tinymce.wp-editor.content input[type=\'submit\']', 'background-color', $accent ); } // Background color. if ( $background && $background !== $background_default ) { twentytwenty_generate_css( 'body#tinymce.wp-editor.content', 'background-color', '#' . $background ); } // Text color. if ( $body && $body !== $body_default ) { twentytwenty_generate_css( 'body#tinymce.wp-editor.content', 'color', $body ); } // Secondary color. if ( $secondary && $secondary !== $secondary_default ) { twentytwenty_generate_css( 'body#tinymce.wp-editor.content hr:not(.is-style-dots), body#tinymce.wp-editor.content cite, body#tinymce.wp-editor.content figcaption, body#tinymce.wp-editor.content .wp-caption-text, body#tinymce.wp-editor.content .wp-caption-dd, body#tinymce.wp-editor.content .gallery-caption', 'color', $secondary ); } // Borders color. if ( $borders && $borders !== $borders_default ) { twentytwenty_generate_css( 'body#tinymce.wp-editor.content pre, body#tinymce.wp-editor.content hr, body#tinymce.wp-editor.content fieldset,body#tinymce.wp-editor.content input, body#tinymce.wp-editor.content textarea', 'border-color', $borders ); } } // Return the results. return ob_get_clean(); } } PK array( 'class' => true, 'xmlns' => true, 'width' => true, 'height' => true, 'viewbox' => true, 'aria-hidden' => true, 'role' => true, 'focusable' => true, ), 'path' => array( 'fill' => true, 'fill-rule' => true, 'd' => true, 'transform' => true, ), 'polygon' => array( 'fill' => true, 'fill-rule' => true, 'points' => true, 'transform' => true, 'focusable' => true, ), ) ); if ( ! $svg ) { return false; } return $svg; } } PKQH\[  icon-functions.phpnuW+Atheme_location ) { $svg = twentynineteen_get_social_link_svg( $item->url, 32 ); if ( empty( $svg ) ) { $svg = twentynineteen_get_icon_svg( 'link' ); } $item_output = str_replace( $args->link_after, '
' . $svg, $item_output ); } return $item_output; } add_filter( 'walker_nav_menu_start_el', 'twentynineteen_nav_menu_social_icons', 10, 4 ); /** * Adds a dropdown icon to top-level menu items. * * @param string $item_output The menu item's starting HTML output. * @param WP_Post $item Menu item data object. * @param int $depth Depth of the menu. Used for padding. * @param stdClass $args An object of wp_nav_menu() arguments. * @return string Nav menu item start element. */ function twentynineteen_add_dropdown_icons( $item_output, $item, $depth, $args ) { // Only add class to 'top level' items on the 'primary' menu. if ( ! isset( $args->theme_location ) || 'menu-1' !== $args->theme_location ) { return $item_output; } if ( in_array( 'mobile-parent-nav-menu-item', $item->classes, true ) && isset( $item->original_id ) ) { // Inject the keyboard_arrow_left SVG inside the parent nav menu item, and let the item link to the parent item. // @todo Only do this for nested submenus? If on a first-level submenu, then really the link could be "#" since the desire is to remove the target entirely. $link = sprintf( '. $item_output = preg_replace( '##i', '', $item_output, 1 // Limit. ); } elseif ( in_array( 'menu-item-has-children', $item->classes, true ) ) { // Add SVG icon to parent items. $icon = twentynineteen_get_icon_svg( 'keyboard_arrow_down', 24 ); $item_output .= sprintf( '', $icon ); } return $item_output; } add_filter( 'walker_nav_menu_start_el', 'twentynineteen_add_dropdown_icons', 10, 4 ); PKQH\^^helper-functions.phpnuW+Auser_id > 0 ) { $user = get_userdata( $comment->user_id ); $post = get_post( $comment->comment_post_ID ); if ( ! empty( $user ) && ! empty( $post ) ) { return $comment->user_id === $post->post_author; } } return false; } /** * Returns information about the current post's discussion, with cache support. */ function twentynineteen_get_discussion_data() { static $discussion, $post_id; $current_post_id = get_the_ID(); if ( $current_post_id === $post_id ) { return $discussion; /* If we have discussion information for post ID, return cached object */ } else { $post_id = $current_post_id; } $comments = get_comments( array( 'post_id' => $current_post_id, 'orderby' => 'comment_date_gmt', 'order' => get_option( 'comment_order', 'asc' ), /* Respect comment order from Settings » Discussion. */ 'status' => 'approve', 'number' => 20, /* Only retrieve the last 20 comments, as the end goal is just 6 unique authors */ ) ); $authors = array(); foreach ( $comments as $comment ) { $authors[] = ( (int) $comment->user_id > 0 ) ? (int) $comment->user_id : $comment->comment_author_email; } $authors = array_unique( $authors ); $discussion = (object) array( 'authors' => array_slice( $authors, 0, 6 ), /* Six unique authors commenting on the post. */ 'responses' => get_comments_number( $current_post_id ), /* Number of responses. */ ); return $discussion; } /** * Converts HSL to HEX or RGB colors. * * @param float $h The hue component (0-360). * @param float $s The saturation component (0-100). * @param float $l The lightness component (0-100). * @param bool $to_hex Whether to convert to HEX format (true) or RGB (false). Default true. */ function twentynineteen_hsl_hex( $h, $s, $l, $to_hex = true ) { $h /= 360; $s /= 100; $l /= 100; $r = $l; $g = $l; $b = $l; $v = ( $l <= 0.5 ) ? ( $l * ( 1.0 + $s ) ) : ( $l + $s - $l * $s ); if ( $v > 0 ) { $m = $l + $l - $v; $sv = ( $v - $m ) / $v; $h *= 6.0; $sextant = floor( $h ); $fract = $h - $sextant; $vsf = $v * $sv * $fract; $mid1 = $m + $vsf; $mid2 = $v - $vsf; switch ( $sextant ) { case 0: $r = $v; $g = $mid1; $b = $m; break; case 1: $r = $mid2; $g = $v; $b = $m; break; case 2: $r = $m; $g = $v; $b = $mid1; break; case 3: $r = $m; $g = $mid2; $b = $v; break; case 4: $r = $mid1; $g = $m; $b = $v; break; case 5: $r = $v; $g = $m; $b = $mid2; break; } } $r = round( $r * 255, 0 ); $g = round( $g * 255, 0 ); $b = round( $b * 255, 0 ); if ( $to_hex ) { $r = ( $r < 15 ) ? '0' . dechex( $r ) : dechex( $r ); $g = ( $g < 15 ) ? '0' . dechex( $g ) : dechex( $g ); $b = ( $b < 15 ) ? '0' . dechex( $b ) : dechex( $b ); return "#$r$g$b"; } return "rgb($r, $g, $b)"; } PKQH\++color-patterns.phpnuW+A .has-primary-background-color, .entry .entry-content > *[class^="wp-block-"].has-primary-background-color, .entry .entry-content > *[class^="wp-block-"] .has-primary-background-color, .entry .entry-content > *[class^="wp-block-"].is-style-solid-color, .entry .entry-content > *[class^="wp-block-"].is-style-solid-color.has-primary-background-color, .entry .entry-content .wp-block-file .wp-block-file__button { background-color: hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness . ' ); /* base: #0073a8; */ } /* * Set Color for: * - all links * - main navigation links * - Post navigation links * - Post entry meta hover * - Post entry header more-link hover * - main navigation svg * - comment navigation * - Comment edit link hover * - Site Footer Link hover * - Widget links */ a, a:visited, .main-navigation .main-menu > li, .main-navigation ul.main-menu > li > a, .post-navigation .post-title, .entry .entry-meta a:hover, .entry .entry-footer a:hover, .entry .entry-content .more-link:hover, .main-navigation .main-menu > li > a + svg, .comment .comment-metadata > a:hover, .comment .comment-metadata .comment-edit-link:hover, #colophon .site-info a:hover, .widget a, .entry .entry-content .wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color), .entry .entry-content > .has-primary-color, .entry .entry-content > *[class^="wp-block-"] .has-primary-color, .entry .entry-content > *[class^="wp-block-"].is-style-solid-color blockquote.has-primary-color, .entry .entry-content > *[class^="wp-block-"].is-style-solid-color blockquote.has-primary-color p { color: hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness . ' ); /* base: #0073a8; */ } /* * Set border color for: * wp block quote * :focus */ blockquote, .entry .entry-content blockquote, .entry .entry-content .wp-block-quote:not(.is-large), .entry .entry-content .wp-block-quote:not(.is-style-large), input[type="text"]:focus, input[type="email"]:focus, input[type="url"]:focus, input[type="password"]:focus, input[type="search"]:focus, input[type="number"]:focus, input[type="tel"]:focus, input[type="range"]:focus, input[type="date"]:focus, input[type="month"]:focus, input[type="week"]:focus, input[type="time"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="color"]:focus, textarea:focus { border-color: hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness . ' ); /* base: #0073a8; */ } .gallery-item > div > a:focus { box-shadow: 0 0 0 2px hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness . ' ); /* base: #0073a8; */ } /* Hover colors */ a:hover, a:active, .main-navigation .main-menu > li > a:hover, .main-navigation .main-menu > li > a:hover + svg, .post-navigation .nav-links a:hover, .post-navigation .nav-links a:hover .post-title, .author-bio .author-description .author-link:hover, .entry .entry-content > .has-secondary-color, .entry .entry-content > *[class^="wp-block-"] .has-secondary-color, .entry .entry-content > *[class^="wp-block-"].is-style-solid-color blockquote.has-secondary-color, .entry .entry-content > *[class^="wp-block-"].is-style-solid-color blockquote.has-secondary-color p, .comment .comment-author .fn a:hover, .comment-reply-link:hover, .comment-navigation .nav-previous a:hover, .comment-navigation .nav-next a:hover, #cancel-comment-reply-link:hover, .widget a:hover { color: hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness_hover . ' ); /* base: #005177; */ } .main-navigation .sub-menu > li > a:hover, .main-navigation .sub-menu > li > a:focus, .main-navigation .sub-menu > li > a:hover:after, .main-navigation .sub-menu > li > a:focus:after, .main-navigation .sub-menu > li > .menu-item-link-return:hover, .main-navigation .sub-menu > li > .menu-item-link-return:focus, .main-navigation .sub-menu > li > a:not(.submenu-expand):hover, .main-navigation .sub-menu > li > a:not(.submenu-expand):focus, .entry .entry-content > .has-secondary-background-color, .entry .entry-content > *[class^="wp-block-"].has-secondary-background-color, .entry .entry-content > *[class^="wp-block-"] .has-secondary-background-color, .entry .entry-content > *[class^="wp-block-"].is-style-solid-color.has-secondary-background-color { background-color: hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness_hover . ' ); /* base: #005177; */ } /* Text selection colors */ ::selection { background-color: hsl( ' . $primary_color . ', ' . $saturation_selection . ', ' . $lightness_selection . ' ); /* base: #005177; */ } ::-moz-selection { background-color: hsl( ' . $primary_color . ', ' . $saturation_selection . ', ' . $lightness_selection . ' ); /* base: #005177; */ }'; $editor_css = ' /* * Set colors for: * - links * - blockquote * - pullquote (solid color) * - buttons, including buttons in the file and search blocks. */ .editor-styles-wrapper .wp-block a, .editor-styles-wrapper .wp-block .wp-block-file .wp-block-file__textlink, /* Before 5.8 */ .editor-styles-wrapper .wp-block .wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color), /* Before 5.8 */ .editor-styles-wrapper .wp-block.wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color), /* Before 5.8, the following hover style is needed to override the default color when the block is selected. */ .editor-styles-wrapper .wp-block .wp-block-button.is-style-outline:hover .wp-block-button__link:not(.has-text-color) { color: hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness . ' ); /* base: #0073a8; */ } .editor-styles-wrapper .wp-block.wp-block-quote:not(.is-large):not(.is-style-large), .editor-styles-wrapper .wp-block .wp-block-freeform blockquote, /* Before 5.8 */ .editor-styles-wrapper .wp-block.wp-block-freeform blockquote { border-color: hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness . ' ); /* base: #0073a8; */ } /* Pullquote: The solid color variation was removed in 5.9, the CSS is kept for backwards compatibility. */ .editor-styles-wrapper .wp-block .wp-block-pullquote.is-style-solid-color:not(.has-background-color), /* Before 5.8 */ .editor-styles-wrapper .wp-block.wp-block-pullquote.is-style-solid-color:not(.has-background-color), .editor-styles-wrapper .wp-block .wp-block-file .wp-block-file__button, /* Before 5.8, and when the block is aligned. */ .editor-styles-wrapper .wp-block.wp-block-file .wp-block-file__button, .editor-styles-wrapper .wp-block .wp-block-button:not(.is-style-outline) .wp-block-button__link, .editor-styles-wrapper .wp-block .wp-block-search .wp-block-search__button, /* Before 5.8, and when the block is aligned. */ .editor-styles-wrapper .wp-block.wp-block-search .wp-block-search__button { background-color: hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness . ' ); /* base: #0073a8; */ } /* Link hover colors */ .editor-styles-wrapper .wp-block a:hover, .editor-styles-wrapper .wp-block a:active, .editor-styles-wrapper .wp-block.wp-block-file .wp-block-file__textlink:hover { color: hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness_hover . ' ); /* base: #005177; */ } /* Do not overwrite solid color pullquote or cover links */ .editor-styles-wrapper .wp-block .wp-block-pullquote.is-style-solid-color a, /* Before 5.8 */ .editor-styles-wrapper .wp-block.wp-block-pullquote.is-style-solid-color a, .editor-styles-wrapper .wp-block.wp-block-cover a { color: inherit; } '; if ( function_exists( 'register_block_type' ) && is_admin() ) { $theme_css = $editor_css; } /** * Filters Twenty Nineteen custom colors CSS. * * @since Twenty Nineteen 1.0 * * @param string $css Base theme colors CSS. * @param int $primary_color The user's selected color hue. * @param string $saturation Filtered theme color saturation level. */ return apply_filters( 'twentynineteen_custom_colors_css', $theme_css, $primary_color, $saturation ); } PKQH\@FFcustomizer.phpnuW+Aget_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; if ( isset( $wp_customize->selective_refresh ) ) { $wp_customize->selective_refresh->add_partial( 'blogname', array( 'selector' => '.site-title a', 'render_callback' => 'twentynineteen_customize_partial_blogname', ) ); $wp_customize->selective_refresh->add_partial( 'blogdescription', array( 'selector' => '.site-description', 'render_callback' => 'twentynineteen_customize_partial_blogdescription', ) ); } /** * Primary color. */ $wp_customize->add_setting( 'primary_color', array( 'default' => 'default', 'transport' => 'postMessage', 'sanitize_callback' => 'twentynineteen_sanitize_color_option', ) ); $wp_customize->add_control( 'primary_color', array( 'type' => 'radio', 'label' => __( 'Primary Color', 'twentynineteen' ), 'choices' => array( 'default' => _x( 'Default', 'primary color', 'twentynineteen' ), 'custom' => _x( 'Custom', 'primary color', 'twentynineteen' ), ), 'section' => 'colors', 'priority' => 5, ) ); // Add primary color hue setting and control. $wp_customize->add_setting( 'primary_color_hue', array( 'default' => 199, 'transport' => 'postMessage', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'primary_color_hue', array( 'label' => __( 'Custom Color', 'twentynineteen' ), 'description' => __( 'Apply a custom color for buttons, links, featured images, etc.', 'twentynineteen' ), 'section' => 'colors', 'mode' => 'hue', ) ) ); // Add image filter setting and control. $wp_customize->add_setting( 'image_filter', array( 'default' => 1, 'sanitize_callback' => 'absint', 'transport' => 'postMessage', ) ); $wp_customize->add_control( 'image_filter', array( 'label' => __( 'Apply a filter to featured images using the primary color', 'twentynineteen' ), 'section' => 'colors', 'type' => 'checkbox', ) ); } add_action( 'customize_register', 'twentynineteen_customize_register' ); /** * Renders the site title for the selective refresh partial. * * @return void */ function twentynineteen_customize_partial_blogname() { bloginfo( 'name' ); } /** * Renders the site tagline for the selective refresh partial. * * @return void */ function twentynineteen_customize_partial_blogdescription() { bloginfo( 'description' ); } /** * Binds JS handlers to instantly live-preview changes. */ function twentynineteen_customize_preview_js() { wp_enqueue_script( 'twentynineteen-customize-preview', get_theme_file_uri( '/js/customize-preview.js' ), array( 'customize-preview' ), '20181214', array( 'in_footer' => true ) ); } add_action( 'customize_preview_init', 'twentynineteen_customize_preview_js' ); /** * Loads dynamic logic for the customizer controls area. */ function twentynineteen_panels_js() { wp_enqueue_script( 'twentynineteen-customize-controls', get_theme_file_uri( '/js/customize-controls.js' ), array(), '20250717', array( 'in_footer' => true ) ); } add_action( 'customize_controls_enqueue_scripts', 'twentynineteen_panels_js' ); /** * Sanitizes custom color choice. * * @param string $choice Whether image filter is active. * @return string Sanitized color option. */ function twentynineteen_sanitize_color_option( $choice ) { $valid = array( 'default', 'custom', ); if ( in_array( $choice, $valid, true ) ) { return $choice; } return 'default'; } PKR\". slabtext.phpnu[ '', "max_width" => '', "style" => 'slab-style-1', "el_class" => '', ), $atts) ); wp_enqueue_script( 'jquery-slabtext' ); if ( trim($text_rows) != '' ) { $txt_rows = json_decode(base64_decode($text_rows), true); } if ( !empty($max_width) ) { $el_style = 'max-width:' . esc_attr( $max_width ) . ';'; } $output = ''; $output .= '
'; $output .= '
'; if ( !empty( $txt_rows ) ) { foreach ($txt_rows as $key => $txt_row) { $output .= '' . do_shortcode( $txt_row['value'] ) . ''; } } $output .= '
'; $output .= '
'; return $output; } add_action( 'init', function () { add_shortcode('shrk_slabtext', 'shrk_sc_slabtext'); }); add_filter( 'shrk_filter_vc_mappings', function ( $shrk_vc_shortcodes ) { $shrk_vc_shortcodes["shrk_slabtext"] = array( "name" => esc_html__("Slab text", 'dvl-uxshop-shortcodes'), "base" => "shrk_slabtext", "category" => esc_html__('Theme Specific', 'dvl-uxshop-shortcodes'), "icon" => "icon-wpb-shrk", "show_settings_on_create" => true, "params" => array( array( "type" => "text_slides", "class" => "", "heading" => esc_html__("Add / remove text rows", 'dvl-uxshop-shortcodes'), "param_name" => "text_rows", "value" => "" ), array( "type" => "textfield", "heading" => esc_html__("Container max width", 'dvl-uxshop-shortcodes'), "param_name" => "max_width", "description" => esc_html__("Enter a (CSS) value to override the container\'s max width. For example you can enter '500px' or '75%'.", 'dvl-uxshop-shortcodes') ), array( "type" => "textfield", "heading" => esc_html__("Extra class name", 'dvl-uxshop-shortcodes'), "param_name" => "el_class", "description" => esc_html__("If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.", 'dvl-uxshop-shortcodes') ), ), 'js_view' => 'shrkSlabTextView', 'custom_markup' => '

'. esc_html__( "BigText: ", 'dvl-uxshop-shortcodes' ) .'

', ); return $shrk_vc_shortcodes; } ); function shrk_sc_slabtext_scripts() { ob_start(); ?>(function ( $ ) { if ( typeof(vc) !== 'undefined' ) { window.shrkSlabTextView = vc.shortcode_view.extend( { changeShortcodeParams: function ( model ) { var params, txt, $res; params = model.get( 'params' ); if ( _.isObject( params ) && _.isString( params.text_rows ) ) { txt = json_decode(atob(params.text_rows)); $res = this.$el.find( '> .wpb_element_wrapper [name="text_rows"]' ); $res.html(''); if ( txt ) { for (var i = 0; i < txt.length; i++) { $res.append( '
' + txt[i].value + '
' ); } } } } }); } })( window.jQuery );PKR\+istyled_map.phpnu[ '', 'coord' => '47.376848,8.535347', 'height' => 450, 'zoom' => 16, 'type' => 'ROADMAP', 'mapstyle' => 'theme', 'scrollwheel' => 'no', 'marker' => 'no', 'marker_icon' => '', 'infowindowtitle' => '', 'infowindowhtml' => '', 'el_class' => '' ), $atts)); //Enqueue google maps api script wp_enqueue_script( 'google-maps-api' ); if ( $marker_icon && trim( $marker_icon ) != '') { $marker_icon = wp_get_attachment_image_src( $marker_icon, 'full' ); $marker_icon = $marker_icon[0]; } if ( !empty( $coord ) ) { $data_atts[] = 'data-map-coord="' . esc_attr( $coord ) . '"'; } if ( !empty( $zoom ) ) { $data_atts[] = 'data-map-zoom="' . esc_attr( $zoom ) . '"'; } if ( !empty( $type ) ) { $data_atts[] = 'data-map-type="' . esc_attr( $type ) . '"'; } if ( !empty( $mapstyle ) ) { $data_atts[] = 'data-map-mapstyle="' . esc_attr( $mapstyle ) . '"'; } if ( !empty( $scrollwheel ) ) { $data_atts[] = 'data-map-scrollwheel="' . esc_attr( $scrollwheel ) . '"'; } if ( !empty( $marker ) ) { $data_atts[] = 'data-map-marker="' . esc_attr( $marker ) . '"'; } if ( !empty( $infowindowtitle ) ) { $data_atts[] = 'data-map-infowindowtitle="' . esc_attr( $infowindowtitle ) . '"'; } if ( !empty( $marker_icon ) ) { $data_atts[] = 'data-map-marker-icon="' . esc_url( $marker_icon ) . '"'; } $output .= '
'; if ( '' != trim( $title ) ) { $output .= '

' . esc_html( $title ) . '

'; } $output .= '
'; if ( '' != trim($infowindowhtml) && '' != trim(base64_decode($infowindowhtml)) ) { $output .= ''; } $output .= '
'; return $output; } add_action( 'init', function () { add_shortcode('shrk_styled_map', 'shrk_sc_styled_map'); }); add_filter( 'shrk_filter_vc_mappings', function ( $shrk_vc_shortcodes ) { global $allowedtags; $shrk_vc_shortcodes["shrk_styled_map"] = array( "name" => esc_html__("Styled Map", 'dvl-uxshop-shortcodes'), "base" => "shrk_styled_map", "category" => esc_html__('Theme Specific', 'dvl-uxshop-shortcodes'), "icon" => "icon-wpb-shrk", "show_settings_on_create" => true, "params" => array( array( "type" => "textfield", "heading" => esc_html__("Title", 'dvl-uxshop-shortcodes'), "param_name" => "title", "description" => esc_html__("What text to use as a map title. Leave blank if no title is needed.", 'dvl-uxshop-shortcodes') ), array( "type" => "textfield", "heading" => esc_html__("Map Height (px)", 'dvl-uxshop-shortcodes'), "param_name" => "height", "description" => esc_html__("The height of the map (in pixels)", 'dvl-uxshop-shortcodes'), "value" => "450", "save_always" => true ), array( "type" => "textfield", "heading" => esc_html__("Map Center", 'dvl-uxshop-shortcodes'), "param_name" => "coord", "description" => wp_kses( __("Coordinates in the form of latitude and longitude comma separated pair (for example: 51.509811, -0.114380 ). Get coordinates of an address", 'dvl-uxshop-shortcodes'), $allowedtags ) ), array( "type" => "dropdown", "heading" => esc_html__("Map Zoom level", 'dvl-uxshop-shortcodes'), "param_name" => "zoom", "description" => esc_html__("The map zoom level. The bigger the number the more zoom'ed in the map will be.", 'dvl-uxshop-shortcodes'), "value" => array( "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20" ) ), array( "type" => "dropdown", "heading" => esc_html__("Map type", 'dvl-uxshop-shortcodes'), "param_name" => "type", "value" => array( esc_html__("Roadmap", 'dvl-uxshop-shortcodes') => "ROADMAP", esc_html__("Satellite", 'dvl-uxshop-shortcodes') => "SATELLITE", esc_html__("Hybrid", 'dvl-uxshop-shortcodes') => "HYBRID", esc_html__("Terrain", 'dvl-uxshop-shortcodes') => "TERRAIN" ), "description" => esc_html__("Initial map type", 'dvl-uxshop-shortcodes') ), array( "type" => 'dropdown', "heading" => esc_html__("Show marker", 'dvl-uxshop-shortcodes'), "param_name" => "marker", "description" => esc_html__("Show a marker at the center of the map.", 'dvl-uxshop-shortcodes'), "value" => Array(esc_html__("Yes, show a marker", 'dvl-uxshop-shortcodes') => 'yes', esc_html__("No don't show a marker", 'dvl-uxshop-shortcodes') => 'no'), "save_always" => true ), array( "type" => "attach_image", "class" => "", "heading" => esc_html__("Marker icon", 'dvl-uxshop-shortcodes'), "description" => esc_html__("Select a custom icon for the marker", 'dvl-uxshop-shortcodes'), "param_name" => "marker_icon", "value" => '', ), array( "type" => "textfield", "heading" => esc_html__("Marker title", 'dvl-uxshop-shortcodes'), "param_name" => "infowindowtitle", "description" => esc_html__("The marker title. Leave empty if you don't need one.", 'dvl-uxshop-shortcodes'), "dependency" => Array('element' => "marker", 'value' => array('yes')) ), array( "type" => "textarea_raw_html", "heading" => esc_html__("Info Window Content", 'dvl-uxshop-shortcodes'), "param_name" => "infowindowhtml", "description" => esc_html__("The content of the info window that pops up when you click at the marker. You can use html. Leave empty for no info window.", 'dvl-uxshop-shortcodes'), "dependency" => Array('element' => "marker", 'value' => array('yes')) ), array( "type" => 'checkbox', "heading" => esc_html__("Scrollwheel zoom", 'dvl-uxshop-shortcodes'), "param_name" => "scrollwheel", "description" => esc_html__("Use mouse scrollwheel as zoom control, leave unchecked so that page scrolling doesn't interfere with the map.", 'dvl-uxshop-shortcodes'), "value" => Array(esc_html__("Yes", 'dvl-uxshop-shortcodes') => 'yes'), "save_always" => true, ), array( "type" => 'dropdown', "heading" => esc_html__("Applied Map style", 'dvl-uxshop-shortcodes'), "param_name" => "mapstyle", "description" => esc_html__("You can select between the default map style of the theme, the default (official) google maps style, or you can set up your own under 'theme options'\\'Advanced'.", 'dvl-uxshop-shortcodes'), "value" => Array( esc_html__("Theme map style", 'dvl-uxshop-shortcodes') => 'theme', esc_html__("Default map style (official)", 'dvl-uxshop-shortcodes') => 'default', esc_html__("Custom map style", 'dvl-uxshop-shortcodes') => 'custom' ) ), array( "type" => "textfield", "heading" => esc_html__("Extra class name", 'dvl-uxshop-shortcodes'), "param_name" => "el_class", "description" => esc_html__("If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.", 'dvl-uxshop-shortcodes') ) ) ); return $shrk_vc_shortcodes; } ); ?>PKR\ socialicons.phpnu[ '', 'link_colors' => 'normal', 'new_window' => false, 'css' => '' ), $atts) ); $social_networks = apply_filters( 'shrk-social-network-icons' , array( 'facebook' => 'ion-social-facebook', 'twitter' => 'ion-social-twitter', 'googleplus' => 'ion-social-googleplus', 'google' => 'ion-social-google', 'dribbble' => 'ion-social-dribbble', 'github' => 'ion-social-github', 'instagram' => 'ion-social-instagram', 'foursquare' => 'ion-social-foursquare', 'pinterest' => 'ion-social-pinterest', 'tumblr' => 'ion-social-tumblr', 'wordpress' => 'ion-social-wordpress', 'reddit' => 'ion-social-reddit', 'buffer' => 'ion-social-buffer', 'skype' => 'ion-social-skype', 'linkedin' => 'ion-social-linkedin', 'vimeo' => 'ion-social-vimeo', 'youtube' => 'ion-social-youtube', 'rss' => 'ion-social-rss', ) ); foreach ($social_networks as $network => $icon) { if ( !empty( $shrk_options['social_'.$network.'_url'] ) ) { $icons .= '
  • '; } } if ( $link_colors == 'inverted' ) { $class .= ' inv-link-colors'; } if ( function_exists( 'vc_shortcode_custom_css_class') ) { $class .= ' ' . apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class( $css, ' ' ), 'shrk_banner', $atts ); } if ( !empty($icons) ) { return ''; } else { return 'Social networks not specified.'; } } add_action( 'init', function () { add_shortcode('socialicons', 'shrk_sc_socialicons'); }); add_filter( 'shrk_filter_vc_mappings', function ( $shrk_vc_shortcodes ) { $shrk_vc_shortcodes["socialicons"] = array( "name" => esc_html__("Social Icons", 'dvl-uxshop-shortcodes'), "category" => esc_html__('Theme Specific', 'dvl-uxshop-shortcodes'), "description" => esc_html__('Show the social icons configured in the theme options.', 'dvl-uxshop-shortcodes'), "base" => "socialicons", "icon" => "icon-wpb-shrk", "show_settings_on_create" => false, "params" => array( array( 'type' => 'dropdown', 'heading' => esc_html__('Link colors', 'dvl-uxshop-shortcodes'), 'param_name' => 'link_colors', 'value' => array( esc_html__( 'Main Color / Secondary on hover', 'dvl-uxshop-shortcodes' ) => 'normal', esc_html__( 'Secondary Color / Main on hover', 'dvl-uxshop-shortcodes' ) => 'inverted', ) ), array( 'type' => 'css_editor', 'heading' => __( 'Css', 'dvl-uxshop-shortcodes' ), 'param_name' => 'css', 'group' => __( 'Design options', 'dvl-uxshop-shortcodes' ), ), ), ); return $shrk_vc_shortcodes; } ); ?>PKR\$ assets/js/video-popup.jsnu[(function($) { $('.shrk-video-popup').click(function(event) { event.preventDefault(); var id = $(this).attr('data-video-popup-id'); var url = $(this).attr('data-video-popup-url'); var autoplay = $(this).attr('data-video-autoplay'); // Add the video wrapper $('body').append('
    '); var $video_wrapper = $('.shrk-video-popup-wrapper[data-video-popup-id="'+id+'"]'); setTimeout(function(){ $video_wrapper.addClass('visible'); }, 0); data = { action: 'shrk_get_video_popup', video_url: url, video_autoplay: autoplay }; jQuery.post(shrk.ajax.ajaxurl, data, function(response) { $video_wrapper.append(response); $video_wrapper.find('iframe').addClass('shrk-video-popup-video'); shrk_resize_video_popup(); $video_wrapper.addClass('ready'); }); }); // Close Function function shrk_close_video_popup() { $('.shrk-video-popup-wrapper, .shrk-video-popup-video').fadeOut(200); setTimeout(function(){ $('.shrk-video-popup-wrapper').remove(); }, 200); } // Close on click $('body').on('click touchend', '.shrk-video-popup-wrapper', function(event) { event.stopPropagation(); shrk_close_video_popup(); }); // Close on Escape $(document).keyup(function(e) { if (e.keyCode == 27) { if ( $('.shrk-video-popup-wrapper').is(':visible') ) { shrk_close_video_popup(); } } }); function shrk_resize_video_popup() { var videoWidth, videoHeight, ratio; var $video = $('.shrk-video-popup-video'); if ( typeof( $video.data('video-ratio') ) === 'undefined' ) { videoWidth = $video.width(); videoHeight = $video.height(); ratio = videoWidth/videoHeight; $video.data('video-ratio', ratio); } $video.css({ 'width' : '80%' }); videoWidth = $video.width(); $video.height(videoWidth*0.5625); } $('.shrk-video-popup .thumbnail-bg').each(function () { var video_url = $(this).closest('.shrk-video-popup').attr('data-video-popup-url'); var $thumb = $(this); var thumb_url = false; if ( video_url.indexOf('youtube') !== -1 ) { var video_id = video_url.match(/(?:https?:\/{2})?(?:w{3}\.)?youtu(?:be)?\.(?:com|be)(?:\/watch\?v=|\/)([^\s&]+)/); if ( video_id !== null ) { thumb_url = 'https://i1.ytimg.com/vi/' + video_id[1] + '/0.jpg'; } if ( thumb_url ) { $thumb.css({ 'background-image': 'url('+thumb_url+')' }); } else { shrk.debug__log( 'Error getting video thumbnail for: ' + video_url ); } } else if ( video_url.indexOf('vimeo') !== -1 ) { $.ajax({ type:'GET', url: 'https://vimeo.com/api/oembed.json?url=' + encodeURIComponent(video_url), dataType: 'json', success: function(data) { thumb_url = data.thumbnail_url; if ( thumb_url ) { $thumb.css({ 'background-image': 'url('+thumb_url+')' }); } else { shrk.debug__log( 'Error getting video thumbnail for: ' + video_url ); } } }); } }); // Resize $(window).resize(function() { shrk_resize_video_popup(); }); })( jQuery );PKR\xz33 dropcap.phpnu[' . do_shortcode($content) . ''; } add_action( 'init', function () { add_shortcode('dropcap', 'shrk_sc_dropcap'); }); ?>PKR\VYoo ps-slider.phpnu[ false, 'slider_id' => null, 'swiper_mode' => 'horizontal', 'swiper_spv' => '1', //Slides per view 'swiper_effect' => 'slide', 'swiper_speed' => '5000', 'swiper_animation_speed' => '300', 'swiper_autoplay' => 'no', 'swiper_loop' => 'no', 'show_scrollbar' => 'no', 'hide_pagination' => 'no', 'slides_grid_width' => '12', // 12 = one per slide 'space_between_slides' => '0', 'partial_view' => 'no', 'partial_max_width' => '80%', 'slider_bg_color_inline' => '', 'swiper_controls_colors' => 'light', 'swiper_controls_transp' => 'no', 'arrows_hidden_xs' => 'no', 'pagination_only_xs' => 'no', 'swiper_breakpoints' => 'disable', ), $atts ); $slider_id = !empty( $atts['slider_id'] ) ? esc_attr( $atts['slider_id'] ) : false; if ( empty($content) ) { $content = '

    ' . esc_html__('Your Sections Slider has no sections in it!', 'dvl-uxshop-shortcodes') . '

    '; } if ( !function_exists( 'shrk_sc_swiper_get_atts' ) ) { return '
    ' . esc_html__('Your theme does not support the pagesections slider.', 'dvl-uxshop-shortcodes') . '
    '; } ob_start(); echo '
    '; echo '
    '; echo do_shortcode( $content ); echo '
    '; echo '
    '; return ob_get_clean(); } add_action( 'init', function () { add_shortcode('shrk_section_slider', 'shrk_sc_ps_slider'); }); add_filter( 'shrk_filter_vc_mappings', function ( $shrk_vc_shortcodes ) { $shrk_vc_shortcodes["shrk_section_slider"] = array( "name" => esc_html__("Page Sections Slider", 'dvl-uxshop-shortcodes'), "base" => "shrk_section_slider", "as_parent" => array('only' => 'shrk_section'), // Use only|except attributes to limit child shortcodes (separate multiple values with comma) "content_element" => true, "icon" => "icon-wpb-shrk", "category" => esc_html__('Theme Specific', 'dvl-uxshop-shortcodes'), "show_settings_on_create" => false, /** * Set the width of the Sections Slider by setting the width of the row it is in. * Set the height of each of the slides explicitly in that section's options. * Dont set full to width to rows inside the section * Dont set full height to the row containing the section slider. */ "params" => array( array( "type" => "textfield", "class" => "hidden", "param_name" => "slider_id", "value" => uniqid('swiper-'), ), array( "type" => "dropdown", "heading" => esc_html__("Slider effect", 'dvl-uxshop-shortcodes'), "param_name" => "swiper_effect", "value" => array( esc_html__("Slide", 'dvl-uxshop-shortcodes') => "slide", esc_html__("Fade", 'dvl-uxshop-shortcodes') => "fade", esc_html__("Coverflow", 'dvl-uxshop-shortcodes') => "coverflow", esc_html__("Flip", 'dvl-uxshop-shortcodes') => "flip", ), ), array( "type" => 'colorpicker', "heading" => esc_html__("Set slider background color.", 'dvl-uxshop-shortcodes'), "param_name" => "slider_bg_color_inline", ), array( "type" => "dropdown", "heading" => esc_html__("Slider controls theme", 'dvl-uxshop-shortcodes'), "param_name" => "swiper_controls_colors", "value" => array( esc_html__("Light", 'dvl-uxshop-shortcodes') => "light", esc_html__("Dark", 'dvl-uxshop-shortcodes') => "dark", ), ), array( "type" => 'checkbox', "heading" => esc_html__("Transparent arrows", 'dvl-uxshop-shortcodes'), "param_name" => "swiper_controls_transp", "value" => Array(esc_html__("Yes", 'dvl-uxshop-shortcodes') => 'yes') ), array( "type" => 'checkbox', "heading" => esc_html__("Slider autoplay", 'dvl-uxshop-shortcodes'), "param_name" => "swiper_autoplay", "value" => Array(esc_html__("Yes", 'dvl-uxshop-shortcodes') => 'yes') ), array( "type" => "textfield", "heading" => esc_html__("Autoplay delay (in milliseconds)", 'dvl-uxshop-shortcodes'), "param_name" => "swiper_speed", "value" => '7000', "description" => esc_html__("Set the number of milliseconds to wait before showing the next slide.", 'dvl-uxshop-shortcodes'), "dependency" => Array('element' => "swiper_autoplay", 'value' => array('yes')), ), array( "type" => "textfield", "heading" => esc_html__("Animation speed (in milliseconds)", 'dvl-uxshop-shortcodes'), "param_name" => "swiper_animation_speed", "value" => '300', "description" => esc_html__("Set the speed for the transition between slides.", 'dvl-uxshop-shortcodes') ), array( "type" => 'checkbox', "heading" => esc_html__("Loop Slider", 'dvl-uxshop-shortcodes'), "param_name" => "swiper_loop", "value" => Array(esc_html__("Yes", 'dvl-uxshop-shortcodes') => 'yes') ), array( "type" => 'checkbox', "heading" => esc_html__("Show scrollbar", 'dvl-uxshop-shortcodes'), "param_name" => "show_scrollbar", "value" => Array(esc_html__("Yes", 'dvl-uxshop-shortcodes') => 'yes') ), array( "type" => 'dropdown', "heading" => esc_html__("Hide pagination", 'dvl-uxshop-shortcodes'), "param_name" => "hide_pagination", "value" => array( esc_html__("Yes", 'dvl-uxshop-shortcodes') => "yes", esc_html__("No", 'dvl-uxshop-shortcodes') => "no", ), "save_always" => true ), array( "type" => 'checkbox', "heading" => esc_html__("Hide arrows on mobile", 'dvl-uxshop-shortcodes'), "param_name" => "arrows_hidden_xs", "value" => Array(esc_html__("Yes", 'dvl-uxshop-shortcodes') => 'yes') ), array( "type" => 'checkbox', "heading" => esc_html__("Hide pagination on desktop", 'dvl-uxshop-shortcodes'), "param_name" => "pagination_only_xs", "value" => Array(esc_html__("Yes", 'dvl-uxshop-shortcodes') => 'yes') ), ), 'js_view' => 'VcColumnView', ); return $shrk_vc_shortcodes; } ); ?>PKR\y>A`A`xy-woo-slider.phpnu[ null, 'cats_number' => null, // Max number of categories to show 'cats_orderby' => 'name', // Accepts term fields ('name', 'slug', 'term_group', 'term_id', 'id', 'description'), 'count' for term taxonomy count 'cats_order' => 'ASC', // ASC or DESC 'cats_hide_empty' => '1', // 'cats_parent' => '', // Show only children of.. 'cats_ids' => '', // Comma separated string of term ids to include 'el_class' => '', 'swiper_mode' => 'vertical', 'swiper_speed' => '5000', 'swiper_autoplay' => 'no', 'swiper_effect' => 'slide', 'swiper_autoheight' => 'no', 'slider_height_mode' => 'custom', 'slider_height' => '600px', 'show_scrollbar' => 'no', 'hide_pagination' => 'yes', 'slides_grid_width' => '12', // 12 = one per slide 'space_between_slides' => '', 'partial_view' => 'no', 'partial_max_width' => '80%', 'lazyload_next_slides' => false, 'preload_first_x_slides' => 'auto', 'inner_auto_load_slides' => 'yes', 'inner_per_page' => '10', 'inner_orderby' => 'date', 'inner_order' => 'DESC', 'inner_thumb_only' => 'no', 'inner_thumb_fb' => 'yes', 'inner_half_image' => 'no', 'inner_transp_content' => 'no', 'inner_transp_content_mob' => 'no', 'inner_content_bg_color' => '', 'inner_content_bg_color_mob' => '', 'inner_image_bg_color' => '', 'inner_image_bg_size' => '', 'slider_bg_color' => '', 'cat_overlay_bg_color' => '', 'cat_button_text' => 'Show me', 'swiper_breakpoints' => 'disable', 'nav_thumbs' => 'autohide', 'nav_thumbs_overlay_bg_color' => '', 'nav_thumbs_show_count' => 'no', ), $atts); if ( !function_exists( 'shrk_sc_swiper_get_atts' ) || !function_exists( 'WC' ) ) { return '
    ' . esc_html__('Your theme does not support the XY Products Slider or WooCommerce is not active.', 'dvl-uxshop-shortcodes') . '
    '; } wp_enqueue_script( 'shrk-swiper' ); $slider_id = !empty( $atts['slider_id'] ) ? $atts['slider_id'] : false; if ( isset( $atts['cats_ids'] ) ) { $ids = explode( ',', $atts['cats_ids'] ); $ids = array_map( 'trim', $ids ); } else { $ids = array(); } $hide_empty = ( $atts['cats_hide_empty'] == '1' ) ? 1 : 0; $args = array( 'orderby' => $atts['cats_orderby'], 'order' => $atts['cats_order'], 'hide_empty' => $hide_empty, 'include' => $ids, 'pad_counts' => true, 'child_of' => $atts['cats_parent'] ); $product_categories = get_terms( 'product_cat', $args ); $product_categories = is_wp_error( $product_categories ) ? array() : $product_categories; if ( '' !== $atts['cats_parent'] ) { $product_categories = wp_list_filter( $product_categories, array( 'parent' => $atts['cats_parent'] ) ); } if ( $hide_empty ) { foreach ( $product_categories as $key => $category ) { if ( $category->count == 0 ) { unset( $product_categories[ $key ] ); } } } if ( $atts['cats_number'] ) { $product_categories = array_slice( $product_categories, 0, $atts['cats_number'] ); } $inner_swiper_atts = array( 'swiper_mode' => 'horizontal', 'swiper_speed' => '5000', 'swiper_autoplay' => 'no', 'swiper_autoheight' => 'no', 'slides_grid_width' => '12', 'space_between_slides' => '', 'partial_view' => 'no', 'partial_max_width' => '80%', 'lazyload_next_slides' => false, 'preload_first_x_slides' => 'auto', 'show_scrollbar' => 'no', 'hide_pagination' => 'yes', 'auto_load_slides' => $atts['inner_auto_load_slides'], 'category_id' => '', 'page' => '1', 'per_page' => $atts['inner_per_page'], 'orderby' => $atts['inner_orderby'], 'order' => $atts['inner_order'], 'swiper_breakpoints' => 'disable', 'cover_atts' => array( 'thumb_fb' => ( $atts['inner_thumb_fb'] == 'yes' ? true : false ), 'thumb_only' => ( $atts['inner_thumb_only'] == 'yes' ? true : false ), ), ); ob_start(); // Loop throught categories to get // inner swipers // $outer_pagination = $cat_cover_srcset = ''; $i = 0; if ( $product_categories ) { foreach ( $product_categories as $category ) { $cat_cover = function_exists('woo_shrk_get_category_image') && woo_shrk_get_category_image( $category->term_id ) ? woo_shrk_get_category_image( $category->term_id, 'shrk_section_bg' ) : ''; $cat_cover_thumb = function_exists('woo_shrk_get_category_image') && woo_shrk_get_category_image( $category->term_id ) ? woo_shrk_get_category_image( $category->term_id, 'large' ) : ''; $inner_swiper_atts['category_id'] = $category->term_id; $sw_pc = shrk_swiper_product_category( $inner_swiper_atts ); $inner_swiper_content = $sw_pc['content']; $inner_swiper_product_count = intval( $sw_pc['count'] ); if ( function_exists( 'get_woocommerce_term_meta' ) && function_exists( 'shrk_get_image_aspect' ) ) { $cat_cover_id = get_woocommerce_term_meta( $category->term_id, 'thumbnail_id', true ); $cat_cover_srcset = wp_get_attachment_image_srcset( $cat_cover_id, 'shrk_section_bg' ); $cat_cover_ar = shrk_get_image_aspect( $cat_cover_id, 'shrk_section_bg' ); } ?>
    '; echo '
    '; ?>

    name ); ?>

    '; echo '
    0 / ' . esc_html( $inner_swiper_product_count ) . '
    '; echo '
    '; ?>
    ' . esc_html( $category->name ) . '(' . esc_html( $inner_swiper_product_count ) . ')'; $i++; } } woocommerce_reset_loop(); $slides_cat = ob_get_clean(); $swiper_outer_classes = array('shrk-swiper-container', 'img-cover'); if ( $atts['nav_thumbs'] == 'show' ) { $swiper_outer_classes[] = 'swiper-nav-sticky'; } if ( $atts['nav_thumbs_show_count'] == '1' ) { $swiper_outer_classes[] = 'swiper-nav-show-count'; } // Outer swiper $output = ''; $output .= '
    '; $output .= '
    '; $output .= '
    '; $output .= $slides_cat; $output .= '
    '; if ( $atts['nav_thumbs'] != 'hide' ) { $output .= '
    ' . $outer_pagination . '
    '; } $output .= '
    '; return '
    ' . $output . '
    '; } add_action( 'init', function () { add_shortcode('shrk_woo_catproducts', 'shrk_sc_woo_xy_slider'); }); add_filter( 'shrk_filter_vc_mappings', function ( $shrk_vc_shortcodes ) { $shrk_vc_shortcodes["shrk_flex"] = array( "name" => esc_html__("XY Products Slider", 'dvl-uxshop-shortcodes'), "category" => esc_html__('Theme Specific', 'dvl-uxshop-shortcodes'), "icon" => "icon-wpb-shrk", "base" => "shrk_woo_catproducts", "show_settings_on_create" => true, "params" => array( array( "type" => "textfield", "class" => "hidden", "param_name" => "slider_id", "value" => uniqid('swiper-'), "group" => esc_html__( "Slider options", 'dvl-uxshop-shortcodes' ), ), array( "type" => "dropdown", "heading" => esc_html__("Slider effect", 'dvl-uxshop-shortcodes'), "param_name" => "swiper_effect", "value" => array( esc_html__("Slide", 'dvl-uxshop-shortcodes') => "slide", esc_html__("Fade", 'dvl-uxshop-shortcodes') => "fade", esc_html__("Coverflow", 'dvl-uxshop-shortcodes') => "coverflow", esc_html__("Flip", 'dvl-uxshop-shortcodes') => "flip", ), "group" => esc_html__( "Slider options", 'dvl-uxshop-shortcodes' ), ), array( "type" => "dropdown", "class" => "", "heading" => esc_html__("Slider height mode", 'dvl-uxshop-shortcodes'), "param_name" => "slider_height_mode", "value" => array( esc_html__("Custom", 'dvl-uxshop-shortcodes') => "custom", esc_html__("Window height (minus header height)", 'dvl-uxshop-shortcodes') => "windowheight_mh" ), "description" => esc_html__("You can enter a custom height or set the slider to match the parent row height.", 'dvl-uxshop-shortcodes'), "group" => esc_html__( "Slider options", 'dvl-uxshop-shortcodes' ), ), array( "type" => "textfield", "class" => "", "heading" => esc_html__("Slider height", 'dvl-uxshop-shortcodes'), "description" => esc_html__("You can enter a value in pixels, em, or vh. For example entering `60vh` will make it 60% of the window height.", 'dvl-uxshop-shortcodes'), "param_name" => "slider_height", "value" => '600px', "dependency" => Array('element' => "slider_height_mode", 'value' => array('custom')), "group" => esc_html__( "Slider options", 'dvl-uxshop-shortcodes' ), ), array( "type" => "textfield", "heading" => esc_html__("Categories open button text", 'dvl-uxshop-shortcodes'), "param_name" => "cat_button_text", "value" => esc_html__( "Show me", 'dvl-uxshop-shortcodes' ), "group" => esc_html__( "Slider options", 'dvl-uxshop-shortcodes' ), ), array( "type" => 'colorpicker', "heading" => esc_html__("Categories cover overlay color", 'dvl-uxshop-shortcodes'), "description" => esc_html__("Set the color and opacity applied on the categories images (vertical slider).", 'dvl-uxshop-shortcodes'), "param_name" => "cat_overlay_bg_color", "group" => esc_html__( "Slider options", 'dvl-uxshop-shortcodes' ), ), array( "type" => 'checkbox', "heading" => esc_html__("Don't use cover image. (Use only product thumbnail)", 'dvl-uxshop-shortcodes'), "param_name" => "inner_thumb_only", "value" => Array(esc_html__("Yes", 'dvl-uxshop-shortcodes') => 'yes'), "group" => esc_html__( "Slider options", 'dvl-uxshop-shortcodes' ), ), array( "type" => 'checkbox', "heading" => esc_html__("Fallback to product thumbnail if no cover image available.", 'dvl-uxshop-shortcodes'), "param_name" => "inner_thumb_fb", "value" => Array(esc_html__("Yes", 'dvl-uxshop-shortcodes') => 'yes'), "group" => esc_html__( "Slider options", 'dvl-uxshop-shortcodes' ), ), array( "type" => 'checkbox', "heading" => esc_html__("Make image 50% of the slide's width.", 'dvl-uxshop-shortcodes'), "param_name" => "inner_half_image", "value" => Array(esc_html__("Yes", 'dvl-uxshop-shortcodes') => 'yes'), "group" => esc_html__( "Slider options", 'dvl-uxshop-shortcodes' ), ), array( "type" => 'colorpicker', "heading" => esc_html__("Set content box background color.", 'dvl-uxshop-shortcodes'), "param_name" => "inner_content_bg_color", "group" => esc_html__( "Slider options", 'dvl-uxshop-shortcodes' ), ), array( "type" => 'colorpicker', "heading" => esc_html__("Set content box background color for mobile devices.", 'dvl-uxshop-shortcodes'), "param_name" => "inner_content_bg_color_mob", "group" => esc_html__( "Slider options", 'dvl-uxshop-shortcodes' ), ), array( "type" => 'checkbox', "heading" => esc_html__("Transparent content box on mobile", 'dvl-uxshop-shortcodes'), "param_name" => "inner_transp_content_mob", "value" => Array(esc_html__("Yes", 'dvl-uxshop-shortcodes') => 'yes'), "group" => esc_html__( "Slider options", 'dvl-uxshop-shortcodes' ), ), array( "type" => 'colorpicker', "heading" => esc_html__("Set slider background color.", 'dvl-uxshop-shortcodes'), "param_name" => "slider_bg_color", "group" => esc_html__( "Slider options", 'dvl-uxshop-shortcodes' ), ), array( "type" => "dropdown", "class" => "", "heading" => esc_html__("Image background size", 'dvl-uxshop-shortcodes'), "description" => esc_html__("You can select `contain` if you want the product image never to get cropped by the container boundaries. You can also set a color below, to match the background color of your product image.", 'dvl-uxshop-shortcodes'), "param_name" => "inner_image_bg_size", "value" => array( esc_html__("Cover", 'dvl-uxshop-shortcodes') => "cover", esc_html__("Contain", 'dvl-uxshop-shortcodes') => "contain", ), "group" => esc_html__( "Slider options", 'dvl-uxshop-shortcodes' ), ), array( "type" => 'colorpicker', "heading" => esc_html__("Image background color.", 'dvl-uxshop-shortcodes'), "param_name" => "inner_image_bg_color", "group" => esc_html__( "Slider options", 'dvl-uxshop-shortcodes' ), "dependency" => Array('element' => "inner_image_bg_size", 'value' => array('contain')), ), array( "type" => "textfield", "class" => "", "heading" => esc_html__("Posts per page", 'dvl-uxshop-shortcodes'), "description" => esc_html__("How many slides to load in each ajax request.", 'dvl-uxshop-shortcodes'), "param_name" => "inner_per_page", "value" => '10', "group" => esc_html__( "Slider options", 'dvl-uxshop-shortcodes' ), ), array( "type" => "textfield", "heading" => esc_html__("Extra class name", 'dvl-uxshop-shortcodes'), "param_name" => "el_class", "description" => esc_html__("If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.", 'dvl-uxshop-shortcodes'), "group" => esc_html__( "Slider options", 'dvl-uxshop-shortcodes' ), ), array( "type" => "woo_categories", "heading" => esc_html__("Limit product categories.", 'dvl-uxshop-shortcodes'), "param_name" => "cats_ids", "multiple" => true, "output" => "id", "description" => esc_html__("Select one or more categories to show only these. Selecting none displays all. Use CTRL+click to select/de-select multiple items.", 'dvl-uxshop-shortcodes'), "value" => "", "group" => esc_html__( "Slider content", 'dvl-uxshop-shortcodes' ), ), array( "type" => "woo_categories", "heading" => esc_html__("Only children of", 'dvl-uxshop-shortcodes'), "param_name" => "cats_parent", "multiple" => false, "output" => "id", "description" => esc_html__( "Select a parent category here to show only its children.", 'dvl-uxshop-shortcodes' ), "value" => "", "group" => esc_html__( "Slider content", 'dvl-uxshop-shortcodes' ), ), array( "type" => 'checkbox', "heading" => esc_html__("Hide empty categories.", 'dvl-uxshop-shortcodes'), "param_name" => "cats_hide_empty", "value" => Array(esc_html__("Yes", 'dvl-uxshop-shortcodes') => '1'), "group" => esc_html__( "Slider content", 'dvl-uxshop-shortcodes' ), ), array( "type" => "textfield", "class" => "", "heading" => esc_html__("Maximum number of categories to show.", 'dvl-uxshop-shortcodes'), "description" => esc_html__("Leave empty to show all.", 'dvl-uxshop-shortcodes'), "param_name" => "cats_number", "value" => '', "group" => esc_html__( "Slider content", 'dvl-uxshop-shortcodes' ), ), array( "type" => "dropdown", "class" => "", "heading" => esc_html__("Categories Order By", 'dvl-uxshop-shortcodes'), "param_name" => "cats_orderby", "value" => array( esc_html__("Name", 'dvl-uxshop-shortcodes') => "name", esc_html__("Slug", 'dvl-uxshop-shortcodes') => "slug", esc_html__("Term group", 'dvl-uxshop-shortcodes') => "term_group", esc_html__("Term ID", 'dvl-uxshop-shortcodes') => "term_id", esc_html__("Description", 'dvl-uxshop-shortcodes') => "description", esc_html__("Count", 'dvl-uxshop-shortcodes') => "count", ), "group" => esc_html__( "Slider content", 'dvl-uxshop-shortcodes' ), ), array( "type" => "dropdown", "class" => "", "heading" => esc_html__("Categories Order", 'dvl-uxshop-shortcodes'), "param_name" => "cats_order", "value" => array( esc_html__("Descending", 'dvl-uxshop-shortcodes') => "desc", esc_html__("Ascending", 'dvl-uxshop-shortcodes') => "asc", ), "group" => esc_html__( "Slider content", 'dvl-uxshop-shortcodes' ), ), array( "type" => "dropdown", "class" => "", "heading" => esc_html__("Products Order By", 'dvl-uxshop-shortcodes'), "param_name" => "inner_orderby", "value" => array( esc_html__("Date", 'dvl-uxshop-shortcodes') => "date", esc_html__("Product ID", 'dvl-uxshop-shortcodes') => "ID", esc_html__("Product Title", 'dvl-uxshop-shortcodes') => "title", esc_html__("Product slug", 'dvl-uxshop-shortcodes') => "name", esc_html__("Random", 'dvl-uxshop-shortcodes') => "rand", esc_html__("Comments (reviews) count", 'dvl-uxshop-shortcodes') => "comment_count", esc_html__("Menu order", 'dvl-uxshop-shortcodes') => "menu_order", ), "group" => esc_html__( "Slider content", 'dvl-uxshop-shortcodes' ), ), array( "type" => "dropdown", "class" => "", "heading" => esc_html__("Products Order", 'dvl-uxshop-shortcodes'), "param_name" => "inner_order", "value" => array( esc_html__("Descending", 'dvl-uxshop-shortcodes') => "desc", esc_html__("Ascending", 'dvl-uxshop-shortcodes') => "asc", ), "group" => esc_html__( "Slider content", 'dvl-uxshop-shortcodes' ), ), array( "type" => "dropdown", "class" => "", "heading" => esc_html__("Thumbnails visibility", 'dvl-uxshop-shortcodes'), "param_name" => "nav_thumbs", "value" => array( esc_html__("Auto show/hide", 'dvl-uxshop-shortcodes') => "autohide", esc_html__("Always Show", 'dvl-uxshop-shortcodes') => "show", esc_html__("Always Hide", 'dvl-uxshop-shortcodes') => "hide", ), "group" => esc_html__( "Category thumbnails", 'dvl-uxshop-shortcodes' ), ), array( "type" => 'colorpicker', "heading" => esc_html__("Category thumbs overlay color", 'dvl-uxshop-shortcodes'), "description" => esc_html__("Set the color and opacity applied on the category thumbnail images (vertical slider).", 'dvl-uxshop-shortcodes'), "param_name" => "nav_thumbs_overlay_bg_color", "group" => esc_html__( "Category thumbnails", 'dvl-uxshop-shortcodes' ), ), array( "type" => 'checkbox', "heading" => esc_html__("Show product count in category thumbnail.", 'dvl-uxshop-shortcodes'), "param_name" => "nav_thumbs_show_count", "value" => Array(esc_html__("Yes", 'dvl-uxshop-shortcodes') => '1'), "group" => esc_html__( "Category thumbnails", 'dvl-uxshop-shortcodes' ), ), ) ); return $shrk_vc_shortcodes; } ); /** * Process $post content and extract custom css * attributes for XY Slider * * @param object $post the post object to process * @return string CSS rules */ function shrk_sc_get_xyslider_css( $post ) { $swiper_style = array(); $pattern = '\[(\[?)(shrk_woo_catproducts)(?![\w-])([^\]\/]*(?:\/(?!\])[^\]\/]*)*?)(?:(\/)\]|\](?:([^\[]*+(?:\[(?!\/\2\])[^\[]*+)*+)\[\/\2\])?)(\]?)'; if ( isset( $post->post_content ) && preg_match_all( '/'. $pattern .'/s', $post->post_content, $matches ) ) { foreach ( $matches[3] as $val ) { $atts = array(); $args = explode( ' ', $val ); foreach ($args as $arg) { $arg_parsed = explode( '=', $arg ); if ( ! empty( $arg_parsed[0] ) ) { $atts[$arg_parsed[0]] = trim( $arg_parsed[1], " \t\n\r\0\x0B\"" ); } } if ( ! empty( $atts['slider_id'] ) ) { if ( !empty( $atts['cat_overlay_bg_color'] ) ) { $swiper_style[] = '#' . esc_attr( $atts['slider_id'] ) . ' .shrk-swiper-container.inner .category-cover:after {background-color:' . esc_attr( $atts['cat_overlay_bg_color'] ) . ';}'; } if ( !empty( $atts['slider_bg_color'] ) ) { $swiper_style[] = '#' . esc_attr( $atts['slider_id'] ) . ' .shrk-swiper-container.inner {background-color:' . esc_attr( $atts['slider_bg_color'] ) . ';}'; } if ( !empty( $atts['inner_content_bg_color'] ) ) { $swiper_style[] = '#' . esc_attr( $atts['slider_id'] ) . ' .shrk-swiper-container.inner .slide-content {background-color:' . esc_attr( $atts['inner_content_bg_color'] ) . ';}'; } if ( !empty( $atts['inner_content_bg_color_mob'] ) ) { $swiper_style[] = '@media screen and (max-width: 767px) { #' . esc_attr( $atts['slider_id'] ) . ' .shrk-swiper-container.inner .slide-content {background-color:' . esc_attr( $atts['inner_content_bg_color_mob'] ) . ';} }'; } if ( !empty( $atts['inner_image_bg_color'] ) ) { $swiper_style[] = '#' . esc_attr( $atts['slider_id'] ) . ' .shrk-swiper-container.inner .slide-background {background-color:' . esc_attr( $atts['inner_image_bg_color'] ) . ';}'; $swiper_style[] = '#' . esc_attr( $atts['slider_id'] ) . ' .shrk-swiper-container.inner .slide-background:before {background-color:' . esc_attr( $atts['inner_image_bg_color'] ) . ';}'; } if ( !empty( $atts['inner_image_bg_size'] ) ) { $swiper_style[] = '#' . esc_attr( $atts['slider_id'] ) . ' .shrk-swiper-container.inner .slide-background {background-size:' . esc_attr( $atts['inner_image_bg_size'] ) . ';}'; } if ( !empty( $atts['nav_thumbs_overlay_bg_color'] ) ) { $swiper_style[] = '#' . esc_attr( $atts['slider_id'] ) . ' .swiper-nav-outer .nav-thumb:after {background-color:' . esc_attr( $atts['nav_thumbs_overlay_bg_color'] ) . ';}'; } } unset( $atts ); } } return !empty( $swiper_style ) && function_exists( 'shrk_simple_minify' ) ? shrk_simple_minify( implode(' ', $swiper_style) ) : ''; } /** * Tap into vc_base_build_shortcodes_custom_css * to save XY Slider's custom CSS output to * _wpb_shortcodes_custom_css meta. */ function shrk_sc_save_xyslider_css( $css ) { global $post; return $css . ' ' . shrk_sc_get_xyslider_css( $post ); } add_filter( 'vc_base_build_shortcodes_custom_css', 'shrk_sc_save_xyslider_css' ); ?>PKR\?~| quote.phpnu[ '', 'quoteauthor' => '', 'alignment' => 'default', ), $atts ) ); $class = ''; if ( $alignment != 'default' ) { $class = $alignment; } return '
    ' . $quotetext . '
    ' . $quoteauthor . '
    '; } add_action( 'init', function () { add_shortcode('shrk_quote', 'shrk_sc_quote'); }); add_filter( 'shrk_filter_vc_mappings', function ( $shrk_vc_shortcodes, $d ) { $shrk_vc_shortcodes["shrk_quote"] = array( "name" => esc_html__("Quote", 'dvl-uxshop-shortcodes'), /* */ "base" => "shrk_quote", "category" => esc_html__('Theme Specific', 'dvl-uxshop-shortcodes'), "icon" => "icon-wpb-shrk", "show_settings_on_create" => true, "params" => array( array( "type" => "textarea", "class" => "", "heading" => esc_html__("Quote text", 'dvl-uxshop-shortcodes'), "param_name" => "quotetext", ), array( "type" => "textfield", "class" => "", "heading" => esc_html__("Quote author", 'dvl-uxshop-shortcodes'), "param_name" => "quoteauthor", "value" => '', ), array( "type" => "dropdown", "class" => "", "heading" => esc_html__("Text Alignment", 'dvl-uxshop-shortcodes'), "param_name" => "alignment", "value" => $d['alignment_text_options'] ), ) ); return $shrk_vc_shortcodes; },10 ,2 ); ?>PKR\wk section.phpnu[ false, ), $atts ) ); ob_start(); if ( !function_exists( 'shrk_get_sections' ) ) { return '
    ' . esc_html__('Your theme does not support the section shortcode.', 'dvl-uxshop-shortcodes') . '
    '; } echo '
    '; shrk_get_sections( $section_id ); echo '
    '; return ob_get_clean(); } add_action( 'init', function () { add_shortcode('shrk_section', 'shrk_sc_section'); }); add_filter( 'shrk_filter_vc_mappings', function ( $shrk_vc_shortcodes ) { $shrk_vc_shortcodes["shrk_section"] = array( "name" => esc_html__("Page Section", 'dvl-uxshop-shortcodes'), "base" => "shrk_section", "icon" => "icon-wpb-shrk", "category" => esc_html__('Theme Specific', 'dvl-uxshop-shortcodes'), "content_element" => true, "params" => array( array( "type" => "dropdown", "class" => "", "heading" => esc_html__("Section", 'dvl-uxshop-shortcodes'), "param_name" => "section_id", "value" => shrk_child_vc_get_posts( array( 'post_type' => 'pagesections' ) ) ) ), 'js_view' => 'shrkSectionView', 'custom_markup' => '

    '. esc_html__( "Section: ", 'dvl-uxshop-shortcodes' ) .'

    ' . esc_html__( 'Edit section', 'dvl-uxshop-shortcodes' ) . '', ); return $shrk_vc_shortcodes; } ); function shrk_sc_section_scripts() { ob_start(); ?>(function ( $ ) { if ( typeof(vc) !== 'undefined' ) { window.shrkSectionView = vc.shortcode_view.extend( { changeShortcodeParams: function ( model ) { var params; var admin_url = ''; //window.shrkSectionView.__super__.changeShortcodeParams.call( this, model ); params = model.get( 'params' ); if ( _.isObject( params ) && _.isString( params.section_id ) ) { //get selected option text var txt = shrk_getKeyByValue( model.view.params.section_id.value, parseInt(params.section_id, 10) ); this.$el.find( '> .wpb_element_wrapper [name="section_id"]' ).html(txt); // section edit link this.$el.find( '> .wpb_element_wrapper .edit-section-link' ).attr('href', admin_url+'post.php?post='+params.section_id+'&action=edit'); } } } ); } })( window.jQuery );PKR\8K4PPsimpleheading.phpnu[ 'your Heading text', 'heading_style' => 'widget-title', 'heading_type' => 'h3', ), $atts ) ); return '
    <' . esc_attr( $heading_type ) . ' class="' . esc_attr( $heading_style ) . '">' . esc_html( $heading_text ) . '
    '; } add_action( 'init', function () { add_shortcode('shrk_simpleheading', 'shrk_sc_simpleheading'); }); add_filter( 'shrk_filter_vc_mappings', function ( $shrk_vc_shortcodes, $d ) { $shrk_vc_shortcodes['shrk_simpleheading'] = array( 'name' => esc_html__('Simple heading', 'dvl-uxshop-shortcodes'), /* */ 'category' => esc_html__('Theme Specific', 'dvl-uxshop-shortcodes'), 'base' => 'shrk_simpleheading', 'icon' => 'icon-wpb-shrk', 'show_settings_on_create' => true, 'params' => array( array( 'type' => 'textarea', 'heading' => esc_html__('Heading text', 'dvl-uxshop-shortcodes'), 'param_name' => 'heading_text', 'value' => esc_html__( 'your Heading text', 'dvl-uxshop-shortcodes' ) ), array( 'type' => 'dropdown', 'heading' => esc_html__('Heading style', 'dvl-uxshop-shortcodes'), 'param_name' => 'heading_style', 'value' => array( esc_html__( 'Widget title', 'dvl-uxshop-shortcodes') => 'widget-title', esc_html__( 'Section title', 'dvl-uxshop-shortcodes') => 'section-title', ) ), array( 'type' => 'dropdown', 'heading' => esc_html__('Heading type', 'dvl-uxshop-shortcodes'), 'param_name' => 'heading_type', 'value' => array( 'H1' => 'h1', 'H2' => 'h2', 'H3' => 'h3', 'H4' => 'h4', 'H5' => 'h5', 'H6' => 'h6' ), 'std' => 'h3' ), ) ); return $shrk_vc_shortcodes; },10 ,2 ); ?>PKR\… mailchimp.phpnu[name] = $mc_form_obj->ID; } } if ( shortcode_exists( 'mc4wp_form' ) ) { $shrk_vc_shortcodes['shrk_mailchimp'] = array( 'name' => esc_html__('MailChimp newsletter form', 'dvl-uxshop-shortcodes'), /* */ 'base' => 'mc4wp_form', 'category' => esc_html__('Theme Specific', 'dvl-uxshop-shortcodes'), 'icon' => 'icon-wpb-shrk', 'show_settings_on_create' => true, 'params' => array( array( 'type' => 'dropdown', 'heading' => esc_html__('Mailchimp form', 'dvl-uxshop-shortcodes'), 'param_name' => 'id', 'value' => $mc_forms ), ) ); } return $shrk_vc_shortcodes; },10 ,2 ); ?>PKR\i_video-popup.phpnu[ null, 'video' => '', 'autoplay' => '0', 'linktext' => '', 'linktext' => '', 'link_style' => 'textlink', 'el_class' => '', ), $atts ) ); wp_enqueue_script( 'shrk-sc-video-popup' ); $video_popup_id = !empty( $atts['video_popup_id'] ) ? $atts['video_popup_id'] : false; if ( $link_style == 'theme-button' ) { $el_class .= ' button'; } if ( $link_style == 'theme-button-alt' ) { $el_class .= ' button alt'; } return '' . esc_html( $linktext ) . ''; } add_action( 'init', function () { add_shortcode('shrk_video_popup', 'shrk_sc_video_popup'); }); add_filter( 'shrk_filter_vc_mappings', function ( $shrk_vc_shortcodes, $d ) { $shrk_vc_shortcodes["shrk_video_popup"] = array( "name" => esc_html__("Video popup", 'dvl-uxshop-shortcodes'), /* */ "base" => "shrk_video_popup", "category" => esc_html__('Theme Specific', 'dvl-uxshop-shortcodes'), "icon" => "icon-wpb-shrk", "show_settings_on_create" => true, "params" => array( array( "type" => "textfield", "class" => "hidden", "param_name" => "video_popup_id", "value" => uniqid('video-popup-'), ), array( "type" => "textfield", "class" => "", "heading" => esc_html__("Video URL", 'dvl-uxshop-shortcodes'), "param_name" => "video", "description" => esc_html__("Enter the video URL. Youtube and Vimeo are supported.", 'dvl-uxshop-shortcodes'), ), array( "type" => 'checkbox', "heading" => esc_html__("Autoplay video", 'dvl-uxshop-shortcodes'), "param_name" => "autoplay", "value" => Array(esc_html__("Yes", 'dvl-uxshop-shortcodes') => 'yes'), ), array( "type" => "textfield", "class" => "", "heading" => esc_html__("Link Text", 'dvl-uxshop-shortcodes'), "param_name" => "linktext", "save_always" => true, //required to save default value after vc 4.9.1 "value" => esc_html__("Play video", 'dvl-uxshop-shortcodes'), ), array( "type" => "dropdown", "class" => "", "heading" => esc_html__("Link style", 'dvl-uxshop-shortcodes'), "param_name" => "link_style", "value" => array( esc_html__("Text link", 'dvl-uxshop-shortcodes') => "textlink", esc_html__("Button", 'dvl-uxshop-shortcodes') => "theme-button", esc_html__("Button - Secondary color", 'dvl-uxshop-shortcodes') => "theme-button-alt", ), ), array( "type" => "textfield", "param_name" => "el_class", "heading" => esc_html__("Extra class name", 'dvl-uxshop-shortcodes'), "description" => esc_html__("If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.", 'dvl-uxshop-shortcodes'), ), ) ); return $shrk_vc_shortcodes; },10 ,2 ); function shrk_sc_video_scripts() { wp_register_script( 'shrk-sc-video-popup', plugin_dir_url( __FILE__ ) . 'assets/js/video-popup.js', array( 'jquery' ), false, false ); } add_action( 'wp_enqueue_scripts', 'shrk_sc_video_scripts' ); // Handle AJAX call function shrk_sc_ajax_get_video_popup() { $video_url = isset( $_POST['video_url'] ) ? esc_url_raw( $_POST['video_url'] ) : null; $video_autoplay = isset( $_POST['video_autoplay'] ) && $_POST['video_autoplay'] == 'yes' ? true : false; if ( !$video_url ) { wp_die( esc_html__("No Video URL!", 'dvl-uxshop-shortcodes') ); } $embed_code = wp_oembed_get( $video_url ); if ( $video_autoplay ) { $embed_code = preg_replace('@embed/([^"&]*)@', 'embed/$1&showinfo=0&autoplay=1', $embed_code); // Match youtube $embed_code = preg_replace('@video/([^"&]*)@', 'video/$1?autoplay=1', $embed_code); // Match vimeo } echo $embed_code; wp_die(); } add_action( 'wp_ajax_shrk_get_video_popup', 'shrk_sc_ajax_get_video_popup' ); add_action( 'wp_ajax_nopriv_shrk_get_video_popup', 'shrk_sc_ajax_get_video_popup' ); ?>PKR\kX"X" banner.phpnu[ 'custom', 'product_cat' => '', // product_cat overrides product_cat_slug 'product_cat_slug' => '', 'product_id' => '', 'banner_image' => '', 'banner_height' => '300px', 'heading_text' => '', 'font_size' => 'medium', 'target_url' => '', 'el_class' => '', 'banner_style' => 'style-1', 'css' => '' ), $atts ) ); switch ( $banner_source ) { case 'product_category': $product_cat = absint( trim( $product_cat ) ); $term = !empty( $product_cat ) ? get_term_by( 'id', $product_cat, 'product_cat' ) : get_term_by( 'slug', $product_cat_slug, 'product_cat' ); if ( $term ) { $img_id = get_woocommerce_term_meta( absint($term->term_id), 'thumbnail_id', true ); $img_src = function_exists( 'woo_shrk_get_category_image' ) ? woo_shrk_get_category_image( absint($term->term_id), 'shrk_section_bg' ) : ''; $target_url = get_term_link( $term ); $heading = $term->name; $srcset = wp_get_attachment_image_srcset( $img_id, 'shrk_section_bg' ); $img_ar = shrk_get_image_aspect( $img_id, 'shrk_section_bg' ); } break; case 'product': $product_id = absint( trim( $product_id ) ); $heading = get_the_title( $product_id ); $target_url = get_permalink( $product_id ); if ( function_exists( 'shrk_get_meta_option' ) && shrk_get_meta_option( 'product_cover_image', $product_id ) ) { $cover_image_id = shrk_get_meta_option( 'product_cover_image', $product_id ); $cover = wp_get_attachment_image_src( $cover_image_id, 'shrk_section_bg' ); $srcset = wp_get_attachment_image_srcset( $cover_image_id, 'shrk_section_bg' ); $img_src = $cover[0]; $img_ar = shrk_get_image_aspect( $cover_image_id, 'shrk_section_bg' ); } break; case 'custom': $heading = $heading_text; if ( function_exists( 'vc_build_link' ) ) { $target = function_exists( 'vc_build_link' ) ? vc_build_link( $target_url ) : ''; $target_url = $target['url']; } $target_title = isset( $target['title'] ) ? $target['title'] : ''; $img = wp_get_attachment_image_src( preg_replace( '/[^\d]/', '', $banner_image ), 'shrk_section_bg' ); $srcset = wp_get_attachment_image_srcset( preg_replace( '/[^\d]/', '', $banner_image ), 'shrk_section_bg' ); $img_src = $img[0]; $img_ar = shrk_get_image_aspect( preg_replace( '/[^\d]/', '', $banner_image ), 'shrk_section_bg' ); break; default: $heading = 'No source set'; $img_src = ''; $img_ar = ''; break; } $el_class = $el_class . ' ' . $banner_style; if ( function_exists( 'vc_shortcode_custom_css_class') ) { $el_class .= ' ' . apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class( $css, ' ' ), 'shrk_banner', $atts ); } if ( !empty( $banner_height ) ) { $style_atts[] = 'height: ' . esc_attr( $banner_height ) . ';'; } $output = '
    '; if ( !empty( $target_url ) ) { $output .= ''; } $output .= '
    '; return $output; } add_action( 'init', function () { add_shortcode('shrk_banner', 'shrk_sc_banner'); }); add_filter( 'shrk_filter_vc_mappings', function ( $shrk_vc_shortcodes, $d ) { $shrk_vc_shortcodes["shrk_banner"] = array( "name" => esc_html__("Banner", 'dvl-uxshop-shortcodes'), /* */ "category" => esc_html__('Theme Specific', 'dvl-uxshop-shortcodes'), "base" => "shrk_banner", "icon" => "icon-wpb-shrk", "show_settings_on_create" => true, "params" => array( array( "type" => "dropdown", "heading" => esc_html__("Data source", 'dvl-uxshop-shortcodes'), "param_name" => "banner_source", "value" => array( esc_html__("Product category", 'dvl-uxshop-shortcodes') => "product_category", esc_html__("Product", 'dvl-uxshop-shortcodes') => "product", esc_html__("Custom", 'dvl-uxshop-shortcodes') => "custom", ), "save_always" => true, //required to save default value after vc 4.9.1 ), array( "type" => "woo_categories", "heading" => esc_html__("Product category", 'dvl-uxshop-shortcodes'), "description" => esc_html__("Select the product category to get the title and image from.", 'dvl-uxshop-shortcodes'), "param_name" => "product_cat", "multiple" => false, "output" => "id", "value" => "", "dependency" => Array( 'element' => "banner_source", 'value' => array( 'product_category' ) ), ), array( "type" => "woo_products", "heading" => esc_html__("Product", 'dvl-uxshop-shortcodes'), "description" => esc_html__("Select the product from which you want to get the title and image cover.", 'dvl-uxshop-shortcodes'), "param_name" => "product_id", "multiple" => false, "value" => "", "dependency" => Array( 'element' => "banner_source", 'value' => array( 'product' ) ), ), array( "type" => "attach_image", "heading" => esc_html__("Banner Image", 'dvl-uxshop-shortcodes'), "param_name" => "banner_image", "dependency" => Array( 'element' => "banner_source", 'value' => array( 'custom' ) ), ), array( "type" => "textfield", "heading" => esc_html__("Heading", 'dvl-uxshop-shortcodes'), "param_name" => "heading_text", "value" => '', "dependency" => Array( 'element' => "banner_source", 'value' => array( 'custom' ) ), ), array( "type" => "vc_link", "heading" => esc_html__("Target link", 'dvl-uxshop-shortcodes'), "param_name" => "target_url", "value" => '', "dependency" => Array( 'element' => "banner_source", 'value' => array( 'custom' ) ), ), array( "type" => "dropdown", "heading" => esc_html__("Font size", 'dvl-uxshop-shortcodes'), "description" => esc_html__("Override default font size if you wish.", 'dvl-uxshop-shortcodes'), "param_name" => "font_size", "value" => array( esc_html__("Large", 'dvl-uxshop-shortcodes') => "large", esc_html__("Medium", 'dvl-uxshop-shortcodes') => "medium", esc_html__("Small", 'dvl-uxshop-shortcodes') => "small", ), "save_always" => true, //required to save default value after vc 4.9.1 ), array( "type" => "textfield", "heading" => esc_html__("Banner height", 'dvl-uxshop-shortcodes'), "param_name" => "banner_height", "value" => '300px', ), array( "type" => "dropdown", "heading" => esc_html__("Banner style", 'dvl-uxshop-shortcodes'), "param_name" => "banner_style", "value" => array( esc_html__("Style A", 'dvl-uxshop-shortcodes') => "style-1", esc_html__("Style B", 'dvl-uxshop-shortcodes') => "style-2", ), "save_always" => true, //required to save default value after vc 4.9.1 ), array( "type" => "textfield", "heading" => esc_html__("Extra class name", 'dvl-uxshop-shortcodes'), "description" => esc_html__("If you wish to style particular content element differently, then use this field to add a class name and then refer to it in your css file.", 'dvl-uxshop-shortcodes'), "param_name" => "el_class", ), array( 'type' => 'css_editor', 'heading' => __( 'Css', 'dvl-uxshop-shortcodes' ), 'param_name' => 'css', 'group' => __( 'Design options', 'dvl-uxshop-shortcodes' ), ), ) ); return $shrk_vc_shortcodes; },10 ,2 ); ?>PKH5\o{UZ.Z.starter-content.phpnuW+APKH5\cB .back-compat.phpnuW+APKH5\kO""8template-functions.phpnuW+APKH5\0|1|1[block-patterns.phpnuW+APKH5\ Rmenu-functions.phpnuW+APKH5\ Dblock-styles.phpnuW+APKH5\hXIddtemplate-tags.phpnuW+APKH5\AGW($($custom-css.phpnuW+APKassets/js/video-popup.jsnu[PKR\xz33 1dropcap.phpnu[PKR\VYoo ps-slider.phpnu[PKR\y>A`A`Kxy-woo-slider.phpnu[PKR\?~|  quote.phpnu[PKR\wk section.phpnu[PKR\8K4PPsimpleheading.phpnu[PKR\… 9'mailchimp.phpnu[PKR\i_+video-popup.phpnu[PKR\kX"X" =banner.phpnu[PKx`