Blocks
1 year ago
admin
1 year ago
ajax
1 year ago
api
1 year ago
fields
1 year ago
forms
1 year ago
legacy
1 year ago
locations
1 year ago
post-types
1 year ago
rest-api
1 year ago
walkers
1 year ago
acf-bidirectional-functions.php
1 year ago
acf-field-functions.php
1 year ago
acf-field-group-functions.php
1 year ago
acf-form-functions.php
1 year ago
acf-helper-functions.php
1 year ago
acf-hook-functions.php
1 year ago
acf-input-functions.php
1 year ago
acf-internal-post-type-functions.php
1 year ago
acf-meta-functions.php
1 year ago
acf-post-functions.php
1 year ago
acf-post-type-functions.php
1 year ago
acf-taxonomy-functions.php
1 year ago
acf-user-functions.php
1 year ago
acf-utility-functions.php
1 year ago
acf-value-functions.php
1 year ago
acf-wp-functions.php
1 year ago
assets.php
1 year ago
blocks.php
1 year ago
class-acf-data.php
1 year ago
class-acf-internal-post-type.php
1 year ago
class-acf-options-page.php
1 year ago
class-acf-site-health.php
1 year ago
compatibility.php
1 year ago
deprecated.php
1 year ago
fields.php
1 year ago
index.php
1 year ago
l10n.php
1 year ago
local-fields.php
1 year ago
local-json.php
1 year ago
local-meta.php
1 year ago
locations.php
1 year ago
loop.php
1 year ago
media.php
1 year ago
rest-api.php
1 year ago
revisions.php
1 year ago
scf-ui-options-page-functions.php
1 year ago
third-party.php
1 year ago
upgrades.php
1 year ago
validation.php
1 year ago
wpml.php
1 year ago
deprecated.php
153 lines
| 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 ACF 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 ACF 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 | * Returns and array of fields for the given $parent_id. |
| 63 | * |
| 64 | * @date 27/02/2014 |
| 65 | * @since ACF 5.0.0. |
| 66 | * @deprecated 5.7.11 |
| 67 | * |
| 68 | * @param integer $parent_id The parent ID. |
| 69 | * @return array |
| 70 | */ |
| 71 | function acf_get_fields_by_id( $parent_id = 0 ) { |
| 72 | |
| 73 | // Warning. |
| 74 | _deprecated_function( __FUNCTION__, '5.7.11', 'acf_get_fields()' ); |
| 75 | |
| 76 | // Return fields. |
| 77 | return acf_get_fields( |
| 78 | array( |
| 79 | 'ID' => $parent_id, |
| 80 | 'key' => "group_$parent_id", |
| 81 | ) |
| 82 | ); |
| 83 | } |
| 84 | |
| 85 | /** |
| 86 | * acf_update_option |
| 87 | * |
| 88 | * A wrapper for the WP update_option but provides logic for a 'no' autoload |
| 89 | * |
| 90 | * @date 4/01/2014 |
| 91 | * @since ACF 5.0.0 |
| 92 | * @deprecated 5.7.11 |
| 93 | * |
| 94 | * @param string $option The option name. |
| 95 | * @param string $value The option value. |
| 96 | * @param string $autoload An optional autoload value. |
| 97 | * @return boolean |
| 98 | */ |
| 99 | function acf_update_option( $option = '', $value = '', $autoload = null ) { |
| 100 | |
| 101 | // Warning. |
| 102 | _deprecated_function( __FUNCTION__, '5.7.11', 'update_option()' ); |
| 103 | |
| 104 | // Update. |
| 105 | if ( $autoload === null ) { |
| 106 | $autoload = (bool) acf_get_setting( 'autoload' ); |
| 107 | } |
| 108 | return update_option( $option, $value, $autoload ); |
| 109 | } |
| 110 | |
| 111 | /** |
| 112 | * acf_get_field_reference |
| 113 | * |
| 114 | * Finds the field key for a given field name and post_id. |
| 115 | * |
| 116 | * @date 26/1/18 |
| 117 | * @since ACF 5.6.5 |
| 118 | * @deprecated 5.6.8 |
| 119 | * |
| 120 | * @param string $field_name The name of the field. eg 'sub_heading' |
| 121 | * @param mixed $post_id The post_id of which the value is saved against |
| 122 | * @return string $reference The field key |
| 123 | */ |
| 124 | function acf_get_field_reference( $field_name, $post_id ) { |
| 125 | |
| 126 | // Warning. |
| 127 | _deprecated_function( __FUNCTION__, '5.6.8', 'acf_get_reference()' ); |
| 128 | |
| 129 | // Return reference. |
| 130 | return acf_get_reference( $field_name, $post_id ); |
| 131 | } |
| 132 | |
| 133 | /** |
| 134 | * acf_get_dir |
| 135 | * |
| 136 | * Returns the plugin url to a specified file. |
| 137 | * |
| 138 | * @date 28/09/13 |
| 139 | * @since ACF 5.0.0 |
| 140 | * @deprecated 5.6.8 |
| 141 | * |
| 142 | * @param string $filename The specified file. |
| 143 | * @return string |
| 144 | */ |
| 145 | function acf_get_dir( $filename = '' ) { |
| 146 | |
| 147 | // Warning. |
| 148 | _deprecated_function( __FUNCTION__, '5.6.8', 'acf_get_url()' ); |
| 149 | |
| 150 | // Return. |
| 151 | return acf_get_url( $filename ); |
| 152 | } |
| 153 |