← All changes
|
includes/class-convertkit-settings-restrict-content.php
+52
-6
2.3.2
→
3.2.3
View file →
| @@ -64,8 +64,34 @@ | ||
| 64 | 64 | |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | /** |
| 68 | + * Returns whether crawlers are permitted to index Member Content in the Plugin settings. | |
| 69 | + * | |
| 70 | + * @since 2.4.1 | |
| 71 | + * | |
| 72 | + * @return bool | |
| 73 | + */ | |
| 74 | + public function permit_crawlers() { | |
| 75 | + | |
| 76 | + return ( $this->settings['permit_crawlers'] === 'on' ? true : false ); | |
| 77 | + | |
| 78 | + } | |
| 79 | + | |
| 80 | + /** | |
| 81 | + * Returns whether login by email is required for Member Content by Tag functionality. | |
| 82 | + * | |
| 83 | + * @since 2.7.2 | |
| 84 | + * | |
| 85 | + * @return bool | |
| 86 | + */ | |
| 87 | + public function require_tag_login() { | |
| 88 | + | |
| 89 | + return ( $this->settings['require_tag_login'] === 'on' ? true : false ); | |
| 90 | + | |
| 91 | + } | |
| 92 | + | |
| 93 | + /** | |
| 68 | 94 | * Returns Restrict Content settings value for the given key. |
| 69 | 95 | * |
| 70 | 96 | * @since 2.1.0 |
| 71 | 97 | * |
| @@ -99,14 +125,34 @@ | ||
| 99 | 125 | */ |
| 100 | 126 | public function get_defaults() { |
| 101 | 127 | |
| 102 | 128 | $defaults = array( |
| 103 | - 'subscribe_text' => __( 'This content is only available to premium subscribers', 'convertkit' ), | |
| 129 | + // Permit Crawlers. | |
| 130 | + 'permit_crawlers' => '', | |
| 131 | + | |
| 132 | + // Restrict by Form. | |
| 133 | + 'no_access_text_form' => __( 'Your account does not have access to this content. Please use the form above to subscribe.', 'convertkit' ), | |
| 134 | + | |
| 135 | + // Restrict by Product. | |
| 136 | + 'subscribe_heading' => __( 'Read this post with a premium subscription', 'convertkit' ), | |
| 137 | + 'subscribe_text' => __( 'This post is only available to premium subscribers. Join today to get access to all posts.', 'convertkit' ), | |
| 138 | + 'no_access_text' => __( 'Your account does not have access to this content. Please use the button above to purchase, or enter the email address you used to purchase the product.', 'convertkit' ), | |
| 139 | + | |
| 140 | + // Restrict by Tag. | |
| 141 | + 'subscribe_heading_tag' => __( 'Subscribe to keep reading', 'convertkit' ), | |
| 142 | + 'subscribe_text_tag' => __( 'This post is free to read but only available to subscribers. Join today to get access to all posts.', 'convertkit' ), | |
| 143 | + 'require_tag_login' => '', // blank|on. | |
| 144 | + 'no_access_text_tag' => __( 'Your account does not have access to this content. Please use the form above to subscribe.', 'convertkit' ), | |
| 145 | + | |
| 146 | + // All. | |
| 104 | 147 | 'subscribe_button_label' => __( 'Subscribe', 'convertkit' ), |
| 105 | - 'email_text' => __( 'Already a premium subscriber? Enter the email address used when purchasing below, to receive a login link to access.', 'convertkit' ), | |
| 106 | - 'email_button_label' => __( 'Send email', 'convertkit' ), | |
| 107 | - 'email_check_text' => __( 'Check your email and click the link to login, or enter the code from the email below.', 'convertkit' ), | |
| 108 | - 'no_access_text' => __( 'Your account does not have access to this content. Please use the button below to purchase, or enter the email address you used to purchase the product.', 'convertkit' ), | |
| 148 | + 'email_text' => __( 'Already subscribed?', 'convertkit' ), | |
| 149 | + 'email_button_label' => __( 'Log in', 'convertkit' ), | |
| 150 | + 'email_heading' => __( 'Log in to read this post', 'convertkit' ), | |
| 151 | + 'email_description_text' => __( 'We\'ll email you a magic code to log you in without a password.', 'convertkit' ), | |
| 152 | + 'email_check_heading' => __( 'We just emailed you a log in code', 'convertkit' ), | |
| 153 | + 'email_check_text' => __( 'Enter the code below to finish logging in', 'convertkit' ), | |
| 154 | + 'container_css_classes' => '', | |
| 109 | 155 | ); |
| 110 | 156 | |
| 111 | 157 | /** |
| 112 | 158 | * The default settings, used when the ConvertKit Restrict Content Settings haven't been saved |
| @@ -113,9 +159,9 @@ | ||
| 113 | 159 | * e.g. on a new installation. |
| 114 | 160 | * |
| 115 | 161 | * @since 2.1.0 |
| 116 | 162 | * |
| 117 | - * @param array $defaults | |
| 163 | + * @param array $defaults Default settings. | |
| 118 | 164 | */ |
| 119 | 165 | $defaults = apply_filters( 'convertkit_settings_restrict_content_get_defaults', $defaults ); |
| 120 | 166 | |
| 121 | 167 | return $defaults; |