From 245ba94bcd38c49e57236ed23ed28981f9a1634f Mon Sep 17 00:00:00 2001 From: Tim Carr Date: Fri, 24 Jan 2025 17:00:44 +0800 Subject: [PATCH] Coding standards --- ...ertkit-admin-settings-restrict-content.php | 9 -------- ...ass-convertkit-output-restrict-content.php | 4 ++-- ...s-convertkit-settings-restrict-content.php | 2 +- views/frontend/restrict-content/header.php | 4 ++-- views/frontend/restrict-content/tag.php | 21 ------------------- 5 files changed, 5 insertions(+), 35 deletions(-) diff --git a/admin/class-convertkit-admin-settings-restrict-content.php b/admin/class-convertkit-admin-settings-restrict-content.php index 1db9e493..d4fdd08f 100644 --- a/admin/class-convertkit-admin-settings-restrict-content.php +++ b/admin/class-convertkit-admin-settings-restrict-content.php @@ -14,15 +14,6 @@ */ class ConvertKit_Admin_Settings_Restrict_Content extends ConvertKit_Settings_Base { - /** - * Holds the ConvertKit Forms Resource. - * - * @since 2.7.2 - * - * @var bool|ConvertKit_Resource_Forms - */ - private $forms = false; - /** * Constructor. * diff --git a/includes/class-convertkit-output-restrict-content.php b/includes/class-convertkit-output-restrict-content.php index 4d03621c..fc5912d1 100644 --- a/includes/class-convertkit-output-restrict-content.php +++ b/includes/class-convertkit-output-restrict-content.php @@ -1185,7 +1185,7 @@ private function get_call_to_action( $post_id ) { // phpcs:ignore Generic.CodeAn case 'product': // Get header and text from settings for Products. $heading = $this->restrict_content_settings->get_by_key( 'subscribe_heading' ); - $text = $this->restrict_content_settings->get_by_key( 'subscribe_text' ); + $text = $this->restrict_content_settings->get_by_key( 'subscribe_text' ); // Output product restricted message and email form. // Get Product. @@ -1220,7 +1220,7 @@ function () { case 'tag': // Get header and text from settings for Tags. $heading = $this->restrict_content_settings->get_by_key( 'subscribe_heading_tag' ); - $text = $this->restrict_content_settings->get_by_key( 'subscribe_text_tag' ); + $text = $this->restrict_content_settings->get_by_key( 'subscribe_text_tag' ); // If require login is enabled and scripts are enabled, output the email login form in a modal, which will be displayed // when the 'log in' link is clicked. diff --git a/includes/class-convertkit-settings-restrict-content.php b/includes/class-convertkit-settings-restrict-content.php index 2b080e07..f9059206 100644 --- a/includes/class-convertkit-settings-restrict-content.php +++ b/includes/class-convertkit-settings-restrict-content.php @@ -215,7 +215,7 @@ public function get_defaults() { // Restrict by Tag. 'subscribe_heading_tag' => __( 'Subscribe to keep reading', 'convertkit' ), 'subscribe_text_tag' => __( 'This post is free to read but only available to subscribers. Join today to get access to all posts.', 'convertkit' ), - 'require_tag_login' => '', // blank|on. + 'require_tag_login' => '', // blank|on. 'recaptcha_site_key' => '', 'recaptcha_secret_key' => '', 'recaptcha_minimum_score' => '0.5', diff --git a/views/frontend/restrict-content/header.php b/views/frontend/restrict-content/header.php index 496701a2..3b038051 100644 --- a/views/frontend/restrict-content/header.php +++ b/views/frontend/restrict-content/header.php @@ -3,8 +3,8 @@ * Outputs a heading and paragraph text based on the supplied * $heading and $text variables, used across Restrict Content * by Tag and Product. - * - * @since 2.7.1 + * + * @since 2.7.1 * * @package ConvertKit * @author ConvertKit diff --git a/views/frontend/restrict-content/tag.php b/views/frontend/restrict-content/tag.php index dbe9cfc5..e4c5fd3d 100644 --- a/views/frontend/restrict-content/tag.php +++ b/views/frontend/restrict-content/tag.php @@ -43,27 +43,6 @@ restrict_content_settings->require_tag_login() ) { - // If scripts are disabled in the Plugin's settings, output the email login form now. - if ( $this->settings->scripts_disabled() ) { - ?> -

- restrict_content_settings->get_by_key( 'email_text' ) ); ?> -

- -

- restrict_content_settings->get_by_key( 'email_text' ) ); ?> - restrict_content_settings->get_by_key( 'email_button_label' ) ); ?> -

-