From 038bc7a7af3b0903c1e22db1b2a3bc6e52b20ba9 Mon Sep 17 00:00:00 2001
From: Radu
Date: Thu, 16 Aug 2018 16:55:04 +0300
Subject: [PATCH 01/16] change pirate forms to wp forms
---
content-frontpage.php | 10 +++---
functions.php | 52 +++++++++++++--------------
inc/customizer.php | 18 +++++-----
style.css | 40 ++++++++++-----------
template-frontpage.php | 10 +++---
ti-about-page/class-ti-about-page.php | 16 ++++-----
6 files changed, 73 insertions(+), 73 deletions(-)
diff --git a/content-frontpage.php b/content-frontpage.php
index 29c48bc..c9e6975 100644
--- a/content-frontpage.php
+++ b/content-frontpage.php
@@ -101,9 +101,9 @@
endif;
$contactus_subtitle_default = '';
- if ( ! defined( 'PIRATE_FORMS_VERSION' ) ) {
- /* translators: Pirate Forms plugin install link */
- $contactus_subtitle_default = sprintf( __( 'You need to install %s to create a contact form.', 'zerif-lite' ), sprintf( '%2$s ', esc_url( wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=pirate-forms' ), 'install-plugin_pirate-forms' ) ), 'Pirate Forms' ) );
+ if ( ! defined( 'WPFORMS_VERSION' ) ) {
+ /* translators: WPForms Lite plugin install link */
+ $contactus_subtitle_default = sprintf( __( 'You need to install %s to create a contact form.', 'zerif-lite' ), sprintf( '%2$s ', esc_url( wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=wpforms-lite' ), 'install-plugin_wpforms-lite' ) ), 'WPForms Lite' ) );
}
if ( current_user_can( 'edit_theme_options' ) ) {
@@ -122,10 +122,10 @@
';
- echo do_shortcode( '[pirate_forms]' );
+ echo do_shortcode( '[wpforms id="3673""]' );
echo '';
endif;
diff --git a/functions.php b/functions.php
index fb2283d..1c3bf15 100644
--- a/functions.php
+++ b/functions.php
@@ -435,12 +435,12 @@ function zerif_setup() {
'plugin_slug' => 'themeisle-companion',
'id' => 'themeisle-companion',
),
- 'pirate-forms' => array(
- 'title' => 'Pirate Forms',
- 'description' => __( 'Makes your contact page more engaging by creating a good-looking contact form on your website. The interaction with your visitors was never easier.', 'zerif-lite' ),
- 'check' => defined( 'PIRATE_FORMS_VERSION' ),
- 'plugin_slug' => 'pirate-forms',
- 'id' => 'pirate-forms',
+ 'wpforms-lite' => array(
+ 'title' => 'WPForms Lite',
+ 'description' => __( 'WPForms allow you to create beautiful contact forms, subscription forms, payment forms, and other type of forms for your site in minutes, not hours!', 'zerif-lite' ),
+ 'check' => defined( 'WPFORMS_VERSION' ),
+ 'plugin_slug' => 'wpforms-lite',
+ 'id' => 'wpforms-lite',
),
),
@@ -756,8 +756,8 @@ function zerif_register_required_plugins() {
'required' => false,
),
array(
- 'name' => 'Pirate Forms',
- 'slug' => 'pirate-forms',
+ 'name' => 'WPForms Lite',
+ 'slug' => 'wpforms-lite',
'required' => false,
),
array(
@@ -771,8 +771,8 @@ function zerif_register_required_plugins() {
$plugins = array(
array(
- 'name' => 'Pirate Forms',
- 'slug' => 'pirate-forms',
+ 'name' => 'WPForms Lite',
+ 'slug' => 'wpforms-lite',
'required' => false,
),
array(
@@ -1827,53 +1827,53 @@ function remove_class_function( $classes ) {
}
-add_action( 'customize_save_after', 'zerif_lite_update_options_in_pirate_forms', 99 );
+add_action( 'customize_save_after', 'zerif_lite_update_options_in_wpforms', 99 );
/**
- * Update Pirate Forms plugin when there is a change in Customizer Contact us section
+ * Update WPForms Lite plugin when there is a change in Customizer Contact us section
*/
-function zerif_lite_update_options_in_pirate_forms() {
+function zerif_lite_update_options_in_wpforms() {
- /* if Pirate Forms is installed */
- if ( defined( 'PIRATE_FORMS_VERSION' ) ) :
+ /* if WPForms Lite is installed */
+ if ( defined( 'WPFORMS_VERSION' ) ) :
$zerif_lite_current_mods = get_theme_mods(); /* all theme modification values in Customize for Zerif Lite */
- $pirate_forms_settings_array = get_option( 'pirate_forms_settings_array' ); /* Pirate Forms's options's array */
+ $wpforms_settings_array = get_option( 'wpforms_settings_array' ); /* WPForms Lite's options's array */
if ( ! empty( $zerif_lite_current_mods ) ) :
if ( isset( $zerif_lite_current_mods['zerif_contactus_button_label'] ) ) :
- $pirate_forms_settings_array['pirateformsopt_label_submit_btn'] = $zerif_lite_current_mods['zerif_contactus_button_label'];
+ $wpforms_settings_array['wpformsopt_label_submit_btn'] = $zerif_lite_current_mods['zerif_contactus_button_label'];
endif;
if ( isset( $zerif_lite_current_mods['zerif_contactus_email'] ) ) :
- $pirate_forms_settings_array['pirateformsopt_email'] = $zerif_lite_current_mods['zerif_contactus_email'];
- $pirate_forms_settings_array['pirateformsopt_email_recipients'] = $zerif_lite_current_mods['zerif_contactus_email'];
+ $wpforms_settings_array['wpformsopt_email'] = $zerif_lite_current_mods['zerif_contactus_email'];
+ $wpforms_settings_array['wpformsopt_email_recipients'] = $zerif_lite_current_mods['zerif_contactus_email'];
endif;
if ( isset( $zerif_lite_current_mods['zerif_contactus_recaptcha_show'] ) && ( $zerif_lite_current_mods['zerif_contactus_recaptcha_show'] == 1 ) ) :
- if ( isset( $pirate_forms_settings_array['pirateformsopt_recaptcha_field'] ) ) :
- unset( $pirate_forms_settings_array['pirateformsopt_recaptcha_field'] );
+ if ( isset( $wpforms_settings_array['wpformsopt_recaptcha_field'] ) ) :
+ unset( $wpforms_settings_array['wpformsopt_recaptcha_field'] );
endif;
else :
- $pirate_forms_settings_array['pirateformsopt_recaptcha_field'] = 'yes';
+ $wpforms_settings_array['wpformsopt_recaptcha_field'] = 'yes';
endif;
if ( isset( $zerif_lite_current_mods['zerif_contactus_sitekey'] ) ) :
- $pirate_forms_settings_array['pirateformsopt_recaptcha_sitekey'] = $zerif_lite_current_mods['zerif_contactus_sitekey'];
+ $wpforms_settings_array['wpformsopt_recaptcha_sitekey'] = $zerif_lite_current_mods['zerif_contactus_sitekey'];
endif;
if ( isset( $zerif_lite_current_mods['zerif_contactus_secretkey'] ) ) :
- $pirate_forms_settings_array['pirateformsopt_recaptcha_secretkey'] = $zerif_lite_current_mods['zerif_contactus_secretkey'];
+ $wpforms_settings_array['wpformsopt_recaptcha_secretkey'] = $zerif_lite_current_mods['zerif_contactus_secretkey'];
endif;
endif;
- if ( ! empty( $pirate_forms_settings_array ) ) :
- update_option( 'pirate_forms_settings_array', $pirate_forms_settings_array ); /* Update the options */
+ if ( ! empty( $wpforms_settings_array ) ) :
+ update_option( 'wpforms_settings_array', $wp_forms_settings_array ); /* Update the options */
endif;
endif;
diff --git a/inc/customizer.php b/inc/customizer.php
index a97837b..8430cf5 100644
--- a/inc/customizer.php
+++ b/inc/customizer.php
@@ -315,7 +315,7 @@ public function json() {
);
$wp_customize->selective_refresh->add_partial(
'zerif_contactus_button_label', array(
- 'selector' => '#contact .pirate_forms .contact_submit_wrap',
+ 'selector' => '#contact .wpforms .contact_submit_wrap',
'render_callback' => 'zerif_contactus_button_label_render_callback',
)
);
@@ -564,7 +564,7 @@ function zerif_contactus_title_render_callback() {
*/
function zerif_contactus_button_label_render_callback() {
?>
-
+
Pirate Forms', 'zerif-lite' );
+ /* If WPForms Lite is installed */
+ if ( defined( 'WPFORMS_VERSION' ) ) :
+ $zerif_contact_us_section_description = __( 'For more advanced settings please go to Settings -> WPForms Lite', 'zerif-lite' );
endif;
$wp_customize->add_section(
@@ -2254,8 +2254,8 @@ function zerif_blog_header_title_subtitle_callback() {
/* Contactus subtitle */
- /* translators: Pirate Forms plugin */
- $default = ! defined( 'PIRATE_FORMS_VERSION' ) ? sprintf( __( 'You need to install %s to create a contact form.', 'zerif-lite' ), 'Pirate Forms' ) : '';
+ /* translators: WPForms Lite plugin */
+ $default = ! defined( 'WPFORMS_VERSION' ) ? sprintf( __( 'You need to install %s to create a contact form.', 'zerif-lite' ), 'WPForms Lite' ) : '';
$wp_customize->add_setting(
'zerif_contactus_subtitle', array(
'sanitize_callback' => 'zerif_sanitize_input',
@@ -2271,8 +2271,8 @@ function zerif_blog_header_title_subtitle_callback() {
)
);
- /* Use the contact options from the theme, only if Pirate Forms is not installed */
- if ( ! defined( 'PIRATE_FORMS_VERSION' ) ) {
+ /* Use the contact options from the theme, only if WPForms Lite is not installed */
+ if ( ! defined( 'WPFORMS_VERSION' ) ) {
/* Contactus email */
$wp_customize->add_setting(
'zerif_contactus_email', array(
diff --git a/style.css b/style.css
index 06eb498..16c3080 100644
--- a/style.css
+++ b/style.css
@@ -2390,16 +2390,16 @@ ul.nav > li.current_page_item.current > a:before {
/*********************** PIRATE FORMS style ********************/
/****************************************************************/
-.pirate_forms {
+.wpforms-container .wpforms-form {
padding-bottom: 95px;
}
-.pirate_forms input:not([type='checkbox']),
-.pirate_forms textarea {
+.wpforms-container .wpforms-form input:not([type='checkbox']),
+.wpforms-container .wpforms-form textarea {
width: 100%;
margin: auto;
border-radius: 4px !important;
}
-.pirate_forms input:not([type='checkbox']) {
+.wpforms-container .wpforms-form input:not([type='checkbox']) {
display: inline-block;
min-height: 46px;
padding: 9px;
@@ -2409,7 +2409,7 @@ ul.nav > li.current_page_item.current > a:before {
text-align: left;
text-transform: none;
}
-.pirate_forms textarea {
+.wpforms-container .wpforms-form .wpforms-field-textarea {
display: inline-block;
width: 100% !important;
min-height: 250px;
@@ -2420,24 +2420,24 @@ ul.nav > li.current_page_item.current > a:before {
text-align: left;
text-transform: none;
}
-.pirate_forms .custom-button {
+.wpforms-container .wpforms-form .custom-button {
float: right;
margin-right: 15px;
}
-.pirate-forms-g-recaptcha {
+.wpforms-g-recaptcha {
display: none;
}
-.pirate_forms .notification p {
+.wpforms-container .wpforms-form .notification p {
display: inline-block;
margin-bottom: 10px;
padding: 5px 10px;
border-radius: 3px;
color: #fff;
}
-.pirate_forms_error_box {
+.wpforms-form_error_box {
text-align: center;
}
-.pirate_forms_error_box p {
+.wpforms-form_error_box p {
display: inline-block;
margin-bottom: 10px;
padding: 5px 10px;
@@ -2445,7 +2445,7 @@ ul.nav > li.current_page_item.current > a:before {
color: #fff;
background: #e96656;
}
-.pirate_forms_thankyou_wrap p {
+.wpforms-form_thankyou_wrap p {
display: inline-block;
margin-bottom: 10px;
padding: 5px 10px;
@@ -2453,32 +2453,32 @@ ul.nav > li.current_page_item.current > a:before {
color: #fff;
background: #34d293;
}
-.pirate_forms .pirate-forms-submit-button {
+.wpforms-container .wpforms-form .wpforms-submit-button {
float: right;
margin-right: 0;
color: #fff !important;
-webkit-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
}
-.pirate_forms .pirate-forms-submit-button:hover {
+.wpforms-container .wpforms-form .wpforms-submit-button:hover {
color: #fff;
background: #cb4332;
}
-.pirate_forms .contact_checkbox_wrap,
-.pirateform_wrap_classes_spam_wrap {
+.wpforms-form .contact_checkbox_wrap,
+.wpforms-form_wrap_classes_spam_wrap {
text-align: left;
}
-.pirate_forms .contact_checkbox_wrap p {
+.wpforms-form .contact_checkbox_wrap p {
padding-left: 5px;
margin: 0px;
}
-section#contact .pirate_forms .contact_checkbox_wrap p {
+section#contact .wpforms-form .contact_checkbox_wrap p {
color: #ffffff;
}
-.pirate-forms-maps-custom {
+.wpforms-form-maps-custom {
float: left;
}
-.contact-us .pirate-forms-maps-custom,
+.contact-us .wpforms-form-maps-custom,
.contact-us .contact_checkbox_wrap {
color: #ffffff;
}
@@ -6672,7 +6672,7 @@ body.custom-background {
.pirate-forms-g-recaptcha > div {
display: inline-block;
}
- .pirate_forms .pirate-forms-submit-button {
+ .wpforms .pirate-forms-submit-button {
display: inline-block;
text-align: center;
}
diff --git a/template-frontpage.php b/template-frontpage.php
index 303a729..66f767b 100644
--- a/template-frontpage.php
+++ b/template-frontpage.php
@@ -103,9 +103,9 @@
endif;
$contactus_subtitle_default = '';
- if ( ! defined( 'PIRATE_FORMS_VERSION' ) ) {
- /* translators: Pirate Forms plugin install link */
- $contactus_subtitle_default = sprintf( __( 'You need to install %s to create a contact form.', 'zerif-lite' ), sprintf( '%2$s ', esc_url( wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=pirate-forms' ), 'install-plugin_pirate-forms' ) ), 'Pirate Forms' ) );
+ if ( ! defined( 'WPFORMS_VERSION' ) ) {
+ /* translators: WPForms Lite plugin install link */
+ $contactus_subtitle_default = sprintf( __( 'You need to install %s to create a contact form.', 'zerif-lite' ), sprintf( '%2$s ', esc_url( wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=wpforms-lite' ), 'install-plugin_wpforms-lite' ) ), 'WPForms Lite' ) );
}
if ( current_user_can( 'edit_theme_options' ) ) {
@@ -124,10 +124,10 @@
';
- echo do_shortcode( '[pirate_forms]' );
+ echo do_shortcode( '' );
echo '';
endif;
diff --git a/ti-about-page/class-ti-about-page.php b/ti-about-page/class-ti-about-page.php
index 187e296..fcb0fe1 100644
--- a/ti-about-page/class-ti-about-page.php
+++ b/ti-about-page/class-ti-about-page.php
@@ -134,7 +134,7 @@
* 'deactivate_label' => esc_html__( 'Deactivate', 'flymag' ),
* 'content' => array(
* array(
- * 'slug' => 'pirate-forms',
+ * 'slug' => 'wp-forms',
* ),
* array(
* 'link' => 'http://themeisle.com/plugins/easy-content-types/',
@@ -153,13 +153,13 @@
* 'activate_label' => esc_html__( 'Activate', 'flymag' ),
* 'deactivate_label' => esc_html__( 'Deactivate', 'flymag' ),
* 'content' => array(
- * 'pirate-forms' => array(
- * 'title' => __( 'Pirate Forms', 'flymag' ),
- * 'description' => __( 'Makes your contact page more engaging by creating a good-looking contact form on your website. The interaction with your visitors was never easier.', 'flymag' ),
- * 'link_label' => __( 'Install Pirate Forms', 'flymag' ),
- * 'check' => defined( 'PIRATE_FORMS_VERSION' ),
- * 'id' => 'pirate-forms',
- * 'plugin_slug' => 'pirate-forms'
+ * 'wp-forms' => array(
+ * 'title' => __( 'WPForms Lite', 'flymag' ),
+ * 'description' => __( 'WPForms allow you to create beautiful contact forms, subscription forms, payment forms, and other type of forms for your site in minutes, not hours!', 'flymag' ),
+ * 'link_label' => __( 'Install WPForms Lite', 'flymag' ),
+ * 'check' => defined( 'WPFORMS_VERSION' ),
+ * 'id' => 'wpforms-lite',
+ * 'plugin_slug' => 'wpforms-lite'
* ),
* ),
* ),
From 4e3a53f71662ad82e7a6619a0923c967f62f654b Mon Sep 17 00:00:00 2001
From: Radu
Date: Fri, 17 Aug 2018 17:38:25 +0300
Subject: [PATCH 02/16] Adds style on front page for WPForms
---
rtl.css | 12 ++++++++++++
style.css | 40 +++++++++++++++++++++++++++++++++++++---
2 files changed, 49 insertions(+), 3 deletions(-)
diff --git a/rtl.css b/rtl.css
index b83b493..0461b8c 100644
--- a/rtl.css
+++ b/rtl.css
@@ -1680,6 +1680,18 @@ ul.nav > li.current_page_item > a:before {
}
}
+/*---------------------------------------
+ ** WPForms Lite -----
+-----------------------------------------*/
+
+.home div.wpforms-container-full .wpforms-form input[type=text], .home div.wpforms-container-full .wpforms-form input[type=email], .home div.wpforms-container-full .wpforms-form textarea {
+ padding: 9px 15px 9px 9px;
+}
+
+div.wpforms-container-full .wpforms-form .wpforms-submit-container {
+ text-align: left;
+}
+
/*---------------------------------------
** Responsive -----
diff --git a/style.css b/style.css
index 06eb498..bf4cb42 100644
--- a/style.css
+++ b/style.css
@@ -2563,10 +2563,44 @@ section#contact .pirate_forms .contact_checkbox_wrap p {
background-size: 30px 30px;
}
+/****************************************************************/
+/*********************** WPFORMS Lite style ********************/
+/****************************************************************/
-/*---------------------------------------
- ** Section: About us; -----
------------------------------------------*/
+.home div.wpforms-container-full .wpforms-form input[type=text], .home div.wpforms-container-full .wpforms-form input[type=email], .home div.wpforms-container-full .wpforms-form textarea {
+ border-radius: 4px;
+ padding: 9px 9px 9px 15px;
+ font-size: 14px;
+ background-color: rgba(255, 255, 255, 0.95);
+}
+
+div.wpforms-container-full .wpforms-form .wpforms-submit-container {
+ text-align: right;
+}
+
+div.wpforms-container-full .wpforms-form .wpforms-submit-container .wpforms-submit {
+ background-color: #e96656;
+ border-width: 0;
+ border-radius: 4px;
+ color: #fff;
+ font-size: 14px;
+ text-transform: uppercase;
+ padding: 13px 35px 13px 35px;
+}
+
+div.wpforms-container-full .wpforms-form .wpforms-submit-container .wpforms-submit:hover {
+ background-color: #cb4332;
+ border-width: 0;
+ border-radius: 4px;
+ color: #fff;
+ font-size: 14px;
+ text-transform: uppercase;
+ padding: 13px 35px 13px 35px;
+}
+
+ /*---------------------------------------
+ ** Section: About us; -----
+ -----------------------------------------*/
.about-us {
color: #fff;
From 80af0a5d276857fc1dcbbb295a3bcb8a18eddb7c Mon Sep 17 00:00:00 2001
From: Radu
Date: Mon, 20 Aug 2018 11:55:01 +0300
Subject: [PATCH 03/16] Adds WPForms in check_if_plugin_active() and
create_action_link() functions
---
ti-about-page/class-ti-about-page.php | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/ti-about-page/class-ti-about-page.php b/ti-about-page/class-ti-about-page.php
index 8e5138b..97a0863 100644
--- a/ti-about-page/class-ti-about-page.php
+++ b/ti-about-page/class-ti-about-page.php
@@ -483,8 +483,10 @@ public function call_plugin_api( $slug ) {
* Check if plugin is active
*/
public function check_if_plugin_active( $slug ) {
- if ( ( $slug == 'intergeo-maps' ) || ( $slug == 'visualizer' ) ) {
+ if ( ( $slug == 'intergeo-maps' ) || ( $slug == 'visualizer' ) || ( $slug == 'wpforms-lite' ) ) {
$plugin_root_file = 'index';
+ } elseif ( $slug == 'wpforms-lite' ) {
+ $plugin_root_file = 'wpforms';
} elseif ( $slug == 'adblock-notify-by-bweb' ) {
$plugin_root_file = 'adblock-notify';
} else {
@@ -540,10 +542,12 @@ public function get_plugin_icon( $arr ) {
*/
public function create_action_link( $state, $slug ) {
- if ( ( $slug == 'intergeo-maps' ) || ( $slug == 'visualizer' ) ) {
+ if ( ( $slug == 'intergeo-maps' ) || ( $slug == 'visualizer' ) || ( $slug == 'wpforms-lite' ) ) {
$plugin_root_file = 'index';
} elseif ( $slug == 'adblock-notify-by-bweb' ) {
$plugin_root_file = 'adblock-notify';
+ } elseif ( $slug == 'wpforms-lite' ) {
+ $plugin_root_file = 'wpforms';
} else {
$plugin_root_file = $slug;
}
From d72fdd402535ef33863d97335f88a3c07a12aa97 Mon Sep 17 00:00:00 2001
From: Radu
Date: Mon, 20 Aug 2018 12:18:19 +0300
Subject: [PATCH 04/16] Code revision for "WPForms in check_if_plugin_active()
and create_action_link() functions"
---
functions.php | 11 -----------
inc/customizer.php | 2 +-
ti-about-page/class-ti-about-page.php | 4 ++--
3 files changed, 3 insertions(+), 14 deletions(-)
diff --git a/functions.php b/functions.php
index 1caf4a2..0d36b44 100644
--- a/functions.php
+++ b/functions.php
@@ -799,11 +799,6 @@ function zerif_register_required_plugins() {
'slug' => 'pirate-forms',
'required' => false,
),
- array(
- 'name' => 'WPForms Lite',
- 'slug' => 'wpforms-lite',
- 'required' => false,
- ),
array(
'name' => 'Orbit Fox',
'slug' => 'themeisle-companion',
@@ -819,11 +814,6 @@ function zerif_register_required_plugins() {
'slug' => 'pirate-forms',
'required' => false,
),
- array(
- 'name' => 'WPForms Lite',
- 'slug' => 'wpforms-lite',
- 'required' => false,
- ),
array(
'name' => 'Orbit Fox',
'slug' => 'themeisle-companion',
@@ -1883,7 +1873,6 @@ function remove_class_function( $classes ) {
*/
function zerif_lite_update_options_in_pirate_forms() {
- /* if WPForms Lite is installed */
/* if Pirate Forms is installed */
if ( defined( 'PIRATE_FORMS_VERSION' ) ) :
diff --git a/inc/customizer.php b/inc/customizer.php
index 32dbe88..6f4969c 100644
--- a/inc/customizer.php
+++ b/inc/customizer.php
@@ -2201,7 +2201,7 @@ function zerif_blog_header_title_subtitle_callback() {
$zerif_contact_us_section_description = '';
- /* If WPForms Lite is installed */
+ /* If Pirate Forms is installed */
if ( defined( 'PIRATE_FORMS_VERSION' ) ) :
$zerif_contact_us_section_description = __( 'For more advanced settings please go to Settings -> Pirate Forms', 'zerif-lite' );
endif;
diff --git a/ti-about-page/class-ti-about-page.php b/ti-about-page/class-ti-about-page.php
index 97a0863..f12037a 100644
--- a/ti-about-page/class-ti-about-page.php
+++ b/ti-about-page/class-ti-about-page.php
@@ -483,7 +483,7 @@ public function call_plugin_api( $slug ) {
* Check if plugin is active
*/
public function check_if_plugin_active( $slug ) {
- if ( ( $slug == 'intergeo-maps' ) || ( $slug == 'visualizer' ) || ( $slug == 'wpforms-lite' ) ) {
+ if ( ( $slug == 'intergeo-maps' ) || ( $slug == 'visualizer' ) ) {
$plugin_root_file = 'index';
} elseif ( $slug == 'wpforms-lite' ) {
$plugin_root_file = 'wpforms';
@@ -542,7 +542,7 @@ public function get_plugin_icon( $arr ) {
*/
public function create_action_link( $state, $slug ) {
- if ( ( $slug == 'intergeo-maps' ) || ( $slug == 'visualizer' ) || ( $slug == 'wpforms-lite' ) ) {
+ if ( ( $slug == 'intergeo-maps' ) || ( $slug == 'visualizer' ) ) {
$plugin_root_file = 'index';
} elseif ( $slug == 'adblock-notify-by-bweb' ) {
$plugin_root_file = 'adblock-notify';
From 981a3e2f4e3effc98f1f400e50371b21b42c4b88 Mon Sep 17 00:00:00 2001
From: Radu
Date: Mon, 20 Aug 2018 12:19:48 +0300
Subject: [PATCH 05/16] Adds WPFORMS_SHAREASALE_ID
---
functions.php | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/functions.php b/functions.php
index 0d36b44..71ed5f8 100644
--- a/functions.php
+++ b/functions.php
@@ -9,6 +9,11 @@
if ( is_readable( $vendor_file ) ) {
require_once $vendor_file;
}
+
+if ( ! defined( 'WPFORMS_SHAREASALE_ID' ) ) {
+ define( 'WPFORMS_SHAREASALE_ID', '848264' );
+}
+
add_filter( 'themeisle_sdk_products', 'zerif_load_sdk' );
/**
* Loads products array.
From c18a0bd73b295b7027264608d7e0e94d981377b2 Mon Sep 17 00:00:00 2001
From: Radu
Date: Mon, 20 Aug 2018 15:38:12 +0300
Subject: [PATCH 06/16] Remove notice for Fagri
---
functions.php | 35 -----------------------------------
1 file changed, 35 deletions(-)
diff --git a/functions.php b/functions.php
index 71ed5f8..e558064 100644
--- a/functions.php
+++ b/functions.php
@@ -2103,38 +2103,3 @@ function megamenu_add_theme_zerif_lite_max_menu( $themes ) {
return $themes;
}
add_filter( 'megamenu_themes', 'megamenu_add_theme_zerif_lite_max_menu' );
-
-
-add_action( 'admin_notices', 'zerif_fagri_notice' );
-/**
- * Add a dismissible notice in the dashboard to let users know that we have a new child theme for Hestia, Fagri
- * TODO: Remove this in a future release
- */
-function zerif_fagri_notice() {
- global $current_user;
- $user_id = $current_user->ID;
- /* Check that the user hasn't already clicked to ignore the message */
- if ( ! get_user_meta( $user_id, 'zerif_ignore_fagri_notice' ) ) {
- echo '';
- printf( '
', '?zerif_nag_ignore_fagri=0' );
- echo '
';
- /* translators: Install Fagri link */
- printf( esc_html__( 'We just launched a new free %s, you might like it.', 'zerif-lite' ), sprintf( '%2$s ', admin_url( 'theme-install.php?theme=fagri' ), esc_html__( 'theme', 'zerif-lite' ) ) );
- echo '
';
- echo '
';
- }
-}
-
-add_action( 'admin_init', 'zerif_nag_ignore_fagri' );
-
-/**
- * Update the zerif_ignore_fagri_notice option to true, to dismiss the notice from the dashboard
- */
-function zerif_nag_ignore_fagri() {
- global $current_user;
- $user_id = $current_user->ID;
- /* If user clicks to ignore the notice, add that to their user meta */
- if ( isset( $_GET['zerif_nag_ignore_fagri'] ) && '0' == $_GET['zerif_nag_ignore_fagri'] ) {
- add_user_meta( $user_id, 'zerif_ignore_fagri_notice', 'true', true );
- }
-}
From dfc2e64e4666d78db1b08ffb99f1f3bc2aa3d008 Mon Sep 17 00:00:00 2001
From: Radu
Date: Tue, 21 Aug 2018 12:46:54 +0300
Subject: [PATCH 07/16] Adds Hestia notice until 1 nov
---
functions.php | 45 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/functions.php b/functions.php
index e558064..d03accb 100644
--- a/functions.php
+++ b/functions.php
@@ -5,6 +5,8 @@
* @package zerif-lite
*/
+
+
$vendor_file = trailingslashit( get_template_directory() ) . 'vendor/autoload.php';
if ( is_readable( $vendor_file ) ) {
require_once $vendor_file;
@@ -2103,3 +2105,46 @@ function megamenu_add_theme_zerif_lite_max_menu( $themes ) {
return $themes;
}
add_filter( 'megamenu_themes', 'megamenu_add_theme_zerif_lite_max_menu' );
+
+
+
+/**
+ * Add a dismissible notice in the dashboard to let users know they can migrate to Hestia
+ * Displays until 1st November 2018
+ */
+
+add_action( 'admin_notices', 'zerif_hestia_notice' );
+
+function zerif_hestia_notice() {
+ $countdown_time = strtotime('2018-11-01');
+ $current_time = time();
+
+ global $current_user;
+ $user_id = $current_user->ID;
+ /* Check that the user hasn't already clicked to ignore the message */
+ if ( $current_time <= $countdown_time ) {
+ if ( ! get_user_meta( $user_id, 'zerif_ignore_hestia_notice' ) ) {
+ echo '';
+ printf( '
', '?zerif_nag_ignore_hestia=0' );
+ echo '
';
+ /* translators: Install Fagri link */
+ printf( esc_html__( 'Check out our %s, fully compatible with your current Zerif Lite theme. You will love it!', 'zerif-lite' ), sprintf( '%2$s ', admin_url( 'theme-install.php?theme=hestia' ), esc_html__( 'best 2018 free theme', 'zerif-lite' ) ) );
+ echo '
';
+ echo '
';
+ }
+ }
+}
+
+/**
+ * Update the zerif_ignore_hestia_notice option to true, to dismiss the notice from the dashboard
+ */
+add_action( 'admin_init', 'zerif_nag_ignore_hestia' );
+
+function zerif_nag_ignore_hestia() {
+ global $current_user;
+ $user_id = $current_user->ID;
+ /* If user clicks to ignore the notice, add that to their user meta */
+ if ( isset( $_GET['zerif_nag_ignore_hestia'] ) && '0' == $_GET['zerif_nag_ignore_hestia'] ) {
+ add_user_meta( $user_id, 'zerif_ignore_hestia_notice', 'true', true );
+ }
+}
\ No newline at end of file
From 0e01d0c40b1bbd3a5474d69d1c039a1e73bee8e9 Mon Sep 17 00:00:00 2001
From: Radu
Date: Tue, 21 Aug 2018 14:25:09 +0300
Subject: [PATCH 08/16] Add Neve notive + conditionan display of notices
---
functions.php | 62 +++++++++++++++++++++++++++++++++++++++++++--------
1 file changed, 53 insertions(+), 9 deletions(-)
diff --git a/functions.php b/functions.php
index d03accb..03a1e65 100644
--- a/functions.php
+++ b/functions.php
@@ -2107,32 +2107,39 @@ function megamenu_add_theme_zerif_lite_max_menu( $themes ) {
add_filter( 'megamenu_themes', 'megamenu_add_theme_zerif_lite_max_menu' );
+/**
+ * Displays Hestia notice until 1st November '18
+ * Displays Zelle notice after 1st November '18
+ */
+
+function zerif_renaming_notice() {
+ $countdown_time = strtotime('2018-11-01');
+ $current_time = time();
+ if ( $current_time <= $countdown_time ) {
+ add_action( 'admin_notices', 'zerif_hestia_notice' );
+ } else {
+ add_action( 'admin_notices', 'zerif_neve_notice' );
+ }
+}
+
/**
* Add a dismissible notice in the dashboard to let users know they can migrate to Hestia
- * Displays until 1st November 2018
*/
-add_action( 'admin_notices', 'zerif_hestia_notice' );
-
function zerif_hestia_notice() {
- $countdown_time = strtotime('2018-11-01');
- $current_time = time();
-
global $current_user;
$user_id = $current_user->ID;
/* Check that the user hasn't already clicked to ignore the message */
- if ( $current_time <= $countdown_time ) {
if ( ! get_user_meta( $user_id, 'zerif_ignore_hestia_notice' ) ) {
echo '';
printf( '
', '?zerif_nag_ignore_hestia=0' );
echo '
';
- /* translators: Install Fagri link */
+ /* translators: Install Hestia link */
printf( esc_html__( 'Check out our %s, fully compatible with your current Zerif Lite theme. You will love it!', 'zerif-lite' ), sprintf( '%2$s ', admin_url( 'theme-install.php?theme=hestia' ), esc_html__( 'best 2018 free theme', 'zerif-lite' ) ) );
echo '
';
echo '
';
}
- }
}
/**
@@ -2147,4 +2154,41 @@ function zerif_nag_ignore_hestia() {
if ( isset( $_GET['zerif_nag_ignore_hestia'] ) && '0' == $_GET['zerif_nag_ignore_hestia'] ) {
add_user_meta( $user_id, 'zerif_ignore_hestia_notice', 'true', true );
}
+}
+
+/**
+ * Add a dismissible notice in the dashboard to let users know they can migrate to Zelle and read about Zerif renaming
+ */
+
+function zerif_neve_notice() {
+ global $current_user;
+ $user_id = $current_user->ID;
+ /* Check that the user hasn't already clicked to ignore the message */
+ if ( ! get_user_meta( $user_id, 'zerif_ignore_neve_notice' ) ) {
+ echo '';
+ printf( '
', '?zerif_nag_ignore_neve=0' );
+ echo '
';
+ /* translators: Install Neve link */
+ printf( esc_html__( 'Zerif Lite changes its name and is no longer maintained. But don\'t worry about that. Check out %s, fully compatible with Zerif Lite. It\'s free and it\'s superb. You will love it!', 'zerif-lite' ), sprintf( '%2$s ', admin_url( 'theme-install.php?theme=neve' ), esc_html__( 'our newest theme', 'zerif-lite' ) ) );
+ echo '
';
+ echo '
';
+ /* translators: Zerif renaming article link */
+ printf( esc_html__( '%s about the Zerif renaming and our next plans.', 'zerif-lite' ), sprintf( '%2$s ', esc_url( 'https://themeisle.com/blog/zerif-changes-its-name-to-zelle/' ), esc_html__( 'Read more', 'zerif-lite' ) ) );
+ echo '
';
+ echo '
';
+ }
+}
+
+/**
+ * Update the zerif_ignore_hestia_notice option to true, to dismiss the notice from the dashboard
+ */
+add_action( 'admin_init', 'zerif_nag_ignore_neve' );
+
+function zerif_nag_ignore_neve() {
+ global $current_user;
+ $user_id = $current_user->ID;
+ /* If user clicks to ignore the notice, add that to their user meta */
+ if ( isset( $_GET['zerif_nag_ignore_neve'] ) && '0' == $_GET['zerif_nag_ignore_neve'] ) {
+ add_user_meta( $user_id, 'zerif_ignore_neve_notice', 'true', true );
+ }
}
\ No newline at end of file
From 94fcc38cee85aeb7bddb34472a35fa9a6854f52b Mon Sep 17 00:00:00 2001
From: Radu
Date: Tue, 21 Aug 2018 15:59:56 +0300
Subject: [PATCH 09/16] #679 Display certain notice before & after 1 nov
---
functions.php | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/functions.php b/functions.php
index 03a1e65..618a59e 100644
--- a/functions.php
+++ b/functions.php
@@ -2112,7 +2112,6 @@ function megamenu_add_theme_zerif_lite_max_menu( $themes ) {
* Displays Zelle notice after 1st November '18
*/
-function zerif_renaming_notice() {
$countdown_time = strtotime('2018-11-01');
$current_time = time();
if ( $current_time <= $countdown_time ) {
@@ -2120,7 +2119,7 @@ function zerif_renaming_notice() {
} else {
add_action( 'admin_notices', 'zerif_neve_notice' );
}
-}
+
/**
From 7f7e26247adbc5fa267d3eecd5448bfd9a9df542 Mon Sep 17 00:00:00 2001
From: Radu
Date: Tue, 21 Aug 2018 18:02:18 +0300
Subject: [PATCH 10/16] Run grunt local
---
comments.php | 4 +-
content-archive-download.php | 6 +-
content-frontpage.php | 4 +-
content-large.php | 8 +-
content-page-no-title.php | 2 +-
content-page.php | 2 +-
content-single.php | 4 +-
functions.php | 40 ++---
header.php | 8 +-
home.php | 6 +-
.../sections/actions-required.php | 10 +-
.../welcome-screen/sections/changelog.php | 2 +-
.../sections/getting-started.php | 76 ++++----
.../class-customizer-theme-info-control.php | 2 +-
.../class-zerif-customize-upsell-section.php | 2 +-
.../class-zerif-customize-upsell-features.php | 2 +-
.../class-zerif-customize-upsell-pro.php | 2 +-
inc/customizer.php | 2 +-
page.php | 2 +-
search.php | 4 +-
sections/about_us.php | 170 +++++++++---------
sidebar.php | 2 +-
single.php | 2 +-
.../ti-customizer-notify-section.php | 4 +-
24 files changed, 181 insertions(+), 185 deletions(-)
diff --git a/comments.php b/comments.php
index 5a1cf62..30f0af2 100644
--- a/comments.php
+++ b/comments.php
@@ -93,7 +93,7 @@
// If comments are closed and there are comments, let's leave a little note, shall we?
if ( ! comments_open() && '0' != get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
- ?>
+ ?>
@@ -104,6 +104,6 @@
'comment_notes_after' => '',
)
);
-?>
+ ?>
diff --git a/content-archive-download.php b/content-archive-download.php
index e3816ba..fefa583 100644
--- a/content-archive-download.php
+++ b/content-archive-download.php
@@ -6,10 +6,10 @@
*/
?>
-
+
diff --git a/content-frontpage.php b/content-frontpage.php
index 912d0d4..163dcd6 100644
--- a/content-frontpage.php
+++ b/content-frontpage.php
@@ -84,7 +84,7 @@
if ( ( isset( $zerif_contactus_show ) && $zerif_contactus_show != 1 ) || is_customize_preview() ) :
echo '
diff --git a/content-single.php b/content-single.php
index e1d5afd..17f6ecc 100644
--- a/content-single.php
+++ b/content-single.php
@@ -30,7 +30,7 @@
'after' => '
',
)
);
- ?>
+ ?>
@@ -80,7 +80,7 @@
esc_url( get_permalink() )
);
- ?>
+ ?>
', '' ); ?>
diff --git a/functions.php b/functions.php
index 618a59e..e327f36 100644
--- a/functions.php
+++ b/functions.php
@@ -2112,40 +2112,38 @@ function megamenu_add_theme_zerif_lite_max_menu( $themes ) {
* Displays Zelle notice after 1st November '18
*/
- $countdown_time = strtotime('2018-11-01');
+ $countdown_time = strtotime( '2018-11-01' );
$current_time = time();
- if ( $current_time <= $countdown_time ) {
- add_action( 'admin_notices', 'zerif_hestia_notice' );
- } else {
- add_action( 'admin_notices', 'zerif_neve_notice' );
- }
+if ( $current_time <= $countdown_time ) {
+ add_action( 'admin_notices', 'zerif_hestia_notice' );
+} else {
+ add_action( 'admin_notices', 'zerif_neve_notice' );
+}
/**
* Add a dismissible notice in the dashboard to let users know they can migrate to Hestia
*/
-
function zerif_hestia_notice() {
global $current_user;
$user_id = $current_user->ID;
/* Check that the user hasn't already clicked to ignore the message */
- if ( ! get_user_meta( $user_id, 'zerif_ignore_hestia_notice' ) ) {
- echo '';
- printf( '
', '?zerif_nag_ignore_hestia=0' );
- echo '
';
- /* translators: Install Hestia link */
- printf( esc_html__( 'Check out our %s, fully compatible with your current Zerif Lite theme. You will love it!', 'zerif-lite' ), sprintf( '%2$s ', admin_url( 'theme-install.php?theme=hestia' ), esc_html__( 'best 2018 free theme', 'zerif-lite' ) ) );
- echo '
';
- echo '
';
- }
+ if ( ! get_user_meta( $user_id, 'zerif_ignore_hestia_notice' ) ) {
+ echo '';
+ printf( '
', '?zerif_nag_ignore_hestia=0' );
+ echo '
';
+ /* translators: Install Hestia link */
+ printf( esc_html__( 'Check out our %s, fully compatible with your current Zerif Lite theme. You will love it!', 'zerif-lite' ), sprintf( '%2$s ', admin_url( 'theme-install.php?theme=hestia' ), esc_html__( 'best 2018 free theme', 'zerif-lite' ) ) );
+ echo '
';
+ echo '
';
+ }
}
+add_action( 'admin_init', 'zerif_nag_ignore_hestia' );
/**
* Update the zerif_ignore_hestia_notice option to true, to dismiss the notice from the dashboard
*/
-add_action( 'admin_init', 'zerif_nag_ignore_hestia' );
-
function zerif_nag_ignore_hestia() {
global $current_user;
$user_id = $current_user->ID;
@@ -2158,7 +2156,6 @@ function zerif_nag_ignore_hestia() {
/**
* Add a dismissible notice in the dashboard to let users know they can migrate to Zelle and read about Zerif renaming
*/
-
function zerif_neve_notice() {
global $current_user;
$user_id = $current_user->ID;
@@ -2178,11 +2175,10 @@ function zerif_neve_notice() {
}
}
+add_action( 'admin_init', 'zerif_nag_ignore_neve' );
/**
* Update the zerif_ignore_hestia_notice option to true, to dismiss the notice from the dashboard
*/
-add_action( 'admin_init', 'zerif_nag_ignore_neve' );
-
function zerif_nag_ignore_neve() {
global $current_user;
$user_id = $current_user->ID;
@@ -2190,4 +2186,4 @@ function zerif_nag_ignore_neve() {
if ( isset( $_GET['zerif_nag_ignore_neve'] ) && '0' == $_GET['zerif_nag_ignore_neve'] ) {
add_user_meta( $user_id, 'zerif_ignore_neve_notice', 'true', true );
}
-}
\ No newline at end of file
+}
diff --git a/header.php b/header.php
index a511f74..abdb1f7 100644
--- a/header.php
+++ b/header.php
@@ -30,7 +30,7 @@
>
-
+?>
@@ -90,7 +90,7 @@
} else {
- ?>
+ ?>
-
diff --git a/inc/admin/welcome-screen/sections/actions-required.php b/inc/admin/welcome-screen/sections/actions-required.php
index ecd046e..8e8b784 100644
--- a/inc/admin/welcome-screen/sections/actions-required.php
+++ b/inc/admin/welcome-screen/sections/actions-required.php
@@ -11,7 +11,7 @@
-
+
+ ?>
+ ?>
+ ?>
-
+
Zerif Lite
+ ?>
diff --git a/inc/admin/welcome-screen/sections/getting-started.php b/inc/admin/welcome-screen/sections/getting-started.php
index ae00c36..e24ee10 100644
--- a/inc/admin/welcome-screen/sections/getting-started.php
+++ b/inc/admin/welcome-screen/sections/getting-started.php
@@ -15,7 +15,7 @@
Welcome to Zerif Lite!
+ ?>
@@ -23,7 +23,7 @@
-
+
@@ -35,7 +35,7 @@
-
+
@@ -49,37 +49,37 @@
-
+
-
+
-
+
-
+
-
+
-
+
@@ -93,37 +93,37 @@
-
+
-
+
-
+
-
+
-
+
-
+
@@ -143,7 +143,7 @@
-
+
@@ -161,16 +161,16 @@
+ ?>
+?>
-
+
@@ -182,16 +182,16 @@
+ ?>
+?>
-
+
@@ -203,15 +203,15 @@
+ ?>
+?>
-
+
Adblock Notify
@@ -222,13 +222,13 @@
+ ?>
Adblock Notify
+?>
@@ -244,15 +244,15 @@
+ ?>
+?>
-
+
@@ -264,15 +264,15 @@
+ ?>
+?>
-
+
@@ -284,15 +284,15 @@
+ ?>
+?>
-
+
FEEDZY RSS Feeds
@@ -303,13 +303,13 @@
+ ?>
FEEDZY RSS Feeds
+?>
diff --git a/inc/class/class-customizer-theme-info-control/class-customizer-theme-info-control.php b/inc/class/class-customizer-theme-info-control/class-customizer-theme-info-control.php
index 4c4e434..32b025c 100644
--- a/inc/class/class-customizer-theme-info-control/class-customizer-theme-info-control.php
+++ b/inc/class/class-customizer-theme-info-control/class-customizer-theme-info-control.php
@@ -108,7 +108,7 @@ public function content_template() {
<# } #>
-
<# } #>
-
+ ?>
diff --git a/inc/customizer-info/class/class-zerif-customize-upsell-pro.php b/inc/customizer-info/class/class-zerif-customize-upsell-pro.php
index 3b3d3f1..a6161f8 100644
--- a/inc/customizer-info/class/class-zerif-customize-upsell-pro.php
+++ b/inc/customizer-info/class/class-zerif-customize-upsell-pro.php
@@ -65,7 +65,7 @@ public function json() {
* @return void
*/
protected function render_template() {
- ?>
+ ?>
diff --git a/inc/customizer.php b/inc/customizer.php
index 6f4969c..b39b067 100644
--- a/inc/customizer.php
+++ b/inc/customizer.php
@@ -563,7 +563,7 @@ function zerif_contactus_title_render_callback() {
* Render callback for zerif_contactus_button_label
*/
function zerif_contactus_button_label_render_callback() {
- ?>
+ ?>
diff --git a/page.php b/page.php
index cc19c92..22726a3 100644
--- a/page.php
+++ b/page.php
@@ -62,7 +62,7 @@
zerif_after_page_content_trigger();
zerif_sidebar_trigger();
}
- ?>
+ ?>
diff --git a/search.php b/search.php
index 26d10f6..dc4db70 100644
--- a/search.php
+++ b/search.php
@@ -28,7 +28,7 @@
' . get_search_query() . '' );
- ?>
+ ?>
@@ -55,7 +55,7 @@
}
zerif_after_search_trigger();
- ?>
+?>
diff --git a/sections/about_us.php b/sections/about_us.php
index 335acdc..38926f9 100644
--- a/sections/about_us.php
+++ b/sections/about_us.php
@@ -158,145 +158,145 @@
if ( $there_is_skills != '' ) :
-?>
+ ?>
-';
+ echo '';
- if ( ! empty( $zerif_aboutus_feature1_nr ) ) {
+ if ( ! empty( $zerif_aboutus_feature1_nr ) ) {
- echo '';
- }
+ }
- if ( ! empty( $zerif_aboutus_feature1_title ) ) {
- echo '' . wp_kses_post( $zerif_aboutus_feature1_title ) . '
';
- } elseif ( is_customize_preview() ) {
- echo '
';
- }
+ if ( ! empty( $zerif_aboutus_feature1_title ) ) {
+ echo '' . wp_kses_post( $zerif_aboutus_feature1_title ) . '
';
+ } elseif ( is_customize_preview() ) {
+ echo '
';
+ }
- if ( ! empty( $zerif_aboutus_feature1_text ) ) {
- echo '' . wp_kses_post( $zerif_aboutus_feature1_text ) . '
';
- } elseif ( is_customize_preview() ) {
- echo '
';
- }
+ if ( ! empty( $zerif_aboutus_feature1_text ) ) {
+ echo '' . wp_kses_post( $zerif_aboutus_feature1_text ) . '
';
+ } elseif ( is_customize_preview() ) {
+ echo '
';
+ }
- echo ' ';
+ echo '';
-}
-?>
+ }
+ ?>
-';
+ echo '';
- if ( ! empty( $zerif_aboutus_feature2_nr ) ) {
+ if ( ! empty( $zerif_aboutus_feature2_nr ) ) {
- echo '';
- }
+ }
- if ( ! empty( $zerif_aboutus_feature2_title ) ) {
- echo '' . wp_kses_post( $zerif_aboutus_feature2_title ) . '
';
- } elseif ( is_customize_preview() ) {
- echo '
';
- }
+ if ( ! empty( $zerif_aboutus_feature2_title ) ) {
+ echo '' . wp_kses_post( $zerif_aboutus_feature2_title ) . '
';
+ } elseif ( is_customize_preview() ) {
+ echo '
';
+ }
- if ( ! empty( $zerif_aboutus_feature2_text ) ) {
- echo '' . wp_kses_post( $zerif_aboutus_feature2_text ) . '
';
- } elseif ( is_customize_preview() ) {
- echo '
';
- }
+ if ( ! empty( $zerif_aboutus_feature2_text ) ) {
+ echo '' . wp_kses_post( $zerif_aboutus_feature2_text ) . '
';
+ } elseif ( is_customize_preview() ) {
+ echo '
';
+ }
- echo ' ';
+ echo '';
-}
-?>
+ }
+ ?>
-';
+ ';
- if ( ! empty( $zerif_aboutus_feature3_nr ) ) {
+ if ( ! empty( $zerif_aboutus_feature3_nr ) ) {
- echo '';
- }
+ }
- if ( ! empty( $zerif_aboutus_feature3_title ) ) {
- echo '' . wp_kses_post( $zerif_aboutus_feature3_title ) . '
';
- } elseif ( is_customize_preview() ) {
- echo '
';
- }
+ if ( ! empty( $zerif_aboutus_feature3_title ) ) {
+ echo '' . wp_kses_post( $zerif_aboutus_feature3_title ) . '
';
+ } elseif ( is_customize_preview() ) {
+ echo '
';
+ }
- if ( ! empty( $zerif_aboutus_feature3_text ) ) {
- echo '' . wp_kses_post( $zerif_aboutus_feature3_text ) . '
';
- } elseif ( is_customize_preview() ) {
- echo '
';
- }
+ if ( ! empty( $zerif_aboutus_feature3_text ) ) {
+ echo '' . wp_kses_post( $zerif_aboutus_feature3_text ) . '
';
+ } elseif ( is_customize_preview() ) {
+ echo '
';
+ }
- echo '';
+ echo '';
-}
+ }
-?>
+ ?>
-';
+ ';
- if ( ! empty( $zerif_aboutus_feature4_nr ) ) {
+ if ( ! empty( $zerif_aboutus_feature4_nr ) ) {
- echo '';
- }
+ }
- if ( ! empty( $zerif_aboutus_feature4_title ) ) {
- echo '' . wp_kses_post( $zerif_aboutus_feature4_title ) . '
';
- } elseif ( is_customize_preview() ) {
- echo '
';
- }
+ if ( ! empty( $zerif_aboutus_feature4_title ) ) {
+ echo '' . wp_kses_post( $zerif_aboutus_feature4_title ) . '
';
+ } elseif ( is_customize_preview() ) {
+ echo '
';
+ }
- if ( ! empty( $zerif_aboutus_feature4_text ) ) {
- echo '' . wp_kses_post( $zerif_aboutus_feature4_text ) . '
';
- } elseif ( is_customize_preview() ) {
- echo '
';
- }
+ if ( ! empty( $zerif_aboutus_feature4_text ) ) {
+ echo '' . wp_kses_post( $zerif_aboutus_feature4_text ) . '
';
+ } elseif ( is_customize_preview() ) {
+ echo '
';
+ }
echo '';
-}
+ }
-?>
+ ?>
@@ -330,7 +330,7 @@
echo '
';
dynamic_sidebar( 'sidebar-aboutus' );
echo '
';
- echo '
';
+ echo '';
endif;
?>
diff --git a/sidebar.php b/sidebar.php
index 1e405e5..7d36cec 100644
--- a/sidebar.php
+++ b/sidebar.php
@@ -30,7 +30,7 @@
'type' => 'monthly',
)
);
-?>
+ ?>
diff --git a/single.php b/single.php
index 29ab612..8667861 100644
--- a/single.php
+++ b/single.php
@@ -37,7 +37,7 @@
comments_template( '' );
endif;
endwhile; // end of the loop.
- ?>
+ ?>
diff --git a/ti-customizer-notify/ti-customizer-notify-section.php b/ti-customizer-notify/ti-customizer-notify-section.php
index b277ee6..6a47972 100644
--- a/ti-customizer-notify/ti-customizer-notify-section.php
+++ b/ti-customizer-notify/ti-customizer-notify-section.php
@@ -271,7 +271,7 @@ public function json() {
* Outputs the structure for the customizer control
*/
protected function render_template() {
- ?>
+ ?>
<# if( data.recommended_actions.length > 0 || data.recommended_plugins.length > 0 ){ #>
@@ -349,6 +349,6 @@ class="{{ data.recommended_plugins[action].button_class }}"
<# } #>
-
Date: Mon, 27 Aug 2018 17:49:42 +0300
Subject: [PATCH 11/16] add target blank for themeisle article
---
functions.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/functions.php b/functions.php
index e327f36..52d5f34 100644
--- a/functions.php
+++ b/functions.php
@@ -2169,7 +2169,7 @@ function zerif_neve_notice() {
echo '
';
echo '';
/* translators: Zerif renaming article link */
- printf( esc_html__( '%s about the Zerif renaming and our next plans.', 'zerif-lite' ), sprintf( '%2$s ', esc_url( 'https://themeisle.com/blog/zerif-changes-its-name-to-zelle/' ), esc_html__( 'Read more', 'zerif-lite' ) ) );
+ printf( esc_html__( '%s about the Zerif renaming and our next plans.', 'zerif-lite' ), sprintf( '%2$s ', esc_url( 'https://themeisle.com/blog/zerif-changes-its-name-to-zelle/' ), esc_html__( 'Read more', 'zerif-lite' ) ) );
echo '
';
echo '';
}
From fa181d63837986143dbdc976a33d4f473ddbaa08 Mon Sep 17 00:00:00 2001
From: cristian-ungureanu
Date: Tue, 28 Aug 2018 13:25:33 +0300
Subject: [PATCH 12/16] fix for admin notices
---
functions.php | 107 ++++++++++++++++++++++++++++++++++----------------
1 file changed, 73 insertions(+), 34 deletions(-)
diff --git a/functions.php b/functions.php
index 52d5f34..39fd4ca 100644
--- a/functions.php
+++ b/functions.php
@@ -2108,39 +2108,51 @@ function megamenu_add_theme_zerif_lite_max_menu( $themes ) {
/**
- * Displays Hestia notice until 1st November '18
- * Displays Zelle notice after 1st November '18
+ * Function that decide if current date is before a certain date.
+ * @param string $date Date to compare.
+ * @return bool
*/
-
- $countdown_time = strtotime( '2018-11-01' );
+function zerif_is_before_date( $date ){
+ $countdown_time = strtotime( $date );
$current_time = time();
-if ( $current_time <= $countdown_time ) {
- add_action( 'admin_notices', 'zerif_hestia_notice' );
-} else {
- add_action( 'admin_notices', 'zerif_neve_notice' );
+ return $current_time <= $countdown_time;
}
-
-
/**
* Add a dismissible notice in the dashboard to let users know they can migrate to Hestia
*/
function zerif_hestia_notice() {
global $current_user;
$user_id = $current_user->ID;
- /* Check that the user hasn't already clicked to ignore the message */
- if ( ! get_user_meta( $user_id, 'zerif_ignore_hestia_notice' ) ) {
- echo '';
- printf( '
', '?zerif_nag_ignore_hestia=0' );
- echo '
';
- /* translators: Install Hestia link */
- printf( esc_html__( 'Check out our %s, fully compatible with your current Zerif Lite theme. You will love it!', 'zerif-lite' ), sprintf( '%2$s ', admin_url( 'theme-install.php?theme=hestia' ), esc_html__( 'best 2018 free theme', 'zerif-lite' ) ) );
- echo '
';
- echo '
';
+
+ $ignored_notice = get_user_meta( $user_id, 'zerif_ignore_hestia_notice' );
+ if( !empty( $ignored_notice ) ){
+ return;
+ }
+
+ $should_display_notice = zerif_is_before_date('2018-11-01');
+ if( ! $should_display_notice ){
+ return;
}
+
+ $message =
+ /* translators: Install Hestia link */
+ sprintf( esc_html__( 'Check out our %s, fully compatible with your current Zerif Lite theme. You will love it!', 'zerif-lite' ),
+ sprintf( '%2$s ',
+ admin_url( 'theme-install.php?theme=hestia' ),
+ esc_html__( 'best 2018 free theme', 'zerif-lite' )
+ )
+ );
+
+ $dismiss_button = sprintf( ' ',
+ '?zerif_nag_ignore_hestia=0'
+ );
+
+ printf( '', $dismiss_button, $message );
}
+add_action( 'admin_notices', 'zerif_hestia_notice' );
+
-add_action( 'admin_init', 'zerif_nag_ignore_hestia' );
/**
* Update the zerif_ignore_hestia_notice option to true, to dismiss the notice from the dashboard
*/
@@ -2152,6 +2164,7 @@ function zerif_nag_ignore_hestia() {
add_user_meta( $user_id, 'zerif_ignore_hestia_notice', 'true', true );
}
}
+add_action( 'admin_init', 'zerif_nag_ignore_hestia' );
/**
* Add a dismissible notice in the dashboard to let users know they can migrate to Zelle and read about Zerif renaming
@@ -2159,23 +2172,48 @@ function zerif_nag_ignore_hestia() {
function zerif_neve_notice() {
global $current_user;
$user_id = $current_user->ID;
- /* Check that the user hasn't already clicked to ignore the message */
- if ( ! get_user_meta( $user_id, 'zerif_ignore_neve_notice' ) ) {
- echo '';
- printf( '
', '?zerif_nag_ignore_neve=0' );
- echo '
';
- /* translators: Install Neve link */
- printf( esc_html__( 'Zerif Lite changes its name and is no longer maintained. But don\'t worry about that. Check out %s, fully compatible with Zerif Lite. It\'s free and it\'s superb. You will love it!', 'zerif-lite' ), sprintf( '%2$s ', admin_url( 'theme-install.php?theme=neve' ), esc_html__( 'our newest theme', 'zerif-lite' ) ) );
- echo '
';
- echo '
';
- /* translators: Zerif renaming article link */
- printf( esc_html__( '%s about the Zerif renaming and our next plans.', 'zerif-lite' ), sprintf( '%2$s ', esc_url( 'https://themeisle.com/blog/zerif-changes-its-name-to-zelle/' ), esc_html__( 'Read more', 'zerif-lite' ) ) );
- echo '
';
- echo '
';
+
+ $ignored_notice = get_user_meta( $user_id, 'zerif_ignore_neve_notice' );
+ if( !empty( $ignored_notice ) ){
+ return;
}
+
+ $should_display_notice = ! zerif_is_before_date('2018-11-01');
+ if( ! $should_display_notice ){
+ return;
+ }
+
+ $dismiss_button =
+ sprintf( ' ',
+ '?zerif_nag_ignore_neve=0'
+ );
+
+ $message1 =
+ sprintf( esc_html__( 'Zerif changes its name and will be no longer maintained. But don\'t worry about that. Check out %s, fully compatible with Zerif Lite. It\'s free and it\'s superb. You will love it!', 'zerif-lite' ),
+ /* translators: Install Neve link */
+ sprintf( '%2$s ',
+ esc_url( 'https://themeisle.com/themes/neve/?notice=1' ),
+ esc_html__( 'our newest theme', 'zerif-lite' )
+ )
+ );
+
+ $message2 =
+ sprintf( esc_html__( '%s about the Zerif renaming and our next plans.', 'zerif-lite' ),
+ /* translators: Zerif renaming article link */
+ sprintf( '%2$s ',
+ esc_url( 'https://themeisle.com/blog/zerif-changes-its-name-to-zelle/' ),
+ esc_html__( 'Read more', 'zerif-lite' )
+ )
+ );
+
+ printf( '',
+ $dismiss_button,
+ $message1,
+ $message2
+ );
}
+add_action( 'admin_notices', 'zerif_neve_notice' );
-add_action( 'admin_init', 'zerif_nag_ignore_neve' );
/**
* Update the zerif_ignore_hestia_notice option to true, to dismiss the notice from the dashboard
*/
@@ -2187,3 +2225,4 @@ function zerif_nag_ignore_neve() {
add_user_meta( $user_id, 'zerif_ignore_neve_notice', 'true', true );
}
}
+add_action( 'admin_init', 'zerif_nag_ignore_neve' );
From 6e1e8888a4f19c5ab061c06644690e03198e4445 Mon Sep 17 00:00:00 2001
From: cristian-ungureanu
Date: Tue, 28 Aug 2018 14:08:58 +0300
Subject: [PATCH 13/16] run grunt local
---
functions.php | 44 +++++++++++++++++++++++++++-----------------
1 file changed, 27 insertions(+), 17 deletions(-)
diff --git a/functions.php b/functions.php
index 39fd4ca..ad15c66 100644
--- a/functions.php
+++ b/functions.php
@@ -2109,10 +2109,11 @@ function megamenu_add_theme_zerif_lite_max_menu( $themes ) {
/**
* Function that decide if current date is before a certain date.
+ *
* @param string $date Date to compare.
* @return bool
*/
-function zerif_is_before_date( $date ){
+function zerif_is_before_date( $date ) {
$countdown_time = strtotime( $date );
$current_time = time();
return $current_time <= $countdown_time;
@@ -2126,25 +2127,28 @@ function zerif_hestia_notice() {
$user_id = $current_user->ID;
$ignored_notice = get_user_meta( $user_id, 'zerif_ignore_hestia_notice' );
- if( !empty( $ignored_notice ) ){
+ if ( ! empty( $ignored_notice ) ) {
return;
}
- $should_display_notice = zerif_is_before_date('2018-11-01');
- if( ! $should_display_notice ){
+ $should_display_notice = zerif_is_before_date( '2018-11-01' );
+ if ( ! $should_display_notice ) {
return;
}
$message =
- /* translators: Install Hestia link */
- sprintf( esc_html__( 'Check out our %s, fully compatible with your current Zerif Lite theme. You will love it!', 'zerif-lite' ),
- sprintf( '%2$s ',
+ sprintf(
+ /* translators: Install Hestia link */
+ esc_html__( 'Check out our %s, fully compatible with your current Zerif Lite theme. You will love it!', 'zerif-lite' ),
+ sprintf(
+ '%2$s ',
admin_url( 'theme-install.php?theme=hestia' ),
esc_html__( 'best 2018 free theme', 'zerif-lite' )
)
);
- $dismiss_button = sprintf( ' ',
+ $dismiss_button = sprintf(
+ ' ',
'?zerif_nag_ignore_hestia=0'
);
@@ -2174,39 +2178,45 @@ function zerif_neve_notice() {
$user_id = $current_user->ID;
$ignored_notice = get_user_meta( $user_id, 'zerif_ignore_neve_notice' );
- if( !empty( $ignored_notice ) ){
+ if ( ! empty( $ignored_notice ) ) {
return;
}
- $should_display_notice = ! zerif_is_before_date('2018-11-01');
- if( ! $should_display_notice ){
+ $should_display_notice = ! zerif_is_before_date( '2018-11-01' );
+ if ( ! $should_display_notice ) {
return;
}
$dismiss_button =
- sprintf( ' ',
+ sprintf(
+ ' ',
'?zerif_nag_ignore_neve=0'
);
$message1 =
- sprintf( esc_html__( 'Zerif changes its name and will be no longer maintained. But don\'t worry about that. Check out %s, fully compatible with Zerif Lite. It\'s free and it\'s superb. You will love it!', 'zerif-lite' ),
+ sprintf(
/* translators: Install Neve link */
- sprintf( '%2$s ',
+ esc_html__( 'Zerif changes its name and will be no longer maintained. But don\'t worry about that. Check out %s, fully compatible with Zerif Lite. It\'s free and it\'s superb. You will love it!', 'zerif-lite' ),
+ sprintf(
+ '%2$s ',
esc_url( 'https://themeisle.com/themes/neve/?notice=1' ),
esc_html__( 'our newest theme', 'zerif-lite' )
)
);
$message2 =
- sprintf( esc_html__( '%s about the Zerif renaming and our next plans.', 'zerif-lite' ),
+ sprintf(
/* translators: Zerif renaming article link */
- sprintf( '%2$s ',
+ esc_html__( '%s about the Zerif renaming and our next plans.', 'zerif-lite' ),
+ sprintf(
+ '%2$s ',
esc_url( 'https://themeisle.com/blog/zerif-changes-its-name-to-zelle/' ),
esc_html__( 'Read more', 'zerif-lite' )
)
);
- printf( '',
+ printf(
+ '',
$dismiss_button,
$message1,
$message2
From e71a32da73cc65be7cab29f8c0552ba0299995c5 Mon Sep 17 00:00:00 2001
From: Radu
Date: Tue, 28 Aug 2018 15:27:48 +0300
Subject: [PATCH 14/16] WPForms styling fix on frontpage for all filed types
---
style.css | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/style.css b/style.css
index bf4cb42..93372c6 100644
--- a/style.css
+++ b/style.css
@@ -2574,11 +2574,11 @@ section#contact .pirate_forms .contact_checkbox_wrap p {
background-color: rgba(255, 255, 255, 0.95);
}
-div.wpforms-container-full .wpforms-form .wpforms-submit-container {
+.home div.wpforms-container-full .wpforms-form .wpforms-submit-container {
text-align: right;
}
-div.wpforms-container-full .wpforms-form .wpforms-submit-container .wpforms-submit {
+.home div.wpforms-container-full .wpforms-form .wpforms-submit-container .wpforms-submit {
background-color: #e96656;
border-width: 0;
border-radius: 4px;
@@ -2588,7 +2588,7 @@ div.wpforms-container-full .wpforms-form .wpforms-submit-container .wpforms-subm
padding: 13px 35px 13px 35px;
}
-div.wpforms-container-full .wpforms-form .wpforms-submit-container .wpforms-submit:hover {
+.home div.wpforms-container-full .wpforms-form .wpforms-submit-container .wpforms-submit:hover {
background-color: #cb4332;
border-width: 0;
border-radius: 4px;
@@ -2598,6 +2598,19 @@ div.wpforms-container-full .wpforms-form .wpforms-submit-container .wpforms-subm
padding: 13px 35px 13px 35px;
}
+.home .wpforms-field-label, .home .wpforms-field-description, .home .wpforms-field-sublabel, .home .wpforms-field-checkbox, .home .wpforms-field-radio, .home .wpforms-image-choices-none label {
+ color: rgba(255, 255, 255, 0.95);
+ text-align: left;
+}
+
+.home .wpforms-field-checkbox .wpforms-image-choices, .home .wpforms-field-radio .wpforms-image-choices{
+ color: #404040;
+}
+
+.home div.wpforms-container-full .wpforms-form ul.wpforms-image-choices-classic .wpforms-selected label {
+ border-color: #e96656;
+}
+
/*---------------------------------------
** Section: About us; -----
-----------------------------------------*/
From cd24eb16987981ef15f47637e8d98837c4105029 Mon Sep 17 00:00:00 2001
From: cristian-ungureanu
Date: Tue, 28 Aug 2018 18:27:14 +0300
Subject: [PATCH 15/16] temporary remove woocommerce image sizes compatibility
---
functions.php | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/functions.php b/functions.php
index ad15c66..a938fdb 100644
--- a/functions.php
+++ b/functions.php
@@ -135,14 +135,7 @@ function zerif_setup() {
require_once get_template_directory() . '/ti-prevdem/init-prevdem.php';
/* woocommerce support */
- $woocommerce_settings = apply_filters(
- 'zerif_woocommerce_args', array(
- 'single_image_width' => 1600,
- 'thumbnail_image_width' => 300,
- 'gallery_thumbnail_image_width' => 165,
- )
- );
- add_theme_support( 'woocommerce', $woocommerce_settings );
+ add_theme_support( 'woocommerce' );
add_theme_support( 'wc-product-gallery-zoom' );
add_theme_support( 'wc-product-gallery-lightbox' );
add_theme_support( 'wc-product-gallery-slider' );
@@ -531,7 +524,7 @@ function zerif_set_woo_image_sizes() {
update_option( 'zerif_update_woocommerce_customizer_controls', true );
}
-add_action( 'after_setup_theme', 'zerif_set_woo_image_sizes', 10 );
+
/**
* Migrate logo from theme to core
From 5da26203a0b95a3cd33524e93429f5a834e16fe2 Mon Sep 17 00:00:00 2001
From: cristian-ungureanu
Date: Tue, 28 Aug 2018 18:35:34 +0300
Subject: [PATCH 16/16] version bump
---
functions.php | 2 +-
package.json | 2 +-
style.css | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/functions.php b/functions.php
index a938fdb..6c93392 100644
--- a/functions.php
+++ b/functions.php
@@ -35,7 +35,7 @@ function zerif_load_sdk( $products ) {
}
-define( 'ZERIF_LITE_VERSION', '1.8.5.44' );
+define( 'ZERIF_LITE_VERSION', '1.8.5.45' );
diff --git a/package.json b/package.json
index 16755dc..08134bb 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "zerif-lite",
"nicename": "Zerif Lite",
- "version": "1.8.5-44",
+ "version": "1.8.5-45",
"description": "Zerif Lite theme",
"category": "themes",
"repository": {
diff --git a/style.css b/style.css
index 93372c6..b8280e1 100644
--- a/style.css
+++ b/style.css
@@ -4,7 +4,7 @@ Theme URI: https://themeisle.com/themes/zerif-lite/
Author: ThemeIsle
Author URI: https://themeisle.com
Description: Zerif LITE is a free one page WordPress theme. It's perfect for web agency business,corporate business,personal and parallax business portfolio, photography sites and freelancer.Is built on BootStrap with parallax support, is responsive, clean, modern, flat and minimal. Zerif Lite is ecommerce (WooCommerce) Compatible, WPML, RTL, Retina-Ready, SEO Friendly and with parallax, full screen image is one of the best business themes.
-Version: 1.8.5.44
+Version: 1.8.5.45
License: GNU General Public License version 3
License URI: license.txt
WordPress Available: yes