PluginProbe ʕ •ᴥ•ʔ
Secure Custom Fields / 6.9.1
Secure Custom Fields v6.9.1
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
FlexibleContent 2 months ago class-acf-field-accordion.php 2 months ago class-acf-field-button-group.php 2 months ago class-acf-field-checkbox.php 4 days ago class-acf-field-clone.php 2 months ago class-acf-field-color_picker.php 2 months ago class-acf-field-date_picker.php 2 months ago class-acf-field-date_time_picker.php 2 months ago class-acf-field-email.php 2 months ago class-acf-field-file.php 2 months ago class-acf-field-flexible-content.php 1 week ago class-acf-field-gallery.php 3 weeks ago class-acf-field-google-map.php 2 months ago class-acf-field-group.php 2 months ago class-acf-field-icon_picker.php 7 months ago class-acf-field-image.php 2 months ago class-acf-field-link.php 2 months ago class-acf-field-message.php 1 year ago class-acf-field-nav-menu.php 1 week ago class-acf-field-number.php 2 months ago class-acf-field-oembed.php 3 weeks ago class-acf-field-output.php 1 year ago class-acf-field-page_link.php 3 weeks ago class-acf-field-password.php 2 months ago class-acf-field-post_object.php 3 weeks ago class-acf-field-radio.php 4 days ago class-acf-field-range.php 2 months ago class-acf-field-relationship.php 3 weeks ago class-acf-field-repeater.php 3 weeks ago class-acf-field-select.php 4 days ago class-acf-field-separator.php 1 year ago class-acf-field-tab.php 1 year ago class-acf-field-taxonomy.php 3 weeks ago class-acf-field-text.php 3 weeks ago class-acf-field-textarea.php 3 weeks ago class-acf-field-time_picker.php 2 months ago class-acf-field-true_false.php 2 months ago class-acf-field-url.php 3 weeks ago class-acf-field-user.php 3 weeks ago class-acf-field-wysiwyg.php 2 months ago class-acf-field.php 2 months ago class-acf-repeater-table.php 1 year ago index.php 1 year ago
class-acf-field-password.php
122 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 ACF 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', 'secure-custom-fields' );
23 $this->description = __( 'An input for providing a password using a masked field.', 'secure-custom-fields' );
24 $this->preview_image = acf_get_url() . '/assets/images/field-type-previews/field-preview-password.png';
25 $this->doc_url = 'https://developer.wordpress.org/secure-custom-fields/features/fields/password/';
26 $this->tutorial_url = 'https://developer.wordpress.org/secure-custom-fields/features/fields/password/password-tutorial/';
27 $this->defaults = array(
28 'placeholder' => '',
29 'prepend' => '',
30 'append' => '',
31 );
32 }
33
34
35 /**
36 * Create the HTML interface for your field
37 *
38 * @param $field - an array holding all the field's data
39 *
40 * @type action
41 * @since ACF 3.6
42 * @date 23/01/13
43 */
44 function render_field( $field ) {
45
46 acf_get_field_type( 'text' )->render_field( $field );
47 }
48
49 /**
50 * Create extra options for your field. This is rendered when editing a field.
51 * The value of $field['name'] can be used (like bellow) to save extra data to the $field
52 *
53 * @type action
54 * @since ACF 3.6
55 * @date 23/01/13
56 *
57 * @param $field - an array holding all the field's data
58 */
59 function render_field_settings( $field ) {
60 // TODO: Delete this method?
61 }
62
63 /**
64 * Renders the field settings used in the "Presentation" tab.
65 *
66 * @since ACF 6.0
67 *
68 * @param array $field The field settings array.
69 * @return void
70 */
71 function render_field_presentation_settings( $field ) {
72 acf_render_field_setting(
73 $field,
74 array(
75 'label' => __( 'Placeholder Text', 'secure-custom-fields' ),
76 'instructions' => __( 'Appears within the input', 'secure-custom-fields' ),
77 'type' => 'text',
78 'name' => 'placeholder',
79 )
80 );
81
82 acf_render_field_setting(
83 $field,
84 array(
85 'label' => __( 'Prepend', 'secure-custom-fields' ),
86 'instructions' => __( 'Appears before the input', 'secure-custom-fields' ),
87 'type' => 'text',
88 'name' => 'prepend',
89 )
90 );
91
92 acf_render_field_setting(
93 $field,
94 array(
95 'label' => __( 'Append', 'secure-custom-fields' ),
96 'instructions' => __( 'Appears after the input', 'secure-custom-fields' ),
97 'type' => 'text',
98 'name' => 'append',
99 )
100 );
101 }
102
103 /**
104 * Formats the field value for JSON-LD output.
105 *
106 * @since 6.8.0
107 *
108 * @param mixed $value The value of the field.
109 * @param integer|string $post_id The ID of the post.
110 * @param array $field The field array.
111 * @return mixed
112 */
113 public function format_value_for_jsonld( $value, $post_id, $field ) {
114 return false;
115 }
116 }
117
118
119 // initialize
120 acf_register_field_type( 'acf_field_password' );
121 endif; // class_exists check
122