PluginProbe ʕ •ᴥ•ʔ
Secure Custom Fields / 6.4.0-beta2
Secure Custom Fields v6.4.0-beta2
6.9.5 6.9.4 6.9.3 6.9.2 6.9.1 6.9.0 6.8.9 6.8.7 6.8.8 6.8.6 6.8.4 6.8.5 trunk 6.4.0-beta1 6.4.0-beta2 6.4.1 6.4.1-beta3 6.4.1-beta4 6.4.1-beta5 6.4.1-beta6 6.4.1-beta7 6.4.2 6.5.0 6.5.1 6.5.2 6.5.3 6.5.4 6.5.5 6.5.6 6.5.7 6.6.0 6.7.0 6.7.1 6.8.0 6.8.1 6.8.2 6.8.3
secure-custom-fields / includes / fields / class-acf-field-password.php
secure-custom-fields / includes / fields Last commit date
class-acf-field-accordion.php 1 year ago class-acf-field-button-group.php 1 year ago class-acf-field-checkbox.php 1 year ago class-acf-field-color_picker.php 1 year ago class-acf-field-date_picker.php 1 year ago class-acf-field-date_time_picker.php 1 year ago class-acf-field-email.php 1 year ago class-acf-field-file.php 1 year ago class-acf-field-google-map.php 1 year ago class-acf-field-group.php 1 year ago class-acf-field-icon_picker.php 1 year ago class-acf-field-image.php 1 year ago class-acf-field-link.php 1 year ago class-acf-field-message.php 1 year ago class-acf-field-number.php 1 year ago class-acf-field-oembed.php 1 year ago class-acf-field-output.php 1 year ago class-acf-field-page_link.php 1 year ago class-acf-field-password.php 1 year ago class-acf-field-post_object.php 1 year ago class-acf-field-radio.php 1 year ago class-acf-field-range.php 1 year ago class-acf-field-relationship.php 1 year ago class-acf-field-select.php 1 year ago class-acf-field-separator.php 1 year ago class-acf-field-tab.php 1 year ago class-acf-field-taxonomy.php 1 year ago class-acf-field-text.php 1 year ago class-acf-field-textarea.php 1 year ago class-acf-field-time_picker.php 1 year ago class-acf-field-true_false.php 1 year ago class-acf-field-url.php 1 year ago class-acf-field-user.php 1 year ago class-acf-field-wysiwyg.php 1 year ago class-acf-field.php 1 year ago index.php 1 year ago
class-acf-field-password.php
107 lines
1 <?php
2
3 if ( ! class_exists( 'acf_field_password' ) ) :
4
5 class acf_field_password extends acf_field {
6
7
8 /**
9 * This function will setup the field type data
10 *
11 * @type function
12 * @date 5/03/2014
13 * @since 5.0.0
14 *
15 * @param n/a
16 * @return n/a
17 */
18 function initialize() {
19
20 // vars
21 $this->name = 'password';
22 $this->label = __( 'Password', 'acf' );
23 $this->description = __( 'An input for providing a password using a masked field.', 'acf' );
24 $this->preview_image = acf_get_url() . '/assets/images/field-type-previews/field-preview-password.png';
25 $this->doc_url = 'https://www.advancedcustomfields.com/resources/password/';
26 $this->defaults = array(
27 'placeholder' => '',
28 'prepend' => '',
29 'append' => '',
30 );
31 }
32
33
34 /**
35 * Create the HTML interface for your field
36 *
37 * @param $field - an array holding all the field's data
38 *
39 * @type action
40 * @since 3.6
41 * @date 23/01/13
42 */
43 function render_field( $field ) {
44
45 acf_get_field_type( 'text' )->render_field( $field );
46 }
47
48 /**
49 * Create extra options for your field. This is rendered when editing a field.
50 * The value of $field['name'] can be used (like bellow) to save extra data to the $field
51 *
52 * @type action
53 * @since 3.6
54 * @date 23/01/13
55 *
56 * @param $field - an array holding all the field's data
57 */
58 function render_field_settings( $field ) {
59 // TODO: Delete this method?
60 }
61
62 /**
63 * Renders the field settings used in the "Presentation" tab.
64 *
65 * @since 6.0
66 *
67 * @param array $field The field settings array.
68 * @return void
69 */
70 function render_field_presentation_settings( $field ) {
71 acf_render_field_setting(
72 $field,
73 array(
74 'label' => __( 'Placeholder Text', 'acf' ),
75 'instructions' => __( 'Appears within the input', 'acf' ),
76 'type' => 'text',
77 'name' => 'placeholder',
78 )
79 );
80
81 acf_render_field_setting(
82 $field,
83 array(
84 'label' => __( 'Prepend', 'acf' ),
85 'instructions' => __( 'Appears before the input', 'acf' ),
86 'type' => 'text',
87 'name' => 'prepend',
88 )
89 );
90
91 acf_render_field_setting(
92 $field,
93 array(
94 'label' => __( 'Append', 'acf' ),
95 'instructions' => __( 'Appears after the input', 'acf' ),
96 'type' => 'text',
97 'name' => 'append',
98 )
99 );
100 }
101 }
102
103
104 // initialize
105 acf_register_field_type( 'acf_field_password' );
106 endif; // class_exists check
107