Changeset 3384881
- Timestamp:
- 10/26/2025 11:23:47 PM (5 months ago)
- Location:
- lct-useful-shortcodes-functions/trunk
- Files:
-
- 1 deleted
- 23 edited
-
code/__init.php (modified) (1 diff)
-
code/admin/taxonomies.php (modified) (12 diffs)
-
code/api/_helpers.php (modified) (2 diffs)
-
code/api/class.php (modified) (1 diff)
-
code/api/deprecated_functions.php (modified) (3 diffs)
-
code/api/get.php (modified) (1 diff)
-
code/features/access.php (modified) (3 diffs)
-
code/features/shortcodes/file_processor.php (modified) (1 diff)
-
code/plugins/acf/_loaded.php (modified) (2 diffs)
-
code/plugins/acf/api/_helpers.php (modified) (2 diffs)
-
code/plugins/acf/api/form.php (modified) (1 diff)
-
code/plugins/acf/api/get.php (modified) (12 diffs)
-
code/plugins/acf/api/is.php (modified) (1 diff)
-
code/plugins/acf/dev_checks.php (modified) (13 diffs)
-
code/plugins/acf/field-types/send_password/class-v5.php (modified) (1 diff)
-
code/plugins/acf/filters_load_field.php (modified) (1 diff)
-
code/plugins/acf/instant_save.php (modified) (2 diffs)
-
code/plugins/acf/op_main_fixes_cleanups.php (modified) (6 diffs)
-
code/plugins/acf/public.php (deleted)
-
code/public/class.php (modified) (1 diff)
-
code/wp-admin/admin/loader.php (modified) (1 diff)
-
code/wp-admin/admin/onetime.php (modified) (2 diffs)
-
lct-useful-shortcodes-functions.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lct-useful-shortcodes-functions/trunk/code/__init.php
r3337494 r3384881 56 56 * Globalized Classes 57 57 */ 58 /**59 * @var lct_acf_public60 * @since LCT 7.4261 */62 public $acf_public;63 58 /** 64 59 * @var lct_acf_public_choices -
lct-useful-shortcodes-functions/trunk/code/admin/taxonomies.php
r3337494 r3384881 183 183 184 184 $labels = [ 185 'name' => $capitals,186 'singular_name' => $capital,187 'menu_name' => $capitals,188 'all_items' => "All {$capitals}",189 'edit_item' => "Edit {$capital}",190 'view_item' => "View {$capital}",191 'update_item' => "Update {$capital}",192 'add_new_item' => "Add New {$capital}",193 'new_item_name' => "New {$capital} Name",194 'parent_item' => "Parent {$capital}",195 'parent_item_colon' => "Parent {$capitals}:",196 'search_items' => "Search {$capitals}",197 'popular_items' => "Popular {$capitals}",198 'separate_items_with_commas' => "Separate {$lowercases} with commas",199 'add_or_remove_items' => "Add or remove {$lowercases}",200 'choose_from_most_used' => "Choose from the most used {$lowercases}",201 'not_found' => "No {$lowercases} found."185 'name' => $capitals, 186 'singular_name' => $capital, 187 'menu_name' => $capitals, 188 'all_items' => "All {$capitals}", 189 'edit_item' => "Edit {$capital}", 190 'view_item' => "View {$capital}", 191 'update_item' => "Update {$capital}", 192 'add_new_item' => "Add New {$capital}", 193 'new_item_name' => "New {$capital} Name", 194 'parent_item' => "Parent {$capital}", 195 'parent_item_colon' => "Parent {$capitals}:", 196 'search_items' => "Search {$capitals}", 197 'popular_items' => "Popular {$capitals}", 198 'separate_items_with_commas' => "Separate {$lowercases} with commas", 199 'add_or_remove_items' => "Add or remove {$lowercases}", 200 'choose_from_most_used' => "Choose from the most used {$lowercases}", 201 'not_found' => "No {$lowercases} found." 202 202 ]; 203 203 … … 273 273 * @unused param $class 274 274 * @since 0.0 275 * @verified 2025.0 4.02275 * @verified 2025.09.06 276 276 */ 277 277 function register_post_status( $taxonomy, $post_types ) 278 278 { 279 279 if ( 280 empty( $post_types ) 281 || //If a post_type(s) is not set 282 ! lct_plugin_active( 'acf' ) 283 || //If ACF is not installed 284 ! lct_is_status_taxonomy( $taxonomy ) //If the taxonomy is not a status taxonomy 280 empty( $post_types ) //If a post_type(s) is not set 281 || ! lct_plugin_active( 'acf' ) //If ACF is not installed 282 || ! lct_is_status_taxonomy( $taxonomy ) //If the taxonomy is not a status taxonomy 285 283 ) { 286 284 return; … … 289 287 290 288 $cache_key = function_exists( 'afwp_cache_key' ) 291 ? afwp_cache_key( afwp_cache_vars( $taxonomy ) ) : lct_cache_key( compact( 'taxonomy' ) );289 ? afwp_cache_key( afwp_cache_vars( $taxonomy ) ) : lct_cache_key( compact( 'taxonomy' ) ); 292 290 $update_terms = false; 293 291 294 292 295 293 if ( ( $terms_to_register = get_transient( $cache_key ) ) === false ) { 296 $tax_args = [ 297 'taxonomy' => $taxonomy, 298 'hide_empty' => false, 299 'hierarchical' => true, 300 'lct:::tax_disable' => true, 294 $terms_to_register = []; 295 $tax_args = [ 296 'taxonomy' => $taxonomy, 297 'hide_empty' => false, 298 'hierarchical' => true, 299 'lct:::tax_disable' => true, 301 300 ]; 302 $terms = get_terms( $tax_args );301 $terms = get_terms( $tax_args ); 303 302 304 303 … … 363 362 364 363 $terms_to_register[] = [ 365 'slug' => $slug,366 'args' => $args,367 'post_types' => $post_types,364 'slug' => $slug, 365 'args' => $args, 366 'post_types' => $post_types, 368 367 ]; 369 368 } … … 398 397 399 398 if ( 400 lct_wp_admin_non_ajax()401 && in_array( $pagenow, [ 'post.php', 'post-new.php' ] )402 && lct_get_setting( 'post_types_w_statuses', [] )399 lct_wp_admin_non_ajax() 400 && in_array( $pagenow, [ 'post.php', 'post-new.php' ] ) 401 && lct_get_setting( 'post_types_w_statuses', [] ) 403 402 ) { 404 403 add_action( "admin_footer-{$pagenow}", [ $this, 'extend_submitdiv_post_status' ] ); … … 407 406 408 407 if ( 409 lct_wp_admin_non_ajax()410 && $pagenow === 'edit.php'411 && ! empty( $_GET['post_type'] )412 && ( $post_types_w_statuses = lct_get_setting( 'post_types_w_statuses', [] ) )413 && in_array( $_GET['post_type'], $post_types_w_statuses )408 lct_wp_admin_non_ajax() 409 && $pagenow === 'edit.php' 410 && ! empty( $_GET['post_type'] ) 411 && ( $post_types_w_statuses = lct_get_setting( 'post_types_w_statuses', [] ) ) 412 && in_array( $_GET['post_type'], $post_types_w_statuses ) 414 413 ) { 415 414 add_action( "admin_footer-{$pagenow}", [ $this, 'extend_quick_edit_post_status' ] ); … … 432 431 //Abort if we're on the wrong post type, but only if we have a restriction 433 432 if ( 434 empty( $post_type )435 || (436 ( $post_types_w_statuses = lct_get_setting( 'post_types_w_statuses', [] ) )437 && ! in_array( $post_type, $post_types_w_statuses )438 )433 empty( $post_type ) 434 || ( 435 ( $post_types_w_statuses = lct_get_setting( 'post_types_w_statuses', [] ) ) 436 && ! in_array( $post_type, $post_types_w_statuses ) 437 ) 439 438 ) { 440 439 return; … … 450 449 foreach ( $wp_post_statuses as $status ) { 451 450 if ( 452 ! $status->_builtin453 && isset( $status->post_types )454 && in_array( $post_type, $status->post_types )451 ! $status->_builtin 452 && isset( $status->post_types ) 453 && in_array( $post_type, $status->post_types ) 455 454 ) { 456 455 //Match against the current posts status … … 516 515 foreach ( $wp_post_statuses as $status ) { 517 516 if ( 518 ! $status->_builtin519 && isset( $status->post_types )520 && in_array( $post_type, $status->post_types )517 ! $status->_builtin 518 && isset( $status->post_types ) 519 && in_array( $post_type, $status->post_types ) 521 520 ) { 522 521 //Match against the current posts status … … 551 550 552 551 if ( 553 ! lct_plugin_active( 'afwp' )554 && lct_is_status_taxonomy( $current_screen->taxonomy )552 ! lct_plugin_active( 'afwp' ) 553 && lct_is_status_taxonomy( $current_screen->taxonomy ) 555 554 ) { //If the taxonomy is a status taxonomy ?> 556 555 <style> … … 590 589 591 590 if ( 592 ! lct_plugin_active( 'afwp' )593 && lct_is_status_taxonomy( $current_screen->taxonomy )591 ! lct_plugin_active( 'afwp' ) 592 && lct_is_status_taxonomy( $current_screen->taxonomy ) 594 593 ) { //If the taxonomy is a status taxonomy ?> 595 594 <style> … … 624 623 { 625 624 if ( 626 ( $bt = debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS, 5 ) )627 && isset( $bt[4]['function'] )628 && in_array( $bt[4]['function'], [ 'acf_get_post_title', 'register_and_do_post_meta_boxes' ] )625 ( $bt = debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS, 5 ) ) 626 && isset( $bt[4]['function'] ) 627 && in_array( $bt[4]['function'], [ 'acf_get_post_title', 'register_and_do_post_meta_boxes' ] ) 629 628 ) { 630 629 switch ( $bt[4]['function'] ) { 631 630 case 'acf_get_post_title': 632 631 if ( 633 function_exists( 'afwp_cache_key' )634 && ( $cache_key = afwp_cache_key( afwp_cache_vars( 'replace_func', 'lct_taxonomies::register_post_status', $post->post_type . '_status' ) ) )635 && ( $terms_to_register = get_transient( $cache_key ) )636 && ( $terms_to_register = array_column( $terms_to_register, 'slug' ) )637 && in_array( $post_status, $terms_to_register )632 function_exists( 'afwp_cache_key' ) 633 && ( $cache_key = afwp_cache_key( afwp_cache_vars( 'replace_func', 'lct_taxonomies::register_post_status', $post->post_type . '_status' ) ) ) 634 && ( $terms_to_register = get_transient( $cache_key ) ) 635 && ( $terms_to_register = array_column( $terms_to_register, 'slug' ) ) 636 && in_array( $post_status, $terms_to_register ) 638 637 ) { 639 638 $post_status = 'publish'; -
lct-useful-shortcodes-functions/trunk/code/api/_helpers.php
r3337494 r3384881 945 945 * @return array 946 946 * @since LCT 7.3 947 * @verified 202 0.07.02947 * @verified 2025.07.31 948 948 */ 949 949 function lct_pder_get_email_template( $post_id, $template ) … … 969 969 'slug' => $template, 970 970 ]; 971 } else { 972 if ( 973 ( $selector = zxzacf( 'email-reminder_templates' ) ) 974 && ( $repeater = lct_acf_get_repeater_array( $selector, $post_id ) ) 975 && ! empty( $repeater[ $template ] ) 976 && ( $r = $repeater[ $template ] ) 977 ) { 978 if ( ! empty( $r['users_to'] ) ) { 979 $r['users_to_users'] = $r['users_to']; 980 $r['users_to'] = []; 981 982 983 foreach ( $r['users_to_users'] as $user ) { 984 $r['users_to'][] = $user->user_email; 985 } 986 987 988 $r['users_to_str'] = implode( ',', $r['users_to'] ); 971 } elseif ( $r = afwp_acf_repeater_array_row( 'lct:::email-reminder_templates', $post_id, $template, 'slug' ) ) { 972 if ( ! empty( $r['users_to'] ) ) { 973 $r['users_to_users'] = $r['users_to']; 974 $r['users_to'] = []; 975 976 977 foreach ( $r['users_to_users'] as $user ) { 978 $r['users_to'][] = $user->user_email; 989 979 } 990 980 991 981 992 $r['queue_delay'] = (float) $r['queue_delay']; 993 } 982 $r['users_to_str'] = implode( ',', $r['users_to'] ); 983 } 984 985 986 $r['queue_delay'] = (float) $r['queue_delay']; 994 987 } 995 988 -
lct-useful-shortcodes-functions/trunk/code/api/class.php
r3337494 r3384881 595 595 global $wpdb; 596 596 597 $fields = lct_acf_get_field_groups_fields( [ 'options_page' => true ] );597 $fields = afwp_acf_get_fields_of_groups( [ 'options_page' => true ] ); 598 598 599 599 -
lct-useful-shortcodes-functions/trunk/code/api/deprecated_functions.php
r3337494 r3384881 662 662 663 663 664 $fields = lct_acf_get_field_groups_fields( $args );664 $fields = afwp_acf_get_fields_of_groups( $args ); 665 665 666 666 … … 766 766 767 767 if ( ! $success ) { 768 $fields = lct_acf_get_field_groups_fields( [ 'taxonomy' => $taxonomy ] );768 $fields = afwp_acf_get_fields_of_groups( [ 'taxonomy' => $taxonomy ] ); 769 769 770 770 … … 804 804 805 805 if ( $user_id ) { 806 $fields = lct_acf_get_field_groups_fields( [ 'user_id' => $user_id ] );806 $fields = afwp_acf_get_fields_of_groups( [ 'user_id' => $user_id ] ); 807 807 808 808 -
lct-useful-shortcodes-functions/trunk/code/api/get.php
r3337494 r3384881 205 205 { 206 206 return 'options'; 207 }208 209 210 /**211 * Turn a value into a dollar amount212 *213 * @param float|string|int $value214 * @param bool $format_value215 *216 * @return string|float217 * @since 7.63218 * @verified 2024.04.24219 */220 function lct_get_dollar( $value, $format_value = true )221 {222 $amount = lct_get_un_dollar( $value );223 224 225 if ( $format_value ) {226 $amount = number_format( $amount, 2 );227 if ( $amount < 0 ) {228 $amount = '- $' . str_replace( '-', '', $amount );229 } else {230 $amount = '$' . $amount;231 }232 }233 234 235 return $amount;236 }237 238 239 /**240 * Turn a dollar value into a float amount241 *242 * @param float|string|int $value243 *244 * @return float245 * @since 7.63246 * @verified 2024.04.24247 */248 function lct_get_un_dollar( $value )249 {250 $value = str_replace( [ '$', ',', ' ', '%' ], '', $value );251 is_numeric( $value ) ? : $value = 0.0;252 253 254 $amount = (float) $value;255 256 257 return round( $amount, 2 );258 }259 260 261 /**262 * Turn a value into a dollar amount263 *264 * @param $value265 *266 * @return string267 * @since 2019.1268 * @verified 2024.04.24269 */270 function lct_get_dollar_wo_symbol( $value )271 {272 return lct_get_dollar( $value, false );273 }274 275 276 /**277 * Turn a number into a negative one, or positive if it is already negative278 *279 * @param $value280 *281 * @return float282 * @since 2018.11283 * @verified 2018.02.08284 */285 function lct_get_negative_number( $value )286 {287 $value = lct_get_un_dollar( $value );288 289 290 if ( $value ) {291 $value = $value * - 1;292 }293 294 295 return (float) $value;296 }297 298 299 /**300 * Turn a dollar amount into a negative one, or positive if it is already negative301 *302 * @param $value303 *304 * @return string305 * @since 2018.11306 * @verified 2018.02.08307 */308 function lct_get_negative_dollar( $value )309 {310 $value = lct_get_negative_number( $value );311 312 313 return lct_get_dollar( $value );314 207 } 315 208 -
lct-useful-shortcodes-functions/trunk/code/features/access.php
r3337494 r3384881 1467 1467 * Vars 1468 1468 */ 1469 $viewonly = zxzu( 'viewonly' );1469 $viewonly = 'lct_viewonly'; 1470 1470 $already_processed = lct_get_later( 'acf_render_field_viewonly_fields', '', [] ); 1471 1471 … … 1489 1489 1490 1490 if ( 1491 $field['type'] === 'repeater' 1491 afwp_acf_field_element( $field, $viewonly ) 1492 && afwp_acf_is_field_repeater( $field ) 1492 1493 && ! empty( $field[ $viewonly ] ) 1493 1494 ) { … … 1543 1544 } elseif ( 1544 1545 ! empty( $field['type'] ) 1545 && $field['type'] !== 'repeater'1546 && ! afwp_acf_is_field_repeater( $field ) 1546 1547 ) { 1547 1548 echo '<script>jQuery( \'' . $js_selector . '\').attr( \'disabled\', true );</script>'; -
lct-useful-shortcodes-functions/trunk/code/features/shortcodes/file_processor.php
r2894473 r3384881 85 85 * @return bool|string 86 86 */ 87 function processor( 88 $a, 89 /** @noinspection PhpUnusedParameterInspection */ 90 $content = null, 91 $shortcode 92 ) { 87 function processor( $a, $content = null, $shortcode = null ) 88 { 93 89 if ( empty( $a['file'] ) ) { 94 90 return false; -
lct-useful-shortcodes-functions/trunk/code/plugins/acf/_loaded.php
r3337494 r3384881 134 134 * @date 2023.05.17 135 135 * @since 2023.02 136 * @verified 2025. 03.31136 * @verified 2025.10.13 137 137 */ 138 138 function prepare_fields_for_import_store() 139 139 { 140 if ( ! get_transient( 'afwp_acf_loaded_references' ) ) { 140 if ( 141 ! ( $tmp = get_transient( 'afwp_acf_loaded_references' ) ) 142 || ( 143 ! empty( $tmp['count_key'] ) 144 && ! empty( $this->references['count_key'] ) 145 && count( $tmp['count_key'] ) < count( $this->references['count_key'] ) 146 ) 147 ) { 141 148 set_transient( 'afwp_acf_loaded_references', $this->references, MONTH_IN_SECONDS ); 142 149 } … … 450 457 function load_references() 451 458 { 452 if ( ! isset( $this->references['keys'] ) ) { 453 $this->references = get_transient( 'afwp_acf_loaded_references' ); 459 if ( 460 ! isset( $this->references['keys'] ) 461 && ( $tmp = get_transient( 'afwp_acf_loaded_references' ) ) 462 ) { 463 $this->references = $tmp; 454 464 } 455 465 -
lct-useful-shortcodes-functions/trunk/code/plugins/acf/api/_helpers.php
r3337494 r3384881 357 357 358 358 /** 359 * Get an LCT field type list360 *361 * @param null $list362 * @param null $field363 * @param null $array_key364 *365 * @return array366 * @since 2017.83367 * @verified 2018.02.20368 */369 function lct_acf_get_field_types( $list = null, $field = null, $array_key = null )370 {371 if ( $list ) {372 $r = lct_get_setting( 'field_types_' . $list, [] );373 } else {374 $r = lct_get_setting( 'field_types', [] );375 }376 377 378 if (379 ! empty( $r )380 && $field381 ) {382 /**383 * Return early if cache is found384 */385 $cache_key = lct_cache_key( compact( 'list', 'field', 'array_key' ) );386 if ( lct_isset_cache( $cache_key ) ) {387 return lct_get_cache( $cache_key );388 }389 390 391 foreach ( $r as $k => $v ) {392 if ( $array_key ) {393 $r[ $k ] = $v->$field[ $array_key ];394 } else {395 $r[ $k ] = $v->$field;396 }397 }398 399 400 /**401 * Save the value to the cache402 */403 lct_set_cache( $cache_key, $r );404 }405 406 407 return $r;408 }409 410 411 /**412 * Get the ACF label of a selector413 *414 * @param string $selector415 * @param int $post_id416 *417 * @return string418 * @since 2018.11419 * @verified 2018.10.08420 */421 function lct_acf_get_field_label( $selector, $post_id )422 {423 $r = '';424 425 426 if ( $obj = get_field_object( $selector, $post_id, false, false ) ) {427 $r = acf_get_field_label( $obj );428 }429 430 431 return $r;432 }433 434 435 /**436 * Get a label of a selector, don't include any required suffix437 *438 * @param string $selector439 * @param int $post_id440 *441 * @return string442 * @since 2018.11443 * @verified 2018.02.07444 */445 function lct_acf_get_field_label_no_required( $selector, $post_id = false )446 {447 $r = '';448 $obj = get_field_object( $selector, $post_id, false, false );449 450 451 if ( $obj ) {452 $obj['required'] = false;453 454 455 $r = acf_get_field_label( $obj );456 }457 458 459 return $r;460 }461 462 463 /**464 359 * Get the post_id for a field 465 360 * … … 934 829 function lct_acf_validate_subfield_parent( $field, $allowed_parents, $post_id = false ) 935 830 { 936 if ( ! lct_acf_is_repeater_subfield( $field ) ) {831 if ( ! afwp_acf_is_repeater_subfield( $field ) ) { 937 832 return false; 938 833 } -
lct-useful-shortcodes-functions/trunk/code/plugins/acf/api/form.php
r3337494 r3384881 959 959 $post_id = $field['post_id'] = lct_get_field_post_id( $field, $post_id ); 960 960 if ( 961 $field['type'] === 'repeater'961 afwp_acf_is_field_repeater( $field ) 962 962 && ! isset( $raw_value[0] ) 963 963 ) { -
lct-useful-shortcodes-functions/trunk/code/plugins/acf/api/get.php
r3337494 r3384881 187 187 188 188 /** 189 * Returns an array of all sub_fields of an ACF Repeater field array190 * You can set the key of each element to a desired $sub_field_key of the ACF Repeater, otherwise it will be the first191 *192 * @param string $selector193 * @param int $post_id194 * @param string $sub_field_key195 * @param int $max_count196 *197 * @return array198 * @since 2017.58199 * @verified 2019.01.16200 */201 function lct_acf_get_repeater_array( $selector, $post_id, $sub_field_key = null, $max_count = 0 )202 {203 /**204 * Return early if cache is found205 */206 $cache_key = lct_cache_key( compact( 'selector', 'post_id', 'sub_field_key', 'max_count' ) );207 if ( lct_isset_cache( $cache_key ) ) {208 return lct_get_cache( $cache_key );209 }210 211 212 $r = [];213 $row = 1;214 215 216 if (217 ( $repeater = get_field( $selector, $post_id ) )218 && ! empty( $repeater )219 ) {220 /**221 * Set the key to the first repeater field if it is not set222 */223 if ( ! $sub_field_key ) {224 $sub_field_key = key( $repeater[0] );225 }226 227 228 /**229 * Build the array230 */231 foreach ( $repeater as $row_data ) {232 $return_key = null;233 234 if ( isset( $row_data[ $sub_field_key ] ) ) {235 $return_key = $row_data[ $sub_field_key ];236 }237 238 239 foreach ( $row_data as $data_key => $data ) {240 /**241 * Term Objects242 */243 if ( lct_is_a( $data, 'WP_Term' ) ) {244 if ( $data_key === 'status' ) //We have to have this for some old compatibility245 {246 $row_data[ $data_key . lct_pre_us( 'term_id' ) ] = $data->term_id;247 }248 $row_data['term_id'] = $data->term_id;249 250 251 if ( is_object( $row_data[ $sub_field_key ] ) ) {252 $return_key = $data->term_id;253 }254 255 256 /**257 * Post Objects258 */259 } elseif ( lct_is_a( $data, 'WP_Post' ) ) {260 $row_data['ID'] = $data->ID;261 262 263 if ( is_object( $row_data[ $sub_field_key ] ) ) {264 $return_key = $data->ID;265 }266 }267 }268 269 270 if (271 $return_key === null272 && isset( $row_data[ $sub_field_key ] )273 ) {274 $return_key = $row_data[ $sub_field_key ];275 }276 277 278 $r[ $return_key ] = $row_data;279 280 281 /**282 * Stop if we reach max_count283 */284 if (285 $max_count286 && $row >= $max_count287 ) {288 break;289 }290 291 292 $row ++;293 }294 }295 296 297 /**298 * Save the value to the cache299 */300 lct_set_cache( $cache_key, $r );301 302 303 return $r;304 }305 306 307 /**308 * Returns the keys of each element of an ACF Repeater field array309 * You can set the $sub_field_key of the ACF Repeater you would like returned, otherwise it will return the first310 *311 * @param string $selector312 * @param int $post_id313 * @param string $sub_field_key314 * @param int $max_count315 *316 * @return array317 * @since 2017.83318 * @verified 2019.01.10319 */320 function lct_acf_get_repeater_array_keys( $selector, $post_id, $sub_field_key = null, $max_count = 0 )321 {322 if (323 ( $r = lct_acf_get_repeater_array( $selector, $post_id, $sub_field_key, $max_count ) )324 && ! empty( $r )325 ) {326 $r = array_keys( $r );327 }328 329 330 return $r;331 }332 333 334 /**335 * Returns the key of a specific ($sub_field_index) indexed element of an ACF Repeater field array336 * You can set the $sub_field_key of the ACF Repeater you would like returned, otherwise it will return the first337 *338 * @param string $selector339 * @param int $post_id340 * @param string $sub_field_key341 * @param int $sub_field_index342 *343 * @return string|mixed344 * @since 2018.59345 * @verified 2019.01.10346 */347 function lct_acf_get_repeater_array_key( $selector, $post_id, $sub_field_key = null, $sub_field_index = 0 )348 {349 $r = null;350 351 352 if (353 ( $keys = lct_acf_get_repeater_array_keys( $selector, $post_id, $sub_field_key ) )354 && ! empty( $keys[ $sub_field_index ] )355 ) {356 $r = $keys[ $sub_field_index ];357 }358 359 360 return $r;361 }362 363 364 /**365 * Returns the values of each element of an ACF Repeater field array366 * You can set the $sub_field_key of the ACF Repeater you would like returned, otherwise it will return the first367 *368 * @param string $selector369 * @param int $post_id370 * @param string $sub_field371 * @param string $sub_field_key372 * @param int $max_count373 *374 * @return array375 * @since 2019.1376 * @verified 2019.04.09377 */378 function lct_acf_get_repeater_array_values( $selector, $post_id, $sub_field, $sub_field_key = null, $max_count = 0 )379 {380 $r = [];381 382 383 if (384 ( $arr = lct_acf_get_repeater_array( $selector, $post_id, $sub_field_key, $max_count ) )385 && ! empty( $arr )386 ) {387 foreach ( $arr as $k => $v ) {388 if ( isset( $v[ $sub_field ] ) ) {389 $r[ $k ] = $v[ $sub_field ];390 }391 }392 }393 394 395 return $r;396 }397 398 399 /**400 * Returns the value of a specific ($sub_field_index) indexed element of an ACF Repeater field array401 * You can set the $sub_field_key of the ACF Repeater you would like returned, otherwise it will return the first402 *403 * @param string $selector404 * @param int $post_id405 * @param string $sub_field406 * @param string $sub_field_key407 * @param int $sub_field_index408 *409 * @return string|mixed410 * @since 2019.1411 * @verified 2019.01.10412 */413 function lct_acf_get_repeater_array_value( $selector, $post_id, $sub_field, $sub_field_key = null, $sub_field_index = 0 )414 {415 $r = null;416 417 418 if (419 ( $values = lct_acf_get_repeater_array_values( $selector, $post_id, $sub_field, $sub_field_key ) )420 && ! empty( $values )421 ) {422 if (423 ! $sub_field_key424 && is_int( $sub_field_index )425 ) {426 $values = array_values( $values );427 }428 429 430 if ( ! empty( $values[ $sub_field_index ] ) ) {431 $r = $values[ $sub_field_index ];432 }433 }434 435 436 return $r;437 }438 439 440 /**441 * Returns the value of a specific ($sub_field_index) indexed element of an ACF Repeater field array442 *443 * @param string $selector444 * @param int $post_id445 * @param string $sub_field446 * @param int $sub_field_index447 *448 * @return string|mixed449 * @since 2019.1450 * @verified 2019.01.10451 */452 function lct_acf_get_repeater_array_value_by_slug( $selector, $post_id, $sub_field, $sub_field_index = 0 )453 {454 $r = null;455 456 457 if (458 ( $value = lct_acf_get_repeater_array_value( $selector, $post_id, $sub_field, null, $sub_field_index ) )459 && ! empty( $value )460 ) {461 $r = $value;462 }463 464 465 return $r;466 }467 468 469 /**470 * Returns an imploded version of an ACF repeater471 *472 * @param $selector473 * @param $post_id474 * @param array $order475 * @param string $glue476 * @param int $max_count477 *478 * @return array479 * @since 7.12480 * @verified 2017.09.11481 */482 function lct_acf_get_repeater( $selector, $post_id, $order = [], $glue = ',', $max_count = 0 )483 {484 $r = [];485 $row = 1;486 $repeater = get_field( $selector, $post_id );487 488 489 if (490 ! empty( $repeater )491 && is_array( $repeater )492 ) {493 foreach ( $repeater as $row_data ) {494 $this_row = [];495 496 497 if ( ! empty( $row_data ) ) {498 if ( ! empty( $order ) ) {499 $order_count = 0;500 501 foreach ( $order as $data ) {502 if (503 isset( $row_data[ $data ] )504 && ( $value = $row_data[ $data ] )505 ) {506 if (507 is_object( $value )508 && lct_is_a( $value, 'WP_Term' )509 ) {510 $value = $value->name;511 }512 513 514 if ( $glue ) {515 if (516 is_array( $glue )517 && (518 (519 520 isset( $glue[ $order_count - 1 ] )521 && $glue[ $order_count - 1 ]522 )523 || (524 isset( $glue[ $order_count ]['pre'] )525 && isset( $glue[ $order_count ] )526 && $glue[ $order_count ]527 )528 )529 ) {530 if ( isset( $glue[ $order_count ]['callback'] ) ) {531 $value = call_user_func( $glue[ $order_count ]['callback'], $value );532 }533 534 535 if ( isset( $glue[ $order_count ]['pre'] ) ) {536 $this_row[] = $glue[ $order_count ]['pre'];537 $this_row[] = $value;538 $this_row[] = $glue[ $order_count ]['post'];539 } else {540 $this_row[] = $glue[ $order_count - 1 ];541 }542 } elseif ( ! is_array( $glue ) ) {543 $this_row[] = $glue;544 }545 }546 547 if ( ! isset( $glue[ $order_count ]['pre'] ) ) {548 $this_row[] = $value;549 }550 }551 552 $order_count ++;553 }554 555 $r[] = lct_return( $this_row );556 } else {557 foreach ( $row_data as $data ) {558 if ( $data ) {559 $this_row[] = $data;560 }561 }562 563 $r[] = lct_return( $this_row, $glue );564 }565 }566 567 568 if (569 $max_count570 && $row >= $max_count571 ) {572 break;573 }574 575 $row ++;576 }577 578 579 reset_rows();580 }581 582 583 return $r;584 }585 586 587 /**588 * Returns an imploded version of one sub_field of an ACF repeater589 * Similar: repeater_items_shortcode()590 *591 * @param $selector592 * @param $post_id593 * @param $sub_field594 * @param int $max_count595 * @param string $glue596 *597 * @return string598 * @since 7.3599 * @verified 2016.09.29600 */601 function lct_acf_get_imploded_repeater( $selector, $post_id, $sub_field, $max_count = 0, $glue = ',' )602 {603 $r = [];604 $row = 1;605 606 607 if ( have_rows( $selector, $post_id ) ) {608 while( have_rows( $selector, $post_id ) ) {609 the_row();610 611 $sub_field_value = get_sub_field( $sub_field );612 613 if ( $sub_field_value ) {614 $r[] = $sub_field_value;615 }616 617 if (618 $max_count619 && $row >= $max_count620 ) {621 break;622 }623 624 $row ++;625 }626 627 628 reset_rows();629 }630 631 632 return lct_return( $r, $glue );633 }634 635 636 /**637 * Get the ACF group of a field638 * Don't use this639 *640 * @param string|array $field_parent641 *642 * @return array643 * @since 2019.25644 * @verified 2019.11.01645 */646 function lct_acf_get_field_group_of_field( $field_parent )647 {648 $r = false;649 650 651 if ( is_array( $field_parent ) ) {652 $field_parent = $field_parent['parent'];653 }654 655 656 if (657 ( $group = acf_get_field_group( $field_parent ) )658 && acf_is_field_group( $group )659 ) {660 $r = $group;661 } elseif (662 acf_is_field_key( $field_parent )663 && ( $field = get_field_object( $field_parent, false, false, false ) )664 && ( $group = lct_acf_get_field_group_of_field( $field['parent'] ) )665 && acf_is_field_group( $group )666 ) {667 $r = $group;668 }669 670 671 return $r;672 }673 674 675 /**676 189 * Get an array of fields from groups 677 190 * //TODO: cs - Need to improve the speed of this - 6/12/2017 9:31 PM … … 1193 706 1194 707 1195 if ( lct_acf_is_field_repeater( $selector ) ) {708 if ( afwp_acf_is_field_repeater( $selector ) ) { 1196 709 $r = lct_acf_get_POST_values_w_selector_key( $r, false, true ); 1197 710 } elseif ( … … 1326 839 if ( 1327 840 $special_process !== true 1328 && ( $repeat er_key = substr( $special_process, 9 ) ) //remove repeater_841 && ( $repeat_key = substr( $special_process, 9 ) ) //remove repeater_ 1329 842 && is_array( $v ) 1330 && $k !== $repeat er_key843 && $k !== $repeat_key 1331 844 ) { 1332 845 $has_clones = false; … … 1354 867 count( $explode_k ) >= 3 1355 868 && ( $tmp = 'field_' . rtrim( $explode_k[1], '_' ) ) 1356 && lct_acf_is_field_clone( $tmp )869 && afwp_acf_is_field_clone( $tmp ) 1357 870 ) { 1358 871 $clone_parent_k = $tmp; … … 1361 874 1362 875 if ( 1363 ! lct_acf_is_field_clone( $tmp )876 ! afwp_acf_is_field_clone( $tmp ) 1364 877 || count( $explode_k ) < 3 1365 878 ) { … … 1456 969 * Loop thru a repeater 1457 970 */ 1458 if ( lct_acf_is_field_repeater( $key ) ) {971 if ( afwp_acf_is_field_repeater( $key ) ) { 1459 972 $v = lct_acf_get_POST_values_w_selector_key( $v, $return_field, 'repeater_' . $key ); 1460 973 } … … 1464 977 * Loop thru clones 1465 978 */ 1466 if ( lct_acf_is_field_clone( $key ) ) {979 if ( afwp_acf_is_field_clone( $key ) ) { 1467 980 $v = lct_acf_get_POST_values_w_selector_key( $v, $return_field, 'clone_' . $key ); 1468 981 } … … 1501 1014 */ 1502 1015 if ( 1503 lct_acf_is_field_seamless_clone( $key )1016 afwp_acf_is_field_seamless_clone( $key ) 1504 1017 && $special_process !== 'maintain_seamless_clones' 1505 1018 && ! empty( $r[ $selector ] ) … … 1630 1143 * Loop thru a repeater 1631 1144 */ 1632 if ( lct_acf_is_field_repeater( $key ) ) {1145 if ( afwp_acf_is_field_repeater( $key ) ) { 1633 1146 $selector = [ $selector => lct_acf_get_POST_key_selector_map( $v, true ) ]; 1634 1147 } … … 1638 1151 * Loop thru clones 1639 1152 */ 1640 if ( lct_acf_is_field_clone( $key ) ) {1153 if ( afwp_acf_is_field_clone( $key ) ) { 1641 1154 $selector = lct_acf_get_POST_key_selector_map( $v, 'clone_' . $key ); 1642 1155 } … … 1653 1166 */ 1654 1167 if ( 1655 lct_acf_is_field_seamless_clone( $key )1168 afwp_acf_is_field_seamless_clone( $key ) 1656 1169 && $special_process !== 'maintain_seamless_clones' 1657 1170 && ! empty( $r[ $key ] ) … … 1767 1280 1768 1281 return $selector; 1769 }1770 1771 1772 /**1773 * Check if the field is a repeater type field1774 *1775 * @param string $key //Should be a key, You can use a selector as well, but you may get the wrong field returned1776 *1777 * @return bool1778 * @date 2022.10.201779 * @since 2022.101780 * @verified 2022.10.241781 */1782 function lct_acf_is_field_repeater( $key )1783 {1784 /**1785 * Check the type1786 */1787 if (1788 ( $answer = acf_get_field( $key ) )1789 && $answer['type'] === 'repeater'1790 ) {1791 return true;1792 }1793 1794 1795 return false;1796 }1797 1798 1799 /**1800 * Check if the field is a clone type field1801 *1802 * @param string $key //Should be a key, You can use a selector as well, but you may get the wrong field returned1803 *1804 * @return bool1805 * @date 2022.10.201806 * @since 2022.101807 * @verified 2022.10.241808 */1809 function lct_acf_is_field_clone( $key )1810 {1811 /**1812 * Check the type1813 */1814 if (1815 ( $answer = acf_get_field( $key ) )1816 && $answer['type'] === 'clone'1817 ) {1818 return true;1819 }1820 1821 1822 return false;1823 }1824 1825 1826 /**1827 * Check if the field is a seamless clone type field1828 *1829 * @param string $key //Should be a key, You can use a selector as well, but you may get the wrong field returned1830 *1831 * @return bool1832 * @date 2022.10.201833 * @since 2022.101834 * @verified 2022.10.201835 */1836 function lct_acf_is_field_seamless_clone( $key )1837 {1838 /**1839 * Check the display1840 */1841 if (1842 lct_acf_is_field_clone( $key )1843 && ( $answer = acf_get_field( $key ) )1844 && ! empty( $answer['display'] )1845 && $answer['display'] === 'seamless'1846 ) {1847 return true;1848 }1849 1850 1851 return false;1852 1282 } 1853 1283 -
lct-useful-shortcodes-functions/trunk/code/plugins/acf/api/is.php
r3017144 r3384881 118 118 119 119 /** 120 * lct_acf_is_repeater_subfield121 * Returns true if the field is considered a subfield of a repeater122 *123 * @param array $field124 * @param mixed $post_id125 *126 * @return bool127 * @date 2020.10.05128 * @since 2020.13129 * @verified 2020.10.05130 * @noinspection PhpMissingParamTypeInspection131 */132 function lct_acf_is_repeater_subfield( $field, $post_id = false )133 {134 $r = false;135 136 137 if (138 acf_is_field_key( $field['parent'] )139 && ( $parent_obj = get_field_object( $field['parent'], $post_id ) )140 && $parent_obj['type'] === 'repeater'141 ) {142 $r = true;143 }144 145 146 return $r;147 }148 149 150 /**151 120 * Check if the request you are running is allowed 152 121 * -
lct-useful-shortcodes-functions/trunk/code/plugins/acf/dev_checks.php
r3263018 r3384881 731 731 */ 732 732 } else { 733 echo 'Please set the date in the <strong>"' . afwp_acf_ get_field_label( 'lct:::modified_posts_last_check', lct_o() ) . '"</strong> field above.';733 echo 'Please set the date in the <strong>"' . afwp_acf_field_label( 'lct:::modified_posts_last_check', lct_o() ) . '"</strong> field above.'; 734 734 } 735 735 } … … 1187 1187 */ 1188 1188 if ( 1189 ( $option_groups_fields = lct_acf_get_field_groups_fields( [ 'options_page' => true ] ) )1189 ( $option_groups_fields = afwp_acf_get_fields_of_groups( [ 'options_page' => true ] ) ) 1190 1190 && ! empty( $option_groups_fields ) 1191 1191 ) { … … 1252 1252 */ 1253 1253 if ( 1254 ( $option_groups_fields = lct_acf_get_field_groups_fields( [ 'options_page' => true ] ) )1254 ( $option_groups_fields = afwp_acf_get_fields_of_groups( [ 'options_page' => true ] ) ) 1255 1255 && ! empty( $option_groups_fields ) 1256 1256 ) { … … 1258 1258 if ( 1259 1259 empty( $field['_name'] ) 1260 || empty( $field['type'] )1261 1260 || empty( $field['sub_fields'] ) 1262 || ! in_array( $field['type'], [ 'repeater' ])1263 || ! ( $repeat er_count = acf_get_value( lct_o(), $field ) )1261 || ! afwp_acf_is_field_repeater( $field ) 1262 || ! ( $repeat_count = acf_get_value( lct_o(), $field ) ) 1264 1263 ) { 1265 1264 continue; … … 1268 1267 1269 1268 foreach ( $field['sub_fields'] as $sub_field ) { 1270 foreach ( $repeat er_count as $k => $data ) {1269 foreach ( $repeat_count as $k => $data ) { 1271 1270 $option = 'options_' . $field['_name'] . '_' . $k . '_' . $sub_field['_name']; 1272 1271 … … 1431 1430 */ 1432 1431 foreach ( get_post_types() as $post_type ) { 1433 if ( $group = lct_acf_get_field_groups_fields( [ 'post_type' => $post_type ] ) ) {1432 if ( $group = afwp_acf_get_fields_of_groups( [ 'post_type' => $post_type ] ) ) { 1434 1433 $groups_fields = array_merge( $groups_fields, $group ); 1435 1434 } … … 1498 1497 */ 1499 1498 foreach ( get_post_types() as $post_type ) { 1500 if ( $group = lct_acf_get_field_groups_fields( [ 'post_type' => $post_type ] ) ) {1499 if ( $group = afwp_acf_get_fields_of_groups( [ 'post_type' => $post_type ] ) ) { 1501 1500 $groups_fields = array_merge( $groups_fields, $group ); 1502 1501 } … … 1508 1507 if ( 1509 1508 empty( $field['_name'] ) 1510 || empty( $field['type'] )1511 1509 || empty( $field['sub_fields'] ) 1512 || ! in_array( $field['type'], [ 'repeater' ])1513 || ! ( $repeat er_count = acf_get_value( lct_o(), $field ) )1510 || ! afwp_acf_is_field_repeater( $field ) 1511 || ! ( $repeat_count = acf_get_value( lct_o(), $field ) ) 1514 1512 ) { 1515 1513 continue; … … 1518 1516 1519 1517 foreach ( $field['sub_fields'] as $sub_field ) { 1520 foreach ( $repeat er_count as $k => $data ) {1518 foreach ( $repeat_count as $k => $data ) { 1521 1519 $option = $field['_name'] . '_' . $k . '_' . $sub_field['_name']; 1522 1520 … … 1666 1664 */ 1667 1665 foreach ( get_post_types() as $post_type ) { 1668 if ( $group = lct_acf_get_field_groups_fields( [ 'post_type' => $post_type ] ) ) {1666 if ( $group = afwp_acf_get_fields_of_groups( [ 'post_type' => $post_type ] ) ) { 1669 1667 $groups_fields = array_merge( $groups_fields, $group ); 1670 1668 } … … 1730 1728 */ 1731 1729 foreach ( get_post_types() as $post_type ) { 1732 if ( $group = lct_acf_get_field_groups_fields( [ 'post_type' => $post_type ] ) ) {1730 if ( $group = afwp_acf_get_fields_of_groups( [ 'post_type' => $post_type ] ) ) { 1733 1731 $groups_fields = array_merge( $groups_fields, $group ); 1734 1732 } … … 1740 1738 if ( 1741 1739 empty( $field['_name'] ) 1742 || empty( $field['type'] )1743 1740 || empty( $field['sub_fields'] ) 1744 || ! in_array( $field['type'], [ 'repeater' ])1745 || ! ( $repeat er_count = acf_get_value( lct_o(), $field ) )1741 || ! afwp_acf_is_field_repeater( $field ) 1742 || ! ( $repeat_count = acf_get_value( lct_o(), $field ) ) 1746 1743 ) { 1747 1744 continue; … … 1750 1747 1751 1748 foreach ( $field['sub_fields'] as $sub_field ) { 1752 foreach ( $repeat er_count as $k => $data ) {1749 foreach ( $repeat_count as $k => $data ) { 1753 1750 $option = $field['_name'] . '_' . $k . '_' . $sub_field['_name']; 1754 1751 -
lct-useful-shortcodes-functions/trunk/code/plugins/acf/field-types/send_password/class-v5.php
r3150229 r3384881 134 134 135 135 if ( strpos( $field['name'], '][' ) !== false ) { 136 $repeat er= explode( '][', $field['name'] );137 $name = '_' . $repeater[1];136 $repeat = explode( '][', $field['name'] ); 137 $name = '_' . $repeat[1]; 138 138 } 139 139 -
lct-useful-shortcodes-functions/trunk/code/plugins/acf/filters_load_field.php
r3017144 r3384881 58 58 add_filter( 'acf/load_field/name=' . zxzacf( 'js_files' ), [ $this, 'js_files' ] ); 59 59 60 add_filter( 'acf/ load_field', [ $this, 'process_shortcodes' ] );60 add_filter( 'acf/prepare_field', [ $this, 'process_shortcodes' ] ); 61 61 } 62 62 -
lct-useful-shortcodes-functions/trunk/code/plugins/acf/instant_save.php
r3337494 r3384881 239 239 240 240 if ( 241 lct_acf_is_repeater_subfield( $field, $this->vars['post_id'] )241 afwp_acf_is_repeater_subfield( $field, $this->vars['post_id'] ) 242 242 && $updated !== 'dont_update' 243 243 && $this->vars[ $this->meta->value ] === '' … … 291 291 292 292 if ( 293 lct_acf_is_repeater_subfield( $field, $this->vars['post_id'] )293 afwp_acf_is_repeater_subfield( $field, $this->vars['post_id'] ) 294 294 && isset( $this->vars['info_id'] ) 295 295 ) { 296 296 if ( 297 297 ! empty( $_POST[ $this->meta->acf_form ]['acf'] ) 298 && ( $repeat er_value = $_POST[ $this->meta->acf_form ]['acf'] )299 && ( $repeat er_value = lct_clean_acf_repeater( $repeater_value ) )300 && ( $parent_field = lct_find_repeater_field( $repeat er_value, $this->vars[ $this->meta->field_key ] ) )301 && isset( $repeat er_value[ $parent_field ] )298 && ( $repeat_value = $_POST[ $this->meta->acf_form ]['acf'] ) 299 && ( $repeat_value = lct_clean_acf_repeater( $repeat_value ) ) 300 && ( $parent_field = lct_find_repeater_field( $repeat_value, $this->vars[ $this->meta->field_key ] ) ) 301 && isset( $repeat_value[ $parent_field ] ) 302 302 ) { 303 $first_key = array_key_first( $repeat er_value[ $parent_field ] );304 305 if ( ! isset( $repeat er_value[ $parent_field ][ $first_key ][ $this->vars[ $this->meta->field_key ] ] ) ) {306 $repeat er_value[ $parent_field ][ $first_key ][ $this->vars[ $this->meta->field_key ] ] = $this->vars[ $this->meta->value ];303 $first_key = array_key_first( $repeat_value[ $parent_field ] ); 304 305 if ( ! isset( $repeat_value[ $parent_field ][ $first_key ][ $this->vars[ $this->meta->field_key ] ] ) ) { 306 $repeat_value[ $parent_field ][ $first_key ][ $this->vars[ $this->meta->field_key ] ] = $this->vars[ $this->meta->value ]; 307 307 } 308 308 309 309 310 update_field( $parent_field, $repeat er_value[ $parent_field ], $this->vars['post_id'] );310 update_field( $parent_field, $repeat_value[ $parent_field ], $this->vars['post_id'] ); 311 311 312 312 -
lct-useful-shortcodes-functions/trunk/code/plugins/acf/op_main_fixes_cleanups.php
r3150229 r3384881 1765 1765 if ( ! empty( $objects ) ) { 1766 1766 foreach ( $objects as $object ) { 1767 $fields = lct_acf_get_field_groups_fields( [ 'user_id' => $object->ID ] );1767 $fields = afwp_acf_get_fields_of_groups( [ 'user_id' => $object->ID ] ); 1768 1768 1769 1769 … … 1799 1799 * Update repeaters 1800 1800 */ 1801 if ( $field['type'] == 'repeater') {1801 if ( afwp_acf_is_field_repeater( $field ) ) { 1802 1802 $report = $this->repair_acf_repeater_metadata( $report, 'user', $current_value, $object, $field ); 1803 1803 … … 1987 1987 * Update repeaters 1988 1988 */ 1989 if ( $field['type'] == 'repeater') {1989 if ( afwp_acf_is_field_repeater( $field ) ) { 1990 1990 $report = $this->repair_acf_repeater_metadata( $report, 'post', $current_value, $object, $field ); 1991 1991 … … 2117 2117 if ( ! empty( $objects ) ) { 2118 2118 foreach ( $objects as $object ) { 2119 $fields = lct_acf_get_field_groups_fields( [ 'taxonomy' => $object->taxonomy ] );2119 $fields = afwp_acf_get_fields_of_groups( [ 'taxonomy' => $object->taxonomy ] ); 2120 2120 2121 2121 … … 2151 2151 * Update repeaters 2152 2152 */ 2153 if ( $field['type'] == 'repeater') {2153 if ( afwp_acf_is_field_repeater( $field ) ) { 2154 2154 $report = $this->repair_acf_repeater_metadata( $report, 'term', $current_value, $object, $field ); 2155 2155 … … 2306 2306 */ 2307 2307 if ( 2308 $field['type'] == 'repeater'2308 afwp_acf_is_field_repeater( $field ) 2309 2309 || empty( $field['name'] ) 2310 2310 || empty( $key_exists ) -
lct-useful-shortcodes-functions/trunk/code/public/class.php
r2894473 r3384881 66 66 67 67 if ( lct_plugin_active( $plugin ) ) { 68 lct_load_class( 'plugins/' . $plugin . '/public.php', 'public', [ 'plugin' => $plugin, 'globalize' => true ] );69 70 68 lct_load_class( 'plugins/' . $plugin . '/public_choices.php', 'public_choices', [ 'plugin' => $plugin, 'globalize' => true ] ); 71 69 } -
lct-useful-shortcodes-functions/trunk/code/wp-admin/admin/loader.php
r2894473 r3384881 128 128 129 129 if ( in_array( $this->vars['plugin_page'], $acf_keys ) ) { 130 lct_update_setting( 'acf_is_options_page', true );131 132 130 add_action( 'admin_enqueue_scripts', [ lct_instances()->wp_admin_admin_admin, 'sticky_admin_sidebar' ] ); 133 131 } -
lct-useful-shortcodes-functions/trunk/code/wp-admin/admin/onetime.php
r3150229 r3384881 1507 1507 1508 1508 1509 if ( $fields = lct_acf_get_field_groups_fields( [ 'post_type' => $post_type ] ) ) {1509 if ( $fields = afwp_acf_get_fields_of_groups( [ 'post_type' => $post_type ] ) ) { 1510 1510 $acf_fields = array_merge( $acf_fields, $fields ); 1511 1511 } … … 1528 1528 1529 1529 if ( 1530 isset( $field['type'] ) 1531 && $field['type'] === 'repeater' 1530 afwp_acf_is_field_repeater( $field ) 1532 1531 && ! empty( $field['sub_fields'] ) 1533 1532 ) { -
lct-useful-shortcodes-functions/trunk/lct-useful-shortcodes-functions.php
r3337494 r3384881 4 4 * Plugin URI: https://www.simplesmithmedia.com 5 5 * Description: Shortcodes & Functions that will help make your life easier. 6 * Version: 2025.0 26 * Version: 2025.03 7 7 * Author: SimpleSmithMedia 8 8 * Author URI: https://www.simplesmithmedia.com -
lct-useful-shortcodes-functions/trunk/readme.txt
r3337494 r3384881 33 33 34 34 == Changelog == 35 = 2025.03 = 36 *Release Date - 26 October 2025* 37 38 * Removed: 39 * lct_acf_get_field_types() 40 * lct_acf_get_field_label() 41 * lct_acf_get_field_label_no_required() 42 * lct_acf_get_field_group_of_field() 43 * lct_acf_get_repeater_array() 44 * lct_acf_get_repeater_array_keys() 45 * lct_acf_get_repeater_array_key() 46 * lct_acf_get_repeater_array_values() 47 * lct_acf_get_repeater_array_value() 48 * lct_acf_get_repeater_array_value_by_slug() 49 * lct_acf_get_repeater() 50 * lct_acf_get_imploded_repeater() 51 * lct_acf_is_field_repeater() 52 * lct_acf_is_field_clone() 53 * lct_acf_is_field_seamless_clone() 54 * lct_acf_is_repeater_subfield() 55 * lct_get_dollar() 56 * lct_get_un_dollar() 57 * lct_get_dollar_wo_symbol() 58 * lct_get_negative_number() 59 * lct_get_negative_dollar() 60 * lct_acf_public{} 61 35 62 = 2025.02 = 36 63 *Release Date - 31 July 2025*
Note: See TracChangeset
for help on using the changeset viewer.