admin
1 month ago
ajax
3 months ago
api
2 weeks ago
fields
4 weeks ago
forms
4 weeks ago
legacy
5 months ago
locations
1 month ago
post-types
5 months ago
rest-api
4 weeks ago
walkers
5 months ago
acf-bidirectional-functions.php
5 months ago
acf-field-functions.php
5 months ago
acf-field-group-functions.php
5 months ago
acf-form-functions.php
5 months ago
acf-helper-functions.php
5 months ago
acf-hook-functions.php
5 months ago
acf-input-functions.php
5 months ago
acf-internal-post-type-functions.php
5 months ago
acf-meta-functions.php
2 months ago
acf-post-functions.php
5 months ago
acf-post-type-functions.php
5 months ago
acf-taxonomy-functions.php
5 months ago
acf-user-functions.php
5 months ago
acf-utility-functions.php
5 months ago
acf-value-functions.php
5 months ago
acf-wp-functions.php
5 months ago
assets.php
5 months ago
class-acf-data.php
5 months ago
class-acf-internal-post-type.php
5 months ago
compatibility.php
5 months ago
deprecated.php
5 months ago
fields.php
5 months ago
index.php
2 years ago
l10n.php
5 months ago
local-fields.php
5 months ago
local-json.php
3 months ago
local-meta.php
5 months ago
locations.php
5 months ago
loop.php
5 months ago
media.php
6 days ago
rest-api.php
5 months ago
revisions.php
3 months ago
third-party.php
5 months ago
upgrades.php
2 months ago
validation.php
5 months ago
wpml.php
5 months ago
deprecated.php
162 lines
| 1 | <?php |
| 2 | /** |
| 3 | * @package ACF |
| 4 | * @author WP Engine |
| 5 | * |
| 6 | * © 2026 Advanced Custom Fields (ACF®). All rights reserved. |
| 7 | * "ACF" is a trademark of WP Engine. |
| 8 | * Licensed under the GNU General Public License v2 or later. |
| 9 | * https://www.gnu.org/licenses/gpl-2.0.html |
| 10 | */ |
| 11 | |
| 12 | // Register deprecated filters ( $deprecated, $version, $replacement ). |
| 13 | acf_add_deprecated_filter( 'acf/settings/export_textdomain', '5.3.3', 'acf/settings/l10n_textdomain' ); |
| 14 | acf_add_deprecated_filter( 'acf/settings/export_translate', '5.3.3', 'acf/settings/l10n_field' ); |
| 15 | acf_add_deprecated_filter( 'acf/settings/export_translate', '5.3.3', 'acf/settings/l10n_field_group' ); |
| 16 | acf_add_deprecated_filter( 'acf/settings/dir', '5.6.8', 'acf/settings/url' ); |
| 17 | acf_add_deprecated_filter( 'acf/get_valid_field', '5.5.6', 'acf/validate_field' ); |
| 18 | acf_add_deprecated_filter( 'acf/get_valid_field_group', '5.5.6', 'acf/validate_field_group' ); |
| 19 | acf_add_deprecated_filter( 'acf/get_valid_post_id', '5.5.6', 'acf/validate_post_id' ); |
| 20 | acf_add_deprecated_filter( 'acf/get_field_reference', '5.6.5', 'acf/load_reference' ); |
| 21 | acf_add_deprecated_filter( 'acf/get_field_group', '5.7.11', 'acf/load_field_group' ); |
| 22 | acf_add_deprecated_filter( 'acf/get_field_groups', '5.7.11', 'acf/load_field_groups' ); |
| 23 | acf_add_deprecated_filter( 'acf/get_fields', '5.7.11', 'acf/load_fields' ); |
| 24 | |
| 25 | // Register variations for deprecated filters. |
| 26 | acf_add_filter_variations( 'acf/get_valid_field', array( 'type' ), 0 ); |
| 27 | |
| 28 | /** |
| 29 | * acf_render_field_wrap_label |
| 30 | * |
| 31 | * Renders the field's label. |
| 32 | * |
| 33 | * @date 19/9/17 |
| 34 | * @since 5.6.3 |
| 35 | * @deprecated 5.6.5 |
| 36 | * |
| 37 | * @param array $field The field array. |
| 38 | * @return void |
| 39 | */ |
| 40 | function acf_render_field_wrap_label( $field ) { |
| 41 | |
| 42 | // Warning. |
| 43 | _deprecated_function( __FUNCTION__, '5.7.11', 'acf_render_field_label()' ); |
| 44 | |
| 45 | // Render. |
| 46 | acf_render_field_label( $field ); |
| 47 | } |
| 48 | |
| 49 | /** |
| 50 | * acf_render_field_wrap_description |
| 51 | * |
| 52 | * Renders the field's instructions. |
| 53 | * |
| 54 | * @date 19/9/17 |
| 55 | * @since 5.6.3 |
| 56 | * @deprecated 5.6.5 |
| 57 | * |
| 58 | * @param array $field The field array. |
| 59 | * @return void |
| 60 | */ |
| 61 | function acf_render_field_wrap_description( $field ) { |
| 62 | |
| 63 | // Warning. |
| 64 | _deprecated_function( __FUNCTION__, '5.7.11', 'acf_render_field_instructions()' ); |
| 65 | |
| 66 | // Render. |
| 67 | acf_render_field_instructions( $field ); |
| 68 | } |
| 69 | |
| 70 | /** |
| 71 | * Returns and array of fields for the given $parent_id. |
| 72 | * |
| 73 | * @date 27/02/2014 |
| 74 | * @since 5.0.0. |
| 75 | * @deprecated 5.7.11 |
| 76 | * |
| 77 | * @param integer $parent_id The parent ID. |
| 78 | * @return array |
| 79 | */ |
| 80 | function acf_get_fields_by_id( $parent_id = 0 ) { |
| 81 | |
| 82 | // Warning. |
| 83 | _deprecated_function( __FUNCTION__, '5.7.11', 'acf_get_fields()' ); |
| 84 | |
| 85 | // Return fields. |
| 86 | return acf_get_fields( |
| 87 | array( |
| 88 | 'ID' => $parent_id, |
| 89 | 'key' => "group_$parent_id", |
| 90 | ) |
| 91 | ); |
| 92 | } |
| 93 | |
| 94 | /** |
| 95 | * acf_update_option |
| 96 | * |
| 97 | * A wrapper for the WP update_option but provides logic for a 'no' autoload |
| 98 | * |
| 99 | * @date 4/01/2014 |
| 100 | * @since 5.0.0 |
| 101 | * @deprecated 5.7.11 |
| 102 | * |
| 103 | * @param string $option The option name. |
| 104 | * @param string $value The option value. |
| 105 | * @param string $autoload An optional autoload value. |
| 106 | * @return boolean |
| 107 | */ |
| 108 | function acf_update_option( $option = '', $value = '', $autoload = null ) { |
| 109 | |
| 110 | // Warning. |
| 111 | _deprecated_function( __FUNCTION__, '5.7.11', 'update_option()' ); |
| 112 | |
| 113 | // Update. |
| 114 | if ( $autoload === null ) { |
| 115 | $autoload = (bool) acf_get_setting( 'autoload' ); |
| 116 | } |
| 117 | return update_option( $option, $value, $autoload ); |
| 118 | } |
| 119 | |
| 120 | /** |
| 121 | * acf_get_field_reference |
| 122 | * |
| 123 | * Finds the field key for a given field name and post_id. |
| 124 | * |
| 125 | * @date 26/1/18 |
| 126 | * @since 5.6.5 |
| 127 | * @deprecated 5.6.8 |
| 128 | * |
| 129 | * @param string $field_name The name of the field. eg 'sub_heading' |
| 130 | * @param mixed $post_id The post_id of which the value is saved against |
| 131 | * @return string $reference The field key |
| 132 | */ |
| 133 | function acf_get_field_reference( $field_name, $post_id ) { |
| 134 | |
| 135 | // Warning. |
| 136 | _deprecated_function( __FUNCTION__, '5.6.8', 'acf_get_reference()' ); |
| 137 | |
| 138 | // Return reference. |
| 139 | return acf_get_reference( $field_name, $post_id ); |
| 140 | } |
| 141 | |
| 142 | /** |
| 143 | * acf_get_dir |
| 144 | * |
| 145 | * Returns the plugin url to a specified file. |
| 146 | * |
| 147 | * @date 28/09/13 |
| 148 | * @since 5.0.0 |
| 149 | * @deprecated 5.6.8 |
| 150 | * |
| 151 | * @param string $filename The specified file. |
| 152 | * @return string |
| 153 | */ |
| 154 | function acf_get_dir( $filename = '' ) { |
| 155 | |
| 156 | // Warning. |
| 157 | _deprecated_function( __FUNCTION__, '5.6.8', 'acf_get_url()' ); |
| 158 | |
| 159 | // Return. |
| 160 | return acf_get_url( $filename ); |
| 161 | } |
| 162 |