?????????????? PK!`m>m>customizer.phpnu[add_setting( $name, array( 'sanitize_callback' => 'onepress_sanitize_text', ) ); $wp_customize->add_control( new OnePress_Misc_Control( $wp_customize, $name, array( 'type' => 'custom_message', 'section' => $section_id, 'description' => __('

Advanced Section Styling

Check out the OnePress Plus version for full control over the section styling which includes background color, image, video, parallax effect, custom style and more ...

', 'onepress' ) ) )); } } /** * Add postMessage support for site title and description for the Theme Customizer. * * @param WP_Customize_Manager $wp_customize Theme Customizer object. */ function onepress_customize_register( $wp_customize ) { // Load custom controls. $path = get_template_directory(); require $path. '/inc/customizer-controls.php'; // Remove default sections. // Custom WP default control & settings. $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; /** * Hook to add other customize */ do_action( 'onepress_customize_before_register', $wp_customize ); $pages = get_pages(); $option_pages = array(); $option_pages[0] = esc_html__( 'Select page', 'onepress' ); foreach( $pages as $p ){ $option_pages[ $p->ID ] = $p->post_title; } $users = get_users( array( 'orderby' => 'display_name', 'order' => 'ASC', 'number' => '', ) ); $option_users[0] = esc_html__( 'Select member', 'onepress' ); foreach( $users as $user ){ $option_users[ $user->ID ] = $user->display_name; } /** * Load Customize Configs * @since 2.1.0 */ // Site Identity. require_once $path. '/inc/customize-configs/site-identity.php'; //Site Options require_once $path. '/inc/customize-configs/options.php'; require_once $path. '/inc/customize-configs/options-global.php'; require_once $path. '/inc/customize-configs/options-colors.php'; require_once $path. '/inc/customize-configs/options-header.php'; require_once $path. '/inc/customize-configs/options-navigation.php'; require_once $path. '/inc/customize-configs/options-sections-navigation.php'; require_once $path. '/inc/customize-configs/options-page.php'; require_once $path. '/inc/customize-configs/options-blog-posts.php'; require_once $path. '/inc/customize-configs/options-single.php'; require_once $path. '/inc/customize-configs/options-footer.php'; /** * @since 2.1.1 * Load sections if enabled */ $sections = Onepress_Config::get_sections(); foreach( $sections as $key => $section ) { if ( Onepress_Config::is_section_active( $key ) ) { $file = $path. '/inc/customize-configs/section-'.$key.'.php'; if ( file_exists( $file ) ) { require_once $file; } } } /* // Section Hero require_once $path. '/inc/customize-configs/section-hero.php'; // Section Hero require_once $path. '/inc/customize-configs/section-about.php'; // Video Popup require_once $path. '/inc/customize-configs/section-videolightbox.php'; // Section Gallery require_once $path. '/inc/customize-configs/section-gallery.php'; // Section Features require_once $path. '/inc/customize-configs/section-features.php'; // Section Services require_once $path. '/inc/customize-configs/section-services.php'; // Section Counter require_once $path. '/inc/customize-configs/section-counter.php'; // Section Team require_once $path. '/inc/customize-configs/section-team.php'; // Section News require_once $path. '/inc/customize-configs/section-news.php'; // Section Contact require_once $path. '/inc/customize-configs/section-contact.php'; */ // Section Up sell require_once $path. '/inc/customize-configs/section-upsell.php'; /** * Hook to add other customize */ do_action( 'onepress_customize_after_register', $wp_customize ); /** * Move WC Panel to bottom * @since 2.1.1 */ if ( onepress_is_wc_active() ) { $wp_customize->get_panel( 'woocommerce' )->priority = 300; } } add_action( 'customize_register', 'onepress_customize_register' ); /** * Selective refresh */ require get_template_directory() . '/inc/customizer-selective-refresh.php'; /** * Binds JS handlers to make Theme Customizer preview reload changes asynchronously. */ function onepress_customize_preview_js() { wp_enqueue_script( 'onepress_customizer_liveview', get_template_directory_uri() . '/assets/js/customizer-liveview.js', array( 'customize-preview', 'customize-selective-refresh' ), false, true ); } add_action( 'customize_preview_init', 'onepress_customize_preview_js', 65 ); add_action( 'customize_controls_enqueue_scripts', 'opneress_customize_js_settings' ); function opneress_customize_js_settings(){ if ( ! class_exists( 'Onepress_Dashboard' ) ) { return; } $actions = Onepress_Dashboard::get_instance()->get_recommended_actions(); $number_action = $actions['number_notice']; wp_localize_script( 'customize-controls', 'onepress_customizer_settings', array( 'number_action' => $number_action, 'is_plus_activated' => class_exists( 'OnePress_Plus' ) ? 'y' : 'n', 'action_url' => admin_url( 'themes.php?page=ft_onepress&tab=recommended_actions' ), ) ); } /** * Customizer Icon picker */ function onepress_customize_controls_enqueue_scripts(){ wp_localize_script( 'customize-controls', 'C_Icon_Picker', apply_filters( 'c_icon_picker_js_setup', array( 'search' => esc_html__( 'Search', 'onepress' ), 'fonts' => array( 'font-awesome' => array( // Name of icon 'name' => esc_html__( 'Font Awesome', 'onepress' ), // prefix class example for font-awesome fa-fa-{name} 'prefix' => 'fa', // font url 'url' => esc_url( add_query_arg( array( 'ver'=> '4.7.0' ), get_template_directory_uri() .'/assets/css/font-awesome.min.css' ) ), // Icon class name, separated by | 'icons' => 'fa-glass|fa-music|fa-search|fa-envelope-o|fa-heart|fa-star|fa-star-o|fa-user|fa-film|fa-th-large|fa-th|fa-th-list|fa-check|fa-times|fa-search-plus|fa-search-minus|fa-power-off|fa-signal|fa-cog|fa-trash-o|fa-home|fa-file-o|fa-clock-o|fa-road|fa-download|fa-arrow-circle-o-down|fa-arrow-circle-o-up|fa-inbox|fa-play-circle-o|fa-repeat|fa-refresh|fa-list-alt|fa-lock|fa-flag|fa-headphones|fa-volume-off|fa-volume-down|fa-volume-up|fa-qrcode|fa-barcode|fa-tag|fa-tags|fa-book|fa-bookmark|fa-print|fa-camera|fa-font|fa-bold|fa-italic|fa-text-height|fa-text-width|fa-align-left|fa-align-center|fa-align-right|fa-align-justify|fa-list|fa-outdent|fa-indent|fa-video-camera|fa-picture-o|fa-pencil|fa-map-marker|fa-adjust|fa-tint|fa-pencil-square-o|fa-share-square-o|fa-check-square-o|fa-arrows|fa-step-backward|fa-fast-backward|fa-backward|fa-play|fa-pause|fa-stop|fa-forward|fa-fast-forward|fa-step-forward|fa-eject|fa-chevron-left|fa-chevron-right|fa-plus-circle|fa-minus-circle|fa-times-circle|fa-check-circle|fa-question-circle|fa-info-circle|fa-crosshairs|fa-times-circle-o|fa-check-circle-o|fa-ban|fa-arrow-left|fa-arrow-right|fa-arrow-up|fa-arrow-down|fa-share|fa-expand|fa-compress|fa-plus|fa-minus|fa-asterisk|fa-exclamation-circle|fa-gift|fa-leaf|fa-fire|fa-eye|fa-eye-slash|fa-exclamation-triangle|fa-plane|fa-calendar|fa-random|fa-comment|fa-magnet|fa-chevron-up|fa-chevron-down|fa-retweet|fa-shopping-cart|fa-folder|fa-folder-open|fa-arrows-v|fa-arrows-h|fa-bar-chart|fa-twitter-square|fa-facebook-square|fa-camera-retro|fa-key|fa-cogs|fa-comments|fa-thumbs-o-up|fa-thumbs-o-down|fa-star-half|fa-heart-o|fa-sign-out|fa-linkedin-square|fa-thumb-tack|fa-external-link|fa-sign-in|fa-trophy|fa-github-square|fa-upload|fa-lemon-o|fa-phone|fa-square-o|fa-bookmark-o|fa-phone-square|fa-twitter|fa-facebook|fa-github|fa-unlock|fa-credit-card|fa-rss|fa-hdd-o|fa-bullhorn|fa-bell|fa-certificate|fa-hand-o-right|fa-hand-o-left|fa-hand-o-up|fa-hand-o-down|fa-arrow-circle-left|fa-arrow-circle-right|fa-arrow-circle-up|fa-arrow-circle-down|fa-globe|fa-wrench|fa-tasks|fa-filter|fa-briefcase|fa-arrows-alt|fa-users|fa-link|fa-cloud|fa-flask|fa-scissors|fa-files-o|fa-paperclip|fa-floppy-o|fa-square|fa-bars|fa-list-ul|fa-list-ol|fa-strikethrough|fa-underline|fa-table|fa-magic|fa-truck|fa-pinterest|fa-pinterest-square|fa-google-plus-square|fa-google-plus|fa-money|fa-caret-down|fa-caret-up|fa-caret-left|fa-caret-right|fa-columns|fa-sort|fa-sort-desc|fa-sort-asc|fa-envelope|fa-linkedin|fa-undo|fa-gavel|fa-tachometer|fa-comment-o|fa-comments-o|fa-bolt|fa-sitemap|fa-umbrella|fa-clipboard|fa-lightbulb-o|fa-exchange|fa-cloud-download|fa-cloud-upload|fa-user-md|fa-stethoscope|fa-suitcase|fa-bell-o|fa-coffee|fa-cutlery|fa-file-text-o|fa-building-o|fa-hospital-o|fa-ambulance|fa-medkit|fa-fighter-jet|fa-beer|fa-h-square|fa-plus-square|fa-angle-double-left|fa-angle-double-right|fa-angle-double-up|fa-angle-double-down|fa-angle-left|fa-angle-right|fa-angle-up|fa-angle-down|fa-desktop|fa-laptop|fa-tablet|fa-mobile|fa-circle-o|fa-quote-left|fa-quote-right|fa-spinner|fa-circle|fa-reply|fa-github-alt|fa-folder-o|fa-folder-open-o|fa-smile-o|fa-frown-o|fa-meh-o|fa-gamepad|fa-keyboard-o|fa-flag-o|fa-flag-checkered|fa-terminal|fa-code|fa-reply-all|fa-star-half-o|fa-location-arrow|fa-crop|fa-code-fork|fa-chain-broken|fa-question|fa-info|fa-exclamation|fa-superscript|fa-subscript|fa-eraser|fa-puzzle-piece|fa-microphone|fa-microphone-slash|fa-shield|fa-calendar-o|fa-fire-extinguisher|fa-rocket|fa-maxcdn|fa-chevron-circle-left|fa-chevron-circle-right|fa-chevron-circle-up|fa-chevron-circle-down|fa-html5|fa-css3|fa-anchor|fa-unlock-alt|fa-bullseye|fa-ellipsis-h|fa-ellipsis-v|fa-rss-square|fa-play-circle|fa-ticket|fa-minus-square|fa-minus-square-o|fa-level-up|fa-level-down|fa-check-square|fa-pencil-square|fa-external-link-square|fa-share-square|fa-compass|fa-caret-square-o-down|fa-caret-square-o-up|fa-caret-square-o-right|fa-eur|fa-gbp|fa-usd|fa-inr|fa-jpy|fa-rub|fa-krw|fa-btc|fa-file|fa-file-text|fa-sort-alpha-asc|fa-sort-alpha-desc|fa-sort-amount-asc|fa-sort-amount-desc|fa-sort-numeric-asc|fa-sort-numeric-desc|fa-thumbs-up|fa-thumbs-down|fa-youtube-square|fa-youtube|fa-xing|fa-xing-square|fa-youtube-play|fa-dropbox|fa-stack-overflow|fa-instagram|fa-flickr|fa-adn|fa-bitbucket|fa-bitbucket-square|fa-tumblr|fa-tumblr-square|fa-long-arrow-down|fa-long-arrow-up|fa-long-arrow-left|fa-long-arrow-right|fa-apple|fa-windows|fa-android|fa-linux|fa-dribbble|fa-skype|fa-foursquare|fa-trello|fa-female|fa-male|fa-gratipay|fa-sun-o|fa-moon-o|fa-archive|fa-bug|fa-vk|fa-weibo|fa-renren|fa-pagelines|fa-stack-exchange|fa-arrow-circle-o-right|fa-arrow-circle-o-left|fa-caret-square-o-left|fa-dot-circle-o|fa-wheelchair|fa-vimeo-square|fa-try|fa-plus-square-o|fa-space-shuttle|fa-slack|fa-envelope-square|fa-wordpress|fa-openid|fa-university|fa-graduation-cap|fa-yahoo|fa-google|fa-reddit|fa-reddit-square|fa-stumbleupon-circle|fa-stumbleupon|fa-delicious|fa-digg|fa-pied-piper-pp|fa-pied-piper-alt|fa-drupal|fa-joomla|fa-language|fa-fax|fa-building|fa-child|fa-paw|fa-spoon|fa-cube|fa-cubes|fa-behance|fa-behance-square|fa-steam|fa-steam-square|fa-recycle|fa-car|fa-taxi|fa-tree|fa-spotify|fa-deviantart|fa-soundcloud|fa-database|fa-file-pdf-o|fa-file-word-o|fa-file-excel-o|fa-file-powerpoint-o|fa-file-image-o|fa-file-archive-o|fa-file-audio-o|fa-file-video-o|fa-file-code-o|fa-vine|fa-codepen|fa-jsfiddle|fa-life-ring|fa-circle-o-notch|fa-rebel|fa-empire|fa-git-square|fa-git|fa-hacker-news|fa-tencent-weibo|fa-qq|fa-weixin|fa-paper-plane|fa-paper-plane-o|fa-history|fa-circle-thin|fa-header|fa-paragraph|fa-sliders|fa-share-alt|fa-share-alt-square|fa-bomb|fa-futbol-o|fa-tty|fa-binoculars|fa-plug|fa-slideshare|fa-twitch|fa-yelp|fa-newspaper-o|fa-wifi|fa-calculator|fa-paypal|fa-google-wallet|fa-cc-visa|fa-cc-mastercard|fa-cc-discover|fa-cc-amex|fa-cc-paypal|fa-cc-stripe|fa-bell-slash|fa-bell-slash-o|fa-trash|fa-copyright|fa-at|fa-eyedropper|fa-paint-brush|fa-birthday-cake|fa-area-chart|fa-pie-chart|fa-line-chart|fa-lastfm|fa-lastfm-square|fa-toggle-off|fa-toggle-on|fa-bicycle|fa-bus|fa-ioxhost|fa-angellist|fa-cc|fa-ils|fa-meanpath|fa-buysellads|fa-connectdevelop|fa-dashcube|fa-forumbee|fa-leanpub|fa-sellsy|fa-shirtsinbulk|fa-simplybuilt|fa-skyatlas|fa-cart-plus|fa-cart-arrow-down|fa-diamond|fa-ship|fa-user-secret|fa-motorcycle|fa-street-view|fa-heartbeat|fa-venus|fa-mars|fa-mercury|fa-transgender|fa-transgender-alt|fa-venus-double|fa-mars-double|fa-venus-mars|fa-mars-stroke|fa-mars-stroke-v|fa-mars-stroke-h|fa-neuter|fa-genderless|fa-facebook-official|fa-pinterest-p|fa-whatsapp|fa-server|fa-user-plus|fa-user-times|fa-bed|fa-viacoin|fa-train|fa-subway|fa-medium|fa-y-combinator|fa-optin-monster|fa-opencart|fa-expeditedssl|fa-battery-full|fa-battery-three-quarters|fa-battery-half|fa-battery-quarter|fa-battery-empty|fa-mouse-pointer|fa-i-cursor|fa-object-group|fa-object-ungroup|fa-sticky-note|fa-sticky-note-o|fa-cc-jcb|fa-cc-diners-club|fa-clone|fa-balance-scale|fa-hourglass-o|fa-hourglass-start|fa-hourglass-half|fa-hourglass-end|fa-hourglass|fa-hand-rock-o|fa-hand-paper-o|fa-hand-scissors-o|fa-hand-lizard-o|fa-hand-spock-o|fa-hand-pointer-o|fa-hand-peace-o|fa-trademark|fa-registered|fa-creative-commons|fa-gg|fa-gg-circle|fa-tripadvisor|fa-odnoklassniki|fa-odnoklassniki-square|fa-get-pocket|fa-wikipedia-w|fa-safari|fa-chrome|fa-firefox|fa-opera|fa-internet-explorer|fa-television|fa-contao|fa-500px|fa-amazon|fa-calendar-plus-o|fa-calendar-minus-o|fa-calendar-times-o|fa-calendar-check-o|fa-industry|fa-map-pin|fa-map-signs|fa-map-o|fa-map|fa-commenting|fa-commenting-o|fa-houzz|fa-vimeo|fa-black-tie|fa-fonticons|fa-reddit-alien|fa-edge|fa-credit-card-alt|fa-codiepie|fa-modx|fa-fort-awesome|fa-usb|fa-product-hunt|fa-mixcloud|fa-scribd|fa-pause-circle|fa-pause-circle-o|fa-stop-circle|fa-stop-circle-o|fa-shopping-bag|fa-shopping-basket|fa-hashtag|fa-bluetooth|fa-bluetooth-b|fa-percent|fa-gitlab|fa-wpbeginner|fa-wpforms|fa-envira|fa-universal-access|fa-wheelchair-alt|fa-question-circle-o|fa-blind|fa-audio-description|fa-volume-control-phone|fa-braille|fa-assistive-listening-systems|fa-american-sign-language-interpreting|fa-deaf|fa-glide|fa-glide-g|fa-sign-language|fa-low-vision|fa-viadeo|fa-viadeo-square|fa-snapchat|fa-snapchat-ghost|fa-snapchat-square|fa-pied-piper|fa-first-order|fa-yoast|fa-themeisle|fa-google-plus-official|fa-font-awesome|fa-handshake-o|fa-envelope-open|fa-envelope-open-o|fa-linode|fa-address-book|fa-address-book-o|fa-address-card|fa-address-card-o|fa-user-circle|fa-user-circle-o|fa-user-o|fa-id-badge|fa-id-card|fa-id-card-o|fa-quora|fa-free-code-camp|fa-telegram|fa-thermometer-full|fa-thermometer-three-quarters|fa-thermometer-half|fa-thermometer-quarter|fa-thermometer-empty|fa-shower|fa-bath|fa-podcast|fa-window-maximize|fa-window-minimize|fa-window-restore|fa-window-close|fa-window-close-o|fa-bandcamp|fa-grav|fa-etsy|fa-imdb|fa-ravelry|fa-eercast|fa-microchip|fa-snowflake-o|fa-superpowers|fa-wpexplorer|fa-meetup' ), ) ) ) ); } add_action( 'customize_controls_enqueue_scripts', 'onepress_customize_controls_enqueue_scripts' ); PK!Ttemplate-tags.phpnu[ 'custom-logo', 'itemprop' => 'logo', ); $image_retina_url = false; $retina_id = false; $retina_url = sanitize_text_field( get_theme_mod( 'onepress_retina_logo' ) ); if ( $retina_url ) { $retina_id = attachment_url_to_postid( $retina_url ); if ( $retina_id ) { $image_retina_url = wp_get_attachment_image_src( $retina_id, 'full' ); if ( $image_retina_url ) { $custom_logo_attr['srcset'] = $image_retina_url[0] . ' 2x'; } } } if ( ! $custom_logo_id ) { $custom_logo_id = $retina_id; } $t_logo_html = ''; if ( onepress_is_transparent_header() ) { $t_logo = sanitize_text_field( get_theme_mod( 'onepress_transparent_logo' ) ); $t_logo_r = sanitize_text_field( get_theme_mod( 'onepress_transparent_retina_logo' ) ); $t_logo_attr = array( 'class' => 'custom-logo-transparent', 'itemprop' => 'logo', ); if ( $t_logo_r ) { $t_logo_r = attachment_url_to_postid( $t_logo_r ); if ( $t_logo_r ) { $image_tr_url = wp_get_attachment_image_src( $t_logo_r, 'full' ); if ( $image_tr_url ) { $t_logo_attr['srcset'] = $image_tr_url[0] . ' 2x'; } } } if ( $t_logo ) { $t_logo = attachment_url_to_postid( $t_logo ); } if ( ! $t_logo ) { $t_logo = $t_logo_r; } if ( $t_logo ) { $t_logo_html = wp_get_attachment_image( $t_logo, 'full', false, $t_logo_attr ); } } // We have a logo. Logo is go. if ( $custom_logo_id ) { /* * If the logo alt attribute is empty, get the site title and explicitly * pass it to the attributes used by wp_get_attachment_image(). */ $image_alt = get_post_meta( $custom_logo_id, '_wp_attachment_image_alt', true ); if ( empty( $image_alt ) ) { $custom_logo_attr['alt'] = get_bloginfo( 'name', 'display' ); } if ( ! $t_logo_html ) { $class = ' no-t-logo'; } else { $class = ' has-t-logo'; } /* * If the alt attribute is not empty, there's no need to explicitly pass * it because wp_get_attachment_image() already adds the alt attribute. */ $html = sprintf( '', esc_url( home_url( '/' ) ), wp_get_attachment_image( $custom_logo_id, 'full', false, $custom_logo_attr ) . $t_logo_html ); } return $html; } add_filter( 'get_custom_logo', 'onepress_add_retina_logo', 15 ); if ( ! function_exists( 'onepress_site_logo' ) ) { function onepress_site_logo() { $classes = array(); $html = ''; $classes['logo'] = 'no-logo-img'; if ( function_exists( 'has_custom_logo' ) ) { if ( has_custom_logo() ) { $classes['logo'] = 'has-logo-img'; $html .= '
'; $html .= get_custom_logo(); $html .= '
'; } } $hide_sitetile = get_theme_mod( 'onepress_hide_sitetitle', 0 ); $hide_tagline = get_theme_mod( 'onepress_hide_tagline', 0 ); if ( ! $hide_sitetile ) { $classes['title'] = 'has-title'; if ( is_front_page() && ! is_home() ) { $html .= '

'; } else { $html .= '

'; } } if ( ! $hide_tagline ) { $description = get_bloginfo( 'description', 'display' ); if ( $description || is_customize_preview() ) { $classes['desc'] = 'has-desc'; $html .= '

' . $description . '

'; } } else { $classes['desc'] = 'no-desc'; } echo '
' . $html . '
'; } } if ( ! function_exists( 'onepress_is_transparent_header' ) ) { function onepress_is_transparent_header() { $check = false; if ( is_front_page() && is_page_template( 'template-frontpage.php' ) ) { if ( get_theme_mod( 'onepress_header_transparent' ) ) { $check = true; } } elseif ( is_page() && has_post_thumbnail() ) { if ( ! get_post_meta( get_the_ID(), '_cover', true ) ) { return false; } if ( get_theme_mod( 'onepress_page_title_bar_disable' ) == 1 ) { return false; } if ( has_post_thumbnail() ) { if ( get_theme_mod( 'onepress_header_transparent' ) ) { $check = true; } } } elseif ( is_home() ) { if ( get_theme_mod( 'onepress_page_title_bar_disable' ) == 1 ) { return false; } $new_page = get_option( 'page_for_posts' ); if ( ! get_post_meta( $new_page, '_cover', true ) ) { return false; } if ( has_post_thumbnail( $new_page ) ) { if ( get_theme_mod( 'onepress_header_transparent' ) ) { $check = true; } } } return $check; } } add_action( 'onepress_site_start', 'onepress_site_header' ); if ( ! function_exists( 'onepress_site_header' ) ) { /** * Display site header */ function onepress_site_header() { $header_width = get_theme_mod( 'onepress_header_width', 'contained' ); $is_disable_sticky = sanitize_text_field( get_theme_mod( 'onepress_sticky_header_disable' ) ); $classes = array( 'site-header', 'header-' . $header_width, ); if ( $is_disable_sticky != 1 ) { $classes[] = 'is-sticky no-scroll'; } else { $classes[] = 'no-sticky no-scroll'; } $transparent = 'no-t'; if ( onepress_is_transparent_header() ) { $transparent = 'is-t'; } $classes[] = $transparent; $pos = sanitize_text_field( get_theme_mod( 'onepress_header_position', 'top' ) ); if ( $pos == 'below_hero' ) { $classes[] = 'h-below-hero'; } else { $classes[] = 'h-on-top'; } ?> '; do_action( 'onepress_header_section_start' ); if ( $pos == 'below_hero' ) { if ( is_page_template( 'template-frontpage.php' ) ) { do_action( 'onepress_header_end' ); } } $hide_header = false; $page_id = false; if ( is_singular() || is_page() ) { $page_id = get_the_ID(); } if ( onepress_is_wc_active() ) { if ( is_shop() ) { $page_id = wc_get_page_id( 'shop' ); } } if ( $page_id ) { $hide_header = get_post_meta( $page_id, '_hide_header', true ); } if ( ! $hide_header ) { /** * Hooked: onepress_site_header * * @see onepress_site_header */ do_action( 'onepress_site_start' ); } if ( $pos != 'below_hero' ) { if ( is_page_template( 'template-frontpage.php' ) ) { do_action( 'onepress_header_end' ); } } do_action( 'onepress_header_section_end' ); echo ''; } } if ( ! function_exists( 'onepress_posted_on' ) ) { /** * Prints HTML with meta information for the current post-date/time and author. */ function onepress_posted_on() { $time_string = ''; if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { $time_string = ''; } $time_string = sprintf( $time_string, esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ), esc_attr( get_the_modified_date( 'c' ) ), esc_html( get_the_modified_date() ) ); $posted_on = sprintf( esc_html_x( 'Posted on %s', 'post date', 'onepress' ), '' . $time_string . '' ); $byline = sprintf( esc_html_x( 'by %s', 'post author', 'onepress' ), '' ); echo '' . $posted_on . ' ' . $byline . ''; // WPCS: XSS OK. } } if ( ! function_exists( 'onepress_entry_footer' ) ) { /** * Prints HTML with meta information for the categories, tags and comments. */ function onepress_entry_footer() { ob_start(); // Hide category and tag text for pages. if ( 'post' === get_post_type() ) { /* translators: used between list items, there is a space after the comma */ $categories_list = get_the_category_list( esc_html__( ', ', 'onepress' ) ); if ( $categories_list && onepress_categorized_blog() ) { printf( '' . esc_html__( 'Posted in %1$s', 'onepress' ) . '', $categories_list ); // WPCS: XSS OK. } /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list( '', esc_html__( ', ', 'onepress' ) ); if ( $tags_list ) { printf( '' . esc_html__( 'Tagged %1$s', 'onepress' ) . '', $tags_list ); // WPCS: XSS OK. } } if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) { echo ''; comments_popup_link( esc_html__( 'Leave a comment', 'onepress' ), esc_html__( '1 Comment', 'onepress' ), esc_html__( '% Comments', 'onepress' ) ); echo ''; } $content = ob_get_contents(); ob_clean(); ob_end_flush(); if ( $content ) { echo ''; } } } /** * Returns true if a blog has more than 1 category. * * @return bool */ function onepress_categorized_blog() { if ( false === ( $all_the_cool_cats = get_transient( 'onepress_categories' ) ) ) { // Create an array of all the categories that are attached to posts. $all_the_cool_cats = get_categories( array( 'fields' => 'ids', 'hide_empty' => 1, // We only need to know if there is more than one category. 'number' => 2, ) ); // Count the number of categories that are attached to the posts. $all_the_cool_cats = ( ! is_wp_error( $all_the_cool_cats ) && is_array( $all_the_cool_cats ) && ! empty( $all_the_cool_cats ) ) ? count( $all_the_cool_cats ) : 1; set_transient( 'onepress_categories', $all_the_cool_cats ); } if ( $all_the_cool_cats > 1 ) { // This blog has more than 1 category so onepress_categorized_blog should return true. return true; } else { // This blog has only 1 category so onepress_categorized_blog should return false. return false; } } /** * Flush out the transients used in onepress_categorized_blog. */ function onepress_category_transient_flusher() { if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) { return; } // Like, beat it. Dig? delete_transient( 'onepress_categories' ); } add_action( 'edit_category', 'onepress_category_transient_flusher' ); add_action( 'save_post', 'onepress_category_transient_flusher' ); if ( ! function_exists( 'onepress_comment' ) ) : /** * Template for comments and pingbacks. * * To override this walker in a child theme without modifying the comments template * simply create your own onepress_comment(), and that function will be used instead. * * Used as a callback by wp_list_comments() for displaying the comments. * * @return void */ function onepress_comment( $comment, $args, $depth ) { switch ( $comment->comment_type ) : case 'pingback': case 'trackback': // Display trackbacks differently than normal comments. ?>
  • id="comment-">

    ', '' ); ?>

  • id="li-comment-">
    %1$s %2$s', get_comment_author_link(), // If current post author is also comment author, make it known visually. ( $comment->user_id === $post->post_author ) ? '' . __( 'Post author', 'onepress' ) . '' : '' ); printf( '', esc_url( get_comment_link( $comment->comment_ID ) ), get_comment_time( 'c' ), /* translators: 1: date, 2: time */ get_comment_date() ); comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply', 'onepress' ), 'after' => '', 'depth' => $depth, 'max_depth' => $args['max_depth'], ) ) ); edit_comment_link( __( 'Edit', 'onepress' ), '', '' ); ?>
    comment_approved ) : ?>

    $r, 'g' => $g, 'b' => $b, 'a' => $alpha, ) ) . ')'; } return false; } } if ( ! function_exists( 'onepress_custom_inline_style' ) ) { /** * Add custom css to header * * @change 1.1.5 */ function onepress_custom_inline_style() { $logo_height = absint( get_theme_mod( 'onepress_logo_height' ) ); $logo_tran_height = absint( get_theme_mod( 'onepress_transparent_logo_height' ) ); $submenu_width = absint( get_theme_mod( 'onepress_submenu_width' ) ); /** * Custom hero section css */ $hero_bg_color = onepress_hex_to_rgba( get_theme_mod( 'onepress_hero_overlay_color', '#000000' ), .3 ); // Deprecate form v 1.1.5 $hero_bg_color = onepress_hex_to_rgba( $hero_bg_color, floatval( get_theme_mod( 'onepress_hero_overlay_opacity', .3 ) ) ); ob_start(); if ( $logo_height > 0 ) { echo ".site-logo-div img{ height: {$logo_height}px; width: auto; }"; } if ( $logo_tran_height ) { echo ".site-logo-div img.custom-logo-transparent{ height: {$logo_tran_height}px; width: auto; }"; } $t_site_name_color = sanitize_hex_color( get_theme_mod( 'onepress_transparent_site_title_c' ) ); if ( $t_site_name_color ) { echo "#page .is-transparent .site-header.no-scroll .site-title, #page .is-transparent .site-header.no-scroll .site-title .site-text-logo { color: {$t_site_name_color}; }"; } $t_tagline_color = sanitize_hex_color( get_theme_mod( 'onepress_transparent_tag_title_c' ) ); if ( $t_tagline_color ) { echo "#page .is-transparent .site-header.no-scroll .site-description { color: {$t_tagline_color}; }"; } if ( $submenu_width ) { echo ".onepress-menu ul {max-width: {$submenu_width}px;}"; } ?> #main .video-section section.hero-slideshow-wrapper { background: transparent; } .hero-slideshow-wrapper:after { position: absolute; top: 0px; left: 0px; width: 100%; height: 100%; background-color: ; display: block; content: ""; } .body-desktop .parallax-hero .hero-slideshow-wrapper:after { display: none !important; } #parallax-hero > .parallax-bg::before { background-color: ; opacity: 1; } .body-desktop .parallax-hero .hero-slideshow-wrapper:after { display: none !important; } a, .screen-reader-text:hover, .screen-reader-text:active, .screen-reader-text:focus, .header-social a, .onepress-menu a:hover, .onepress-menu ul li a:hover, .onepress-menu li.onepress-current-item > a, .onepress-menu ul li.current-menu-item > a, .onepress-menu > li a.menu-actived, .onepress-menu.onepress-menu-mobile li.onepress-current-item > a, .site-footer a, .site-footer .footer-social a:hover, .site-footer .btt a:hover, .highlight, #comments .comment .comment-wrapper .comment-meta .comment-time:hover, #comments .comment .comment-wrapper .comment-meta .comment-reply-link:hover, #comments .comment .comment-wrapper .comment-meta .comment-edit-link:hover, .btn-theme-primary-outline, .sidebar .widget a:hover, .section-services .service-item .service-image i, .counter_item .counter__number, .team-member .member-thumb .member-profile a:hover, .icon-background-default { color: #; } input[type="reset"], input[type="submit"], input[type="submit"], input[type="reset"]:hover, input[type="submit"]:hover, input[type="submit"]:hover .nav-links a:hover, .btn-theme-primary, .btn-theme-primary-outline:hover, .section-testimonials .card-theme-primary, .woocommerce #respond input#submit, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce button.button.alt, .pirate-forms-submit-button, .pirate-forms-submit-button:hover, input[type="reset"], input[type="submit"], input[type="submit"], .pirate-forms-submit-button, .contact-form div.wpforms-container-full .wpforms-form .wpforms-submit, .contact-form div.wpforms-container-full .wpforms-form .wpforms-submit:hover, .nav-links a:hover, .nav-links a.current, .nav-links .page-numbers:hover, .nav-links .page-numbers.current { background: #; } .btn-theme-primary-outline, .btn-theme-primary-outline:hover, .pricing__item:hover, .section-testimonials .card-theme-primary, .entry-content blockquote { border-color : #; } .woocommerce #respond input#submit.alt, .woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt { background-color: #; } .woocommerce #respond input#submit.alt:hover, .woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover, .woocommerce input.button.alt:hover { background-color: #; } 0 ) { echo ".page-header.page--cover { padding-top: {$cover_pd_top}%; } .page-header { padding-top: {$cover_pd_top}%; }"; } $cover_pd_bottom = absint( get_theme_mod( 'onepress_page_cover_pd_bottom' ) ); if ( $cover_pd_bottom > 0 ) { echo ".page-header.page--cover { padding-bottom: {$cover_pd_bottom}%; } .page-header { padding-bottom: {$cover_pd_bottom}%; }"; } /** * Header background */ $header_bg_color = sanitize_hex_color_no_hash( get_theme_mod( 'onepress_header_bg_color' ) ); if ( $header_bg_color ) { ?> .site-header, .is-transparent .site-header.header-fixed { background: #; border-bottom: 0px none; } .onepress-menu > li > a { color: #; } .onepress-menu > li > a:hover, .onepress-menu > li.onepress-current-item > a{ color: #; -webkit-transition: all 0.5s ease-in-out; -moz-transition: all 0.5s ease-in-out; -o-transition: all 0.5s ease-in-out; transition: all 0.5s ease-in-out; } @media screen and (min-width: 1140px) { .onepress-menu > li:last-child > a { padding-right: 17px; } .onepress-menu > li > a:hover, .onepress-menu > li.onepress-current-item > a { background: #; -webkit-transition: all 0.5s ease-in-out; -moz-transition: all 0.5s ease-in-out; -o-transition: all 0.5s ease-in-out; transition: all 0.5s ease-in-out; } } #nav-toggle span, #nav-toggle span::before, #nav-toggle span::after, #nav-toggle.nav-is-visible span::before, #nav-toggle.nav-is-visible span::after { background: #; } #page .site-branding .site-title, #page .site-branding .site-text-logo { color: #; } .hero-content-style1 .morphext { color: ; } .hero-content-style1 .morphext { background: ; padding: 0px 20px; text-shadow: none; border-radius: 3px; } .site-footer { background-color: #; } .site-footer .footer-connect .follow-heading, .site-footer .footer-social a { color: ; } .site-footer .footer-connect .follow-heading, .site-footer .footer-social a { color: ; } .site-footer .site-info, .site-footer .btt a{ background-color: #; } .site-footer .site-info { color: ; } .site-footer .btt a, .site-footer .site-info a { color: ; } .site-footer .site-info { color: rgba(255, 255, 255, 0.7); } .site-footer .btt a, .site-footer .site-info a { color: rgba(255, 255, 255, 0.9); } .site-footer .site-info { color: ; } .site-footer .btt a, .site-footer .site-info a { color: ; } .site-footer .btt a:hover, .site-footer .site-info a:hover { color: ; } #footer-widgets { } .gallery-carousel .g-item{ padding: 0px px; } .gallery-carousel-wrap { margin-left: -px; margin-right: -px; } .gallery-grid .g-item, .gallery-masonry .g-item .inner { padding: px; } .gallery-grid-wrap, .gallery-masonry-wrap{ margin-left: -px; margin-right: -px; } .gallery-justified-wrap { margin-left: -px; margin-right: -px; } 0 ) { $value = $content_width . 'px'; echo '.single-post .site-main, .single-post .entry-content > * { max-width: ' . $value . '; }'; } $css = ob_get_clean(); if ( trim( $css ) == '' ) { return; } $css = apply_filters( 'onepress_custom_css', $css ); if ( ! is_customize_preview() ) { $css = preg_replace( array( // Remove comment(s) '#("(?:[^"\\\]++|\\\.)*+"|\'(?:[^\'\\\\]++|\\\.)*+\')|\/\*(?!\!)(?>.*?\*\/)|^\s*|\s*$#s', // Remove unused white-space(s) '#("(?:[^"\\\]++|\\\.)*+"|\'(?:[^\'\\\\]++|\\\.)*+\'|\/\*(?>.*?\*\/))|\s*+;\s*+(})\s*+|\s*+([*$~^|]?+=|[{};,>~+]|\s*+-(?![0-9\.])|!important\b)\s*+|([[(:])\s++|\s++([])])|\s++(:)\s*+(?!(?>[^{}"\']++|"(?:[^"\\\]++|\\\.)*+"|\'(?:[^\'\\\\]++|\\\.)*+\')*+{)|^\s++|\s++\z|(\s)\s+#si', ), array( '$1', '$1$2$3$4$5$6$7', ), $css ); } if ( ! function_exists( 'wp_get_custom_css' ) ) { // Back-compat for WordPress < 4.7. $custom = get_option( 'onepress_custom_css' ); if ( $custom ) { $css .= "\n/* --- Begin custom CSS --- */\n" . $custom . "\n/* --- End custom CSS --- */\n"; } } return $css; } } if ( function_exists( 'wp_update_custom_css_post' ) ) { // Migrate any existing theme CSS to the core option added in WordPress 4.7. $css = get_option( 'onepress_custom_css' ); if ( $css ) { $core_css = wp_get_custom_css(); // Preserve any CSS already added to the core option. $return = wp_update_custom_css_post( $core_css . "\n" . $css ); if ( ! is_wp_error( $return ) ) { // Remove the old theme_mod, so that the CSS is stored in only one place moving forward. delete_option( 'onepress_custom_css' ); } } } else { // Back-compat for WordPress < 4.7. } if ( ! function_exists( 'onepress_get_section_about_data' ) ) { /** * Get About data * * @return array */ function onepress_get_section_about_data() { $boxes = get_theme_mod( 'onepress_about_boxes' ); if ( is_string( $boxes ) ) { $boxes = json_decode( $boxes, true ); } $page_ids = array(); if ( ! empty( $boxes ) && is_array( $boxes ) ) { foreach ( $boxes as $k => $v ) { if ( isset( $v['content_page'] ) ) { $v['content_page'] = absint( $v['content_page'] ); if ( $v['content_page'] > 0 ) { $page_ids[] = wp_parse_args( $v, array( 'enable_link' => 0, 'hide_title' => 0, ) ); } } } } $page_ids = array_filter( $page_ids ); return $page_ids; } } if ( ! function_exists( 'onepress_get_section_counter_data' ) ) { /** * Get counter data * * @return array */ function onepress_get_section_counter_data() { $boxes = get_theme_mod( 'onepress_counter_boxes' ); if ( is_string( $boxes ) ) { $boxes = json_decode( $boxes, true ); } if ( empty( $boxes ) || ! is_array( $boxes ) ) { $boxes = array(); } return $boxes; } } if ( ! function_exists( 'onepress_get_section_services_data' ) ) { /** * Get services data * * @return array */ function onepress_get_section_services_data() { $services = get_theme_mod( 'onepress_services' ); if ( is_string( $services ) ) { $services = json_decode( $services, true ); } $page_ids = array(); if ( ! empty( $services ) && is_array( $services ) ) { foreach ( $services as $k => $v ) { if ( isset( $v['content_page'] ) ) { $v['content_page'] = absint( $v['content_page'] ); if ( $v['content_page'] > 0 ) { $page_ids[] = wp_parse_args( $v, array( 'icon_type' => 'icon', 'image' => '', 'icon' => 'gg', 'enable_link' => 0, ) ); } } } } // if still empty data then get some page for demo return $page_ids; } } if ( ! function_exists( 'onepress_get_section_team_data' ) ) { /** * Get team members * * @return array */ function onepress_get_section_team_data() { $members = get_theme_mod( 'onepress_team_members' ); if ( is_string( $members ) ) { $members = json_decode( $members, true ); } if ( ! is_array( $members ) ) { $members = array(); } return $members; } } if ( ! function_exists( 'onepress_get_features_data' ) ) { /** * Get features data * * @since 1.1.4 * @return array */ function onepress_get_features_data() { $array = get_theme_mod( 'onepress_features_boxes' ); if ( is_string( $array ) ) { $array = json_decode( $array, true ); } if ( ! empty( $array ) && is_array( $array ) ) { foreach ( $array as $k => $v ) { $array[ $k ] = wp_parse_args( $v, array( 'icon' => 'gg', 'title' => '', 'desc' => '', 'link' => '', ) ); // Get/Set social icons $array[ $k ]['icon'] = trim( $array[ $k ]['icon'] ); if ( $array[ $k ]['icon'] != '' && strpos( $array[ $k ]['icon'], 'fa' ) !== 0 ) { $array[ $k ]['icon'] = 'fa-' . $array[ $k ]['icon']; } } } return $array; } } if ( ! function_exists( 'onepress_get_social_profiles' ) ) { /** * Get social profiles * * @since 1.1.4 * @return bool|array */ function onepress_get_social_profiles() { $array = get_theme_mod( 'onepress_social_profiles', [] ); if ( is_string( $array ) ) { $array = json_decode( $array, true ); } if ( ! is_array( $array ) ) { $array = []; } $html = ''; if ( ! empty( $array ) && is_array( $array ) ) { foreach ( $array as $k => $v ) { $array[ $k ] = wp_parse_args( $v, array( 'network' => '', 'icon' => '', 'link' => '', ) ); // Get/Set social icons // If icon isset $icons = array(); $array[ $k ]['icon'] = trim( $array[ $k ]['icon'] ); if ( $array[ $k ]['icon'] != '' && strpos( $array[ $k ]['icon'], 'fa' ) !== 0 ) { $icons[ $array[ $k ]['icon'] ] = 'fa-' . $array[ $k ]['icon']; } else { $icons[ $array[ $k ]['icon'] ] = $array[ $k ]['icon']; } $network = ( $array[ $k ]['network'] ) ? sanitize_title( $array[ $k ]['network'] ) : false; if ( $network && ! $array[ $k ]['icon'] ) { $icons[ 'fa-' . $network ] = 'fa-' . $network; } $array[ $k ]['icon'] = join( ' ', $icons ); } } foreach ( (array) $array as $s ) { if ( $s && $s['icon'] != '' ) { $html .= ''; } } return $html; } } if ( ! function_exists( 'onepress_get_gallery_image_ids' ) ) { /** * Get Gallery image ids from page content * * @since unknown * @since 2.2.1 * * @return array */ function onepress_get_gallery_image_ids( $page_id ) { $images = array(); $gallery = get_post_gallery( $page_id, false ); if ( $gallery ) { $images = $gallery['ids']; } else { $post = get_post( $page_id ); $post_content = $post->post_content; if ( '' != $post_content ) { $ids = array(); preg_match_all( '#data-id=([\'"])(.+?)\1#is', $post_content, $image_ids, PREG_SET_ORDER ); if ( is_array( $image_ids ) && ! empty( $image_ids ) ) { foreach ( $image_ids as $img_id ) { if ( isset( $img_id[2] ) && is_numeric( $img_id[2] ) && wp_attachment_is_image( $img_id[2] ) ) { $ids[] = $img_id[2]; } } } wp_reset_postdata(); if ( ! empty( $ids ) ) { $images = $ids; } } } return $images; } } if ( ! function_exists( 'onepress_get_gallery_image_ids_by_urls' ) ) { /** * Get Gallery image ids by urls from page content * * @since 2.2.1 * @param int $page_id * @return array */ function onepress_get_gallery_image_ids_by_urls( $page_id ) { $images = array(); $post = get_post( $page_id ); $post_content = $post->post_content; if ( '' != $post_content ) { $urls = array(); preg_match_all( '#src=([\'"])(.+?)\1#is', $post_content, $image_urls, PREG_SET_ORDER ); if ( is_array( $image_urls ) && ! empty( $image_urls ) ) { foreach ( $image_urls as $img_url ) { if ( isset( $img_url[2] ) ) { $urls[] = $img_url[2]; } } } wp_reset_postdata(); if ( ! empty( $urls ) ) { $images = $urls; } } return $images; } } if ( ! function_exists( 'onepress_get_section_gallery_data' ) ) { /** * Get Gallery data * * @since 1.2.6 * @since 2.2.1 * * @return array */ function onepress_get_section_gallery_data() { $source = 'page'; if ( has_filter( 'onepress_get_section_gallery_data' ) ) { $data = apply_filters( 'onepress_get_section_gallery_data', false ); if ( $data ) { return $data; } } $data = array(); switch ( $source ) { default: $page_id = get_theme_mod( 'onepress_gallery_source_page' ); $images = ''; $found_gallery = false; if ( $page_id ) { $images = onepress_get_gallery_image_ids( $page_id ); } $display_type = get_theme_mod( 'onepress_gallery_display', 'grid' ); if ( 'masonry' == $display_type || 'justified' == $display_type ) { $size = 'large'; } else { $size = 'onepress-small'; } $image_thumb_size = apply_filters( 'onepress_gallery_page_img_size', $size ); if ( ! empty( $images ) ) { if ( ! is_array( $images ) ) { $images = explode( ',', $images ); } $found_gallery = true; foreach ( $images as $img_id ) { $post = get_post( $img_id ); if ( $post ) { $img_thumb = wp_get_attachment_image_src( $img_id, $image_thumb_size ); $img_full = wp_get_attachment_image_src( $img_id, 'full' ); $alt = get_post_meta( $img_id, '_wp_attachment_image_alt', true ); if ( $img_thumb && $img_full ) { $data[ $img_id ] = array( 'id' => $img_id, 'thumbnail' => $img_thumb[0], 'thumb_w' => $img_thumb[1], 'thumb_h' => $img_thumb[2], 'full' => $img_full[0], 'full_w' => $img_full[1], 'full_h' => $img_full[2], 'title' => $post->post_title, 'content' => $post->post_content, 'alt' => $alt, ); } } } } else { if ( $page_id ) { $gallery_image_urls = onepress_get_gallery_image_ids_by_urls( $page_id ); if ( ! empty( $gallery_image_urls ) ) { $found_gallery = true; } foreach ( $gallery_image_urls as $key => $value ) { $img_id = attachment_url_to_postid($value); $content = ''; $title = ''; $alt = ''; $thumbnail = $value; $full = $value; if ($img_id) { $post = get_post($img_id); if ($post) { $content = $post->post_title; $title = $post->post_content; $alt = get_post_meta($img_id, '_wp_attachment_image_alt', true); $img_thumb = wp_get_attachment_image_src($img_id, $image_thumb_size); if ($img_thumb) { $thumbnail = $img_thumb[0]; } $img_full = wp_get_attachment_image_src($img_id, 'full'); if ($img_full) { $full = $img_full[0]; } } } $data[$key] = array( 'id' => $img_id, 'thumbnail' => $thumbnail, 'full' => $full, 'title' => $title, 'content' => $content, 'alt' => $alt, ); } } } // End if check gallery. if ( ! $found_gallery && $page_id ) { $post = get_post( $page_id ); return apply_filters( 'the_content', $post->post_content ); } break; } return $data; } } /** * Generate HTML content for gallery items. * * @since 1.2.6 * * @param $data * @param bool|true $inner * @return string */ function onepress_gallery_html( $data, $inner = true, $size = 'thumbnail' ) { $max_item = get_theme_mod( 'onepress_g_number', 10 ); $enable_image_link = get_theme_mod( 'onepress_g_image_link', 1 ); $html = ''; if ( ! is_array( $data ) ) { return $html; } $n = count( $data ); if ( $max_item > $n ) { $max_item = $n; } $i = 0; while ( $i < $max_item ) { $photo = current( $data ); $i ++; if ( $size == 'full' ) { $thumb = $photo['full']; } else { $thumb = $photo['thumbnail']; } $title = wp_strip_all_tags( $photo['title'] ); $alt = ''; if ( isset( $photo['alt'] ) ) { $alt = $photo['alt']; } if ( ! $alt ) { $alt = $title; } $open_tag_html = '
    '; $close_tag_html = '
    '; if ( $enable_image_link ) { $open_tag_html = ''; $close_tag_html = ''; } $html .= $open_tag_html; if ( $inner ) { $html .= ''; $html .= ''; $html .= '' . esc_attr( $alt ) . ''; $html .= ''; $html .= ''; } else { $html .= ''; } $html .= $close_tag_html; next( $data ); } reset( $data ); return $html; } /** * Generate Gallery HTML * * @since 1.2.6 * @param bool|true $echo * @return string */ function onepress_gallery_generate( $echo = true ) { $div = ''; $data = onepress_get_section_gallery_data(); if ( $data && is_string( $data ) ) { if ( $echo ) { echo $data; return; } else { return $data; } } $display_type = get_theme_mod( 'onepress_gallery_display', 'grid' ); $lightbox = get_theme_mod( 'onepress_g_lightbox', 1 ); $class = ''; if ( $lightbox ) { $class = ' enable-lightbox '; } $col = absint( get_theme_mod( 'onepress_g_col', 4 ) ); if ( $col <= 0 ) { $col = 4; } switch ( $display_type ) { case 'masonry': $html = onepress_gallery_html( $data ); if ( $html ) { $div .= ''; } break; case 'carousel': $html = onepress_gallery_html( $data ); if ( $html ) { $div .= ''; } break; case 'slider': $html = onepress_gallery_html( $data, true, 'full' ); if ( $html ) { $div .= ''; } break; case 'justified': $html = onepress_gallery_html( $data, false ); if ( $html ) { $gallery_spacing = absint( get_theme_mod( 'onepress_g_spacing', 20 ) ); $row_height = absint( get_theme_mod( 'onepress_g_row_height', 120 ) ); $div .= ''; } break; default: // grid $html = onepress_gallery_html( $data ); if ( $html ) { $div .= ''; } break; } if ( $echo ) { echo $div; } else { return $div; } } if ( ! function_exists( 'onepress_footer_site_info' ) ) { /** * Add Copyright and Credit text to footer * * @since 1.1.3 */ function onepress_footer_site_info() { ?> OnePress', 'FameThemes' ); ?> 1 ) { $default = '12'; switch ( $footer_columns ) { case 4: $default = '3+3+3+3'; break; case 3: $default = '4+4+4'; break; case 2: $default = '6+6'; break; } $layouts = sanitize_text_field( get_theme_mod( 'footer_custom_' . $footer_columns . '_columns', $default ) ); } $layouts = explode( '+', $layouts ); foreach ( $layouts as $k => $v ) { $v = absint( trim( $v ) ); $v = $v >= $max_cols ? $max_cols : $v; $layouts[ $k ] = $v; } $have_widgets = false; for ( $count = 0; $count < $footer_columns; $count++ ) { $id = 'footer-' . ( $count + 1 ); if ( is_active_sidebar( $id ) ) { $have_widgets = true; } } if ( $footer_columns > 0 && $have_widgets ) { ?> term_id, 'thumbnail_id', true ); $t_image = wp_get_attachment_url( $thumbnail_id ); if ( $t_image ) { $img = $t_image; } } else { $title = get_the_title( $page_id ); if ( is_tax() ) { $title = single_term_title( '', false ); } if ( get_post_meta( $page_id, '_show_excerpt', true ) ) { $post = get_post( $page_id ); if ( $post->post_excerpt ) { $excerpt = apply_filters( 'the_excerpt', get_post_field( 'post_excerpt', $page_id ) ); } } } if ( ! $apply_shop && $is_single_product ) { $excerpt = ''; } ?>
    >
    ' . $title . ''; if ( $excerpt ) { echo ''; } ?>
    esc_html__( 'Please setup your main Latitude & Longitude first', 'onepress' ), ); wp_enqueue_script( 'onepress-customizer', get_template_directory_uri() . '/assets/js/customizer.js', array( 'customize-controls', 'wp-color-picker' ), time() ); wp_enqueue_style( 'onepress-customizer', get_template_directory_uri() . '/assets/css/customizer.css' ); wp_localize_script( 'onepress-customizer', 'ONEPRESS_CUSTOMIZER_DATA', $customizer_data ); } add_action( 'customize_controls_enqueue_scripts', 'onepres_customizer_control_scripts', 99 ); add_action( 'customize_controls_enqueue_scripts', array( 'OnePress_Editor_Scripts', 'enqueue' ), 95 ); PK!B0`%-%- customizer-selective-refresh.phpnu[selective_refresh ) ) { return; } $selective_refresh_keys = array( // section features array( 'id' => 'features', 'selector' => '.section-features', 'settings' => array( 'onepress_features_boxes', 'onepress_features_title', 'onepress_features_subtitle', 'onepress_features_desc', 'onepress_features_layout', ), ), // section services array( 'id' => 'services', 'selector' => '.section-services', 'settings' => array( 'onepress_services', 'onepress_services_title', 'onepress_services_subtitle', 'onepress_services_desc', 'onepress_service_layout', 'onepress_service_icon_size', 'onepress_service_content_source', ), ), // section gallery 'gallery' => array( 'id' => 'gallery', 'selector' => '.section-gallery', 'settings' => array( 'onepress_gallery_source', 'onepress_gallery_title', 'onepress_gallery_subtitle', 'onepress_gallery_desc', 'onepress_gallery_source_page', 'onepress_gallery_layout', 'onepress_gallery_display', 'onepress_g_number', 'onepress_g_row_height', 'onepress_g_col', 'onepress_g_readmore_link', 'onepress_g_readmore_text', ), ), // section news array( 'id' => 'news', 'selector' => '.section-news', 'settings' => array( 'onepress_news_title', 'onepress_news_subtitle', 'onepress_news_desc', 'onepress_news_number', 'onepress_news_more_link', 'onepress_news_more_text', 'onepress_news_hide_meta', // @since 2.1.0 'onepress_news_excerpt_length', // @since 2.1.0 'onepress_news_more_page', // @since 2.1.0 'onepress_news_cat', 'onepress_news_orderby', 'onepress_news_order', ), ), // section contact array( 'id' => 'contact', 'selector' => '.section-contact', 'settings' => array( 'onepress_contact_title', 'onepress_contact_subtitle', 'onepress_contact_desc', 'onepress_contact_cf7', 'onepress_contact_cf7_disable', 'onepress_contact_text', 'onepress_contact_address_title', 'onepress_contact_address', 'onepress_contact_phone', 'onepress_contact_email', 'onepress_contact_fax', ), ), // section counter array( 'id' => 'counter', 'selector' => '.section-counter', 'settings' => array( 'onepress_counter_boxes', 'onepress_counter_title', 'onepress_counter_subtitle', 'onepress_counter_desc', ), ), // section videolightbox array( 'id' => 'videolightbox', 'selector' => '.section-videolightbox', 'settings' => array( 'onepress_videolightbox_title', 'onepress_videolightbox_url', ), ), // Section about array( 'id' => 'about', 'selector' => '.section-about', 'settings' => array( 'onepress_about_boxes', 'onepress_about_title', 'onepress_about_subtitle', 'onepress_about_desc', 'onepress_about_content_source', 'onepress_about_layout', ), ), // Section team array( 'id' => 'team', 'selector' => '.section-team', 'settings' => array( 'onepress_team_members', 'onepress_team_title', 'onepress_team_subtitle', 'onepress_team_desc', 'onepress_team_layout', ), ), ); $selective_refresh_keys = apply_filters( 'onepress_customizer_partials_selective_refresh_keys', $selective_refresh_keys ); foreach ( $selective_refresh_keys as $section ) { foreach ( $section['settings'] as $key ) { if ( $wp_customize->get_setting( $key ) ) { $wp_customize->get_setting( $key )->transport = 'postMessage'; } } $wp_customize->selective_refresh->add_partial( 'section-' . $section['id'], array( 'selector' => $section['selector'], 'settings' => $section['settings'], 'render_callback' => 'onepress_selective_refresh_render_section_content', ) ); } $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $wp_customize->get_setting( 'onepress_hide_sitetitle' )->transport = 'postMessage'; $wp_customize->get_setting( 'onepress_hide_tagline' )->transport = 'postMessage'; $wp_customize->selective_refresh->add_partial( 'header_brand', array( 'selector' => '.site-header .site-branding', 'settings' => array( 'blogname', 'blogdescription', 'onepress_hide_sitetitle', 'onepress_hide_tagline' ), 'render_callback' => 'onepress_site_logo', ) ); // Footer social heading $wp_customize->selective_refresh->add_partial( 'onepress_social_footer_title', array( 'selector' => '.footer-social .follow-heading', 'settings' => array( 'onepress_social_footer_title' ), 'render_callback' => 'onepress_selective_refresh_social_footer_title', ) ); // Footer social icons $wp_customize->selective_refresh->add_partial( 'onepress_social_profiles', array( 'selector' => '.footer-social .footer-social-icons', 'settings' => array( 'onepress_social_profiles' ), 'render_callback' => 'onepress_get_social_profiles', ) ); // Footer New letter heading $wp_customize->selective_refresh->add_partial( 'onepress_newsletter_title', array( 'selector' => '.footer-subscribe .follow-heading', 'settings' => array( 'onepress_newsletter_title' ), 'render_callback' => 'onepress_selective_refresh_newsletter_title', ) ); /** * Footer Widgets * * @since 2.0.0 */ $wp_customize->selective_refresh->add_partial( 'onepress-footer-widgets', array( 'selector' => '#footer-widgets', 'settings' => array( 'footer_layout', 'footer_custom_1_columns', 'footer_custom_2_columns', 'footer_custom_3_columns', 'footer_custom_4_columns' ), 'render_callback' => 'onepress_footer_widgets', 'container_inclusive' => true, ) ); /** * Header Position * * @since 2.0.0 */ $wp_customize->selective_refresh->add_partial( 'onepress-header-section', array( 'selector' => '#header-section', 'settings' => array( 'onepress_header_position', 'onepress_sticky_header_disable', 'onepress_header_transparent', 'onepress_header_width' ), 'render_callback' => 'onepress_header', 'container_inclusive' => true, ) ); /** * Footer Connect * * @since 2.0.0 */ $wp_customize->selective_refresh->add_partial( 'onepress-footer-connect', array( 'selector' => '.footer-connect', 'settings' => array( 'onepress_newsletter_disable', 'onepress_social_disable' ), 'render_callback' => 'onepress_footer_connect', 'container_inclusive' => true, ) ); /** * Selective Refresh style * * @since 2.0.0 */ $css_settings = array( 'onepress_logo_height', 'onepress_transparent_logo_height', 'onepress_tagline_text_color', 'onepress_logo_text_color', 'onepress_transparent_site_title_c', 'onepress_transparent_tag_title_c', 'onepress_logo_height', 'onepress_hero_overlay_color', // 'onepress_hero_overlay_opacity', 'onepress_primary_color', 'onepress_secondary_color', 'onepress_menu_item_padding', 'onepress_page_cover_align', 'onepress_page_normal_align', 'onepress_page_cover_color', 'onepress_page_cover_overlay', 'onepress_page_cover_pd_top', 'onepress_page_cover_pd_bottom', 'onepress_header_bg_color', 'onepress_menu_color', 'onepress_menu_hover_color', 'onepress_menu_hover_bg_color', 'onepress_menu_hover_bg_color', 'onepress_menu_toggle_button_color', 'onepress_footer_info_bg', 'onepress_footer_bg', 'onepress_footer_top_color', 'onepress_footer_c_color', 'onepress_footer_c_link_color', 'onepress_footer_c_link_hover_color', 'footer_widgets_color', 'footer_widgets_bg_color', 'footer_widgets_title_color', 'footer_widgets_link_color', 'footer_widgets_link_hover_color', 'onepress_hcl1_r_color', 'onepress_hcl1_r_bg_color', 'onepress_sections_nav___color', 'onepress_sections_nav___color2', 'onepress_sections_nav___label_bg', 'onepress_sections_nav___label_color', ); /** * @since 2.1.1 */ $css_settings = apply_filters( 'onepress_selective_refresh_css_settings', $css_settings ); foreach ( $css_settings as $index => $key ) { if ( $wp_customize->get_setting( $key ) ) { $wp_customize->get_setting( $key )->transport = 'postMessage'; } else { unset( $css_settings[ $index ] ); } } $wp_customize->selective_refresh->add_partial( 'onepress-style-live-css', array( 'selector' => '#onepress-style-inline-css', 'settings' => $css_settings, 'container_inclusive' => false, 'render_callback' => 'onepress_custom_inline_style', ) ); // Retina logo $wp_customize->selective_refresh->add_partial( 'onepress_site_logo', array( 'selector' => '.site-branding', 'settings' => array( 'onepress_retina_logo', 'onepress_transparent_logo', 'onepress_transparent_retina_logo' ), 'render_callback' => 'onepress_site_logo', ) ); } add_action( 'customize_register', 'onepress_customizer_partials', 199 ); /** * Selective render content * * @param $partial * @param array $container_context */ function onepress_selective_refresh_render_section_content( $partial, $container_context = array() ) { $tpl = 'section-parts/' . $partial->id . '.php'; $GLOBALS['onepress_is_selective_refresh'] = true; $file = onepress_customizer_load_template( $tpl ); if ( $file ) { include $file; } } function onepress_selective_refresh_social_footer_title() { return get_theme_mod( 'onepress_social_footer_title' ); } function onepress_selective_refresh_newsletter_title() { return get_theme_mod( 'onepress_newsletter_title' ); } PK!vz$z$class-sections-navigation.phpnu[key . $id; } /** * Add customize config * * @param WP_Customize_Manager $wp_customize * @param string $section_id */ function add_customize($wp_customize, $section_id) { $wp_customize->add_setting( $this->get_name('__enable'), array( 'sanitize_callback' => 'onepress_sanitize_text', 'default' => false, ) ); $wp_customize->add_control( $this->get_name('__enable'), array( 'label' => __('Enable in section navigation', 'onepress'), 'section' => $section_id, 'type' => 'checkbox', ) ); $wp_customize->add_setting( $this->get_name('__disable_mobile'), array( 'sanitize_callback' => 'onepress_sanitize_text', 'default' => false, ) ); $wp_customize->add_control( $this->get_name('__disable_mobile'), array( 'label' => __('Disable the section navigation on mobile', 'onepress'), 'section' => $section_id, 'type' => 'checkbox', ) ); $wp_customize->add_setting( $this->get_name('__enable_label'), array( 'sanitize_callback' => 'onepress_sanitize_text', 'default' => 1, ) ); $wp_customize->add_control( $this->get_name('__enable_label'), array( 'label' => __('Enable navigation labels', 'onepress'), 'description' => __('By default navigation label is section title.', 'onepress'), 'section' => $section_id, 'type' => 'checkbox', ) ); // Color Settings. $wp_customize->add_setting( $this->get_name('__color'), array( 'sanitize_callback' => 'sanitize_hex_color_no_hash', 'sanitize_js_callback' => 'maybe_hash_hex_color', 'default' => '', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, $this->get_name('__color'), array( 'label' => esc_html__('Dots color', 'onepress'), 'section' => $section_id, 'description' => '', ) ) ); // Color Settings. $wp_customize->add_setting( $this->get_name('__color2'), array( 'sanitize_callback' => 'sanitize_hex_color_no_hash', 'sanitize_js_callback' => 'maybe_hash_hex_color', 'default' => '', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, $this->get_name('__color2'), array( 'label' => esc_html__('Dots inverse color', 'onepress'), 'section' => $section_id, 'description' => '', ) ) ); // Color Settings. $wp_customize->add_setting( $this->get_name('__label_bg'), array( 'sanitize_callback' => 'onepress_sanitize_color_alpha', 'default' => '', ) ); $wp_customize->add_control( new OnePress_Alpha_Color_Control( $wp_customize, $this->get_name('__label_bg'), array( 'label' => esc_html__('Label Background', 'onepress'), 'section' => $section_id, 'description' => '', ) ) ); // Color Settings. $wp_customize->add_setting( $this->get_name('__label_color'), array( 'sanitize_callback' => 'onepress_sanitize_color_alpha', 'default' => '', ) ); $wp_customize->add_control( new OnePress_Alpha_Color_Control( $wp_customize, $this->get_name('__label_color'), array( 'label' => esc_html__('Label Color', 'onepress'), 'section' => $section_id, 'description' => '', ) ) ); // Section Settings. foreach ($this->get_sections() as $id => $args) { /** * @since 2.1.1 */ if (Onepress_Config::is_section_active($id)) { $name = $this->get_name($id); $wp_customize->add_setting( $id . '_em', array( 'sanitize_callback' => 'onepress_sanitize_text', ) ); $wp_customize->add_control( new OnePress_Misc_Control( $wp_customize, $id . '_em', array( 'type' => 'custom_message', 'section' => $section_id, 'description' => '
    ' . esc_html($args['label']) . '
    ', ) ) ); $wp_customize->add_setting( $name, array( 'sanitize_callback' => 'onepress_sanitize_checkbox', 'default' => $args['default'], // 'transport' => 'postMessage' ) ); $wp_customize->add_control( $name, array( 'label' => __('Enable in section navigation', 'onepress'), 'section' => $section_id, 'type' => 'checkbox', ) ); $wp_customize->add_setting( $name . '_inverse', array( 'sanitize_callback' => 'onepress_sanitize_checkbox', 'default' => isset($args['inverse']) ? $args['inverse'] : false, // 'transport' => 'postMessage' ) ); $wp_customize->add_control( $name . '_inverse', array( 'label' => __('Inverse dots color', 'onepress'), 'section' => $section_id, 'type' => 'checkbox', ) ); $wp_customize->add_setting( $name . '_label', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => '', // 'transport' => 'postMessage' ) ); $wp_customize->add_control( $name . '_label', array( 'label' => __('Custom navigation label', 'onepress'), 'section' => $section_id, ) ); } // end if section active } // end loop } /** * * Get sections settings * * @return array */ function get_settings() { $data = apply_filters('onepress_dots_navigation_get_settings', false); if ($data) { return $data; } $data = array(); $sections = $this->get_sections(); foreach ($sections as $id => $args) { /** * Get settings for enabled sections only. * * @since 2.1.1 */ if (Onepress_Config::is_section_active($id)) { $name = $this->get_name($id); $translated_id = (isset($args['id']) && $args['id']) ? $args['id'] : $id; $el_id = sanitize_title(get_theme_mod('onepress_' . $id . '_id', $translated_id, false)); if (!$el_id) { $el_id = $id; } $data[$el_id] = array( 'id' => $el_id, '_id' => $id, 'inverse' => get_theme_mod($this->get_name($id . '_inverse'), isset($args['inverse']) ? $args['inverse'] : false), 'enable' => get_theme_mod($name, $args['default']) ? true : false, 'title' => get_theme_mod('onepress_' . $id . '_title', $args['title']), ); $custom_title = get_theme_mod($this->get_name($id . '_label'), false); if ($custom_title) { $data[$el_id]['title'] = $custom_title; } } } return $data; } /** * Add scripts * load only enabled */ function scripts() { if (get_theme_mod($this->get_name('__enable'), false)) { if (is_front_page()) { wp_enqueue_script('jquery.bully', get_template_directory_uri() . '/assets/js/jquery.bully.js', array('jquery'), false, true); wp_localize_script( 'jquery.bully', 'Onepress_Bully', array( 'enable_label' => get_theme_mod($this->get_name('__enable_label'), true) ? true : false, 'disable_mobile' => get_theme_mod($this->get_name('__disable_mobile'), false) ? true : false, 'sections' => $this->get_settings(), ) ); } } } /** * Add custom style * load only enabled * * @param string $code * * @return string */ function custom_style($code = false) { if (get_theme_mod($this->get_name('__enable'), false)) { $color = sanitize_hex_color_no_hash(get_theme_mod($this->get_name('__color'))); if ($color) { $code .= " body .c-bully { color: #{$color}; } "; } $color2 = sanitize_hex_color_no_hash(get_theme_mod($this->get_name('__color2'))); if ($color2) { $code .= " body .c-bully.c-bully--inversed { color: #{$color2}; } "; } $bg = get_theme_mod($this->get_name('__label_bg')); $bg_color = onepress_sanitize_color_alpha($bg); if ($bg_color) { $code .= " body .c-bully .c-bully__title { background-color: {$bg_color}; } "; } $color = get_theme_mod($this->get_name('__label_color')); $color = onepress_sanitize_color_alpha($color); if ($color) { $code .= " body .c-bully .c-bully__title { color: {$color}; } "; } } return $code; } /** * Inits */ function init() { add_action('wp_enqueue_scripts', array($this, 'scripts')); add_filter('onepress_custom_css', array($this, 'custom_style')); } } Onepress_Dots_Navigation::get_instance()->init(); PK!>ʈ3AA$customize-controls/control-pages.phpnu[ type ) { default: case 'heading': echo '' . $this->label . ''; break; case 'custom_message' : echo '

    ' . $this->description . '

    '; break; case 'hr' : echo '
    '; break; } } }PK!b22'customize-controls/control-repeater.phpnu[ $op ) { $args['fields'][ $key ]['id'] = $key; if( ! isset( $op['value'] ) ) { if( isset( $op['default'] ) ) { $args['fields'][ $key ]['value'] = $op['default']; } else { $args['fields'][ $key ]['value'] = ''; } } } $this->fields = $args['fields']; $this->live_title_id = isset( $args['live_title_id'] ) ? $args['live_title_id'] : false; $this->defined_values = isset( $args['defined_values'] ) ? $args['defined_values'] : false; $this->id_key = isset( $args['id_key'] ) ? $args['id_key'] : false; if ( isset( $args['title_format'] ) && $args['title_format'] != '' ) { $this->title_format = $args['title_format']; } else { $this->title_format = ''; } if ( isset( $args['limited_msg'] ) && $args['limited_msg'] != '' ) { $this->limited_msg = $args['limited_msg']; } else { $this->limited_msg = ''; } if ( ! isset( $args['max_item'] ) ) { $args['max_item'] = 0; } if ( ! isset( $args['allow_unlimited'] ) || $args['allow_unlimited'] != false ) { $this->max_item = apply_filters( 'onepress_reepeatable_max_item', absint( $args['max_item'] ) ); } else { $this->max_item = absint( $args['max_item'] ); } $this->changeable = isset( $args['changeable'] ) && $args['changeable'] == 'no' ? 'no' : 'yes'; $this->default_empty_title = isset( $args['default_empty_title'] ) && $args['default_empty_title'] != '' ? $args['default_empty_title'] : esc_html__( 'Item', 'onepress' ); } public function merge_data( $array_value, $array_default ){ if ( ! $this->id_key ) { return $array_value; } if ( ! is_array( $array_value ) ) { $array_value = array(); } if ( ! is_array( $array_default ) ) { $array_default = array(); } $new_array = array(); foreach ( $array_value as $k => $a ) { if ( is_array( $a ) ) { if ( isset ( $a[ $this->id_key ] ) && $a[ $this->id_key ] != '' ) { $new_array[ $a[ $this->id_key ] ] = $a; } else { $new_array[ $k ] = $a; } } } foreach ( $array_default as $k => $a ) { if ( is_array( $a ) && isset ( $a[ $this->id_key ] ) ) { if ( ! isset ( $new_array[ $a[ $this->id_key ] ] ) ) { $new_array[ $a[ $this->id_key ] ] = $a; } } } return array_values( $new_array ); } public function to_json() { parent::to_json(); $value = $this->value(); if (is_string( $value ) ) { $value = json_decode( $value, true ); } if ( empty ( $value ) ){ $value = $this->defined_values; } elseif ( is_array( $this->defined_values ) && ! empty ( $this->defined_values ) ) { $value = $this->merge_data( $value, $this->defined_values ); } /** * @since 2.1.1 */ if ( $this->id_key == 'section_id' ) { foreach ( ( array ) $value as $k => $v ) { if ( ! Onepress_Config::is_section_active( $v['section_id'] ) ) { $value[ $k ]['__visibility'] = 'hidden'; } else { $value[ $k ]['__visibility'] = ''; } } } $this->json['live_title_id'] = $this->live_title_id; $this->json['title_format'] = $this->title_format; $this->json['max_item'] = $this->max_item; $this->json['limited_msg'] = $this->limited_msg; $this->json['changeable'] = $this->changeable; $this->json['default_empty_title'] = $this->default_empty_title; $this->json['value'] = $value; $this->json['id_key'] = $this->id_key; $this->json['fields'] = $this->fields; } /** * Enqueue scripts/styles. * * @since 1.0.0 * @access public * @return void */ public function enqueue() { add_action( 'customize_controls_print_footer_scripts', array( __CLASS__, 'item_tpl' ), 66 ); } public static function item_tpl(){ ?> input_attrs(); ?> value="" link(); ?> />
    add_text ) ? esc_html( $this->add_text ) : __( 'Add an item', 'onepress' ); ?>
  • <# var cond_v; #> <# for ( i in data ) { #> <# if ( ! data.hasOwnProperty( i ) ) continue; #> <# field = data[i]; #> <# if ( ! field.type ) continue; #> <# if ( field.type ){ #> <# if ( ! _.isEmpty( field.required ) ) { #>
    <# } else { #>
    <# } #> <# if ( field.type !== 'checkbox' ) { #> <# if ( field.title ) { #> <# } #> <# if ( field.desc ) { #>

    {{{ field.desc }}}

    <# } #> <# } #> <# if ( field.type === 'hidden' ) { #> <# } else if ( field.type === 'add_by' ) { #> <# } else if ( field.type === 'text' ) { #> <# } else if ( field.type === 'checkbox' ) { #> <# if ( field.title ) { #> <# } #> <# if ( field.desc ) { #>

    {{ field.desc }}

    <# } #> <# } else if ( field.type === 'select' ) { #> <# if ( field.multiple ) { #> <# } #> <# for ( k in field.options ) { #> <# if ( _.isArray( field.value ) ) { #> <# } else { #> <# } #> <# } #> <# } else if ( field.type === 'radio' ) { #> <# for ( k in field.options ) { #> <# if ( field.options.hasOwnProperty( k ) ) { #> <# } #> <# } #> <# } else if ( field.type == 'color' || field.type == 'coloralpha' ) { #> <# if ( field.value !='' ) { field.value = '#'+field.value ; } #> <# } else if ( field.type == 'media' ) { #> <# if ( !field.media || field.media == '' || field.media =='image' ) { #> <# } else { #> <# } #> <# if ( !field.media || field.media == '' || field.media =='image' ) { #>
    <# if ( field.value.url !== '' ){ #> <# } #>
    <# } #>
    <# } else if ( field.type == 'textarea' || field.type == 'editor' ) { #> <# } else if ( field.type == 'icon' ) { #> <# var icon_class = field.value; if ( icon_class.indexOf( 'fa-' ) != 0 ) { icon_class = 'fa-' + field.value; } else { icon_class = icon_class.replace( 'fa ', '' ); } icon_class = icon_class.replace( 'fa-fa', '' ); #>
    <# } #>
    <# } #> <# } #>
    |

  • mod = strtolower( $this->mod ); if( ! $this->mod = 'html' ) { $this->mod = 'tmce'; } ?>

    description ?>

    plus_text; $json['plus_url'] = $this->plus_url; $json['id'] = $this->id; return $json; } /** * Outputs the Underscore.js template. * * @since 1.0.0 * @access public * @return void */ protected function render_template() { ?>
  • {{{ data.plus_text }}}

  • . */ class OnePress_Alpha_Color_Control extends WP_Customize_Control { /** * Official control name. */ public $type = 'alpha-color'; /** * Add support for palettes to be passed in. * * Supported palette values are true, false, or an array of RGBa and Hex colors. */ public $palette; /** * Add support for showing the opacity value on the slider handle. */ public $show_opacity; /** * Enqueue scripts and styles. * * Ideally these would get registered and given proper paths before this control object * gets initialized, then we could simply enqueue them here, but for completeness as a * stand alone class we'll register and enqueue them here. */ public function enqueue() { } /** * Render the control. */ public function render_content() { // Process the palette if ( is_array( $this->palette ) ) { $palette = implode( '|', $this->palette ); } else { // Default to true. $palette = ( false === $this->palette || 'false' === $this->palette ) ? 'false' : 'true'; } // Support passing show_opacity as string or boolean. Default to true. $show_opacity = ( false === $this->show_opacity || 'false' === $this->show_opacity ) ? 'false' : 'true'; // Begin the output. ?> OnePress Plus to be able to change the section order and styling!', 'onepress' ); } } PK! ,class-config.phpnu[ $s ) { $data[ $k ] = isset( $submitted_data['section_'.$k] ) && $submitted_data['section_'.$k] == 1 ? 1 : false; } update_option( self::$key, $data ); } } static function get_settings( ){ return get_option( self::$key ); } static function get_plus_sections(){ $plugin_sections = array( 'slider' => array( 'label' => __( 'Section: Slider', 'onepress' ), 'title' => __( 'Slider', 'onepress' ), 'default' => false, 'inverse' => false, ), 'clients' => array( 'label' => __( 'Section: Clients', 'onepress' ), 'title' => __( 'Our Clients', 'onepress' ), 'default' => false, 'inverse' => false, ), 'cta' => array( 'label' => __( 'Section: Call to Action', 'onepress' ), 'title' => __( '', 'onepress' ), 'default' => false, 'inverse' => false, ), 'map' => array( 'label' => __( 'Section: Map', 'onepress' ), 'title' => __( 'Map', 'onepress' ), 'default' => false, 'inverse' => false, ), 'pricing' => array( 'label' => __( 'Section: Pricing', 'onepress' ), 'title' => __( 'Pricing Table', 'onepress' ), 'default' => false, 'inverse' => false, ), 'projects' => array( 'label' => __( 'Section: Projects', 'onepress' ), 'title' => __( 'Highlight Projects', 'onepress' ), 'default' => false, 'inverse' => false, ), 'testimonials' => array( 'label' => __( 'Section: Testimonials', 'onepress' ), 'title' => __( 'Testimonials', 'onepress' ), 'default' => false, 'inverse' => false, ), ); return $plugin_sections; } /** * Get sections * * @return array */ static function get_sections(){ $sorted_sections = apply_filters( 'onepress_frontpage_sections_order', array( 'features', 'about', 'services', 'videolightbox', 'gallery', 'counter', 'team', 'news', 'contact' ) ); $sections_config = array( 'hero' => array( 'label' => __( 'Section: Hero', 'onepress' ), 'title' => __( 'Home', 'onepress' ), 'default' => false, 'inverse' => false, ), 'about' => array( 'label' => __( 'Section: About', 'onepress' ), 'title' => __( 'About Us', 'onepress' ), 'default' => false, 'inverse' => false, ), 'contact' => array( 'label' => __( 'Section: Contact', 'onepress' ), 'title' => __( 'Get in touch', 'onepress' ), 'default' => false, 'inverse' => false, ), 'counter' => array( 'label' => __( 'Section: Counter', 'onepress' ), 'title' => __( 'Our Numbers', 'onepress' ), 'default' => false, 'inverse' => false, ), 'features' => array( 'label' => __( 'Section: Features', 'onepress' ), 'title' => __( 'Features', 'onepress' ), 'default' => false, 'inverse' => false, ), 'gallery' => array( 'label' => __( 'Section: Gallery', 'onepress' ), 'title' => __( 'Gallery', 'onepress' ), 'default' => false, 'inverse' => false, ), 'news' => array( 'label' => __( 'Section: News', 'onepress' ), 'title' => __( 'Latest News', 'onepress' ), 'default' => false, 'inverse' => false, ), 'services' => array( 'label' => __( 'Section: Services', 'onepress' ), 'title' => __( 'Our Services', 'onepress' ), 'default' => false, 'inverse' => false, ), 'team' => array( 'label' => __( 'Section: Team', 'onepress' ), 'title' => __( 'Our Team', 'onepress' ), 'default' => false, 'inverse' => false, ), 'videolightbox' => array( 'label' => __( 'Section: Video Lightbox', 'onepress' ), 'title' => '', 'default' => false, 'inverse' => false, ), ); $new = array( 'hero' => $sections_config['hero'] ); foreach ( $sorted_sections as $id ) { if ( isset( $sections_config[ $id ] ) ) { $new[ $id ] = $sections_config[ $id ]; } } // Filter to add more custom sections here return apply_filters( 'onepress_get_sections', $new ); } }PK!ladmin/dashboard.phpnu[get_recommended_actions(); $number_count = $actions['number_notice']; if ($number_count > 0) { $update_label = sprintf(_n('%1$s action required', '%1$s actions required', $number_count, 'onepress'), $number_count); $count = "" . number_format_i18n($number_count) . ""; $menu_title = sprintf(esc_html__('OnePress Theme %s', 'onepress'), $count); } else { $menu_title = esc_html__('OnePress Theme', 'onepress'); } add_theme_page(esc_html__('OnePress Dashboard', 'onepress'), $menu_title, 'edit_theme_options', 'ft_onepress', array($this, 'theme_info_page')); } /** * Add admin notice when active theme, just show one timetruongsa@200811 * * @return bool|null */ function admin_notice() { $actions = $this->get_recommended_actions(); $number_action = $actions['number_notice']; if ($number_action > 0) { $theme_data = wp_get_theme(); ?>

    Welcome page', 'onepress'), $theme_data->Name, admin_url('themes.php?page=ft_onepress')); ?>

    'ft_onepress&tab=demo-data-importer'), admin_url('themes.php'))) . '">' . esc_html__('Import Demo Data', 'onepress') . ''); ?>

    '; echo '
    '; echo '

    ' . __('Customizer Section Manager', 'onepress') . '

    '; echo '

    ' . __('Disable (or enable) unused sections to improve Customizer loading speed. Your section settings is still saved.', 'onepress') . '

    '; echo '
    '; foreach ($sections as $key => $section) { $this->render_section_settings($key, $section); } if (!class_exists('OnePress_Plus')) { foreach (Onepress_Config::get_plus_sections() as $key => $section) { $this->render_section_settings($key, $section, true); } } echo '
    '; echo '
    '; submit_button(); echo ''; } function theme_info_page() { $theme_data = wp_get_theme('onepress'); if (isset($_GET['onepress_action_dismiss'])) { $actions_dismiss = get_option('onepress_actions_dismiss'); if (!is_array($actions_dismiss)) { $actions_dismiss = array(); } $actions_dismiss[sanitize_text_field($_GET['onepress_action_dismiss'])] = 'dismiss'; update_option('onepress_actions_dismiss', $actions_dismiss); } // Check for current viewing tab $tab = null; if (isset($_GET['tab'])) { $tab = sanitize_text_field($_GET['tab']); } else { $tab = null; } $actions_r = $this->get_recommended_actions(); $number_action = $actions_r['number_notice']; $actions = $actions_r['actions']; $current_action_link = admin_url('themes.php?page=ft_onepress&tab=recommended_actions'); $recommend_plugins = get_theme_support('recommend-plugins'); if (is_array($recommend_plugins) && isset($recommend_plugins[0])) { $recommend_plugins = $recommend_plugins[0]; } else { $recommend_plugins[] = array(); } ?>

    Version); ?>

    FameThemes
    sections_settings(); ?>

    Name); ?>

    '; $select .= ''; $select .= ''; $select .= ''; $select .= ''; $select_2 = ''; echo $select . ' to ' . $select_2; ?>

    0) { ?> '', 'page_template')) ?>

    render_recommend_plugins($recommend_plugins); ?>

    Name); ?>

    OnePress OnePress Plus

    WooCommerce Support

    Hero Section

    - Full Screen
    - Background Video
    - Background Slides
    2 Unlimited

    About Section

    - Number of items
    3 Unlimited

    Service Section

    - Number of items
    4 Unlimited

    Counter Section

    - Number of counter items
    4 Unlimited

    Team Section

    - Number of members
    4 Unlimited

    Latest News Section

    Contact Section

    Drag and drop section orders

    Add New Section

    Styling for all sections

    Google Map Section

    Pricing Section

    Testimonial Section

    Call To Action Section

    Projects Section

    Typography Options

    Footer Copyright Editor

    24/7 Priority Support

    'install-plugin', 'plugin' => $plugin_name ), network_admin_url('update.php') ), 'install-plugin_' . $plugin_name ); } else { $install_url = add_query_arg(array( 'action' => 'activate', 'plugin' => rawurlencode($plugin_name . '/' . $plugin_name . '.php'), 'plugin_status' => 'all', 'paged' => '1', '_wpnonce' => wp_create_nonce('activate-plugin_' . $plugin_name . '/' . $plugin_name . '.php'), ), network_admin_url('plugins.php')); $button_class = 'activate-now button-primary'; $button_txt = esc_html__('Active Now', 'onepress'); } $detail_link = add_query_arg( array( 'tab' => 'plugin-information', 'plugin' => $plugin_name, 'TB_iframe' => 'true', 'width' => '772', 'height' => '349', ), network_admin_url('plugin-install.php') ); echo '

    '; printf( esc_html__( '%1$s you will need to install and activate the %2$s plugin first.', 'onepress' ), '' . esc_html__('Hey.', 'onepress') . '', '' . esc_html__('FameThemes Demo Importer', 'onepress') . '' ); echo '

    '; echo '

    ' . $button_txt . '

    '; ?>
    $plugin_info) { $plugin_info = wp_parse_args($plugin_info, array( 'name' => '', 'active_filename' => '', )); $plugin_name = $plugin_info['name']; $status = is_dir(WP_PLUGIN_DIR . '/' . $plugin_slug); $button_class = 'install-now button'; if ($plugin_info['active_filename']) { $active_file_name = $plugin_info['active_filename']; } else { $active_file_name = $plugin_slug . '/' . $plugin_slug . '.php'; } if (!is_plugin_active($active_file_name)) { $button_txt = esc_html__('Install Now', 'onepress'); if (!$status) { $install_url = wp_nonce_url( add_query_arg( array( 'action' => 'install-plugin', 'plugin' => $plugin_slug ), network_admin_url('update.php') ), 'install-plugin_' . $plugin_slug ); } else { $install_url = add_query_arg(array( 'action' => 'activate', 'plugin' => rawurlencode($active_file_name), 'plugin_status' => 'all', 'paged' => '1', '_wpnonce' => wp_create_nonce('activate-plugin_' . $active_file_name), ), network_admin_url('plugins.php')); $button_class = 'activate-now button-primary'; $button_txt = esc_html__('Active Now', 'onepress'); } $detail_link = add_query_arg( array( 'tab' => 'plugin-information', 'plugin' => $plugin_slug, 'TB_iframe' => 'true', 'width' => '772', 'height' => '349', ), network_admin_url('plugin-install.php') ); echo '
    '; echo '

    '; echo esc_html($plugin_name); echo '

    '; echo '

    ' . $button_txt . '

    '; echo '' . esc_html__('Details', 'onepress') . ''; echo '
    '; } } } function admin_dismiss_actions() { // Action for dismiss if (isset($_GET['onepress_action_notice'])) { $actions_dismiss = get_option('onepress_actions_dismiss'); if (!is_array($actions_dismiss)) { $actions_dismiss = array(); } $action_key = sanitize_text_field($_GET['onepress_action_notice']); if (isset($actions_dismiss[$action_key]) && $actions_dismiss[$action_key] == 'hide') { $actions_dismiss[$action_key] = 'show'; } else { $actions_dismiss[$action_key] = 'hide'; } update_option('onepress_actions_dismiss', $actions_dismiss); $url = wp_unslash($_SERVER['REQUEST_URI']); $url = remove_query_arg('onepress_action_notice', $url); wp_redirect($url); die(); } // Action for copy options if (isset($_POST['copy_from']) && isset($_POST['copy_to'])) { $from = sanitize_text_field($_POST['copy_from']); $to = sanitize_text_field($_POST['copy_to']); if ($from && $to) { $mods = get_option("theme_mods_" . $from); update_option("theme_mods_" . $to, $mods); $url = wp_unslash($_SERVER['REQUEST_URI']); $url = add_query_arg(array('copied' => 1), $url); wp_redirect($url); die(); } } } /** * Get theme actions required * * @return array|mixed|void */ function get_recommended_actions() { $actions = array(); $front_page = get_option('page_on_front'); $actions['page_on_front'] = 'dismiss'; $actions['page_template'] = 'dismiss'; $actions['recommend_plugins'] = 'dismiss'; if ('page' != get_option('show_on_front')) { $front_page = 0; } if ($front_page <= 0) { $actions['page_on_front'] = 'active'; $actions['page_template'] = 'active'; } else { if (get_post_meta($front_page, '_wp_page_template', true) == 'template-frontpage.php') { $actions['page_template'] = 'dismiss'; } else { $actions['page_template'] = 'active'; } } $recommend_plugins = get_theme_support('recommend-plugins'); if (is_array($recommend_plugins) && isset($recommend_plugins[0])) { $recommend_plugins = $recommend_plugins[0]; } else { $recommend_plugins[] = array(); } if (!empty($recommend_plugins)) { foreach ($recommend_plugins as $plugin_slug => $plugin_info) { $plugin_info = wp_parse_args($plugin_info, array( 'name' => '', 'active_filename' => '', )); if ($plugin_info['active_filename']) { $active_file_name = $plugin_info['active_filename']; } else { $active_file_name = $plugin_slug . '/' . $plugin_slug . '.php'; } if (!is_plugin_active($active_file_name)) { $actions['recommend_plugins'] = 'active'; } } } $actions = apply_filters('onepress_get_recommended_actions', $actions); $hide_by_click = get_option('onepress_actions_dismiss'); if (!is_array($hide_by_click)) { $hide_by_click = array(); } $n_active = $n_dismiss = 0; $number_notice = 0; foreach ($actions as $k => $v) { if (!isset($hide_by_click[$k])) { $hide_by_click[$k] = false; } if ($v == 'active') { $n_active++; $number_notice++; if ($hide_by_click[$k]) { if ($hide_by_click[$k] == 'hide') { $number_notice--; } } } else if ($v == 'dismiss') { $n_dismiss++; } } $return = array( 'actions' => $actions, 'number_actions' => count($actions), 'number_active' => $n_active, 'number_dismiss' => $n_dismiss, 'hide_by_click' => $hide_by_click, 'number_notice' => $number_notice, ); if ($return['number_notice'] < 0) { $return['number_notice'] = 0; } return $return; } } Onepress_Dashboard::get_instance()->init(); PK!JJz z admin/class-editor.phpnu[=' ) ) { add_filter( 'block_editor_settings_all', array( $this, 'editor_settings' ) ); } else { add_filter( 'block_editor_settings', array( $this, 'editor_settings' ) ); } // Add ajax action to load css file. add_action( 'wp_ajax_' . $this->action, array( $this, 'css_file' ) ); // Add more editor assets. add_action( 'enqueue_block_editor_assets', array( $this, 'assets' ) ); } /** * Add more editor styles and scripts. * * @todo Add Custom Fonts and styling settings. * * @return void */ function assets() { if ( function_exists( 'onepress_typography_render_style' ) ) { $typo = onepress_typography_render_style( false, true ); if ( $typo['url'] ) { wp_register_style( 'onepress-editor-fonts', $typo['url'] ); // Font style url. wp_enqueue_style( 'onepress-editor-fonts' ); // Font style url. } wp_add_inline_style( 'wp-edit-post', $typo['code'] ); } wp_add_inline_style( 'wp-edit-post', $this->css() ); } /** * Add styling settings to editor. * * @return string CSS code. */ public function css() { $css = ''; $content_width = absint( get_theme_mod( 'single_layout_content_width' ) ); if ( $content_width > 0 ) { $value = $content_width . 'px'; $css .= '.editor-styles-wrapper .wp-block:not([data-align="full"]):not([data-align="wide"]) { max-width: ' . $value . '; }'; } return $css; } /** * Create a dymanic stylesheet url. * * @return string CSS URL */ public function editor_style_url() { return add_query_arg( array( 'action' => $this->action, 'nonce' => wp_create_nonce( $this->action ), ), admin_url( 'admin-ajax.php' ) ); } /** * Add edditor settings. * * @see gutenberg_editor_scripts_and_styles * * @param array $editor_settings * @return array */ public function editor_settings( $editor_settings ) { $editor_settings['styles'][] = array( 'css' => $this->load_style(), ); return $editor_settings; } /** * Render dynamic CSS content. * * @return void */ public function css_file() { header( 'Content-type: text/css; charset: UTF-8' ); echo $this->load_style(); } /** * Load CSS content. * * @return string CSS code. */ public function load_style() { global $wp_filesystem; WP_Filesystem(); $file = get_template_directory() . '/' . $this->editor_file; $file_contents = ''; if ( file_exists( $file ) ) { $file_contents .= $wp_filesystem->get_contents( $file ); } $file_contents .= ''; return $file_contents; } } if ( is_admin() ) { new OnePress_Editor(); } PK!P( metabox.phpnu[ '', 'hide_header' => '', 'hide_footer' => '', 'hide_breadcrumb' => '', 'cover' => '', 'show_excerpt' => '', 'wc_apply_product' => '', ) ); foreach ( $settings as $key => $value ) { // Update the meta field. update_post_meta( $post_id, '_' . $key, sanitize_text_field( $value ) ); } } /** * Render Meta Box content. * * @param WP_Post $post The post object. */ public function render_meta_box_content( $post ) { // Add an nonce field so we can check for it later. wp_nonce_field( 'onepress_page_settings', 'onepress_page_settings_nonce' ); $values = array( 'hide_page_title' => '', 'hide_header' => '', 'hide_footer' => '', 'hide_breadcrumb' => '', 'cover' => '', 'show_excerpt' => '', 'wc_apply_product' => '', ); foreach ( $values as $key => $value ) { $values[ $key ] = get_post_meta( $post->ID, '_' . $key, true ); } ?>

    ID ) { ?>

    add_panel( 'onepress_services', array( 'priority' => 170, 'title' => esc_html__( 'Section: Services', 'onepress' ), 'description' => '', 'active_callback' => 'onepress_showon_frontpage' ) ); $wp_customize->add_section( 'onepress_service_settings', array( 'priority' => 3, 'title' => esc_html__( 'Section Settings', 'onepress' ), 'description' => '', 'panel' => 'onepress_services', ) ); // Show Content $wp_customize->add_setting( 'onepress_services_disable', array( 'sanitize_callback' => 'onepress_sanitize_checkbox', 'default' => '', ) ); $wp_customize->add_control( 'onepress_services_disable', array( 'type' => 'checkbox', 'label' => esc_html__( 'Hide this section?', 'onepress' ), 'section' => 'onepress_service_settings', 'description' => esc_html__( 'Check this box to hide this section.', 'onepress' ), ) ); // Section ID $wp_customize->add_setting( 'onepress_services_id', array( 'sanitize_callback' => 'onepress_sanitize_text', 'default' => esc_html__( 'services', 'onepress' ), ) ); $wp_customize->add_control( 'onepress_services_id', array( 'label' => esc_html__( 'Section ID:', 'onepress' ), 'section' => 'onepress_service_settings', 'description' => 'The section ID should be English character, lowercase and no space.' ) ); // Title $wp_customize->add_setting( 'onepress_services_title', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => esc_html__( 'Our Services', 'onepress' ), ) ); $wp_customize->add_control( 'onepress_services_title', array( 'label' => esc_html__( 'Section Title', 'onepress' ), 'section' => 'onepress_service_settings', 'description' => '', ) ); // Sub Title $wp_customize->add_setting( 'onepress_services_subtitle', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => esc_html__( 'Section subtitle', 'onepress' ), ) ); $wp_customize->add_control( 'onepress_services_subtitle', array( 'label' => esc_html__( 'Section Subtitle', 'onepress' ), 'section' => 'onepress_service_settings', 'description' => '', ) ); // Description $wp_customize->add_setting( 'onepress_services_desc', array( 'sanitize_callback' => 'onepress_sanitize_text', 'default' => '', ) ); $wp_customize->add_control( new OnePress_Editor_Custom_Control( $wp_customize, 'onepress_services_desc', array( 'label' => esc_html__( 'Section Description', 'onepress' ), 'section' => 'onepress_service_settings', 'description' => '', ) ) ); // Services layout $wp_customize->add_setting( 'onepress_service_layout', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => '6', ) ); $wp_customize->add_control( 'onepress_service_layout', array( 'label' => esc_html__( 'Services Layout Settings', 'onepress' ), 'section' => 'onepress_service_settings', 'description' => '', 'type' => 'select', 'choices' => array( '3' => esc_html__( '4 Columns', 'onepress' ), '4' => esc_html__( '3 Columns', 'onepress' ), '6' => esc_html__( '2 Columns', 'onepress' ), '12' => esc_html__( '1 Column', 'onepress' ), ), ) ); onepress_add_upsell_for_section( $wp_customize, 'onepress_service_settings' ); $wp_customize->add_section( 'onepress_service_content', array( 'priority' => 6, 'title' => esc_html__( 'Section Content', 'onepress' ), 'description' => '', 'panel' => 'onepress_services', ) ); // Section service content. $wp_customize->add_setting( 'onepress_services', array( 'sanitize_callback' => 'onepress_sanitize_repeatable_data_field', 'transport' => 'refresh', // refresh or postMessage ) ); $wp_customize->add_control( new Onepress_Customize_Repeatable_Control( $wp_customize, 'onepress_services', array( 'label' => esc_html__( 'Service content', 'onepress' ), 'description' => '', 'section' => 'onepress_service_content', 'live_title_id' => 'content_page', // apply for unput text and textarea only 'title_format' => esc_html__( '[live_title]', 'onepress' ), // [live_title] 'max_item' => 4, // Maximum item can add, 'limited_msg' => wp_kses_post( __( 'Upgrade to OnePress Plus to be able to add more items and unlock other premium features!', 'onepress' ) ), 'fields' => array( 'icon_type' => array( 'title' => esc_html__( 'Custom icon', 'onepress' ), 'type' => 'select', 'options' => array( 'icon' => esc_html__( 'Icon', 'onepress' ), 'image' => esc_html__( 'image', 'onepress' ), ), ), 'icon' => array( 'title' => esc_html__( 'Icon', 'onepress' ), 'type' => 'icon', 'required' => array( 'icon_type', '=', 'icon' ), ), 'image' => array( 'title' => esc_html__( 'Image', 'onepress' ), 'type' => 'media', 'required' => array( 'icon_type', '=', 'image' ), ), 'content_page' => array( 'title' => esc_html__( 'Select a page', 'onepress' ), 'type' => 'select', 'options' => $option_pages ), 'enable_link' => array( 'title' => esc_html__( 'Link to single page', 'onepress' ), 'type' => 'checkbox', ), ), ) ) ); // Services icon size $wp_customize->add_setting( 'onepress_service_icon_size', array( 'sanitize_callback' => 'onepress_sanitize_select', 'default' => '5x', ) ); $wp_customize->add_control( 'onepress_service_icon_size', array( 'label' => esc_html__( 'Icon Size', 'onepress' ), 'section' => 'onepress_service_content', 'description' => '', 'type' => 'select', 'choices' => array( '5x' => esc_html__( '5x', 'onepress' ), '4x' => esc_html__( '4x', 'onepress' ), '3x' => esc_html__( '3x', 'onepress' ), '2x' => esc_html__( '2x', 'onepress' ), '1x' => esc_html__( '1x', 'onepress' ), ), ) ); // Service content source $wp_customize->add_setting( 'onepress_service_content_source', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => 'excerpt', ) ); $wp_customize->add_control( 'onepress_service_content_source', array( 'label' => esc_html__( 'Item content source', 'onepress' ), 'section' => 'onepress_service_content', 'description' => '', 'type' => 'select', 'choices' => array( 'content' => esc_html__( 'Full Page Content', 'onepress' ), 'excerpt' => esc_html__( 'Page Excerpt', 'onepress' ), ), ) ); PK!LEE"customize-configs/section-hero.phpnu[add_panel( 'onepress_hero_panel' , array( 'priority' => 130, 'title' => esc_html__( 'Section: Hero', 'onepress' ), 'description' => '', 'active_callback' => 'onepress_showon_frontpage' ) ); // Hero settings $wp_customize->add_section( 'onepress_hero_settings' , array( 'priority' => 3, 'title' => esc_html__( 'Hero Settings', 'onepress' ), 'description' => '', 'panel' => 'onepress_hero_panel', ) ); // Show section $wp_customize->add_setting( 'onepress_hero_disable', array( 'sanitize_callback' => 'onepress_sanitize_checkbox', 'default' => '', ) ); $wp_customize->add_control( 'onepress_hero_disable', array( 'type' => 'checkbox', 'label' => esc_html__('Hide this section?', 'onepress'), 'section' => 'onepress_hero_settings', 'description' => esc_html__('Check this box to hide this section.', 'onepress'), ) ); // Section ID $wp_customize->add_setting( 'onepress_hero_id', array( 'sanitize_callback' => 'onepress_sanitize_text', 'default' => esc_html__('hero', 'onepress'), ) ); $wp_customize->add_control( 'onepress_hero_id', array( 'label' => esc_html__('Section ID:', 'onepress'), 'section' => 'onepress_hero_settings', 'description' => esc_html__( 'The section ID should be English character, lowercase and no space.', 'onepress' ) ) ); // Show hero full screen $wp_customize->add_setting( 'onepress_hero_fullscreen', array( 'sanitize_callback' => 'onepress_sanitize_checkbox', 'default' => '', ) ); $wp_customize->add_control( 'onepress_hero_fullscreen', array( 'type' => 'checkbox', 'label' => esc_html__('Make hero section full screen', 'onepress'), 'section' => 'onepress_hero_settings', 'description' => esc_html__('Check this box to make hero section full screen.', 'onepress'), ) ); // Show hero full screen $wp_customize->add_setting( 'onepress_hero_disable_preload', array( 'sanitize_callback' => 'onepress_sanitize_checkbox', 'default' => '', ) ); $wp_customize->add_control( 'onepress_hero_disable_preload', array( 'type' => 'checkbox', 'label' => esc_html__('Disable Preload Icon', 'onepress'), 'section' => 'onepress_hero_settings', ) ); // Hero content padding top $wp_customize->add_setting( 'onepress_hero_pdtop', array( 'sanitize_callback' => 'onepress_sanitize_text', 'default' => esc_html__('10', 'onepress'), ) ); $wp_customize->add_control( 'onepress_hero_pdtop', array( 'label' => esc_html__('Padding Top:', 'onepress'), 'section' => 'onepress_hero_settings', 'description' => esc_html__( 'The hero content padding top in percent (%).', 'onepress' ), 'active_callback' => 'onepress_hero_fullscreen_callback' ) ); // Hero content padding bottom $wp_customize->add_setting( 'onepress_hero_pdbotom', array( 'sanitize_callback' => 'onepress_sanitize_text', 'default' => esc_html__('10', 'onepress'), ) ); $wp_customize->add_control( 'onepress_hero_pdbotom', array( 'label' => esc_html__('Padding Bottom:', 'onepress'), 'section' => 'onepress_hero_settings', 'description' => esc_html__( 'The hero content padding bottom in percent (%).', 'onepress' ), 'active_callback' => 'onepress_hero_fullscreen_callback' ) ); /* Hero options ----------------------------------------------------------------------*/ $wp_customize->add_setting( 'onepress_hero_option_animation', array( 'default' => 'flipInX', 'sanitize_callback' => 'sanitize_text_field', ) ); /** * @see https://github.com/daneden/animate.css */ $animations_css = 'bounce flash pulse rubberBand shake headShake swing tada wobble jello bounceIn bounceInDown bounceInLeft bounceInRight bounceInUp bounceOut bounceOutDown bounceOutLeft bounceOutRight bounceOutUp fadeIn fadeInDown fadeInDownBig fadeInLeft fadeInLeftBig fadeInRight fadeInRightBig fadeInUp fadeInUpBig fadeOut fadeOutDown fadeOutDownBig fadeOutLeft fadeOutLeftBig fadeOutRight fadeOutRightBig fadeOutUp fadeOutUpBig flipInX flipInY flipOutX flipOutY lightSpeedIn lightSpeedOut rotateIn rotateInDownLeft rotateInDownRight rotateInUpLeft rotateInUpRight rotateOut rotateOutDownLeft rotateOutDownRight rotateOutUpLeft rotateOutUpRight hinge rollIn rollOut zoomIn zoomInDown zoomInLeft zoomInRight zoomInUp zoomOut zoomOutDown zoomOutLeft zoomOutRight zoomOutUp slideInDown slideInLeft slideInRight slideInUp slideOutDown slideOutLeft slideOutRight slideOutUp'; $animations_css = explode( ' ', $animations_css ); $animations = array(); foreach ( $animations_css as $v ) { $v = trim( $v ); if ( $v ){ $animations[ $v ]= $v; } } $wp_customize->add_control( 'onepress_hero_option_animation', array( 'label' => __( 'Text animation', 'onepress' ), 'section' => 'onepress_hero_settings', 'type' => 'select', 'choices' => $animations, ) ); $wp_customize->add_setting( 'onepress_hero_option_speed', array( 'default' => '5000', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'onepress_hero_option_speed', array( 'label' => __( 'Text animation speed', 'onepress' ), 'description' => esc_html__( 'The delay between the changing of each phrase in milliseconds.', 'onepress' ), 'section' => 'onepress_hero_settings', ) ); $wp_customize->add_setting( 'onepress_hero_slider_fade', array( 'default' => '750', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'onepress_hero_slider_fade', array( 'label' => __( 'Slider animation speed', 'onepress' ), 'description' => esc_html__( 'This is the speed at which the image will fade in. Integers in milliseconds are accepted.', 'onepress' ), 'section' => 'onepress_hero_settings', ) ); $wp_customize->add_setting( 'onepress_hero_slider_duration', array( 'default' => '5000', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'onepress_hero_slider_duration', array( 'label' => __( 'Slider duration speed', 'onepress' ), 'description' => esc_html__( 'The amount of time in between slides, expressed as the number of milliseconds.', 'onepress' ), 'section' => 'onepress_hero_settings', ) ); $wp_customize->add_section( 'onepress_hero_images' , array( 'priority' => 6, 'title' => esc_html__( 'Hero Background Media', 'onepress' ), 'description' => '', 'panel' => 'onepress_hero_panel', ) ); $wp_customize->add_setting( 'onepress_hero_images', array( 'sanitize_callback' => 'onepress_sanitize_repeatable_data_field', 'transport' => 'refresh', // refresh or postMessage 'default' => json_encode( array( array( 'image'=> array( 'url' => get_template_directory_uri().'/assets/images/hero5.jpg', 'id' => '' ) ) ) ) ) ); $wp_customize->add_control( new Onepress_Customize_Repeatable_Control( $wp_customize, 'onepress_hero_images', array( 'label' => esc_html__('Background Images', 'onepress'), 'description' => '', 'priority' => 40, 'section' => 'onepress_hero_images', 'title_format' => esc_html__( 'Background', 'onepress'), // [live_title] 'max_item' => 2, // Maximum item can add 'fields' => array( 'image' => array( 'title' => esc_html__('Background Image', 'onepress'), 'type' =>'media', 'default' => array( 'url' => get_template_directory_uri().'/assets/images/hero5.jpg', 'id' => '' ) ), ), ) ) ); // Overlay color $wp_customize->add_setting( 'onepress_hero_overlay_color', array( 'sanitize_callback' => 'onepress_sanitize_color_alpha', 'default' => 'rgba(0,0,0,.3)', //'transport' => 'refresh', // refresh or postMessage ) ); $wp_customize->add_control( new OnePress_Alpha_Color_Control( $wp_customize, 'onepress_hero_overlay_color', array( 'label' => esc_html__('Background Overlay Color', 'onepress'), 'section' => 'onepress_hero_images', 'priority' => 130, ) ) ); // Parallax $wp_customize->add_setting( 'onepress_hero_parallax', array( 'sanitize_callback' => 'onepress_sanitize_checkbox', 'default' => 0, 'transport' => 'refresh', // refresh or postMessage ) ); $wp_customize->add_control( 'onepress_hero_parallax', array( 'label' => esc_html__('Enable parallax effect (apply for first BG image only)', 'onepress'), 'section' => 'onepress_hero_images', 'type' => 'checkbox', 'priority' => 50, 'description' => '', ) ); // Background Video $wp_customize->add_setting( 'onepress_hero_videobackground_upsell', array( 'sanitize_callback' => 'onepress_sanitize_text', ) ); $wp_customize->add_control( new OnePress_Misc_Control( $wp_customize, 'onepress_hero_videobackground_upsell', array( 'section' => 'onepress_hero_images', 'type' => 'custom_message', 'description' => wp_kses_post( __( 'Want to add background video for hero section? Upgrade to OnePress Plus version.', 'onepress' ) ), 'priority' => 131, ) )); $wp_customize->add_section( 'onepress_hero_content_layout1' , array( 'priority' => 9, 'title' => esc_html__( 'Hero Content Layout', 'onepress' ), 'description' => '', 'panel' => 'onepress_hero_panel', ) ); // Hero Layout $wp_customize->add_setting( 'onepress_hero_layout', array( 'sanitize_callback' => 'onepress_sanitize_text', 'default' => '1', ) ); $wp_customize->add_control( 'onepress_hero_layout', array( 'label' => esc_html__('Display Layout', 'onepress'), 'section' => 'onepress_hero_content_layout1', 'description' => '', 'type' => 'select', 'choices' => array( '1' => esc_html__('Layout 1', 'onepress' ), '2' => esc_html__('Layout 2', 'onepress' ), ), ) ); // For Hero layout ------------------------ // Large Text $wp_customize->add_setting( 'onepress_hcl1_largetext', array( 'sanitize_callback' => 'onepress_sanitize_text', 'mod' => 'html', 'default' => wp_kses_post( __( 'We are OnePress | One Page | Responsive | Perfection', 'onepress') ), ) ); $wp_customize->add_control( new OnePress_Editor_Custom_Control( $wp_customize, 'onepress_hcl1_largetext', array( 'label' => esc_html__('Large Text', 'onepress'), 'section' => 'onepress_hero_content_layout1', 'description' => esc_html__('Text Rotating Guide: Put your rotate texts separate by "|" into ..., go to Customizer -> Theme Options -> Section: Hero -> Hero Settings to control rotate animation.', 'onepress'), ) )); $wp_customize->add_setting( 'onepress_hcl1_r_color', array( 'sanitize_callback' => 'sanitize_hex_color', 'default' => null, ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_hcl1_r_color', array( 'label' => esc_html__('Rotating Text Color', 'onepress'), 'section' => 'onepress_hero_content_layout1' ) ) ); $wp_customize->add_setting( 'onepress_hcl1_r_bg_color', array( 'sanitize_callback' => 'sanitize_hex_color', 'default' => null, ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_hcl1_r_bg_color', array( 'label' => esc_html__('Rotating Text Background', 'onepress'), 'section' => 'onepress_hero_content_layout1' ) ) ); // Small Text $wp_customize->add_setting( 'onepress_hcl1_smalltext', array( 'sanitize_callback' => 'onepress_sanitize_text', 'default' => wp_kses_post('Morbi tempus porta nunc pharetra quisque ligula imperdiet posuere
    vitae felis proin sagittis leo ac tellus blandit sollicitudin quisque vitae placerat.', 'onepress'), ) ); $wp_customize->add_control( new OnePress_Editor_Custom_Control( $wp_customize, 'onepress_hcl1_smalltext', array( 'label' => esc_html__('Small Text', 'onepress'), 'section' => 'onepress_hero_content_layout1', 'mod' => 'html', 'description' => esc_html__('You can use text rotate slider in this textarea too.', 'onepress'), ) )); // Button #1 Text $wp_customize->add_setting( 'onepress_hcl1_btn1_text', array( 'sanitize_callback' => 'onepress_sanitize_text', 'default' => esc_html__('About Us', 'onepress'), ) ); $wp_customize->add_control( 'onepress_hcl1_btn1_text', array( 'label' => esc_html__('Button #1 Text', 'onepress'), 'section' => 'onepress_hero_content_layout1' ) ); // Button #1 Link $wp_customize->add_setting( 'onepress_hcl1_btn1_link', array( 'sanitize_callback' => 'esc_url', 'default' => esc_url( home_url( '/' )).esc_html__('#about', 'onepress'), ) ); $wp_customize->add_control( 'onepress_hcl1_btn1_link', array( 'label' => esc_html__('Button #1 Link', 'onepress'), 'section' => 'onepress_hero_content_layout1' ) ); // Button #1 Style $wp_customize->add_setting( 'onepress_hcl1_btn1_style', array( 'sanitize_callback' => 'onepress_sanitize_text', 'default' => 'btn-theme-primary', ) ); $wp_customize->add_control( 'onepress_hcl1_btn1_style', array( 'label' => esc_html__('Button #1 style', 'onepress'), 'section' => 'onepress_hero_content_layout1', 'type' => 'select', 'choices' => array( 'btn-theme-primary' => esc_html__('Button Primary', 'onepress'), 'btn-secondary-outline' => esc_html__('Button Secondary', 'onepress'), 'btn-default' => esc_html__('Button', 'onepress'), 'btn-primary' => esc_html__('Primary', 'onepress'), 'btn-success' => esc_html__('Success', 'onepress'), 'btn-info' => esc_html__('Info', 'onepress'), 'btn-warning' => esc_html__('Warning', 'onepress'), 'btn-danger' => esc_html__('Danger', 'onepress'), ) ) ); $wp_customize->add_setting( 'onepress_hcl1_btn1_target', array( 'sanitize_callback' => 'onepress_sanitize_checkbox', 'default' => null, ) ); $wp_customize->add_control( 'onepress_hcl1_btn1_target', array( 'label' => __('Open Button #1 In New Window', 'onepress'), 'section' => 'onepress_hero_content_layout1', 'type' => 'checkbox', ) ); // Button #2 Text $wp_customize->add_setting( 'onepress_hcl1_btn2_text', array( 'sanitize_callback' => 'onepress_sanitize_text', 'default' => esc_html__('Get Started', 'onepress'), ) ); $wp_customize->add_control( 'onepress_hcl1_btn2_text', array( 'label' => esc_html__('Button #2 Text', 'onepress'), 'section' => 'onepress_hero_content_layout1' ) ); // Button #2 Link $wp_customize->add_setting( 'onepress_hcl1_btn2_link', array( 'sanitize_callback' => 'esc_url', 'default' => esc_url( home_url( '/' )).esc_html__('#contact', 'onepress'), ) ); $wp_customize->add_control( 'onepress_hcl1_btn2_link', array( 'label' => esc_html__('Button #2 Link', 'onepress'), 'section' => 'onepress_hero_content_layout1' ) ); // Button #2 Style $wp_customize->add_setting( 'onepress_hcl1_btn2_style', array( 'sanitize_callback' => 'onepress_sanitize_text', 'default' => 'btn-secondary-outline', ) ); $wp_customize->add_control( 'onepress_hcl1_btn2_style', array( 'label' => esc_html__('Button #2 style', 'onepress'), 'section' => 'onepress_hero_content_layout1', 'type' => 'select', 'choices' => array( 'btn-theme-primary' => esc_html__('Button Primary', 'onepress'), 'btn-secondary-outline' => esc_html__('Button Secondary', 'onepress'), 'btn-default' => esc_html__('Button', 'onepress'), 'btn-primary' => esc_html__('Primary', 'onepress'), 'btn-success' => esc_html__('Success', 'onepress'), 'btn-info' => esc_html__('Info', 'onepress'), 'btn-warning' => esc_html__('Warning', 'onepress'), 'btn-danger' => esc_html__('Danger', 'onepress'), ) ) ); $wp_customize->add_setting( 'onepress_hcl1_btn2_target', array( 'sanitize_callback' => 'onepress_sanitize_checkbox', 'default' => null, ) ); $wp_customize->add_control( 'onepress_hcl1_btn2_target', array( 'label' => __('Open Button #2 In New Window', 'onepress'), 'section' => 'onepress_hero_content_layout1', 'type' => 'checkbox', ) ); /* Layout 2 ---- */ // Layout 22 content text $wp_customize->add_setting( 'onepress_hcl2_content', array( 'sanitize_callback' => 'onepress_sanitize_text', 'mod' => 'html', 'default' => wp_kses_post( '

    Business Website'."\n".'Made Simple.

    '."\n".'We provide creative solutions to clients around the world,'."\n".'creating things that get attention and meaningful.'."\n\n".'Get Started' ), ) ); $wp_customize->add_control( new OnePress_Editor_Custom_Control( $wp_customize, 'onepress_hcl2_content', array( 'label' => esc_html__('Content Text', 'onepress'), 'section' => 'onepress_hero_content_layout1', 'description' => '', ) )); // Layout 2 image $wp_customize->add_setting( 'onepress_hcl2_image', array( 'sanitize_callback' => 'onepress_sanitize_text', 'mod' => 'html', 'default' => get_template_directory_uri().'/assets/images/onepress_responsive.png', ) ); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'onepress_hcl2_image', array( 'label' => esc_html__('Image', 'onepress'), 'section' => 'onepress_hero_content_layout1', 'description' => '', ) )); // END For Hero layout ------------------------PK! :In"customize-configs/options-page.phpnu[add_section( 'onepress_page', array( 'priority' => null, 'title' => esc_html__( 'Page Title Area', 'onepress' ), 'description' => '', 'panel' => 'onepress_options', ) ); // Disable the page title bar. $wp_customize->add_setting( 'onepress_page_title_bar_disable', array( 'sanitize_callback' => 'onepress_sanitize_checkbox', 'default' => '', ) ); $wp_customize->add_control( 'onepress_page_title_bar_disable', array( 'type' => 'checkbox', 'label' => esc_html__( 'Disable Page Title bar?', 'onepress' ), 'section' => 'onepress_page', 'description' => esc_html__( 'Check this box to disable the page title bar on all pages.', 'onepress' ), ) ); $wp_customize->add_setting( 'onepress_page_cover_pd_top', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => '', 'transport' => 'postMessage', ) ); $wp_customize->add_control( 'onepress_page_cover_pd_top', array( 'label' => esc_html__( 'Padding Top', 'onepress' ), 'description' => esc_html__( 'The page cover padding top in percent (%).', 'onepress' ), 'section' => 'onepress_page', ) ); $wp_customize->add_setting( 'onepress_page_cover_pd_bottom', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => '', 'transport' => 'postMessage', ) ); $wp_customize->add_control( 'onepress_page_cover_pd_bottom', array( 'label' => esc_html__( 'Padding Bottom', 'onepress' ), 'description' => esc_html__( 'The page cover padding bottom in percent (%).', 'onepress' ), 'section' => 'onepress_page', ) ); $wp_customize->add_setting( 'onepress_page_cover_color', array( 'sanitize_callback' => 'onepress_sanitize_color_alpha', 'default' => null, 'transport' => 'postMessage', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_page_cover_color', array( 'label' => esc_html__( 'Color', 'onepress' ), 'section' => 'onepress_page', ) ) ); // Overlay color. $wp_customize->add_setting( 'onepress_page_cover_overlay', array( 'sanitize_callback' => 'onepress_sanitize_color_alpha', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new OnePress_Alpha_Color_Control( $wp_customize, 'onepress_page_cover_overlay', array( 'label' => esc_html__( 'Background Overlay Color', 'onepress' ), 'section' => 'onepress_page', ) ) ); /** * Normal page title align. * * @since 2.2.1 */ $wp_customize->add_setting( 'onepress_page_normal_align', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => 'left', 'transport' => 'postMessage', ) ); $wp_customize->add_control( 'onepress_page_normal_align', array( 'label' => esc_html__( 'Page Title Alignment', 'onepress' ), 'section' => 'onepress_page', 'type' => 'select', 'choices' => array( 'left' => esc_html__( 'Left', 'onepress' ), 'right' => esc_html__( 'Right', 'onepress' ), 'center' => esc_html__( 'Center', 'onepress' ), ), ) ); $wp_customize->add_setting( 'onepress_page_cover_align', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => 'center', 'transport' => 'postMessage', ) ); $wp_customize->add_control( 'onepress_page_cover_align', array( 'label' => esc_html__( 'Page Title Cover Alignment', 'onepress' ), 'description' => esc_html__( 'Apply when the page display featured image as header cover.', 'onepress' ), 'section' => 'onepress_page', 'type' => 'select', 'choices' => array( 'center' => esc_html__( 'Center', 'onepress' ), 'left' => esc_html__( 'Left', 'onepress' ), 'right' => esc_html__( 'Right', 'onepress' ), ), ) ); PK!>m(customize-configs/options-blog-posts.phpnu[add_section( 'onepress_blog_posts', array( 'priority' => null, 'title' => esc_html__( 'Blog Posts', 'onepress' ), 'description' => '', 'panel' => 'onepress_options', ) ); $wp_customize->add_setting( 'onepress_disable_archive_prefix', array( 'sanitize_callback' => 'onepress_sanitize_checkbox', 'default' => '', ) ); $wp_customize->add_control( 'onepress_disable_archive_prefix', array( 'type' => 'checkbox', 'label' => esc_html__( 'Disable archive prefix', 'onepress' ), 'section' => 'onepress_blog_posts', 'description' => esc_html__( 'Check this to disable archive prefix on category, date, tag page.', 'onepress' ), ) ); $wp_customize->add_setting( 'onepress_hide_thumnail_if_not_exists', array( 'sanitize_callback' => 'onepress_sanitize_checkbox', 'default' => '', ) ); $wp_customize->add_control( 'onepress_hide_thumnail_if_not_exists', array( 'type' => 'checkbox', 'label' => esc_html__( 'Hide thumbnail placeholder', 'onepress' ), 'section' => 'onepress_blog_posts', 'description' => esc_html__( 'Hide placeholder if the post thumbnail not exists.', 'onepress' ), ) ); PK!$dd"customize-configs/section-team.phpnu[add_panel( 'onepress_team' , array( 'priority' => 250, 'title' => esc_html__( 'Section: Team', 'onepress' ), 'description' => '', 'active_callback' => 'onepress_showon_frontpage' ) ); $wp_customize->add_section( 'onepress_team_settings' , array( 'priority' => 3, 'title' => esc_html__( 'Section Settings', 'onepress' ), 'description' => '', 'panel' => 'onepress_team', ) ); // Show Content $wp_customize->add_setting( 'onepress_team_disable', array( 'sanitize_callback' => 'onepress_sanitize_checkbox', 'default' => '', ) ); $wp_customize->add_control( 'onepress_team_disable', array( 'type' => 'checkbox', 'label' => esc_html__('Hide this section?', 'onepress'), 'section' => 'onepress_team_settings', 'description' => esc_html__('Check this box to hide this section.', 'onepress'), ) ); // Section ID $wp_customize->add_setting( 'onepress_team_id', array( 'sanitize_callback' => 'onepress_sanitize_text', 'default' => esc_html__('team', 'onepress'), ) ); $wp_customize->add_control( 'onepress_team_id', array( 'label' => esc_html__('Section ID:', 'onepress'), 'section' => 'onepress_team_settings', 'description' => 'The section ID should be English character, lowercase and no space.' ) ); // Title $wp_customize->add_setting( 'onepress_team_title', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => esc_html__('Our Team', 'onepress'), ) ); $wp_customize->add_control( 'onepress_team_title', array( 'label' => esc_html__('Section Title', 'onepress'), 'section' => 'onepress_team_settings', 'description' => '', ) ); // Sub Title $wp_customize->add_setting( 'onepress_team_subtitle', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => esc_html__('Section subtitle', 'onepress'), ) ); $wp_customize->add_control( 'onepress_team_subtitle', array( 'label' => esc_html__('Section Subtitle', 'onepress'), 'section' => 'onepress_team_settings', 'description' => '', ) ); // Description $wp_customize->add_setting( 'onepress_team_desc', array( 'sanitize_callback' => 'onepress_sanitize_text', 'default' => '', ) ); $wp_customize->add_control( new OnePress_Editor_Custom_Control( $wp_customize, 'onepress_team_desc', array( 'label' => esc_html__('Section Description', 'onepress'), 'section' => 'onepress_team_settings', 'description' => '', ) )); // Team layout $wp_customize->add_setting( 'onepress_team_layout', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => '3', ) ); $wp_customize->add_control( 'onepress_team_layout', array( 'label' => esc_html__('Team Layout Settings', 'onepress'), 'section' => 'onepress_team_settings', 'description' => '', 'type' => 'select', 'choices' => array( '3' => esc_html__( '4 Columns', 'onepress' ), '4' => esc_html__( '3 Columns', 'onepress' ), '6' => esc_html__( '2 Columns', 'onepress' ), ), ) ); onepress_add_upsell_for_section( $wp_customize, 'onepress_team_settings' ); $wp_customize->add_section( 'onepress_team_content' , array( 'priority' => 6, 'title' => esc_html__( 'Section Content', 'onepress' ), 'description' => '', 'panel' => 'onepress_team', ) ); // Team member settings $wp_customize->add_setting( 'onepress_team_members', array( 'sanitize_callback' => 'onepress_sanitize_repeatable_data_field', 'transport' => 'refresh', // refresh or postMessage ) ); $wp_customize->add_control( new Onepress_Customize_Repeatable_Control( $wp_customize, 'onepress_team_members', array( 'label' => esc_html__('Team members', 'onepress'), 'description' => '', 'section' => 'onepress_team_content', //'live_title_id' => 'user_id', // apply for unput text and textarea only 'title_format' => esc_html__( '[live_title]', 'onepress'), // [live_title] 'max_item' => 4, // Maximum item can add 'limited_msg' => wp_kses_post( __( 'Upgrade to OnePress Plus to be able to add more items and unlock other premium features!', 'onepress' ) ), 'fields' => array( 'user_id' => array( 'title' => esc_html__('User media', 'onepress'), 'type' =>'media', 'desc' => '', ), 'link' => array( 'title' => esc_html__('Custom Link', 'onepress'), 'type' =>'text', 'desc' => '', ), ), ) ) );PK!_}}1customize-configs/options-sections-navigation.phpnu[add_section( 'onepress_sections_nav', array( 'priority' => null, 'title' => esc_html__( 'Sections Navigation', 'onepress' ), 'description' => '', 'panel' => 'onepress_options', ) ); Onepress_Dots_Navigation::get_instance()->add_customize( $wp_customize, 'onepress_sections_nav' ); PK!>fdD$customize-configs/options-single.phpnu[add_section( 'onepress_single', array( 'priority' => null, 'title' => esc_html__( 'Single Post', 'onepress' ), 'description' => '', 'panel' => 'onepress_options', ) ); $wp_customize->add_setting( 'single_layout', array( 'sanitize_callback' => 'onepress_sanitize_select', 'default' => 'default', ) ); $wp_customize->add_control( 'single_layout', array( 'type' => 'select', 'label' => esc_html__( 'Single Layout Sidebar', 'onepress' ), 'section' => 'onepress_single', 'choices' => array( 'default' => esc_html__( 'Default', 'onepress' ), 'no-sidebar' => esc_html__( 'No Sidebar', 'onepress' ), 'left-sidebar' => esc_html__( 'Left Sidebar', 'onepress' ), 'right-sidebar' => esc_html__( 'Right Sidebar', 'onepress' ), ) ) ); $wp_customize->add_setting( 'single_layout_content_width', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => '', ) ); $wp_customize->add_control( 'single_layout_content_width', array( 'type' => 'text', 'label' => esc_html__( 'Single Content Max Width', 'onepress' ), 'description' => esc_html__( 'Enter content max width number, e.g : 800', 'onepress' ), 'section' => 'onepress_single', ) ); $wp_customize->add_setting( 'single_thumbnail', array( 'sanitize_callback' => 'onepress_sanitize_checkbox', 'default' => '', ) ); $wp_customize->add_control( 'single_thumbnail', array( 'type' => 'checkbox', 'label' => esc_html__( 'Show single post thumbnail', 'onepress' ), 'section' => 'onepress_single', 'description' => esc_html__( 'Check this box to show post thumbnail on single post.', 'onepress' ) ) ); $wp_customize->add_setting( 'single_meta', array( 'sanitize_callback' => 'onepress_sanitize_checkbox', 'default' => '1', ) ); $wp_customize->add_control( 'single_meta', array( 'type' => 'checkbox', 'label' => esc_html__( 'Show single post meta', 'onepress' ), 'section' => 'onepress_single', 'description' => esc_html__( 'Check this box to show single post meta such as post date, author, category,...', 'onepress' ) ) );PK!ee"customize-configs/section-news.phpnu[add_panel( 'onepress_news', array( 'priority' => 260, 'title' => esc_html__( 'Section: News', 'onepress' ), 'description' => '', 'active_callback' => 'onepress_showon_frontpage' ) ); $wp_customize->add_section( 'onepress_news_settings', array( 'priority' => 3, 'title' => esc_html__( 'Section Settings', 'onepress' ), 'description' => '', 'panel' => 'onepress_news', ) ); // Show Content $wp_customize->add_setting( 'onepress_news_disable', array( 'sanitize_callback' => 'onepress_sanitize_checkbox', 'default' => '', ) ); $wp_customize->add_control( 'onepress_news_disable', array( 'type' => 'checkbox', 'label' => esc_html__( 'Hide this section?', 'onepress' ), 'section' => 'onepress_news_settings', 'description' => esc_html__( 'Check this box to hide this section.', 'onepress' ), ) ); // Section ID $wp_customize->add_setting( 'onepress_news_id', array( 'sanitize_callback' => 'onepress_sanitize_text', 'default' => esc_html__( 'news', 'onepress' ), ) ); $wp_customize->add_control( 'onepress_news_id', array( 'label' => esc_html__( 'Section ID:', 'onepress' ), 'section' => 'onepress_news_settings', 'description' => esc_html__( 'The section ID should be English character, lowercase and no space.', 'onepress' ) ) ); // Title $wp_customize->add_setting( 'onepress_news_title', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => esc_html__( 'Latest News', 'onepress' ), ) ); $wp_customize->add_control( 'onepress_news_title', array( 'label' => esc_html__( 'Section Title', 'onepress' ), 'section' => 'onepress_news_settings', 'description' => '', ) ); // Sub Title $wp_customize->add_setting( 'onepress_news_subtitle', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => esc_html__( 'Section subtitle', 'onepress' ), ) ); $wp_customize->add_control( 'onepress_news_subtitle', array( 'label' => esc_html__( 'Section Subtitle', 'onepress' ), 'section' => 'onepress_news_settings', 'description' => '', ) ); // Description $wp_customize->add_setting( 'onepress_news_desc', array( 'sanitize_callback' => 'onepress_sanitize_text', 'default' => '', ) ); $wp_customize->add_control( new OnePress_Editor_Custom_Control( $wp_customize, 'onepress_news_desc', array( 'label' => esc_html__( 'Section Description', 'onepress' ), 'section' => 'onepress_news_settings', 'description' => '', ) ) ); // hr $wp_customize->add_setting( 'onepress_news_settings_hr', array( 'sanitize_callback' => 'onepress_sanitize_text', ) ); $wp_customize->add_control( new OnePress_Misc_Control( $wp_customize, 'onepress_news_settings_hr', array( 'section' => 'onepress_news_settings', 'type' => 'hr' ) ) ); /** * @since 2.1.0 */ $wp_customize->add_setting( 'onepress_news_hide_meta', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => false, ) ); $wp_customize->add_control( 'onepress_news_hide_meta', array( 'label' => esc_html__( 'Hide post categories', 'onepress' ), 'section' => 'onepress_news_settings', 'type' => 'checkbox', 'description' => '', ) ); /** * @since 2.1.0 */ $wp_customize->add_setting( 'onepress_news_excerpt_type', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => 'custom', ) ); $wp_customize->add_control( 'onepress_news_excerpt_type', array( 'label' => esc_html__( 'Custom excerpt length', 'onepress' ), 'section' => 'onepress_news_settings', 'type' => 'select', 'choices' => array( 'custom' => __( 'Custom', 'onepress' ), 'excerpt' => __( 'Use excerpt metabox', 'onepress' ), 'more_tag' => __( 'Strip excerpt by more tag', 'onepress' ), 'content' => __( 'Full content', 'onepress' ), ), 'description' => '', ) ); /** * @since 2.1.0 */ $wp_customize->add_setting( 'onepress_news_excerpt_length', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => '', ) ); $wp_customize->add_control( 'onepress_news_excerpt_length', array( 'label' => esc_html__( 'Custom excerpt length', 'onepress' ), 'section' => 'onepress_news_settings', 'description' => '', ) ); // Number of post to show. $wp_customize->add_setting( 'onepress_news_number', array( 'sanitize_callback' => 'onepress_sanitize_number', 'default' => '3', ) ); $wp_customize->add_control( 'onepress_news_number', array( 'label' => esc_html__( 'Number of post to show', 'onepress' ), 'section' => 'onepress_news_settings', 'description' => '', ) ); $wp_customize->add_setting( 'onepress_news_cat', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => 0, ) ); $wp_customize->add_control( new OnePress_Category_Control( $wp_customize, 'onepress_news_cat', array( 'label' => esc_html__( 'Category to show', 'onepress' ), 'section' => 'onepress_news_settings', 'description' => '', ) ) ); $wp_customize->add_setting( 'onepress_news_orderby', array( 'sanitize_callback' => 'onepress_sanitize_select', 'default' => 0, ) ); $wp_customize->add_control( 'onepress_news_orderby', array( 'label' => esc_html__( 'Order By', 'onepress' ), 'section' => 'onepress_news_settings', 'type' => 'select', 'choices' => array( 'default' => esc_html__( 'Default', 'onepress' ), 'id' => esc_html__( 'ID', 'onepress' ), 'author' => esc_html__( 'Author', 'onepress' ), 'title' => esc_html__( 'Title', 'onepress' ), 'date' => esc_html__( 'Date', 'onepress' ), 'comment_count' => esc_html__( 'Comment Count', 'onepress' ), 'menu_order' => esc_html__( 'Order by Page Order', 'onepress' ), 'rand' => esc_html__( 'Random order', 'onepress' ), ) ) ); $wp_customize->add_setting( 'onepress_news_order', array( 'sanitize_callback' => 'onepress_sanitize_select', 'default' => 'desc', ) ); $wp_customize->add_control( 'onepress_news_order', array( 'label' => esc_html__( 'Order', 'onepress' ), 'section' => 'onepress_news_settings', 'type' => 'select', 'choices' => array( 'desc' => esc_html__( 'Descending', 'onepress' ), 'asc' => esc_html__( 'Ascending', 'onepress' ), ) ) ); // Blog Button $wp_customize->add_setting( 'onepress_news_more_page', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => '', ) ); $wp_customize->add_control( new OnePress_Pages_Control( $wp_customize, 'onepress_news_more_page', array( 'label' => esc_html__( 'More News Page', 'onepress' ), 'section' => 'onepress_news_settings', 'show_option_none' => esc_html__( 'Custom Link', 'onepress' ), 'description' => esc_html__( 'It should be your blog page link.', 'onepress' ) ) ) ); $wp_customize->add_setting( 'onepress_news_more_link', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => '', ) ); $wp_customize->add_control( 'onepress_news_more_link', array( 'label' => esc_html__( 'Custom More News link', 'onepress' ), 'section' => 'onepress_news_settings' ) ); $wp_customize->add_setting( 'onepress_news_more_text', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => esc_html__( 'Read Our Blog', 'onepress' ), ) ); $wp_customize->add_control( 'onepress_news_more_text', array( 'label' => esc_html__( 'More News Button Text', 'onepress' ), 'section' => 'onepress_news_settings', 'description' => '', ) ); onepress_add_upsell_for_section( $wp_customize, 'onepress_news_settings' ); PK!9^%customize-configs/section-counter.phpnu[add_panel( 'onepress_counter' , array( 'priority' => 210, 'title' => esc_html__( 'Section: Counter', 'onepress' ), 'description' => '', 'active_callback' => 'onepress_showon_frontpage' ) ); $wp_customize->add_section( 'onepress_counter_settings' , array( 'priority' => 3, 'title' => esc_html__( 'Section Settings', 'onepress' ), 'description' => '', 'panel' => 'onepress_counter', ) ); // Show Content $wp_customize->add_setting( 'onepress_counter_disable', array( 'sanitize_callback' => 'onepress_sanitize_checkbox', 'default' => '', ) ); $wp_customize->add_control( 'onepress_counter_disable', array( 'type' => 'checkbox', 'label' => esc_html__('Hide this section?', 'onepress'), 'section' => 'onepress_counter_settings', 'description' => esc_html__('Check this box to hide this section.', 'onepress'), ) ); // Section ID $wp_customize->add_setting( 'onepress_counter_id', array( 'sanitize_callback' => 'onepress_sanitize_text', 'default' => esc_html__('counter', 'onepress'), ) ); $wp_customize->add_control( 'onepress_counter_id', array( 'label' => esc_html__('Section ID:', 'onepress'), 'section' => 'onepress_counter_settings', 'description' => esc_html__( 'The section ID should be English character, lowercase and no space.', 'onepress' ) ) ); // Title $wp_customize->add_setting( 'onepress_counter_title', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => esc_html__('Our Numbers', 'onepress'), ) ); $wp_customize->add_control( 'onepress_counter_title', array( 'label' => esc_html__('Section Title', 'onepress'), 'section' => 'onepress_counter_settings', 'description' => '', ) ); // Sub Title $wp_customize->add_setting( 'onepress_counter_subtitle', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => esc_html__('Section subtitle', 'onepress'), ) ); $wp_customize->add_control( 'onepress_counter_subtitle', array( 'label' => esc_html__('Section Subtitle', 'onepress'), 'section' => 'onepress_counter_settings', 'description' => '', ) ); // Description $wp_customize->add_setting( 'onepress_counter_desc', array( 'sanitize_callback' => 'onepress_sanitize_text', 'default' => '', ) ); $wp_customize->add_control( new OnePress_Editor_Custom_Control( $wp_customize, 'onepress_counter_desc', array( 'label' => esc_html__('Section Description', 'onepress'), 'section' => 'onepress_counter_settings', 'description' => '', ) )); onepress_add_upsell_for_section( $wp_customize, 'onepress_counter_settings' ); $wp_customize->add_section( 'onepress_counter_content' , array( 'priority' => 6, 'title' => esc_html__( 'Section Content', 'onepress' ), 'description' => '', 'panel' => 'onepress_counter', ) ); // Order & Styling $wp_customize->add_setting( 'onepress_counter_boxes', array( 'sanitize_callback' => 'onepress_sanitize_repeatable_data_field', 'transport' => 'refresh', // refresh or postMessage ) ); $wp_customize->add_control( new Onepress_Customize_Repeatable_Control( $wp_customize, 'onepress_counter_boxes', array( 'label' => esc_html__('Counter content', 'onepress'), 'description' => '', 'section' => 'onepress_counter_content', 'live_title_id' => 'title', // apply for unput text and textarea only 'title_format' => esc_html__('[live_title]', 'onepress'), // [live_title] 'max_item' => 4, // Maximum item can add 'limited_msg' => wp_kses_post( __('Upgrade to OnePress Plus to be able to add more items and unlock other premium features!', 'onepress' ) ), 'fields' => array( 'title' => array( 'title' => esc_html__('Title', 'onepress'), 'type' =>'text', 'desc' => '', 'default' => esc_html__( 'Your counter label', 'onepress' ), ), 'number' => array( 'title' => esc_html__('Number', 'onepress'), 'type' =>'text', 'default' => 99, ), 'unit_before' => array( 'title' => esc_html__('Before number', 'onepress'), 'type' =>'text', 'default' => '', ), 'unit_after' => array( 'title' => esc_html__('After number', 'onepress'), 'type' =>'text', 'default' => '', ), ), ) ) ); PK!\˿--$customize-configs/options-footer.phpnu[add_section( 'onepres_footer_top', array( 'title' => esc_html__( 'Footer Socials', 'onepress' ), 'description' => '', 'panel' => 'onepress_options', ) ); // Disable Social $wp_customize->add_setting( 'onepress_social_disable', array( 'sanitize_callback' => 'onepress_sanitize_checkbox', 'default' => '1', 'transport' => 'postMessage', ) ); $wp_customize->add_control( 'onepress_social_disable', array( 'type' => 'checkbox', 'label' => esc_html__( 'Hide Footer Social?', 'onepress' ), 'section' => 'onepres_footer_top', 'description' => esc_html__( 'Check this box to hide footer social section.', 'onepress' ) ) ); $wp_customize->add_setting( 'onepress_social_footer_guide', array( 'sanitize_callback' => 'onepress_sanitize_text' ) ); $wp_customize->add_control( new OnePress_Misc_Control( $wp_customize, 'onepress_social_footer_guide', array( 'section' => 'onepres_footer_top', 'type' => 'custom_message', 'description' => esc_html__( 'The social profiles specified below will be displayed in the footer of your site.', 'onepress' ) ) ) ); // Footer Social Title $wp_customize->add_setting( 'onepress_social_footer_title', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => esc_html__( 'Keep Updated', 'onepress' ), 'transport' => 'postMessage', ) ); $wp_customize->add_control( 'onepress_social_footer_title', array( 'label' => esc_html__( 'Social Footer Title', 'onepress' ), 'section' => 'onepres_footer_top', 'description' => '' ) ); // Socials $wp_customize->add_setting( 'onepress_social_profiles', array( //'default' => '', 'sanitize_callback' => 'onepress_sanitize_repeatable_data_field', 'transport' => 'postMessage', // refresh or postMessage ) ); $wp_customize->add_control( new Onepress_Customize_Repeatable_Control( $wp_customize, 'onepress_social_profiles', array( 'label' => esc_html__( 'Socials', 'onepress' ), 'description' => '', 'section' => 'onepres_footer_top', 'live_title_id' => 'network', // apply for unput text and textarea only 'title_format' => esc_html__( '[live_title]', 'onepress' ), // [live_title] 'max_item' => 5, // Maximum item can add 'limited_msg' => wp_kses_post( __( 'Upgrade to OnePress Plus to be able to add more items and unlock other premium features!', 'onepress' ) ), 'fields' => array( 'network' => array( 'title' => esc_html__( 'Social network', 'onepress' ), 'type' => 'text', ), 'icon' => array( 'title' => esc_html__( 'Icon', 'onepress' ), 'type' => 'icon', ), 'link' => array( 'title' => esc_html__( 'URL', 'onepress' ), 'type' => 'text', ), ), ) ) ); /* Newsletter Settings ----------------------------------------------------------------------*/ // Disable Newsletter $wp_customize->add_setting( 'onepress_newsletter_disable', array( 'sanitize_callback' => 'onepress_sanitize_checkbox', 'default' => '1', 'transport' => 'postMessage', ) ); $wp_customize->add_control( 'onepress_newsletter_disable', array( 'type' => 'checkbox', 'label' => esc_html__( 'Hide Footer Newsletter?', 'onepress' ), 'section' => 'onepres_footer_top', 'description' => esc_html__( 'Check this box to hide footer newsletter form.', 'onepress' ) ) ); // Mailchimp Form Title $wp_customize->add_setting( 'onepress_newsletter_title', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => esc_html__( 'Join our Newsletter', 'onepress' ), 'transport' => 'postMessage', // refresh or postMessage ) ); $wp_customize->add_control( 'onepress_newsletter_title', array( 'label' => esc_html__( 'Newsletter Form Title', 'onepress' ), 'section' => 'onepres_footer_top', 'description' => '' ) ); // Mailchimp action url $wp_customize->add_setting( 'onepress_newsletter_mailchimp', array( 'sanitize_callback' => 'esc_url', 'default' => '', 'transport' => 'postMessage', // refresh or postMessage ) ); $wp_customize->add_control( 'onepress_newsletter_mailchimp', array( 'label' => esc_html__( 'MailChimp Action URL', 'onepress' ), 'section' => 'onepres_footer_top', 'description' => __( 'The newsletter form use MailChimp, please follow this guide to know how to get MailChimp Action URL. Example //famethemes.us8.list-manage.com/subscribe/post?u=521c400d049a59a4b9c0550c2&id=83187e0006', 'onepress' ) ) ); // Footer BG Color $wp_customize->add_setting( 'onepress_footer_bg', array( 'sanitize_callback' => 'sanitize_hex_color_no_hash', 'sanitize_js_callback' => 'maybe_hash_hex_color', 'default' => '', 'transport' => 'postMessage' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_footer_bg', array( 'label' => esc_html__( 'Background', 'onepress' ), 'section' => 'onepres_footer_top', 'description' => '', ) ) ); $wp_customize->add_setting( 'onepress_footer_top_color', array( 'sanitize_callback' => 'sanitize_hex_color', 'default' => '', 'transport' => 'postMessage' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_footer_top_color', array( 'label' => esc_html__( 'Text Color', 'onepress' ), 'section' => 'onepres_footer_top', 'description' => '', ) ) ); /* Footer Widgets Settings ----------------------------------------------------------------------*/ $wp_customize->add_section( 'onepress_footer', array( 'priority' => null, 'title' => esc_html__( 'Footer Widgets', 'onepress' ), 'description' => '', 'panel' => 'onepress_options', ) ); $wp_customize->add_setting( 'footer_layout', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => '', 'transport' => 'postMessage', ) ); $wp_customize->add_control( 'footer_layout', array( 'type' => 'select', 'label' => esc_html__( 'Layout', 'onepress' ), 'section' => 'onepress_footer', 'default' => '0', 'description' => esc_html__( 'Number footer columns to display.', 'onepress' ), 'choices' => array( '4' => 4, '3' => 3, '2' => 2, '1' => 1, '0' => esc_html__( 'Disable footer widgets', 'onepress' ), ) ) ); for ( $i = 1; $i <= 4; $i ++ ) { $df = 12; if ( $i > 1 ) { $_n = 12 / $i; $df = array(); for ( $j = 0; $j < $i; $j ++ ) { $df[ $j ] = $_n; } $df = join( '+', $df ); } $wp_customize->add_setting( 'footer_custom_' . $i . '_columns', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => $df, 'transport' => 'postMessage', ) ); $wp_customize->add_control( 'footer_custom_' . $i . '_columns', array( 'label' => $i == 1 ? __( 'Custom footer 1 column width', 'onepress' ) : sprintf( __( 'Custom footer %s columns width', 'onepress' ), $i ), 'section' => 'onepress_footer', 'description' => esc_html__( 'Enter int numbers and sum of them must smaller or equal 12, separated by "+"', 'onepress' ), ) ); } // onepress_sanitize_color_alpha $wp_customize->add_setting( 'footer_widgets_color', array( 'sanitize_callback' => 'sanitize_hex_color', 'default' => '', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'footer_widgets_color', array( 'label' => esc_html__( 'Text Color', 'onepress' ), 'section' => 'onepress_footer', ) ) ); $wp_customize->add_setting( 'footer_widgets_bg_color', array( 'sanitize_callback' => 'sanitize_hex_color', 'default' => '', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'footer_widgets_bg_color', array( 'label' => esc_html__( 'Background Color', 'onepress' ), 'section' => 'onepress_footer', ) ) ); // Footer Heading color $wp_customize->add_setting( 'footer_widgets_title_color', array( 'sanitize_callback' => 'sanitize_hex_color', 'default' => '', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'footer_widgets_title_color', array( 'label' => esc_html__( 'Widget Title Color', 'onepress' ), 'section' => 'onepress_footer', ) ) ); $wp_customize->add_setting( 'footer_widgets_link_color', array( 'sanitize_callback' => 'sanitize_hex_color', 'default' => '', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'footer_widgets_link_color', array( 'label' => esc_html__( 'Link Color', 'onepress' ), 'section' => 'onepress_footer', ) ) ); $wp_customize->add_setting( 'footer_widgets_link_hover_color', array( 'sanitize_callback' => 'sanitize_hex_color', 'default' => '', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'footer_widgets_link_hover_color', array( 'label' => esc_html__( 'Link Hover Color', 'onepress' ), 'section' => 'onepress_footer', ) ) ); /* Footer Copyright Settings ----------------------------------------------------------------------*/ $wp_customize->add_section( 'onepress_footer_copyright', array( 'priority' => null, 'title' => esc_html__( 'Footer Copyright', 'onepress' ), 'description' => '', 'panel' => 'onepress_options', ) ); // Footer Widgets Color $wp_customize->add_setting( 'onepress_footer_info_bg', array( 'sanitize_callback' => 'sanitize_hex_color', 'sanitize_js_callback' => 'maybe_hash_hex_color', 'default' => '', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_footer_info_bg', array( 'label' => esc_html__( 'Background', 'onepress' ), 'section' => 'onepress_footer_copyright', 'description' => '', ) ) ); // Footer Widgets Color $wp_customize->add_setting( 'onepress_footer_c_color', array( 'sanitize_callback' => 'sanitize_hex_color', 'sanitize_js_callback' => 'maybe_hash_hex_color', 'default' => '', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_footer_c_color', array( 'label' => esc_html__( 'Text Color', 'onepress' ), 'section' => 'onepress_footer_copyright', 'description' => '', ) ) ); $wp_customize->add_setting( 'onepress_footer_c_link_color', array( 'sanitize_callback' => 'sanitize_hex_color', 'sanitize_js_callback' => 'maybe_hash_hex_color', 'default' => '', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_footer_c_link_color', array( 'label' => esc_html__( 'Link Color', 'onepress' ), 'section' => 'onepress_footer_copyright', 'description' => '', ) ) ); $wp_customize->add_setting( 'onepress_footer_c_link_hover_color', array( 'sanitize_callback' => 'sanitize_hex_color', 'sanitize_js_callback' => 'maybe_hash_hex_color', 'default' => '', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_footer_c_link_hover_color', array( 'label' => esc_html__( 'Link Hover Color', 'onepress' ), 'section' => 'onepress_footer_copyright', 'description' => '', ) ) );PK!65(customize-configs/options-navigation.phpnu[add_section( 'onepress_nav', array( 'priority' => null, 'title' => esc_html__( 'Navigation', 'onepress' ), 'description' => '', 'panel' => 'onepress_options', ) ); $wp_customize->add_setting( 'onepress_menu_item_padding', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => '', 'transport' => 'postMessage' ) ); $wp_customize->add_control( 'onepress_menu_item_padding', array( 'label' => esc_html__( 'Menu Item Padding', 'onepress' ), 'description' => esc_html__( 'Padding left and right for Navigation items (pixels).', 'onepress' ), 'section' => 'onepress_nav', ) );PK! aa$customize-configs/options-colors.phpnu[add_section( 'onepress_colors_settings', array( 'priority' => 4, 'title' => esc_html__( 'Site Colors', 'onepress' ), 'description' => '', 'panel' => 'onepress_options', ) ); // Primary Color $wp_customize->add_setting( 'onepress_primary_color', array( 'sanitize_callback' => 'sanitize_hex_color_no_hash', 'sanitize_js_callback' => 'maybe_hash_hex_color', 'default' => '#03c4eb', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_primary_color', array( 'label' => esc_html__( 'Primary Color', 'onepress' ), 'section' => 'onepress_colors_settings', 'description' => '', 'priority' => 1, ) ) ); /** * Secondary Color * * @since 2.2.1 */ $wp_customize->add_setting( 'onepress_secondary_color', array( 'sanitize_callback' => 'sanitize_hex_color_no_hash', 'sanitize_js_callback' => 'maybe_hash_hex_color', 'default' => '#333333', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_secondary_color', array( 'label' => esc_html__( 'Secondary Color', 'onepress' ), 'section' => 'onepress_colors_settings', 'description' => '', 'priority' => 2, ) ) ); PK!>& +customize-configs/section-videolightbox.phpnu[add_panel( 'onepress_videolightbox' , array( 'priority' => 180, 'title' => esc_html__( 'Section: Video Lightbox', 'onepress' ), 'description' => '', 'active_callback' => 'onepress_showon_frontpage' ) ); $wp_customize->add_section( 'onepress_videolightbox_settings' , array( 'priority' => 3, 'title' => esc_html__( 'Section Settings', 'onepress' ), 'description' => '', 'panel' => 'onepress_videolightbox', ) ); // Show Content $wp_customize->add_setting( 'onepress_videolightbox_disable', array( 'sanitize_callback' => 'onepress_sanitize_checkbox', 'default' => '', ) ); $wp_customize->add_control( 'onepress_videolightbox_disable', array( 'type' => 'checkbox', 'label' => esc_html__('Hide this section?', 'onepress'), 'section' => 'onepress_videolightbox_settings', 'description' => esc_html__('Check this box to hide this section.', 'onepress'), ) ); // Section ID $wp_customize->add_setting( 'onepress_videolightbox_id', array( 'sanitize_callback' => 'onepress_sanitize_text', 'default' => 'videolightbox', ) ); $wp_customize->add_control( 'onepress_videolightbox_id', array( 'label' => esc_html__('Section ID:', 'onepress'), 'section' => 'onepress_videolightbox_settings', 'description' => esc_html__('The section ID should be English character, lowercase and no space.', 'onepress' ) ) ); // Title $wp_customize->add_setting( 'onepress_videolightbox_title', array( 'sanitize_callback' => 'onepress_sanitize_text', 'default' => '', ) ); $wp_customize->add_control( new OnePress_Editor_Custom_Control( $wp_customize, 'onepress_videolightbox_title', array( 'label' => esc_html__('Section heading', 'onepress'), 'section' => 'onepress_videolightbox_settings', 'description' => '', ) )); // Video URL $wp_customize->add_setting( 'onepress_videolightbox_url', array( 'sanitize_callback' => 'esc_url_raw', 'default' => '', ) ); $wp_customize->add_control( 'onepress_videolightbox_url', array( 'label' => esc_html__('Video url', 'onepress'), 'section' => 'onepress_videolightbox_settings', 'description' => esc_html__('Paste Youtube or Vimeo url here', 'onepress'), ) ); // Parallax image $wp_customize->add_setting( 'onepress_videolightbox_image', array( 'sanitize_callback' => 'onepress_sanitize_number', 'default' => '', ) ); $wp_customize->add_control( new WP_Customize_Media_Control( $wp_customize, 'onepress_videolightbox_image', array( 'label' => esc_html__('Background image', 'onepress'), 'section' => 'onepress_videolightbox_settings', ) )); onepress_add_upsell_for_section( $wp_customize, 'onepress_videolightbox_settings' );PK!a"O O $customize-configs/options-global.phpnu[add_section( 'onepress_global_settings', array( 'priority' => 3, 'title' => esc_html__( 'Global', 'onepress' ), 'description' => '', 'panel' => 'onepress_options', ) ); // Sidebar settings $wp_customize->add_setting( 'onepress_layout', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => 'right-sidebar', //'transport' => 'postMessage' ) ); $wp_customize->add_control( 'onepress_layout', array( 'type' => 'select', 'label' => esc_html__( 'Site Layout', 'onepress' ), 'description' => esc_html__( 'Site Layout, apply for all pages, exclude home page and custom page templates.', 'onepress' ), 'section' => 'onepress_global_settings', 'choices' => array( 'right-sidebar' => esc_html__( 'Right sidebar', 'onepress' ), 'left-sidebar' => esc_html__( 'Left sidebar', 'onepress' ), 'no-sidebar' => esc_html__( 'No sidebar', 'onepress' ), ) ) ); // Disable Animation $wp_customize->add_setting( 'onepress_animation_disable', array( 'sanitize_callback' => 'onepress_sanitize_checkbox', 'default' => '', ) ); $wp_customize->add_control( 'onepress_animation_disable', array( 'type' => 'checkbox', 'label' => esc_html__( 'Disable animation effect?', 'onepress' ), 'section' => 'onepress_global_settings', 'description' => esc_html__( 'Check this box to disable all element animation when scroll.', 'onepress' ) ) ); // Disable Animation $wp_customize->add_setting( 'onepress_btt_disable', array( 'sanitize_callback' => 'onepress_sanitize_checkbox', 'default' => '', 'transport' => 'postMessage' ) ); $wp_customize->add_control( 'onepress_btt_disable', array( 'type' => 'checkbox', 'label' => esc_html__( 'Hide footer back to top?', 'onepress' ), 'section' => 'onepress_global_settings', 'description' => esc_html__( 'Check this box to hide footer back to top button.', 'onepress' ) ) ); // Disable Google Font $wp_customize->add_setting( 'onepress_disable_g_font', array( 'sanitize_callback' => 'onepress_sanitize_checkbox', 'default' => '', 'transport' => 'postMessage' ) ); $wp_customize->add_control( 'onepress_disable_g_font', array( 'type' => 'checkbox', 'label' => esc_html__( 'Disable Google Fonts', 'onepress' ), 'section' => 'onepress_global_settings', 'description' => esc_html__( 'Check this if you want to disable default google fonts in theme.', 'onepress' ) ) );PK!n&&$customize-configs/options-header.phpnu[add_section( 'onepress_header_settings', array( 'priority' => 5, 'title' => esc_html__( 'Header', 'onepress' ), 'description' => '', 'panel' => 'onepress_options', ) ); // Header width. $wp_customize->add_setting( 'onepress_header_width', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => 'contained', 'transport' => 'postMessage', ) ); $wp_customize->add_control( 'onepress_header_width', array( 'type' => 'select', 'label' => esc_html__( 'Header Width', 'onepress' ), 'section' => 'onepress_header_settings', 'choices' => array( 'full-width' => esc_html__( 'Full Width', 'onepress' ), 'contained' => esc_html__( 'Contained', 'onepress' ), ), ) ); // Header Layout $wp_customize->add_setting( 'onepress_header_position', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => 'top', 'transport' => 'postMessage', 'active_callback' => 'onepress_showon_frontpage', ) ); $wp_customize->add_control( 'onepress_header_position', array( 'type' => 'select', 'label' => esc_html__( 'Header Position', 'onepress' ), 'section' => 'onepress_header_settings', 'choices' => array( 'top' => esc_html__( 'Top', 'onepress' ), 'below_hero' => esc_html__( 'Below Hero Slider', 'onepress' ), ), ) ); // Disable Sticky Header $wp_customize->add_setting( 'onepress_sticky_header_disable', array( 'sanitize_callback' => 'onepress_sanitize_checkbox', 'default' => '', 'transport' => 'postMessage', ) ); $wp_customize->add_control( 'onepress_sticky_header_disable', array( 'type' => 'checkbox', 'label' => esc_html__( 'Disable Sticky Header?', 'onepress' ), 'section' => 'onepress_header_settings', 'description' => esc_html__( 'Check this box to disable sticky header when scroll.', 'onepress' ), ) ); // Vertical align menu $wp_customize->add_setting( 'onepress_vertical_align_menu', array( 'sanitize_callback' => 'onepress_sanitize_checkbox', 'default' => '', ) ); $wp_customize->add_control( 'onepress_vertical_align_menu', array( 'type' => 'checkbox', 'label' => esc_html__( 'Center vertical align for menu', 'onepress' ), 'section' => 'onepress_header_settings', 'description' => esc_html__( 'If you use logo and your logo is too tall, check this box to auto vertical align menu.', 'onepress' ), ) ); // Scroll to top when click to logo $wp_customize->add_setting( 'onepress_header_scroll_logo', array( 'sanitize_callback' => 'onepress_sanitize_checkbox', 'default' => 0, 'active_callback' => '', ) ); $wp_customize->add_control( 'onepress_header_scroll_logo', array( 'type' => 'checkbox', 'label' => esc_html__( 'Scroll to top when click to the site logo or site title, only apply on front page.', 'onepress' ), 'section' => 'onepress_header_settings', ) ); // Header BG Color $wp_customize->add_setting( 'onepress_header_bg_color', array( 'sanitize_callback' => 'sanitize_hex_color_no_hash', 'sanitize_js_callback' => 'maybe_hash_hex_color', 'default' => '', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_header_bg_color', array( 'label' => esc_html__( 'Background Color', 'onepress' ), 'section' => 'onepress_header_settings', 'description' => '', ) ) ); // Site Title Color $wp_customize->add_setting( 'onepress_logo_text_color', array( 'sanitize_callback' => 'sanitize_hex_color_no_hash', 'sanitize_js_callback' => 'maybe_hash_hex_color', 'default' => '', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_logo_text_color', array( 'label' => esc_html__( 'Site Title Color', 'onepress' ), 'section' => 'onepress_header_settings', 'description' => esc_html__( 'Only set if you don\'t use an image logo.', 'onepress' ), ) ) ); $wp_customize->add_setting( 'onepress_tagline_text_color', array( 'sanitize_callback' => 'sanitize_hex_color_no_hash', 'sanitize_js_callback' => 'maybe_hash_hex_color', 'default' => '', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_tagline_text_color', array( 'label' => esc_html__( 'Site Tagline Color', 'onepress' ), 'section' => 'onepress_header_settings', 'description' => esc_html__( 'Only set if display site tagline.', 'onepress' ), ) ) ); // Header Menu Color $wp_customize->add_setting( 'onepress_menu_color', array( 'sanitize_callback' => 'sanitize_hex_color_no_hash', 'sanitize_js_callback' => 'maybe_hash_hex_color', 'default' => '', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_menu_color', array( 'label' => esc_html__( 'Menu Link Color', 'onepress' ), 'section' => 'onepress_header_settings', 'description' => '', ) ) ); // Header Menu Hover Color $wp_customize->add_setting( 'onepress_menu_hover_color', array( 'sanitize_callback' => 'sanitize_hex_color_no_hash', 'sanitize_js_callback' => 'maybe_hash_hex_color', 'default' => '', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_menu_hover_color', array( 'label' => esc_html__( 'Menu Link Hover/Active Color', 'onepress' ), 'section' => 'onepress_header_settings', 'description' => '', ) ) ); // Header Menu Hover BG Color $wp_customize->add_setting( 'onepress_menu_hover_bg_color', array( 'sanitize_callback' => 'sanitize_hex_color_no_hash', 'sanitize_js_callback' => 'maybe_hash_hex_color', 'default' => '', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_menu_hover_bg_color', array( 'label' => esc_html__( 'Menu Link Hover/Active BG Color', 'onepress' ), 'section' => 'onepress_header_settings', 'description' => '', ) ) ); // Responsive Mobile button color $wp_customize->add_setting( 'onepress_menu_toggle_button_color', array( 'sanitize_callback' => 'sanitize_hex_color_no_hash', 'sanitize_js_callback' => 'maybe_hash_hex_color', 'default' => '', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_menu_toggle_button_color', array( 'label' => esc_html__( 'Responsive Menu Button Color', 'onepress' ), 'section' => 'onepress_header_settings', 'description' => '', ) ) ); // Header Transparent $wp_customize->add_setting( 'onepress_header_transparent', array( 'sanitize_callback' => 'onepress_sanitize_checkbox', 'default' => '', 'active_callback' => 'onepress_showon_frontpage', 'transport' => 'postMessage', ) ); $wp_customize->add_control( 'onepress_header_transparent', array( 'type' => 'checkbox', 'label' => esc_html__( 'Header Transparent', 'onepress' ), 'section' => 'onepress_header_settings', 'description' => esc_html__( 'Apply for front page template only.', 'onepress' ), ) ); // Transparent Logo $wp_customize->add_setting( 'onepress_transparent_logo', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => '', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'onepress_transparent_logo', array( 'label' => esc_html__( 'Transparent Logo', 'onepress' ), 'section' => 'onepress_header_settings', 'description' => esc_html__( 'Only apply when transparent header option is checked.', 'onepress' ), ) ) ); // Transparent Retina Logo $wp_customize->add_setting( 'onepress_transparent_retina_logo', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => '', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'onepress_transparent_retina_logo', array( 'label' => esc_html__( 'Transparent Retina Logo', 'onepress' ), 'description' => esc_html__( 'Only apply when transparent header option is checked.', 'onepress' ), 'section' => 'onepress_header_settings', ) ) ); /** * @since 2.0.8 */ $wp_customize->add_setting( 'onepress_transparent_logo_height', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => '', ) ); $wp_customize->add_control( 'onepress_transparent_logo_height', array( 'label' => esc_html__( 'Transparent Logo Height in Pixel', 'onepress' ), 'section' => 'onepress_header_settings', 'description' => '', ) ); $wp_customize->add_setting( 'onepress_transparent_site_title_c', array( 'sanitize_callback' => 'sanitize_hex_color', 'default' => '', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_transparent_site_title_c', array( 'label' => esc_html__( 'Transparent Site Title Color', 'onepress' ), 'section' => 'onepress_header_settings', 'description' => '', ) ) ); $wp_customize->add_setting( 'onepress_transparent_tag_title_c', array( 'sanitize_callback' => 'sanitize_hex_color', 'default' => '', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'onepress_transparent_tag_title_c', array( 'label' => esc_html__( 'Transparent Site Tagline Color', 'onepress' ), 'section' => 'onepress_header_settings', 'description' => '', ) ) ); PK!mcustomize-configs/options.phpnu[add_panel( 'onepress_options', array( 'priority' => 5, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => esc_html__( 'Theme Options', 'onepress' ), 'description' => '', ) ); if ( ! function_exists( 'wp_get_custom_css' ) ) { // Back-compat for WordPress < 4.7. // Custom CSS Settings. $wp_customize->add_section( 'onepress_custom_code', array( 'title' => __( 'Custom CSS', 'onepress' ), 'panel' => 'onepress_options', ) ); $wp_customize->add_setting( 'onepress_custom_css', array( 'default' => '', 'sanitize_callback' => 'onepress_sanitize_css', 'type' => 'option', ) ); $wp_customize->add_control( 'onepress_custom_css', array( 'label' => __( 'Custom CSS', 'onepress' ), 'section' => 'onepress_custom_code', 'type' => 'textarea', ) ); } else { $wp_customize->get_section( 'custom_css' )->priority = 994; } PK!ٮu&customize-configs/section-features.phpnu[add_panel( 'onepress_features' , array( 'priority' => 150, 'title' => esc_html__( 'Section: Features', 'onepress' ), 'description' => '', 'active_callback' => 'onepress_showon_frontpage' ) ); $wp_customize->add_section( 'onepress_features_settings' , array( 'priority' => 3, 'title' => esc_html__( 'Section Settings', 'onepress' ), 'description' => '', 'panel' => 'onepress_features', ) ); // Show Content $wp_customize->add_setting( 'onepress_features_disable', array( 'sanitize_callback' => 'onepress_sanitize_checkbox', 'default' => '', ) ); $wp_customize->add_control( 'onepress_features_disable', array( 'type' => 'checkbox', 'label' => esc_html__('Hide this section?', 'onepress'), 'section' => 'onepress_features_settings', 'description' => esc_html__('Check this box to hide this section.', 'onepress'), ) ); // Section ID $wp_customize->add_setting( 'onepress_features_id', array( 'sanitize_callback' => 'onepress_sanitize_text', 'default' => esc_html__('features', 'onepress'), ) ); $wp_customize->add_control( 'onepress_features_id', array( 'label' => esc_html__('Section ID:', 'onepress'), 'section' => 'onepress_features_settings', 'description' => esc_html__( 'The section ID should be English character, lowercase and no space.', 'onepress' ) ) ); // Title $wp_customize->add_setting( 'onepress_features_title', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => esc_html__('Features', 'onepress'), ) ); $wp_customize->add_control( 'onepress_features_title', array( 'label' => esc_html__('Section Title', 'onepress'), 'section' => 'onepress_features_settings', 'description' => '', ) ); // Sub Title $wp_customize->add_setting( 'onepress_features_subtitle', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => esc_html__('Section subtitle', 'onepress'), ) ); $wp_customize->add_control( 'onepress_features_subtitle', array( 'label' => esc_html__('Section Subtitle', 'onepress'), 'section' => 'onepress_features_settings', 'description' => '', ) ); // Description $wp_customize->add_setting( 'onepress_features_desc', array( 'sanitize_callback' => 'onepress_sanitize_text', 'default' => '', ) ); $wp_customize->add_control( new OnePress_Editor_Custom_Control( $wp_customize, 'onepress_features_desc', array( 'label' => esc_html__('Section Description', 'onepress'), 'section' => 'onepress_features_settings', 'description' => '', ) )); // Features layout $wp_customize->add_setting( 'onepress_features_layout', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => '3', ) ); $wp_customize->add_control( 'onepress_features_layout', array( 'label' => esc_html__('Features Layout Setting', 'onepress'), 'section' => 'onepress_features_settings', 'description' => '', 'type' => 'select', 'choices' => array( '3' => esc_html__( '4 Columns', 'onepress' ), '4' => esc_html__( '3 Columns', 'onepress' ), '6' => esc_html__( '2 Columns', 'onepress' ), ), ) ); onepress_add_upsell_for_section( $wp_customize, 'onepress_features_settings' ); $wp_customize->add_section( 'onepress_features_content' , array( 'priority' => 6, 'title' => esc_html__( 'Section Content', 'onepress' ), 'description' => '', 'panel' => 'onepress_features', ) ); // Features content $wp_customize->add_setting( 'onepress_features_boxes', array( //'default' => '', 'sanitize_callback' => 'onepress_sanitize_repeatable_data_field', 'transport' => 'refresh', // refresh or postMessage ) ); $wp_customize->add_control( new Onepress_Customize_Repeatable_Control( $wp_customize, 'onepress_features_boxes', array( 'label' => esc_html__('Features content', 'onepress'), 'description' => '', 'section' => 'onepress_features_content', 'live_title_id' => 'title', // apply for unput text and textarea only 'title_format' => esc_html__('[live_title]', 'onepress'), // [live_title] 'max_item' => 4, // Maximum item can add 'limited_msg' => wp_kses_post( __( 'Upgrade to OnePress Plus to be able to add more items and unlock other premium features!', 'onepress' ) ), 'fields' => array( 'title' => array( 'title' => esc_html__('Title', 'onepress'), 'type' =>'text', ), 'icon_type' => array( 'title' => esc_html__('Custom icon', 'onepress'), 'type' =>'select', 'options' => array( 'icon' => esc_html__('Icon', 'onepress'), 'image' => esc_html__('image', 'onepress'), ), ), 'icon' => array( 'title' => esc_html__('Icon', 'onepress'), 'type' =>'icon', 'required' => array( 'icon_type', '=', 'icon' ), ), 'image' => array( 'title' => esc_html__('Image', 'onepress'), 'type' =>'media', 'required' => array( 'icon_type', '=', 'image' ), ), 'desc' => array( 'title' => esc_html__('Description', 'onepress'), 'type' =>'editor', ), 'link' => array( 'title' => esc_html__('Custom Link', 'onepress'), 'type' =>'text', ), ), ) ) ); // About content source $wp_customize->add_setting( 'onepress_about_content_source', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => 'content', ) ); $wp_customize->add_control( 'onepress_about_content_source', array( 'label' => esc_html__('Item content source', 'onepress'), 'section' => 'onepress_about_content', 'description' => '', 'type' => 'select', 'choices' => array( 'content' => esc_html__( 'Full Page Content', 'onepress' ), 'excerpt' => esc_html__( 'Page Excerpt', 'onepress' ), ), ) ); PK!I33#customize-configs/site-identity.phpnu[add_setting( 'onepress_hide_sitetitle', array( 'sanitize_callback' => 'onepress_sanitize_checkbox', 'default' => $is_old_logo ? 1 : 0, ) ); $wp_customize->add_control( 'onepress_hide_sitetitle', array( 'label' => esc_html__( 'Hide site title', 'onepress' ), 'section' => 'title_tagline', 'type' => 'checkbox', ) ); $wp_customize->add_setting( 'onepress_hide_tagline', array( 'sanitize_callback' => 'onepress_sanitize_checkbox', 'default' => $is_old_logo ? 1 : 0, ) ); $wp_customize->add_control( 'onepress_hide_tagline', array( 'label' => esc_html__( 'Hide site tagline', 'onepress' ), 'section' => 'title_tagline', 'type' => 'checkbox', ) ); // Retina Logo $wp_customize->add_setting( 'onepress_retina_logo', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => '', 'transport' => 'postMessage' ) ); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'onepress_retina_logo', array( 'label' => esc_html__( 'Retina Logo', 'onepress' ), 'section' => 'title_tagline', ) ) ); // Logo Width $wp_customize->add_setting( 'onepress_logo_height', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => '', 'transport' => 'postMessage' ) ); $wp_customize->add_control( 'onepress_logo_height', array( 'label' => esc_html__( 'Logo Height In Pixel', 'onepress' ), 'section' => 'title_tagline', ) );PK! [%customize-configs/section-contact.phpnu[add_panel( 'onepress_contact' , array( 'priority' => 270, 'title' => esc_html__( 'Section: Contact', 'onepress' ), 'description' => '', 'active_callback' => 'onepress_showon_frontpage' ) ); $wp_customize->add_section( 'onepress_contact_settings' , array( 'priority' => 3, 'title' => esc_html__( 'Section Settings', 'onepress' ), 'description' => '', 'panel' => 'onepress_contact', ) ); // Show Content $wp_customize->add_setting( 'onepress_contact_disable', array( 'sanitize_callback' => 'onepress_sanitize_checkbox', 'default' => '', ) ); $wp_customize->add_control( 'onepress_contact_disable', array( 'type' => 'checkbox', 'label' => esc_html__('Hide this section?', 'onepress'), 'section' => 'onepress_contact_settings', 'description' => esc_html__('Check this box to hide this section.', 'onepress'), ) ); // Section ID $wp_customize->add_setting( 'onepress_contact_id', array( 'sanitize_callback' => 'onepress_sanitize_text', 'default' => esc_html__('contact', 'onepress'), ) ); $wp_customize->add_control( 'onepress_contact_id', array( 'label' => esc_html__('Section ID:', 'onepress'), 'section' => 'onepress_contact_settings', 'description' => esc_html__( 'The section ID should be English character, lowercase and no space.', 'onepress' ) ) ); // Title $wp_customize->add_setting( 'onepress_contact_title', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => esc_html__('Get in touch', 'onepress'), ) ); $wp_customize->add_control( 'onepress_contact_title', array( 'label' => esc_html__('Section Title', 'onepress'), 'section' => 'onepress_contact_settings', 'description' => '', ) ); // Sub Title $wp_customize->add_setting( 'onepress_contact_subtitle', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => esc_html__('Section subtitle', 'onepress'), ) ); $wp_customize->add_control( 'onepress_contact_subtitle', array( 'label' => esc_html__('Section Subtitle', 'onepress'), 'section' => 'onepress_contact_settings', 'description' => '', ) ); // Description $wp_customize->add_setting( 'onepress_contact_desc', array( 'sanitize_callback' => 'onepress_sanitize_text', 'default' => '', ) ); $wp_customize->add_control( new OnePress_Editor_Custom_Control( $wp_customize, 'onepress_contact_desc', array( 'label' => esc_html__('Section Description', 'onepress'), 'section' => 'onepress_contact_settings', 'description' => '', ) )); onepress_add_upsell_for_section( $wp_customize, 'onepress_contact_settings' ); $wp_customize->add_section( 'onepress_contact_content' , array( 'priority' => 6, 'title' => esc_html__( 'Section Content', 'onepress' ), 'description' => '', 'panel' => 'onepress_contact', ) ); // Contact form 7 guide. $wp_customize->add_setting( 'onepress_contact_cf7_guide', array( 'sanitize_callback' => 'onepress_sanitize_text' ) ); $wp_customize->add_control( new OnePress_Misc_Control( $wp_customize, 'onepress_contact_cf7_guide', array( 'section' => 'onepress_contact_content', 'type' => 'custom_message', 'description' => wp_kses_post( 'Paste your form shortcode from contact form plugin here, e.g [wpforms id="123"]', 'onepress' ) ) )); // Contact Form 7 Shortcode $wp_customize->add_setting( 'onepress_contact_cf7', array( 'sanitize_callback' => 'onepress_sanitize_text', 'default' => '', ) ); $wp_customize->add_control( 'onepress_contact_cf7', array( 'label' => esc_html__('Contact Form Shortcode.', 'onepress'), 'section' => 'onepress_contact_content', 'description' => '', ) ); // Show CF7 $wp_customize->add_setting( 'onepress_contact_cf7_disable', array( 'sanitize_callback' => 'onepress_sanitize_checkbox', 'default' => '', ) ); $wp_customize->add_control( 'onepress_contact_cf7_disable', array( 'type' => 'checkbox', 'label' => esc_html__('Hide contact form completely.', 'onepress'), 'section' => 'onepress_contact_content', 'description' => esc_html__('Check this box to hide contact form.', 'onepress'), ) ); // Contact Text $wp_customize->add_setting( 'onepress_contact_text', array( 'sanitize_callback' => 'onepress_sanitize_text', 'default' => '', ) ); $wp_customize->add_control( new OnePress_Editor_Custom_Control( $wp_customize, 'onepress_contact_text', array( 'label' => esc_html__('Contact Text', 'onepress'), 'section' => 'onepress_contact_content', 'description' => '', ) )); // hr $wp_customize->add_setting( 'onepress_contact_text_hr', array( 'sanitize_callback' => 'onepress_sanitize_text' ) ); $wp_customize->add_control( new OnePress_Misc_Control( $wp_customize, 'onepress_contact_text_hr', array( 'section' => 'onepress_contact_content', 'type' => 'hr' ) )); // Address Box $wp_customize->add_setting( 'onepress_contact_address_title', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => '', ) ); $wp_customize->add_control( 'onepress_contact_address_title', array( 'label' => esc_html__('Contact Box Title', 'onepress'), 'section' => 'onepress_contact_content', 'description' => '', ) ); // Contact Text $wp_customize->add_setting( 'onepress_contact_address', array( 'sanitize_callback' => 'onepress_sanitize_text', 'default' => '', ) ); $wp_customize->add_control( 'onepress_contact_address', array( 'label' => esc_html__('Address', 'onepress'), 'section' => 'onepress_contact_content', 'description' => '', ) ); // Contact Phone $wp_customize->add_setting( 'onepress_contact_phone', array( 'sanitize_callback' => 'onepress_sanitize_text', 'default' => '', ) ); $wp_customize->add_control( 'onepress_contact_phone', array( 'label' => esc_html__('Phone', 'onepress'), 'section' => 'onepress_contact_content', 'description' => '', ) ); // Contact Email $wp_customize->add_setting( 'onepress_contact_email', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => '', ) ); $wp_customize->add_control( 'onepress_contact_email', array( 'label' => esc_html__('Email', 'onepress'), 'section' => 'onepress_contact_content', 'description' => '', ) ); // Contact Fax $wp_customize->add_setting( 'onepress_contact_fax', array( 'sanitize_callback' => 'onepress_sanitize_text', 'default' => '', ) ); $wp_customize->add_control( 'onepress_contact_fax', array( 'label' => esc_html__('Fax', 'onepress'), 'section' => 'onepress_contact_content', 'description' => '', ) );PK!54ʹ$customize-configs/section-upsell.phpnu[register_section_type( 'OnePress_Section_Plus' ); // Register sections. $wp_customize->add_section( 'onepress_order_styling_preview', array( 'title' => esc_html__( 'Section Order & Styling', 'onepress' ), 'priority' => 129, ) ); // Plus message $wp_customize->add_setting( 'onepress_order_styling_message', array( 'sanitize_callback' => 'onepress_sanitize_text', ) ); $wp_customize->add_control( new OnePress_Misc_Control( $wp_customize, 'onepress_order_styling_message', array( 'type' => 'custom_message', 'section' => 'onepress_order_styling_preview', 'description' => __('

    Drag & Drop Section Orders

    Check out the OnePress Plus version for full control over the frontpage SECTIONS ORDER!

    Advanced Section Styling

    Check out the OnePress Plus version for full control over the section styling which includes background color, image, video, parallax effect, custom style and more ...

    ', 'onepress' ) ) )); $wp_customize->add_section( new OnePress_Section_Plus( $wp_customize, 'onepress-plus', array( 'priority' => 1, 'plus_text' => __( 'OnePress Plus Available! Take a look', 'onepress' ), 'plus_url' => 'https://www.famethemes.com/plugins/onepress-plus/?utm_source=theme_customizer&utm_medium=text_link&utm_campaign=onepress_customizer#get-started' ) ) );PK!#customize-configs/section-about.phpnu[add_panel( 'onepress_about', array( 'priority' => 160, 'title' => esc_html__( 'Section: About', 'onepress' ), 'description' => '', 'active_callback' => 'onepress_showon_frontpage' ) ); $wp_customize->add_section( 'onepress_about_settings', array( 'priority' => 3, 'title' => esc_html__( 'Section Settings', 'onepress' ), 'description' => '', 'panel' => 'onepress_about', ) ); // Show Content $wp_customize->add_setting( 'onepress_about_disable', array( 'sanitize_callback' => 'onepress_sanitize_checkbox', 'default' => '', ) ); $wp_customize->add_control( 'onepress_about_disable', array( 'type' => 'checkbox', 'label' => esc_html__( 'Hide this section?', 'onepress' ), 'section' => 'onepress_about_settings', 'description' => esc_html__( 'Check this box to hide this section.', 'onepress' ), ) ); // Section ID $wp_customize->add_setting( 'onepress_about_id', array( 'sanitize_callback' => 'onepress_sanitize_text', 'default' => esc_html__( 'about', 'onepress' ), ) ); $wp_customize->add_control( 'onepress_about_id', array( 'label' => esc_html__( 'Section ID:', 'onepress' ), 'section' => 'onepress_about_settings', 'description' => esc_html__( 'The section ID should be English character, lowercase and no space.', 'onepress' ) ) ); // Title $wp_customize->add_setting( 'onepress_about_title', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => esc_html__( 'About Us', 'onepress' ), ) ); $wp_customize->add_control( 'onepress_about_title', array( 'label' => esc_html__( 'Section Title', 'onepress' ), 'section' => 'onepress_about_settings', 'description' => '', ) ); // Sub Title $wp_customize->add_setting( 'onepress_about_subtitle', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => esc_html__( 'Section subtitle', 'onepress' ), ) ); $wp_customize->add_control( 'onepress_about_subtitle', array( 'label' => esc_html__( 'Section Subtitle', 'onepress' ), 'section' => 'onepress_about_settings', 'description' => '', ) ); // Description $wp_customize->add_setting( 'onepress_about_desc', array( 'sanitize_callback' => 'onepress_sanitize_text', 'default' => '', ) ); $wp_customize->add_control( new OnePress_Editor_Custom_Control( $wp_customize, 'onepress_about_desc', array( 'label' => esc_html__( 'Section Description', 'onepress' ), 'section' => 'onepress_about_settings', 'description' => '', ) ) ); if ( class_exists( 'OnePress_Plus' ) ) { // About column $wp_customize->add_setting( 'onepress_about_layout', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => 3, ) ); $wp_customize->add_control( 'onepress_about_layout', array( 'label' => esc_html__( 'Layout Settings', 'onepress' ), 'section' => 'onepress_about_settings', 'description' => '', 'type' => 'select', 'choices' => array( 4 => esc_html__( '4 Columns', 'onepress' ), 3 => esc_html__( '3 Columns', 'onepress' ), 2 => esc_html__( '2 Columns', 'onepress' ), 1 => esc_html__( '1 Column', 'onepress' ), ), ) ); } onepress_add_upsell_for_section( $wp_customize , 'onepress_about_settings' ); $wp_customize->add_section( 'onepress_about_content', array( 'priority' => 6, 'title' => esc_html__( 'Section Content', 'onepress' ), 'description' => '', 'panel' => 'onepress_about', ) ); // About Items $wp_customize->add_setting( 'onepress_about_boxes', array( //'default' => '', 'sanitize_callback' => 'onepress_sanitize_repeatable_data_field', 'transport' => 'refresh', // refresh or postMessage ) ); $wp_customize->add_control( new Onepress_Customize_Repeatable_Control( $wp_customize, 'onepress_about_boxes', array( 'label' => esc_html__( 'About content page', 'onepress' ), 'description' => '', 'section' => 'onepress_about_content', 'live_title_id' => 'content_page', // apply for unput text and textarea only 'title_format' => esc_html__( '[live_title]', 'onepress' ), // [live_title] 'max_item' => 3, // Maximum item can add 'limited_msg' => wp_kses_post( __( 'Upgrade to OnePress Plus to be able to add more items and unlock other premium features!', 'onepress' ) ), 'fields' => array( 'content_page' => array( 'title' => esc_html__( 'Select a page', 'onepress' ), 'type' => 'select', 'options' => $option_pages ), 'hide_title' => array( 'title' => esc_html__( 'Hide item title', 'onepress' ), 'type' => 'checkbox', ), 'enable_link' => array( 'title' => esc_html__( 'Link to single page', 'onepress' ), 'type' => 'checkbox', ), ), ) ) ); // About content source $wp_customize->add_setting( 'onepress_about_content_source', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => 'content', ) ); $wp_customize->add_control( 'onepress_about_content_source', array( 'label' => esc_html__( 'Item content source', 'onepress' ), 'section' => 'onepress_about_content', 'description' => '', 'type' => 'select', 'choices' => array( 'content' => esc_html__( 'Full Page Content', 'onepress' ), 'excerpt' => esc_html__( 'Page Excerpt', 'onepress' ), ), ) ); PK!ɯ!!%customize-configs/section-gallery.phpnu[add_panel( 'onepress_gallery', array( 'priority' => 190, 'title' => esc_html__( 'Section: Gallery', 'onepress' ), 'description' => '', 'active_callback' => 'onepress_showon_frontpage', ) ); $wp_customize->add_section( 'onepress_gallery_settings', array( 'priority' => 3, 'title' => esc_html__( 'Section Settings', 'onepress' ), 'description' => '', 'panel' => 'onepress_gallery', ) ); // Show Content. $wp_customize->add_setting( 'onepress_gallery_disable', array( 'sanitize_callback' => 'onepress_sanitize_checkbox', 'default' => 1, ) ); $wp_customize->add_control( 'onepress_gallery_disable', array( 'type' => 'checkbox', 'label' => esc_html__( 'Hide this section?', 'onepress' ), 'section' => 'onepress_gallery_settings', 'description' => esc_html__( 'Check this box to hide this section.', 'onepress' ), ) ); // Section ID. $wp_customize->add_setting( 'onepress_gallery_id', array( 'sanitize_callback' => 'onepress_sanitize_text', 'default' => esc_html__( 'gallery', 'onepress' ), ) ); $wp_customize->add_control( 'onepress_gallery_id', array( 'label' => esc_html__( 'Section ID:', 'onepress' ), 'section' => 'onepress_gallery_settings', 'description' => esc_html__( 'The section ID should be English character, lowercase and no space.', 'onepress' ), ) ); // Title. $wp_customize->add_setting( 'onepress_gallery_title', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => esc_html__( 'Gallery', 'onepress' ), ) ); $wp_customize->add_control( 'onepress_gallery_title', array( 'label' => esc_html__( 'Section Title', 'onepress' ), 'section' => 'onepress_gallery_settings', 'description' => '', ) ); // Sub Title. $wp_customize->add_setting( 'onepress_gallery_subtitle', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => esc_html__( 'Section subtitle', 'onepress' ), ) ); $wp_customize->add_control( 'onepress_gallery_subtitle', array( 'label' => esc_html__( 'Section Subtitle', 'onepress' ), 'section' => 'onepress_gallery_settings', 'description' => '', ) ); // Description $wp_customize->add_setting( 'onepress_gallery_desc', array( 'sanitize_callback' => 'onepress_sanitize_text', 'default' => '', ) ); $wp_customize->add_control( new OnePress_Editor_Custom_Control( $wp_customize, 'onepress_gallery_desc', array( 'label' => esc_html__( 'Section Description', 'onepress' ), 'section' => 'onepress_gallery_settings', 'description' => '', ) ) ); onepress_add_upsell_for_section( $wp_customize, 'onepress_gallery_settings' ); $wp_customize->add_section( 'onepress_gallery_content', array( 'priority' => 6, 'title' => esc_html__( 'Section Content', 'onepress' ), 'description' => '', 'panel' => 'onepress_gallery', ) ); // Gallery Source $wp_customize->add_setting( 'onepress_gallery_source', array( 'sanitize_callback' => 'sanitize_text_field', 'validate_callback' => 'onepress_gallery_source_validate', 'default' => 'page', ) ); $wp_customize->add_control( 'onepress_gallery_source', array( 'label' => esc_html__( 'Select Gallery Source', 'onepress' ), 'section' => 'onepress_gallery_content', 'type' => 'select', 'priority' => 5, 'choices' => array( 'page' => esc_html__( 'Page', 'onepress' ), 'facebook' => 'Facebook', 'instagram' => 'Instagram', 'flickr' => 'Flickr', ), ) ); // Source page settings. $wp_customize->add_setting( 'onepress_gallery_source_page', array( 'sanitize_callback' => 'onepress_sanitize_number', 'default' => '', ) ); $wp_customize->add_control( 'onepress_gallery_source_page', array( 'label' => esc_html__( 'Select Gallery Page', 'onepress' ), 'section' => 'onepress_gallery_content', 'type' => 'select', 'priority' => 10, 'choices' => $option_pages, 'description' => esc_html__( 'Select a page which have content contain [gallery] shortcode or gallery blocks.', 'onepress' ), ) ); // Gallery Layout. $wp_customize->add_setting( 'onepress_gallery_layout', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => 'default', ) ); $wp_customize->add_control( 'onepress_gallery_layout', array( 'label' => esc_html__( 'Layout', 'onepress' ), 'section' => 'onepress_gallery_content', 'type' => 'select', 'priority' => 40, 'choices' => array( 'default' => esc_html__( 'Default, inside container', 'onepress' ), 'full-width' => esc_html__( 'Full Width', 'onepress' ), ), ) ); // Gallery Display. $wp_customize->add_setting( 'onepress_gallery_display', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => 'default', ) ); $wp_customize->add_control( 'onepress_gallery_display', array( 'label' => esc_html__( 'Display', 'onepress' ), 'section' => 'onepress_gallery_content', 'type' => 'select', 'priority' => 50, 'choices' => array( 'grid' => esc_html__( 'Grid', 'onepress' ), 'carousel' => esc_html__( 'Carousel', 'onepress' ), 'slider' => esc_html__( 'Slider', 'onepress' ), 'justified' => esc_html__( 'Justified', 'onepress' ), 'masonry' => esc_html__( 'Masonry', 'onepress' ), ), ) ); // Gallery grid spacing. $wp_customize->add_setting( 'onepress_g_spacing', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => 20, ) ); $wp_customize->add_control( 'onepress_g_spacing', array( 'label' => esc_html__( 'Item Spacing', 'onepress' ), 'section' => 'onepress_gallery_content', 'priority' => 55, ) ); // Gallery grid spacing. $wp_customize->add_setting( 'onepress_g_row_height', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => 120, ) ); $wp_customize->add_control( 'onepress_g_row_height', array( 'label' => esc_html__( 'Row Height', 'onepress' ), 'section' => 'onepress_gallery_content', 'priority' => 57, ) ); // Gallery grid gird col. $wp_customize->add_setting( 'onepress_g_col', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => '4', ) ); $wp_customize->add_control( 'onepress_g_col', array( 'label' => esc_html__( 'Layout columns', 'onepress' ), 'section' => 'onepress_gallery_content', 'priority' => 60, 'type' => 'select', 'choices' => array( '1' => 1, '2' => 2, '3' => 3, '4' => 4, '5' => 5, '6' => 6, ), ) ); // Gallery max number. $wp_customize->add_setting( 'onepress_g_number', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => 10, ) ); $wp_customize->add_control( 'onepress_g_number', array( 'label' => esc_html__( 'Number items', 'onepress' ), 'section' => 'onepress_gallery_content', 'priority' => 65, ) ); // Gallery grid spacing. $wp_customize->add_setting( 'onepress_g_lightbox', array( 'sanitize_callback' => 'onepress_sanitize_checkbox', 'default' => 1, ) ); $wp_customize->add_control( 'onepress_g_lightbox', array( 'label' => esc_html__( 'Enable Lightbox', 'onepress' ), 'section' => 'onepress_gallery_content', 'priority' => 70, 'type' => 'checkbox', ) ); // Gallery image link to single. $wp_customize->add_setting( 'onepress_g_image_link', array( 'sanitize_callback' => 'onepress_sanitize_checkbox', 'default' => 1, ) ); $wp_customize->add_control( 'onepress_g_image_link', array( 'label' => esc_html__( 'Enable Image Link', 'onepress' ), 'section' => 'onepress_gallery_content', 'priority' => 71, 'type' => 'checkbox', ) ); // Gallery readmore link. $wp_customize->add_setting( 'onepress_g_readmore_link', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => '', ) ); $wp_customize->add_control( 'onepress_g_readmore_link', array( 'label' => esc_html__( 'Read More Link', 'onepress' ), 'section' => 'onepress_gallery_content', 'priority' => 90, 'type' => 'text', ) ); $wp_customize->add_setting( 'onepress_g_readmore_text', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => esc_html__( 'View More', 'onepress' ), ) ); $wp_customize->add_control( 'onepress_g_readmore_text', array( 'label' => esc_html__( 'Read More Text', 'onepress' ), 'section' => 'onepress_gallery_content', 'priority' => 100, 'type' => 'text', ) ); PK!W?#1#1 extras.phpnu['; } } add_action( 'wp_head', 'onepress_pingback_header' ); /** * Adds custom classes to the array of body classes. * * @param array $classes Classes for the body element. * * @return array */ function onepress_body_classes( $classes ) { // Adds a class of group-blog to blogs with more than 1 published author. if ( is_multi_author() ) { $classes[] = 'group-blog'; } // Fullwidth template if ( is_page_template( 'template-fullwidth-stretched.php' ) ) { $classes[] = 'template-fullwidth-stretched'; } if ( is_customize_preview() ) { $classes[] = 'is-customize-preview'; } if ( is_page() ) { $hide_page_title = get_post_meta( get_the_ID(), '_hide_page_title', true ); if ( $hide_page_title ) { $classes[] = 'hiding-page-title'; } } if ( get_theme_mod( 'onepress_animation_disable' ) ) { $classes[] = 'animation-disable'; } return $classes; } add_filter( 'body_class', 'onepress_body_classes' ); if ( ! function_exists( 'onepress_custom_excerpt_length' ) ) : /** * Custom excerpt length for the theme */ function onepress_custom_excerpt_length( $length ) { return 30; } add_filter( 'excerpt_length', 'onepress_custom_excerpt_length', 999 ); endif; if ( ! function_exists( 'onepress_new_excerpt_more' ) ) : /** * Remove […] string using Filters */ function onepress_new_excerpt_more( $more ) { return ' ...'; } add_filter( 'excerpt_more', 'onepress_new_excerpt_more' ); endif; /** * Get media from a variable * * @param array $media * * @return false|string */ if ( ! function_exists( 'onepress_get_media_url' ) ) { function onepress_get_media_url( $media = array(), $size = 'full' ) { $media = wp_parse_args( $media, array( 'url' => '', 'id' => '', ) ); $url = ''; if ( $media['id'] != '' ) { if ( strpos( get_post_mime_type( $media['id'] ), 'image' ) !== false ) { $image = wp_get_attachment_image_src( $media['id'], $size ); if ( $image ) { $url = $image[0]; } } else { $url = wp_get_attachment_url( $media['id'] ); } } if ( $url == '' && $media['url'] != '' ) { $id = attachment_url_to_postid( $media['url'] ); if ( $id ) { if ( strpos( get_post_mime_type( $id ), 'image' ) !== false ) { $image = wp_get_attachment_image_src( $id, $size ); if ( $image ) { $url = $image[0]; } } else { $url = wp_get_attachment_url( $id ); } } else { $url = $media['url']; } } return $url; } } /** * Same hook for the_content * * @TODO: do not effect content by plugins * * 8 WP_Embed:run_shortcode * 8 WP_Embed:autoembed * 10 wptexturize * 10 wpautop * 10 shortcode_unautop * 10 prepend_attachment * 10 wp_filter_content_tags || wp_make_content_images_responsive * 11 capital_P_dangit * 11 do_shortcode * 20 convert_smilies */ global $wp_embed; add_filter( 'onepress_the_content', array( $wp_embed, 'run_shortcode' ), 8 ); add_filter( 'onepress_the_content', array( $wp_embed, 'autoembed' ), 8 ); add_filter( 'onepress_the_content', 'wptexturize' ); add_filter( 'onepress_the_content', 'wpautop' ); add_filter( 'onepress_the_content', 'shortcode_unautop' ); add_filter( 'onepress_the_content', 'prepend_attachment' ); if ( function_exists( 'wp_filter_content_tags' ) ) { add_filter( 'onepress_the_content', 'wp_filter_content_tags' ); } else { add_filter( 'onepress_the_content', 'wp_make_content_images_responsive' ); } add_filter( 'onepress_the_content', 'capital_P_dangit' ); add_filter( 'onepress_the_content', 'do_shortcode' ); add_filter( 'onepress_the_content', 'convert_smilies' ); if ( ! function_exists( 'onepress_is_wc_active' ) ) { function onepress_is_wc_active() { if ( class_exists( 'WooCommerce' ) || function_exists( 'is_woocommerce' ) ) { return true; } return false; } } if ( ! function_exists( 'onepress_is_wc_archive' ) ) { function onepress_is_wc_archive() { if ( function_exists( 'is_product_category' ) || function_exists( 'is_product_tag' ) ) { if ( is_product_category() || is_product_tag() ) { return true; } } return false; } } if ( ! function_exists( 'onepress_get_layout' ) ) { /** * * * @param string $default * * @return string|void */ function onepress_get_layout( $default = 'right-sidebar' ) { $layout = get_theme_mod( 'onepress_layout', $default ); if ( onepress_is_wc_active() ) { if ( is_woocommerce() || is_cart() || is_checkout() || is_account_page() || is_wc_endpoint_url() ) { $is_active_sidebar = is_active_sidebar( 'sidebar-shop' ); if ( ! $is_active_sidebar ) { $layout = 'no-sidebar'; } } } /** * Support single layout * * @since 2.1.1 */ if ( is_singular( 'post' ) ) { $single_layout = get_theme_mod( 'single_layout', 'default' ); if ( $single_layout != '' && $single_layout != 'default' ) { $layout = $single_layout; } } return apply_filters( 'onepress_get_layout', $layout, $default ); } } /** * Woocommerce Support */ if ( class_exists( 'WooCommerce' ) ) { remove_action( 'woocommerce_cart_collaterals', 'woocommerce_cross_sell_display' ); add_filter( 'loop_shop_per_page', 'onepress_number_products_per_page', 20 ); function onepress_number_products_per_page( $number ) { // $cols contains the current number of products per page based on the value stored on Options -> Reading // Return the number of products you wanna show per page. $number = 20; return $number; } } /** * Support WPForms plugin */ if ( ! defined( 'WPFORMS_SHAREASALE_ID' ) ) { define( 'WPFORMS_SHAREASALE_ID', '1816909' ); } if ( ! function_exists( 'onepress_get_video_lightbox_image' ) ) { /** * @since 2.0.5 * @return string */ function onepress_get_video_lightbox_image() { $image = get_theme_mod( 'onepress_videolightbox_image' ); return $image; } } if ( ! function_exists( 'onepress_before_section' ) ) { /** * @since 2.0.5 * * @param $section_id * @param array $args */ function onepress_before_section( $section_id, $args = array() ) { if ( ! isset( $args['_bg_type'] ) ) { $args['_bg_type'] = ''; } if ( ! class_exists( 'OnePress_Plus' ) ) { if ( $section_id == 'videolightbox' ) { $image = onepress_get_video_lightbox_image(); $image_url = wp_get_attachment_image_url( $image, 'full' ); $image_alt = get_post_meta( $image, '_wp_attachment_image_alt', true ); if ( $image || onepress_is_selective_refresh() ) { echo '
    '; echo '
    ' . esc_attr( $image_alt ) . '
    '; } return; } } switch ( $args['_bg_type'] ) { case 'video': $args = wp_parse_args( $args, array( 'video_url' => '', 'video_webm_url' => '', 'video_ogv_url' => '', 'image' => '', ) ); extract( $args ); if ( $video_url || $video_webm_url || $video_ogv_url ) { $fallback = get_theme_mod( 'onepress_hero_mobile_img' ) ? 'true' : 'false'; ?>
    '', 'alpha' => '', 'enable_parallax' => '', ) ); extract( $args ); if ( $enable_parallax == 1 ) { $class = 'section-parallax jarallax'; if ( $section_id == 'hero' ) { $class = ' parallax-hero jarallax'; } echo '
    '; echo '
    '; } elseif ( $image || $alpha ) { // image bg echo '
    '; } break; }// end switch } } if ( ! function_exists( 'onepress_after_section' ) ) { /** * @since 2.0.5 * * @param null $section_id * @param array $args */ function onepress_after_section( $section_id = null, $args = array() ) { if ( ! isset( $args['_bg_type'] ) ) { $args['_bg_type'] = ''; } if ( ! class_exists( 'OnePress_Plus' ) ) { if ( $section_id == 'videolightbox' ) { $image = onepress_get_video_lightbox_image(); if ( $image || onepress_is_selective_refresh() ) { echo '
    '; } return; } } switch ( $args['_bg_type'] ) { case 'video': $args = wp_parse_args( $args, array( 'video_url' => '', 'video_webm_url' => '', 'video_ogv_url' => '', ) ); extract( $args ); if ( $video_url || $video_webm_url || $video_ogv_url ) { echo '
    '; } break; case 'image': $args = wp_parse_args( $args, array( 'image' => '', 'alpha' => '', 'enable_parallax' => '', ) ); extract( $args ); if ( $enable_parallax == 1 ) { echo '
    '; } elseif ( $image || $alpha ) { // image bg echo '
    '; } break; }// end switch } } add_action( 'onepress_before_section_part', 'onepress_before_section', 10, 2 ); add_action( 'onepress_after_section_part', 'onepress_after_section', 10, 2 ); /** * Retrieve the archive title based on the queried object. * * @return string Archive title. */ function onepress_get_the_archive_title( $title ) { $disable = get_theme_mod( 'onepress_disable_archive_prefix', false ); if ( $disable ) { if ( is_category() ) { $title = single_cat_title( '', false ); } elseif ( is_tag() ) { $title = single_tag_title( '', false ); } elseif ( is_author() ) { $title = '' . get_the_author() . ''; } elseif ( is_year() ) { $title = get_the_date( _x( 'Y', 'yearly archives date format', 'onepress' ) ); } elseif ( is_month() ) { $title = get_the_date( _x( 'F Y', 'monthly archives date format', 'onepress' ) ); } elseif ( is_day() ) { $title = get_the_date( _x( 'F j, Y', 'daily archives date format', 'onepress' ) ); } elseif ( is_post_type_archive() ) { $title = post_type_archive_title( '', false ); } elseif ( is_tax() ) { $title = single_term_title( '', false ); } } return $title; } add_filter( 'get_the_archive_title', 'onepress_get_the_archive_title', 15 ); if ( onepress_is_wc_active() ) { /** * Template pages */ if ( ! function_exists( 'woocommerce_content' ) ) { /** * Output WooCommerce content. * * This function is only used in the optional 'woocommerce.php' template. * which people can add to their themes to add basic woocommerce support. * without hooks or modifying core templates. * * @since 2.0.6 */ function woocommerce_content() { if ( is_singular( 'product' ) ) { while ( have_posts() ) : the_post(); wc_get_template_part( 'content', 'single-product' ); endwhile; } else { ?>

    ]*?>.*?@si', '', $string); $string = strip_tags($string); return trim($string); } function onepress_sanitize_color_alpha($color) { $color = str_replace('#', '', $color); if ('' === $color) { return ''; } // 3 or 6 hex digits, or the empty string. if (preg_match('|^#([A-Fa-f0-9]{3}){1,2}$|', '#' . $color)) { // convert to rgb $colour = $color; if (strlen($colour) == 6) { list($r, $g, $b) = array($colour[0] . $colour[1], $colour[2] . $colour[3], $colour[4] . $colour[5]); } elseif (strlen($colour) == 3) { list($r, $g, $b) = array($colour[0] . $colour[0], $colour[1] . $colour[1], $colour[2] . $colour[2]); } else { return false; } $r = hexdec($r); $g = hexdec($g); $b = hexdec($b); return 'rgba(' . join( ',', array( 'r' => $r, 'g' => $g, 'b' => $b, 'a' => 1, ) ) . ')'; } return strpos(trim($color), 'rgb') !== false ? $color : false; } /** * Sanitize repeatable data * * @param $input * @param $setting object $wp_customize * @return bool|mixed|string|void */ function onepress_sanitize_repeatable_data_field($input, $setting) { $control = $setting->manager->get_control($setting->id); $fields = $control->fields; if (is_string($input)) { $input = json_decode(wp_unslash($input), true); } $data = wp_parse_args($input, array()); if (!is_array($data)) { return false; } if (!isset($data['_items'])) { return false; } $data = $data['_items']; foreach ($data as $i => $item_data) { foreach ($item_data as $id => $value) { if (isset($fields[$id])) { switch (strtolower($fields[$id]['type'])) { case 'text': $data[$i][$id] = sanitize_text_field($value); break; case 'textarea': case 'editor': $data[$i][$id] = wp_kses_post($value); break; case 'color': $data[$i][$id] = sanitize_hex_color_no_hash($value); break; case 'coloralpha': $data[$i][$id] = onepress_sanitize_color_alpha($value); break; case 'checkbox': $data[$i][$id] = onepress_sanitize_checkbox($value); break; case 'select': $data[$i][$id] = ''; if (is_array($fields[$id]['options']) && !empty($fields[$id]['options'])) { // if is multiple choices if (is_array($value)) { foreach ($value as $k => $v) { if (isset($fields[$id]['options'][$v])) { $value[$k] = $v; } } $data[$i][$id] = $value; } else { // is single choice if (isset($fields[$id]['options'][$value])) { $data[$i][$id] = $value; } } } break; case 'radio': $data[$i][$id] = sanitize_text_field($value); break; case 'media': $value = wp_parse_args( $value, array( 'url' => '', 'id' => false, ) ); $value['id'] = absint($value['id']); $data[$i][$id]['url'] = sanitize_text_field($value['url']); if ($url = wp_get_attachment_url($value['id'])) { $data[$i][$id]['id'] = $value['id']; $data[$i][$id]['url'] = $url; } else { $data[$i][$id]['id'] = ''; } break; default: $data[$i][$id] = wp_kses_post($value); } } else { $data[$i][$id] = wp_kses_post($value); } if (is_array($data) && is_array($fields) && count($data[$i]) != count($fields)) { foreach ($fields as $k => $f) { if (!isset($data[$i][$k])) { $data[$i][$k] = ''; } } } } } return $data; } function onepress_sanitize_file_url($file_url) { $output = ''; $filetype = wp_check_filetype($file_url); if ($filetype['ext']) { $output = esc_url($file_url); } return $output; } /** * Conditional to show more hero settings * * @param $control * @return bool */ function onepress_hero_fullscreen_callback($control) { $value = $control->manager->get_setting('onepress_hero_fullscreen')->value(); if ('' == $value || !$value) { return true; } else { return false; } } /** * Sanitize select choices * * @param $input * @param null $setting * * @return string */ function onepress_sanitize_select($input, $setting = null) { // input must be a slug: lowercase alphanumeric characters, dashes and underscores are allowed only $input = sanitize_key($input); // get the list of possible select options if ($setting) { $choices = $setting->manager->get_control($setting->id)->choices; // return input if valid or return default option return (array_key_exists($input, $choices) ? $input : $setting->default); } else { return $input; } } function onepress_sanitize_number($input) { return balanceTags($input); } function onepress_sanitize_hex_color($color) { if ($color === '') { return ''; } if (preg_match('|^#([A-Fa-f0-9]{3}){1,2}$|', $color)) { return $color; } return null; } function onepress_sanitize_checkbox($input) { if ($input == 1) { return 1; } else { return 0; } } function onepress_sanitize_text($string) { return wp_kses_post(balanceTags($string)); } function onepress_sanitize_html_input($string) { return wp_kses_allowed_html($string); } function onepress_showon_frontpage() { return is_page_template('template-frontpage.php'); } function onepress_gallery_source_validate($validity, $value) { if (!class_exists('OnePress_Plus')) { if ($value != 'page') { $validity->add('notice', sprintf(esc_html__('Upgrade to %1s to unlock this feature.', 'onepress'), 'OnePress Plus')); } } return $validity; } PK!`m>m>customizer.phpnu[PK!T>template-tags.phpnu[PK!B9 9 customizer-controls.phpnu[PK!B0`%-%- F*customizer-selective-refresh.phpnu[PK!vz$z$Wclass-sections-navigation.phpnu[PK!>ʈ3AA$|customize-controls/control-pages.phpnu[PK!GM.customize-controls/control-custom-textarea.phpnu[PK!uv#1customize-controls/control-misc.phpnu[PK!b22'customize-controls/control-repeater.phpnu[PK!5?%customize-controls/control-editor.phpnu[PK!xPEAA#customize-controls/section-plus.phpnu[PK! ,,'!customize-controls/control-category.phpnu[PK!@JI I *customize-controls/control-color-alpha.phpnu[PK!ui,Gcustomize-controls/control-theme-support.phpnu[PK! ,class-config.phpnu[PK!ladmin/dashboard.phpnu[PK!JJz z hadmin/class-editor.phpnu[PK!P( tmetabox.phpnu[PK!Ҿ&mcustomize-configs/section-services.phpnu[PK!LEE"Kcustomize-configs/section-hero.phpnu[PK! :In"customize-configs/options-page.phpnu[PK!>m(customize-configs/options-blog-posts.phpnu[PK!$dd"Zcustomize-configs/section-team.phpnu[PK!_}}1customize-configs/options-sections-navigation.phpnu[PK!>fdD$customize-configs/options-single.phpnu[PK!ee"=customize-configs/section-news.phpnu[PK!9^%:customize-configs/section-counter.phpnu[PK!\˿--$$Mcustomize-configs/options-footer.phpnu[PK!65(?{customize-configs/options-navigation.phpnu[PK! aa$~customize-configs/options-colors.phpnu[PK!>& +Lcustomize-configs/section-videolightbox.phpnu[PK!a"O O $<customize-configs/options-global.phpnu[PK!n&&$ߚcustomize-configs/options-header.phpnu[PK!m;customize-configs/options.phpnu[PK!ٮu&customize-configs/section-features.phpnu[PK!I33#customize-configs/site-identity.phpnu[PK! [% customize-configs/section-contact.phpnu[PK!54ʹ$customize-configs/section-upsell.phpnu[PK!#customize-configs/section-about.phpnu[PK!ɯ!!%wcustomize-configs/section-gallery.phpnu[PK!W?#1#1 {?extras.phpnu[PK!=`L psanitize.phpnu[PK**