| @@ -46,22 +46,13 @@ | ||
| 46 | 46 | * Holds the settings class for the section. |
| 47 | 47 | * |
| 48 | 48 | * @since 1.9.6 |
| 49 | 49 | * |
| 50 | - * @var false|ConvertKit_Settings|ConvertKit_ContactForm7_Settings|ConvertKit_Wishlist_Settings|ConvertKit_Settings_Restrict_Content | |
| 50 | + * @var false|ConvertKit_Settings|ConvertKit_ContactForm7_Settings|ConvertKit_Wishlist_Settings | |
| 51 | 51 | */ |
| 52 | 52 | public $settings; |
| 53 | 53 | |
| 54 | 54 | /** |
| 55 | - * Holds whether this settings section is for beta functionality. | |
| 56 | - * | |
| 57 | - * @since 2.1.0 | |
| 58 | - * | |
| 59 | - * @var bool | |
| 60 | - */ | |
| 61 | - public $is_beta = false; | |
| 62 | - | |
| 63 | - /** | |
| 64 | 55 | * Constructor |
| 65 | 56 | */ |
| 66 | 57 | public function __construct() { |
| 67 | 58 | |
| @@ -107,13 +98,8 @@ | ||
| 107 | 98 | */ |
| 108 | 99 | abstract public function print_section_info(); |
| 109 | 100 | |
| 110 | 101 | /** |
| 111 | - * Returns the URL for the ConvertKit documentation for this setting section. | |
| 112 | - */ | |
| 113 | - abstract public function documentation_url(); | |
| 114 | - | |
| 115 | - /** | |
| 116 | 102 | * Renders the section |
| 117 | 103 | */ |
| 118 | 104 | public function render() { |
| 119 | 105 | |
| @@ -152,9 +138,9 @@ | ||
| 152 | 138 | public function render_container_start() { |
| 153 | 139 | |
| 154 | 140 | ?> |
| 155 | 141 | <div class="metabox-holder"> |
| 156 | - <div class="postbox <?php echo sanitize_html_class( $this->is_beta ? 'convertkit-beta' : '' ); ?>"> | |
| 142 | + <div class="postbox"> | |
| 157 | 143 | <?php |
| 158 | 144 | |
| 159 | 145 | } |
| 160 | 146 | |
| @@ -215,11 +201,11 @@ | ||
| 215 | 201 | * Returns a masked value. |
| 216 | 202 | * |
| 217 | 203 | * @since 1.9.6 |
| 218 | 204 | * |
| 219 | - * @param string $value Value. | |
| 220 | - * @param bool|string $description Description. | |
| 221 | - * @return string Masked Value | |
| 205 | + * @param string $value Value. | |
| 206 | + * @param mixed $description Description (false|string). | |
| 207 | + * @return string Masked Value | |
| 222 | 208 | */ |
| 223 | 209 | public function get_masked_value( $value, $description = false ) { |
| 224 | 210 | |
| 225 | 211 | $html = sprintf( |
| @@ -239,19 +225,17 @@ | ||
| 239 | 225 | * Returns a text field. |
| 240 | 226 | * |
| 241 | 227 | * @since 1.9.6 |
| 242 | 228 | * |
| 243 | - * @param string $name Name. | |
| 244 | - * @param string $value Value. | |
| 245 | - * @param bool|string|array $description Description (false|string|array). | |
| 246 | - * @param bool|array $css_classes CSS Classes (false|array). | |
| 247 | - * @return string HTML Field | |
| 229 | + * @param string $name Name. | |
| 230 | + * @param string $value Value. | |
| 231 | + * @param mixed $description Description (false|string|array). | |
| 232 | + * @return string HTML Field | |
| 248 | 233 | */ |
| 249 | - public function get_text_field( $name, $value = '', $description = false, $css_classes = false ) { | |
| 234 | + public function get_text_field( $name, $value = '', $description = false ) { | |
| 250 | 235 | |
| 251 | 236 | $html = sprintf( |
| 252 | - '<input type="text" class="%s" id="%s" name="%s[%s]" value="%s" />', | |
| 253 | - ( is_array( $css_classes ) ? implode( ' ', $css_classes ) : 'regular-text' ), | |
| 237 | + '<input type="text" class="regular-text code" id="%s" name="%s[%s]" value="%s" />', | |
| 254 | 238 | $name, |
| 255 | 239 | $this->settings_key, |
| 256 | 240 | $name, |
| 257 | 241 | $value |
| @@ -265,15 +249,15 @@ | ||
| 265 | 249 | * Returns a select dropdown field. |
| 266 | 250 | * |
| 267 | 251 | * @since 1.9.6 |
| 268 | 252 | * |
| 269 | - * @param string $name Name. | |
| 270 | - * @param string $value Value. | |
| 271 | - * @param array $options Options / Choices. | |
| 272 | - * @param bool|string $description Description. | |
| 273 | - * @param bool|array $css_classes <select> CSS class(es). | |
| 274 | - * @param bool|array $attributes <select> attributes. | |
| 275 | - * @return string HTML Select Field | |
| 253 | + * @param string $name Name. | |
| 254 | + * @param string $value Value. | |
| 255 | + * @param array $options Options / Choices. | |
| 256 | + * @param mixed $description Description (false|string). | |
| 257 | + * @param mixed $css_classes <select> CSS class(es) (false|array). | |
| 258 | + * @param mixed $attributes <select> attributes (false|array). | |
| 259 | + * @return string HTML Select Field | |
| 276 | 260 | */ |
| 277 | 261 | public function get_select_field( $name, $value = '', $options = array(), $description = false, $css_classes = false, $attributes = false ) { |
| 278 | 262 | |
| 279 | 263 | // Build opening <select> tag. |
| @@ -313,14 +297,14 @@ | ||
| 313 | 297 | * Returns a checkbox field. |
| 314 | 298 | * |
| 315 | 299 | * @since 1.9.6 |
| 316 | 300 | * |
| 317 | - * @param string $name Name. | |
| 318 | - * @param string $value Value. | |
| 319 | - * @param bool $checked Should checkbox be checked/ticked. | |
| 320 | - * @param bool|string $label Label. | |
| 321 | - * @param bool|string|array $description Description. | |
| 322 | - * @return string HTML Checkbox | |
| 301 | + * @param string $name Name. | |
| 302 | + * @param string $value Value. | |
| 303 | + * @param bool $checked Should checkbox be checked/ticked. | |
| 304 | + * @param mixed $label Label (false|string). | |
| 305 | + * @param mixed $description Description (false|string). | |
| 306 | + * @return string HTML Checkbox | |
| 323 | 307 | */ |
| 324 | 308 | public function get_checkbox_field( $name, $value, $checked = false, $label = '', $description = '' ) { |
| 325 | 309 | |
| 326 | 310 | $html = ''; |
| @@ -356,10 +340,10 @@ | ||
| 356 | 340 | * Returns the given text wrapped in a paragraph with the description class. |
| 357 | 341 | * |
| 358 | 342 | * @since 1.9.6 |
| 359 | 343 | * |
| 360 | - * @param bool|string|array $description Description. | |
| 361 | - * @return string HTML Description | |
| 344 | + * @param mixed $description Description (false|string|array). | |
| 345 | + * @return string HTML Description | |
| 362 | 346 | */ |
| 363 | 347 | private function get_description( $description ) { |
| 364 | 348 | |
| 365 | 349 | // Return blank string if no description specified. |