PluginProbe
Advanced Custom Fields (ACF®) / 5.9.4
Advanced Custom Fields (ACF®) v5.9.4
6.8.9 6.8.8 6.8.7 6.8.6 6.8.5 6.8.4 6.8.3 6.8.2 6.8.1 5.8.5 5.8.6 5.8.7 5.8.8 5.8.9 5.9.0 5.9.1 5.9.2 5.9.3 5.9.4 5.9.5 5.9.6 5.9.7 5.9.8 5.9.9 6.0.0 All 230 releases
advanced-custom-fields / includes / deprecated.php
deprecated.php
150 lines 3.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 // Register deprecated filters ( $deprecated, $version, $replacement ).
4 acf_add_deprecated_filter( 'acf/settings/export_textdomain', '5.3.3', 'acf/settings/l10n_textdomain' );
5 acf_add_deprecated_filter( 'acf/settings/export_translate', '5.3.3', 'acf/settings/l10n_field' );
6 acf_add_deprecated_filter( 'acf/settings/export_translate', '5.3.3', 'acf/settings/l10n_field_group' );
7 acf_add_deprecated_filter( 'acf/settings/dir', '5.6.8', 'acf/settings/url' );
8 acf_add_deprecated_filter( 'acf/get_valid_field', '5.5.6', 'acf/validate_field' );
9 acf_add_deprecated_filter( 'acf/get_valid_field_group', '5.5.6', 'acf/validate_field_group' );
10 acf_add_deprecated_filter( 'acf/get_valid_post_id', '5.5.6', 'acf/validate_post_id' );
11 acf_add_deprecated_filter( 'acf/get_field_reference', '5.6.5', 'acf/load_reference' );
12 acf_add_deprecated_filter( 'acf/get_field_group', '5.7.11', 'acf/load_field_group' );
13 acf_add_deprecated_filter( 'acf/get_field_groups', '5.7.11', 'acf/load_field_groups' );
14 acf_add_deprecated_filter( 'acf/get_fields', '5.7.11', 'acf/load_fields' );
15
16 // Register variations for deprecated filters.
17 acf_add_filter_variations( 'acf/get_valid_field', array('type'), 0 );
18
19 /**
20 * acf_render_field_wrap_label
21 *
22 * Renders the field's label.
23 *
24 * @date 19/9/17
25 * @since 5.6.3
26 * @deprecated 5.6.5
27 *
28 * @param array $field The field array.
29 * @return void
30 */
31 function acf_render_field_wrap_label( $field ) {
32
33 // Warning.
34 _deprecated_function( __FUNCTION__, '5.7.11', 'acf_render_field_label()' );
35
36 // Render.
37 acf_render_field_label( $field );
38 }
39
40 /**
41 * acf_render_field_wrap_description
42 *
43 * Renders the field's instructions.
44 *
45 * @date 19/9/17
46 * @since 5.6.3
47 * @deprecated 5.6.5
48 *
49 * @param array $field The field array.
50 * @return void
51 */
52 function acf_render_field_wrap_description( $field ) {
53
54 // Warning.
55 _deprecated_function( __FUNCTION__, '5.7.11', 'acf_render_field_instructions()' );
56
57 // Render.
58 acf_render_field_instructions( $field );
59 }
60
61 /*
62 * acf_get_fields_by_id
63 *
64 * Returns and array of fields for the given $parent_id.
65 *
66 * @date 27/02/2014
67 * @since 5.0.0.
68 * @deprecated 5.7.11
69 *
70 * @param int $parent_id The parent ID.
71 * @return array
72 */
73 function acf_get_fields_by_id( $parent_id = 0 ) {
74
75 // Warning.
76 _deprecated_function( __FUNCTION__, '5.7.11', 'acf_get_fields()' );
77
78 // Return fields.
79 return acf_get_fields(array( 'ID' => $parent_id, 'key' => "group_$parent_id" ));
80 }
81
82 /**
83 * acf_update_option
84 *
85 * A wrapper for the WP update_option but provides logic for a 'no' autoload
86 *
87 * @date 4/01/2014
88 * @since 5.0.0
89 * @deprecated 5.7.11
90 *
91 * @param string $option The option name.
92 * @param string $value The option value.
93 * @param string $autoload An optional autoload value.
94 * @return bool
95 */
96 function acf_update_option( $option = '', $value = '', $autoload = null ) {
97
98 // Warning.
99 _deprecated_function( __FUNCTION__, '5.7.11', 'update_option()' );
100
101 // Update.
102 if( $autoload === null ) {
103 $autoload = (bool) acf_get_setting('autoload');
104 }
105 return update_option( $option, $value, $autoload );
106 }
107
108 /**
109 * acf_get_field_reference
110 *
111 * Finds the field key for a given field name and post_id.
112 *
113 * @date 26/1/18
114 * @since 5.6.5
115 * @deprecated 5.6.8
116 *
117 * @param string $field_name The name of the field. eg 'sub_heading'
118 * @param mixed $post_id The post_id of which the value is saved against
119 * @return string $reference The field key
120 */
121 function acf_get_field_reference( $field_name, $post_id ) {
122
123 // Warning.
124 _deprecated_function( __FUNCTION__, '5.6.8', 'acf_get_reference()' );
125
126 // Return reference.
127 return acf_get_reference( $field_name, $post_id );
128 }
129
130 /**
131 * acf_get_dir
132 *
133 * Returns the plugin url to a specified file.
134 *
135 * @date 28/09/13
136 * @since 5.0.0
137 * @deprecated 5.6.8
138 *
139 * @param string $filename The specified file.
140 * @return string
141 */
142 function acf_get_dir( $filename = '' ) {
143
144 // Warning.
145 _deprecated_function( __FUNCTION__, '5.6.8', 'acf_get_url()' );
146
147 // Return.
148 return acf_get_url( $filename );
149 }
150