Skip to content

Commit

Permalink
Coding standards
Browse files Browse the repository at this point in the history
  • Loading branch information
n7studios committed Jan 24, 2025
1 parent 138be20 commit 245ba94
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 35 deletions.
9 changes: 0 additions & 9 deletions admin/class-convertkit-admin-settings-restrict-content.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
4 changes: 2 additions & 2 deletions includes/class-convertkit-output-restrict-content.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion includes/class-convertkit-settings-restrict-content.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
4 changes: 2 additions & 2 deletions views/frontend/restrict-content/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
21 changes: 0 additions & 21 deletions views/frontend/restrict-content/tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,27 +43,6 @@
</form>

<?php
// If require login is enabled, show the login screen.
if ( $this->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() ) {
?>
<p>
<?php echo esc_html( $this->restrict_content_settings->get_by_key( 'email_text' ) ); ?>
</p>
<?php
require 'login-email.php';
} else {
// Just output the paragraph with a link to login, which will trigger the modal to display.
?>
<p>
<?php echo esc_html( $this->restrict_content_settings->get_by_key( 'email_text' ) ); ?>
<a href="#" class="convertkit-restrict-content-modal-open"><?php echo esc_attr( $this->restrict_content_settings->get_by_key( 'email_button_label' ) ); ?></a>
</p>
<?php
}
}

// Output notices.
require 'notices.php';
?>
Expand Down

0 comments on commit 245ba94

Please sign in to comment.