From 5ea1fa6f51b7a6fcbc3f274088041ced723e67f4 Mon Sep 17 00:00:00 2001 From: Suyogya Shukla Date: Fri, 12 May 2017 17:14:03 +0530 Subject: [PATCH 1/2] Add support to override default icons Override default Our Focus Widget icons from Child Theme suyogyashukla/portif#2 --- inc/zerif-lite/zerif-lite-functions.php | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/inc/zerif-lite/zerif-lite-functions.php b/inc/zerif-lite/zerif-lite-functions.php index ca5f7e6b..d9693561 100644 --- a/inc/zerif-lite/zerif-lite-functions.php +++ b/inc/zerif-lite/zerif-lite-functions.php @@ -36,14 +36,16 @@ function themeisle_populate_with_default_widgets() { 'title' => 'PARALLAX EFFECT', 'text' => 'Create memorable pages with smooth parallax effects that everyone loves. Also, use our lightweight content slider offering you smooth and great-looking animations.', 'link' => '#', - 'image_uri' => get_stylesheet_directory_uri() . "/images/parallax.png" + // Custom code with stylesheet_direc + 'image_uri' => apply_filters ( 'zerif_ourfocus_first_icon_default_filter', get_stylesheet_directory_uri() . "/images/parallax.png" ), ); } else { $ourfocus_content[ $zerif_lite_counter ] = array( 'title' => 'PARALLAX EFFECT', 'text' => 'Create memorable pages with smooth parallax effects that everyone loves. Also, use our lightweight content slider offering you smooth and great-looking animations.', 'link' => '#', - 'image_uri' => get_template_directory_uri() . "/images/parallax.png" + // Custom code with template_direc + 'image_uri' => apply_filters ( 'zerif_ourfocus_first_icon_default_filter', get_template_directory_uri() . "/images/parallax.png" ), ); } @@ -60,14 +62,16 @@ function themeisle_populate_with_default_widgets() { 'title' => 'WOOCOMMERCE', 'text' => 'Build a front page for your WooCommerce store in a matter of minutes. The neat and clean presentation will help your sales and make your store accessible to everyone.', 'link' => '#', - 'image_uri' => get_stylesheet_directory_uri() . "/images/woo.png" + // Custom code with stylesheet_direc + 'image_uri' => apply_filters ( 'zerif_ourfocus_second_icon_default_filter', get_stylesheet_directory_uri() . "/images/woo.png" ), ); } else { $ourfocus_content[ $zerif_lite_counter ] = array( 'title' => 'WOOCOMMERCE', 'text' => 'Build a front page for your WooCommerce store in a matter of minutes. The neat and clean presentation will help your sales and make your store accessible to everyone.', 'link' => '#', - 'image_uri' => get_template_directory_uri() . "/images/woo.png" + // Custom code with template_direc + 'image_uri' => apply_filters ( 'zerif_ourfocus_second_icon_default_filter', get_template_directory_uri() . "/images/woo.png" ), ); } @@ -84,14 +88,16 @@ function themeisle_populate_with_default_widgets() { 'title' => 'CUSTOM CONTENT BLOCKS', 'text' => 'Showcase your team, products, clients, about info, testimonials, latest posts from the blog, contact form, additional calls to action. Everything translation ready.', 'link' => '#', - 'image_uri' => get_stylesheet_directory_uri() . "/images/ccc.png" + // Custom code with stylesheet_direc + 'image_uri' => apply_filters ( 'zerif_ourfocus_third_icon_default_filter', get_stylesheet_directory_uri() . "/images/ccc.png" ), ); } else { $ourfocus_content[ $zerif_lite_counter ] = array( 'title' => 'CUSTOM CONTENT BLOCKS', 'text' => 'Showcase your team, products, clients, about info, testimonials, latest posts from the blog, contact form, additional calls to action. Everything translation ready.', 'link' => '#', - 'image_uri' => get_template_directory_uri() . "/images/ccc.png" + // Custom code with template_direc + 'image_uri' => apply_filters ( 'zerif_ourfocus_third_icon_default_filter', get_template_directory_uri() . "/images/ccc.png" ), ); } @@ -108,14 +114,16 @@ function themeisle_populate_with_default_widgets() { 'title' => 'GO PRO FOR MORE FEATURES', 'text' => 'Get new content blocks: pricing table, Google Maps, and more. Change the sections order, display each block exactly where you need it, customize the blocks with whatever colors you wish.', 'link' => '#', - 'image_uri' => get_stylesheet_directory_uri() . "/images/ti-logo.png" + // Custom code with stylesheet_direc + 'image_uri' => apply_filters ( 'zerif_ourfocus_fourth_icon_default_filter', get_stylesheet_directory_uri() . "/images/ti-logo.png" ), ); } else { $ourfocus_content[ $zerif_lite_counter ] = array( 'title' => 'GO PRO FOR MORE FEATURES', 'text' => 'Get new content blocks: pricing table, Google Maps, and more. Change the sections order, display each block exactly where you need it, customize the blocks with whatever colors you wish.', 'link' => '#', - 'image_uri' => get_template_directory_uri() . "/images/ti-logo.png" + // Custom code with template_direc + 'image_uri' => apply_filters ( 'zerif_ourfocus_fourth_icon_default_filter', get_template_directory_uri() . "/images/ti-logo.png" ), ); } From cfd9d9ffdb0d7f377d51ca7e3f15f3b03d4d4087 Mon Sep 17 00:00:00 2001 From: Rodica-Elena Andronache Date: Fri, 12 May 2017 16:54:30 +0300 Subject: [PATCH 2/2] Change to have just one filter for the our focus default images --- inc/zerif-lite/zerif-lite-functions.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/inc/zerif-lite/zerif-lite-functions.php b/inc/zerif-lite/zerif-lite-functions.php index d9693561..e76f5e2f 100644 --- a/inc/zerif-lite/zerif-lite-functions.php +++ b/inc/zerif-lite/zerif-lite-functions.php @@ -37,7 +37,7 @@ function themeisle_populate_with_default_widgets() { 'text' => 'Create memorable pages with smooth parallax effects that everyone loves. Also, use our lightweight content slider offering you smooth and great-looking animations.', 'link' => '#', // Custom code with stylesheet_direc - 'image_uri' => apply_filters ( 'zerif_ourfocus_first_icon_default_filter', get_stylesheet_directory_uri() . "/images/parallax.png" ), + 'image_uri' => apply_filters ( 'zerif_ourfocus_icon_default_filter', get_stylesheet_directory_uri() . "/images/parallax.png", 'first' ), ); } else { $ourfocus_content[ $zerif_lite_counter ] = array( @@ -45,7 +45,7 @@ function themeisle_populate_with_default_widgets() { 'text' => 'Create memorable pages with smooth parallax effects that everyone loves. Also, use our lightweight content slider offering you smooth and great-looking animations.', 'link' => '#', // Custom code with template_direc - 'image_uri' => apply_filters ( 'zerif_ourfocus_first_icon_default_filter', get_template_directory_uri() . "/images/parallax.png" ), + 'image_uri' => apply_filters ( 'zerif_ourfocus_icon_default_filter', get_template_directory_uri() . "/images/parallax.png", 'first' ), ); } @@ -63,7 +63,7 @@ function themeisle_populate_with_default_widgets() { 'text' => 'Build a front page for your WooCommerce store in a matter of minutes. The neat and clean presentation will help your sales and make your store accessible to everyone.', 'link' => '#', // Custom code with stylesheet_direc - 'image_uri' => apply_filters ( 'zerif_ourfocus_second_icon_default_filter', get_stylesheet_directory_uri() . "/images/woo.png" ), + 'image_uri' => apply_filters ( 'zerif_ourfocus_icon_default_filter', get_stylesheet_directory_uri() . "/images/woo.png", 'second' ), ); } else { $ourfocus_content[ $zerif_lite_counter ] = array( @@ -71,7 +71,7 @@ function themeisle_populate_with_default_widgets() { 'text' => 'Build a front page for your WooCommerce store in a matter of minutes. The neat and clean presentation will help your sales and make your store accessible to everyone.', 'link' => '#', // Custom code with template_direc - 'image_uri' => apply_filters ( 'zerif_ourfocus_second_icon_default_filter', get_template_directory_uri() . "/images/woo.png" ), + 'image_uri' => apply_filters ( 'zerif_ourfocus_icon_default_filter', get_template_directory_uri() . "/images/woo.png", 'second' ), ); } @@ -89,7 +89,7 @@ function themeisle_populate_with_default_widgets() { 'text' => 'Showcase your team, products, clients, about info, testimonials, latest posts from the blog, contact form, additional calls to action. Everything translation ready.', 'link' => '#', // Custom code with stylesheet_direc - 'image_uri' => apply_filters ( 'zerif_ourfocus_third_icon_default_filter', get_stylesheet_directory_uri() . "/images/ccc.png" ), + 'image_uri' => apply_filters ( 'zerif_ourfocus_icon_default_filter', get_stylesheet_directory_uri() . "/images/ccc.png", 'third' ), ); } else { $ourfocus_content[ $zerif_lite_counter ] = array( @@ -97,7 +97,7 @@ function themeisle_populate_with_default_widgets() { 'text' => 'Showcase your team, products, clients, about info, testimonials, latest posts from the blog, contact form, additional calls to action. Everything translation ready.', 'link' => '#', // Custom code with template_direc - 'image_uri' => apply_filters ( 'zerif_ourfocus_third_icon_default_filter', get_template_directory_uri() . "/images/ccc.png" ), + 'image_uri' => apply_filters ( 'zerif_ourfocus_icon_default_filter', get_template_directory_uri() . "/images/ccc.png", 'third' ), ); } @@ -115,7 +115,7 @@ function themeisle_populate_with_default_widgets() { 'text' => 'Get new content blocks: pricing table, Google Maps, and more. Change the sections order, display each block exactly where you need it, customize the blocks with whatever colors you wish.', 'link' => '#', // Custom code with stylesheet_direc - 'image_uri' => apply_filters ( 'zerif_ourfocus_fourth_icon_default_filter', get_stylesheet_directory_uri() . "/images/ti-logo.png" ), + 'image_uri' => apply_filters ( 'zerif_ourfocus_icon_default_filter', get_stylesheet_directory_uri() . "/images/ti-logo.png", 'fourth' ), ); } else { $ourfocus_content[ $zerif_lite_counter ] = array( @@ -123,7 +123,7 @@ function themeisle_populate_with_default_widgets() { 'text' => 'Get new content blocks: pricing table, Google Maps, and more. Change the sections order, display each block exactly where you need it, customize the blocks with whatever colors you wish.', 'link' => '#', // Custom code with template_direc - 'image_uri' => apply_filters ( 'zerif_ourfocus_fourth_icon_default_filter', get_template_directory_uri() . "/images/ti-logo.png" ), + 'image_uri' => apply_filters ( 'zerif_ourfocus_icon_default_filter', get_template_directory_uri() . "/images/ti-logo.png", 'fourth' ), ); }