Worky
I am PRO
Filters and Actions
Action hooks
Below is the list of all action hooks used in Kava parent theme:
- cx_dynamic_css/include_custom_files
- kava-theme/site/page-start
- kava-theme/breadcrumbs/breadcrumbs-before-render
- kava-theme/breadcrumbs/before
- cx_breadcrumbs/render
- kava-theme/breadcrumbs/after
- kava-theme/breadcrumbs/breadcrumbs-after-render
- kava-theme/header/before
- kava-theme/header/after
- kava-theme/top-panel/elements-left
- kava-theme/top-panel/elements-right
- kava-theme/widget-area/render
- kava-theme/blog/before
- kava-theme/blog/after
- kava-theme/site/site-content-before
- kava-theme/site/primary-before
- kava-theme/site/main-before
- kava-theme/site/main-after
- kava-theme/site/primary-after
- kava-theme/site/site-content-after
- kava-theme/comments/comment-before
- kava-theme/comments/comment-after
- kava_extra_post_format_audio
- kava_extra_post_format_gallery
- kava_extra_post_format_image
- kava_extra_post_format_link
- kava_extra_post_format_quote
- kava_extra_post_format_video
- kava-theme/blog/posts-navigation-before
- kava-theme/blog/posts-navigation-after
The following screenshot visualizes actions' location:
You can use the following plugin to get all action and filter hooks displayed on your website frontend for debugging and development purposes.
Filter hooks
kava-theme/allowed-modules
Location: config/modules.php
Usage:function kava_get_allowed_modules() { return apply_filters( 'kava-theme/allowed-modules', array( 'blog-layouts' => array(), 'crocoblock' => array(), 'woo' => array( 'woo-breadcrumbs' => array(), 'woo-page-title' => array(), ), ) ); }
kava-theme/widget_area/default_settings
Location: config/sidebars.php
Usage:kava_widget_area()->widgets_settings = apply_filters( 'kava-theme/widget_area/default_settings', array( 'sidebar' => array( 'name' => esc_html__( 'Sidebar', 'kava' ), 'description' => '', 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside>', 'before_title' => '<h4 class="widget-title">', 'after_title' => '</h4>', 'before_wrapper' => '<div id="%1$s" %2$s role="complementary">', 'after_wrapper' => '</div>', 'is_global' => true, ), 'sidebar-shop' => array( 'name' => esc_html__( 'Shop Sidebar', 'kava' ), 'description' => '', 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>', 'before_wrapper' => '<div id="%1$s" %2$s role="complementary">', 'after_wrapper' => '</div>', 'is_global' => true, ) ) );
kava-theme/version
Location: functions.php
Usage:public function version() { return apply_filters( 'kava-theme/version', $this->version ); }
kava-theme/disabled-modules
Location: functions.php
Usage:public function load_modules() { $disabled_modules = apply_filters( 'kava-theme/disabled-modules', array() ); foreach ( kava_get_allowed_modules() as $module => $childs ) { if ( ! in_array( $module, $disabled_modules ) ) { $this->load_module( $module, $childs ); } } }
kava-theme/assets-depends/script
Location: functions.php
Usage:public function enqueue_scripts() { /** * Filter the depends on main theme script. * * @since 1.0.0 * @var array */ $scripts_depends = apply_filters( 'kava-theme/assets-depends/script', array( 'jquery', 'responsive-menu' ) ); ....................
kava-theme/assets-depends/styles
Location: functions.php
Usage:public function enqueue_styles() { /** * Filter the depends on main theme styles. * * @since 1.0.0 * @var array */ $styles_depends = apply_filters( 'kava-theme/assets-depends/styles', array( 'font-awesome', ) ); if ( $this->is_blog || is_singular( 'post' ) ) { array_push($styles_depends, 'magnific-popup', 'jquery-swiper'); } ....................
kava-theme/breadcrumbs/options
Location: inc/breadcrumbs.php
Usage:return apply_filters( 'kava-theme/breadcrumbs/options' , array( 'show_browse' => false, 'show_on_front' => kava_theme()->customizer->get_value( 'breadcrumbs_front_visibillity' ), 'show_title' => kava_theme()->customizer->get_value( 'breadcrumbs_page_title' ), 'path_type' => kava_theme()->customizer->get_value( 'breadcrumbs_path_type' ), 'css_namespace' => array( 'module' => 'breadcrumbs', 'content' => 'breadcrumbs_content', 'wrap' => 'breadcrumbs_wrap', 'browse' => 'breadcrumbs_browse', 'item' => 'breadcrumbs_item', 'separator' => 'breadcrumbs_item_sep', 'link' => 'breadcrumbs_item_link', 'target' => 'breadcrumbs_item_target', ), ) );
kava-theme/widget_area/rendering_current
Location: inc/classes/class-widget-area.php
Usage:$area_id = apply_filters( 'kava-theme/widget_area/rendering_current', $area_id );
kava-theme/widget_area/classes
Location: inc/classes/class-widget-area.php
Usage:$classes = apply_filters( 'kava-theme/widget_area/classes', $classes, $area_id );
kava-theme/site/fullwidth
Location: inc/context.php
Usage:if ( ! apply_filters( 'kava-theme/site/fullwidth', $fullwidth ) ) { $layout_type = kava_theme()->customizer->get_value( 'container_type' ); if ( 'boxed' == $layout_type ) { $classes .= 'container'; } }
kava-theme/site-header/container-enabled
Location: inc/context.php
Usage:$site_header_container = apply_filters( 'kava-theme/site-header/container-enabled', true );
kava-theme/site-header/content-classes
Location: inc/context.php
Usage:echo 'class="' . apply_filters( 'kava-theme/site-header/content-classes', $classes ) . '"';
kava-theme/site-breadcrumbs/container-enabled
Location: inc/context.php
Usage:$site_breadcrumbs_container = apply_filters( 'kava-theme/site-breadcrumbs/container-enabled', true );
kava-theme/site-breadcrumbs/content-classes
Location: inc/context.php
Usage:echo 'class="' . apply_filters( 'kava-theme/site-breadcrumbs/content-classes', $classes ) . '"';
kava-theme/site-content/container-enabled
Location: inc/context.php
Usage:$site_content_container = apply_filters( 'kava-theme/site-content/container-enabled', true );
-
kava-theme/site-content/content-classes
Location: inc/context.php
Usage:echo 'class="' . apply_filters( 'kava-theme/site-content/content-classes', $classes ) . '"';
kava-theme/site-footer/container-enabled
Location: inc/context.php
Usage:$site_content_container = apply_filters( 'kava-theme/site-footer/container-enabled', true );
kava-theme/site-footer/content-classes
Location: inc/context.php
Usage:echo 'class="' . apply_filters( 'kava-theme/site-footer/content-classes', $classes ) . '"';
kava-theme/wrapper/{$layout}_classes
Location: inc/context.php
Usage:$layout_classes = apply_filters( "kava-theme/wrapper/{$layout}_classes", $layout_classes );
kava-theme/posts/list-class
Location: inc/context.php
Usage:echo 'class="' . apply_filters( 'kava-theme/posts/list-class', $classes ) . '"';
kava-theme/customizer/options
Location: inc/customizer.php
Usage:return apply_filters( 'kava-theme/customizer/options' , array( ...................
kava-theme/font/styles
Location: inc/customizer.php
Usage:function kava_get_font_styles() { return apply_filters( 'kava-theme/font/styles', array( ...................
kava-theme/font/character_sets
Location: inc/customizer.php
Usage:return apply_filters( 'kava-theme/font/character_sets', array( ...................
kava-theme/font/text-aligns
Location: inc/customizer.php
Usage:return apply_filters( 'kava-theme/font/text-aligns', array( ...................
kava-theme/font/weight
Location: inc/customizer.php
Usage:return apply_filters( 'kava-theme/font/weight', array( ...................
kava-theme/dynamic_css/options
Location: inc/customizer.php
Usage:return apply_filters( 'kava-theme/dynamic_css/options', array( ...................
kava-theme/customizer/blog-sidebar-enabled
Location: inc/customizer.php
Usage:return apply_filters( 'kava-theme/customizer/blog-sidebar-enabled', true );
kava-theme/posts/queried_object_id
Location: inc/extras.php
Usage:$queried_obj = apply_filters( 'kava-theme/posts/queried_object_id', false );
kava-theme/data_macros
Location: inc/extras.php
Usage:$macros = apply_filters( 'kava-theme/data_macros', array( ...................
kava-theme/icons/icons-set
Location: inc/extras.php
Usage:return apply_filters( 'kava-theme/icons/icons-set', array( ...................
kava-theme/posts/template-part-slug
Location: inc/extras.php
Usage:return apply_filters( 'kava-theme/posts/template-part-slug', 'template-parts/content' );
kava-theme/posts/post-style
Location: inc/extras.php
Usage:return apply_filters( 'kava-theme/posts/post-style', false );
cx_breadcrumbs/items
Location: framework/modules/breadcrumbs/cherry-x-breadcrumbs.php
Usage:$this->items = apply_filters( 'cx_breadcrumbs/items', $this->items, $this->args, $this );
kava-theme/woo/breadcrumbs/main_term
Location: inc/modules/woo-breadcrumbs/classes/class-wc-breadcrumbs.php
Usage:$main_term = apply_filters( 'kava-theme/woo/breadcrumbs/main_term', $terms[0], $terms );
kava-theme/woo/products_loop_columns
Location: inc/modules/woo/includes/wc-archive-product-functions.php
Usage:$columns = apply_filters( 'kava-theme/woo/products_loop_columns', $columns, $context );
kava-theme/woo/products-loop-categories/show
Location: inc/modules/woo/includes/wc-archive-product-functions.php
Usage:if ( apply_filters( 'kava-theme/woo/products-loop-categories/show', true ) ){ $ob_get_clean = woocommerce_maybe_show_product_subcategories( $ob_get_clean ); }
kava-theme/comments/author-avatar
Location: inc/template-comment.php
Usage:return apply_filters( 'kava-theme/comments/author-avatar', get_avatar( $comment, $size ), $args );
kava-theme/comments/author-link
Location: inc/template-comment.php
Usage:return apply_filters( 'kava-theme/comments/author-link', sprintf( '<b class="fn">%s</b>', get_comment_author_link() ), $args );
kava-theme/comments/date
Location: inc/template-comment.php
Usage:return apply_filters( 'kava-theme/comments/date', sprintf( '<span class="comment-date"><time datetime="%1$s" class="comment-date__time">%2$s</time></span>', get_comment_time( 'c' ), get_comment_date( $format ) ), $args );
kava-theme/comments/text
Location: inc/template-comment.php
Usage:return apply_filters( 'kava-theme/comments/text', $comment_text, $args );
kava-theme/comments/reply_link
Location: inc/template-comment.php
Usage:return apply_filters( 'kava-theme/comments/reply_link', $reply, $args );
kava-theme/comments/link-edit
Location: inc/template-comment.php
Usage:return apply_filters( 'kava-theme/comments/link-edit', $link, $comment->comment_ID, $args );
kava-theme/menu/main-menu-args
Location: inc/template-menu.php
Usage:$args = apply_filters( 'kava-theme/menu/main-menu-args', array( ...................
kava-theme/menu/footer-menu-args
Location: inc/template-menu.php
Usage:$args = apply_filters( 'kava-theme/menu/footer-menu-args', array( ...................
kava-theme/social/list-args
Location: inc/template-menu.php
Usage:$args = apply_filters( 'kava-theme/social/list-args', array( ...................
kava-theme/post/excerpt-output
Location: inc/template-tags.php
Usage:$excerpt_output = apply_filters( 'kava-theme/post/excerpt-output', $args['before'] .'<p>'. $excerpt .'</p>'. $args['after'] );
kava-theme/post/date-output
Location: inc/template-tags.php
Usage:$date_output = apply_filters( 'kava-theme/post/date-output', $args['before'] . $args['prefix'] . ' ' . $posted_on . $args['after'] );
kava-theme/post/categories-output
Location: inc/template-tags.php
Usage:echo apply_filters( 'kava-theme/post/categories-output', $args['before'] . $args['prefix'] . ' ' . $categories . $args['after'] );
kava-theme/post/tags-output
Location: inc/template-tags.php
Usage:echo apply_filters( 'kava-theme/post/tags-output', $args['before'] . $args['prefix'] . ' ' . $tags . $args['after'] );
kava-theme/post/comments-output
Location: inc/template-tags.php
Usage:echo apply_filters( 'kava-theme/post/comments-output', '<a href="' . $link . '" class="' . $args['class'] . '">' . $args['prefix'] . $count . $args['postfix'] . '</a>' );
kava-theme/post/author-output
Location: inc/template-tags.php
Usage:$author_output = apply_filters( 'kava-theme/post/author-output', $author_output );
kava-theme/post/avatar-output
Location: inc/template-tags.php
Usage:$avatar_output = apply_filters( 'kava-theme/post/avatar-output', get_avatar( get_the_author_meta( 'user_email', $author_id ), $args['size'], '', esc_attr( get_the_author_meta( 'nickname', $author_id ) ) ) );
kava-theme/post/author-meta-output
Location: inc/template-tags.php
Usage:$author_meta_output = apply_filters( 'kava-theme/post/author-meta-output', get_the_author_meta( $args['field'], $author_id ) );
kava-theme/post/link-output
Location: inc/template-tags.php
Usage:echo apply_filters( 'kava-theme/post/link-output', $post_link_output );
kava-theme/post/thumb-image-size
Location: inc/template-tags.php
Usage:$image_size = apply_filters( 'kava-theme/post/thumb-image-size', $image_size );
kava-theme/post/thumb
Location: inc/template-tags.php
Usage:$thumb = apply_filters( 'kava-theme/post/thumb', $thumb );
kava-theme/post/overlay-thumb
Location: inc/template-tags.php
Usage:$thumbnail = apply_filters( 'kava-theme/post/overlay-thumb', get_the_post_thumbnail_url( $postID, $img_size ) );
kava-theme/page/preloader
Location: inc/template-tags.php
Usage:echo apply_filters( 'kava-theme/page/preloader', '<div class="page-preloader-cover"> <div class="page-preloader"></div> </div>' );
kava-theme/header/logo-format
Location: inc/template-tags.php
Usage:$format = apply_filters( 'kava-theme/header/logo-format', '<h1 class="site-logo"><a class="site-logo__link" href="%1$s" rel="home">%2$s</a></h1>' );
kava-theme/header/description-format
Location: inc/template-tags.php
Usage:$format = apply_filters( 'kava-theme/header/description-format', '<div class="site-description">%s</div>' );
kava-theme/footer/copyright-format
Location: inc/template-tags.php
Usage:$format = apply_filters( 'kava-theme/footer/copyright-format', '<div class="footer-copyright">%s</div>' );
kava-theme/header/top-panel-visibility-conditions
Location: inc/template-tags.php
Usage:$conditions = apply_filters( 'kava-theme/header/top-panel-visibility-conditions', array( $site_description, $social ) );
kava-theme/posts/sticky-icon
Location: inc/template-tags.php
Usage:$icon = apply_filters( 'kava-theme/posts/sticky-icon', '<i class="fa fa-thumb-tack" aria-hidden="true"></i>' );
kava-theme/breadcrumbs/breadcrumbs-visibillity
Location: template-parts/breadcrumbs.php
Usage:$breadcrumbs_visibillity = apply_filters( 'kava-theme/breadcrumbs/breadcrumbs-visibillity', $breadcrumbs_visibillity );
kava-theme/posts/navigation-args
Location: template-parts/content-navigation.php
Usage:apply_filters( 'kava-theme/posts/navigation-args', array( ...................
kava-theme/posts/pagination-args
Location: template-parts/content-navigation.php
Usage:apply_filters( 'kava-theme/posts/pagination-args', array( ...................
Website speed optimization
Images optimization
We recommend that you use the EWWW Image Optimizer plugin for images optimization.
The plugin can be downloaded directly from wordpress.org.
-
Once you've installed and activated the plugin, you should navigate to Media->Bulk Optimize menu.
-
Next, click on the 'Scan for unoptimized images' button.
-
When the scanning completes, you will see the total number of images that can be optimized. Press the Start optimizing button to begin images optimization. Please wait for the process completion, it may take a while.
-
We suggest keeping this plugin disabled on a regular basis, to avoid needless additional WordPress's backend and frontend resources load. It's better to activate the plugin periodically and run optimization under the Media -> Bulk Optimize menu.
-
Once you install and activate the plugin, you should navigate to WP Fastest Cache menu in your WordPress Dashboard.
-
Please, enable the following options:
-
Cache System;
-
Preload. Adjust the options according to the screenshot below:
-
Minify HTML;
-
Minify CSS;
-
Combine CSS;
-
Combine JS;
-
Gzip;
-
Browser Caching;
-
Disable Emojis.
-
-
Don't forget to save the changes by clicking on the Submit button.
-
Please, care about the dimensions and weight of the graphic you use on your website. In the vast majority of cases, there is no real need to use the images with 2000px+ dimensions or with 500Kb+ weight.
-
Self-hosted videos are heavy, so please use them on your website wisely.
-
Missing files may have a significant impact on website loading speed. You can use one of the free online services like this one to locate the missing files and broken links on your website.
-
Re-check all the plugins installed on your website. You'd better disable the ones you don't use.
Feel free to check out official plugin's documentation, tutorials, troubleshooters and advanced configuration guides.
Overall website speed optimization
We recommend that you use the efficient but simple WP Fastest Cache plugin for these purposes.
The plugin can be downloaded directly from wordpress.org.