Changeset 3450686
- Timestamp:
- 01/30/2026 07:51:48 PM (6 weeks ago)
- Location:
- lct-useful-shortcodes-functions/trunk
- Files:
-
- 25 edited
-
available/email-reminder/includes/classes/PDER_Admin.php (modified) (1 diff)
-
code/admin/_admin.php (modified) (5 diffs)
-
code/admin/lct.php (modified) (3 diffs)
-
code/api/_cache.php (modified) (3 diffs)
-
code/api/_helpers.php (modified) (12 diffs)
-
code/api/class.php (modified) (1 diff)
-
code/api/hacky.php (modified) (2 diffs)
-
code/features/api/geocode.php (modified) (3 diffs)
-
code/plugins/Avada/testimony.php (modified) (2 diffs)
-
code/plugins/acf/_admin.php (modified) (1 diff)
-
code/plugins/acf/_loaded.php (modified) (6 diffs)
-
code/plugins/acf/_shortcodes.php (modified) (3 diffs)
-
code/plugins/acf/api/get.php (modified) (2 diffs)
-
code/plugins/acf/dev_checks.php (modified) (12 diffs)
-
code/plugins/acf/field_settings.php (modified) (2 diffs)
-
code/plugins/acf/form.php (modified) (2 diffs)
-
code/plugins/acf/op_main_fixes_cleanups.php (modified) (10 diffs)
-
code/plugins/acf/public_choices.php (modified) (14 diffs)
-
code/plugins/gforms/_admin.php (modified) (3 diffs)
-
code/plugins/stream/_admin.php (modified) (2 diffs)
-
code/plugins/wc/_admin.php (modified) (3 diffs)
-
code/wp-admin/admin/_admin.php (modified) (1 diff)
-
code/wp-admin/admin/onetime.php (modified) (5 diffs)
-
lct-useful-shortcodes-functions.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lct-useful-shortcodes-functions/trunk/available/email-reminder/includes/classes/PDER_Admin.php
r3150229 r3450686 275 275 * create new / update post 276 276 */ 277 $add_back = false;278 279 if ( has_action( 'transition_post_status' ) ) {280 remove_action( 'transition_post_status', '_update_term_count_on_transition_post_status' );281 $add_back = true;282 }283 284 285 277 if ( ! empty( $reminder['ID'] ) ) { 286 278 $insert_post_id = wp_update_post( $reminder ); 287 279 } else { 288 280 $insert_post_id = wp_insert_post( $reminder ); 289 }290 291 292 if ( $add_back ) {293 add_action( 'transition_post_status', '_update_term_count_on_transition_post_status', 10, 3 );294 281 } 295 282 -
lct-useful-shortcodes-functions/trunk/code/admin/_admin.php
r3337494 r3450686 80 80 //add_action( 'updated_{$meta_type}_meta' ); //$meta_id, $object_id, $meta_key, $_meta_value 81 81 add_action( 'updated_post_meta', [ $this, 'mark_post_to_be_updated_later' ], 10, 4 ); 82 83 84 //add_action( 'updated_{$meta_type}_meta' ); //$meta_id, $object_id, $meta_key, $_meta_value85 add_action( 'updated_user_meta', [ $this, 'updated_user_meta' ], 10, 4 );86 82 87 83 … … 635 631 636 632 /** 637 * Update the nickname & display name when we change the first or last name638 *639 * @param int $meta_id ID of updated metadata entry.640 * @param int $object_id ID of the object metadata is for.641 * @param string $meta_key Metadata key.642 * @param mixed $meta_value Metadata value.643 *644 * @since 7.35645 * @verified 2025.03.05646 */647 function updated_user_meta( $meta_id, $object_id, $meta_key, $meta_value )648 {649 if ( ! in_array( $meta_key, [ 'first_name', 'last_name' ] ) ) {650 return;651 }652 653 654 $user = get_userdata( $object_id );655 $user->display_name = $user->first_name . ' ' . $user->last_name;656 $user->nickname = $user->first_name . ' ' . $user->last_name;657 658 wp_update_user( $user );659 }660 661 662 /**663 633 * Update the modified time of a post when we edit any meta 664 634 * … … 946 916 * NOT Trackbacks, Pingbacks or any other custom comment type 947 917 * 948 * @param int $new949 * @param int $old950 * @param int $post_id918 * @param int|null $new The new comment count. Default null. 919 * @param int $old The old comment count. 920 * @param int $post_id Post ID. 951 921 * 952 922 * @return int 953 923 * @since 2018.59 954 * @verified 2020.10.26 955 * @noinspection PhpUnusedParameterInspection 924 * @verified 2025.12.05 956 925 */ 957 926 function only_count_comments( $new, $old, $post_id ) … … 960 929 961 930 962 $new_count =(int) $wpdb->get_var(931 return (int) $wpdb->get_var( 963 932 $wpdb->prepare( 964 933 "SELECT COUNT(*) FROM `{$wpdb->comments}` … … 969 938 ) 970 939 ); 971 972 973 if ( is_int( $new_count ) ) {974 $new = $new_count;975 }976 977 978 return $new;979 940 } 980 941 -
lct-useful-shortcodes-functions/trunk/code/admin/lct.php
r3337494 r3450686 208 208 ]; 209 209 210 public $doing_update_display_name = false;211 212 210 213 211 /** … … 410 408 * @verified 2019.09.11 411 409 */ 412 function load_hooks() 413 { 414 add_action( 'set_current_user', [ $this, 'update_display_name' ] ); 415 } 410 function load_hooks() {} 416 411 417 412 … … 921 916 return 'None'; 922 917 } 923 924 925 /**926 * Programmatically update Display Name or First Name & Last Name when some info is missing927 *928 * @since 2019.25929 * @verified 2021.11.02930 */931 function update_display_name()932 {933 global $current_user;934 935 936 if (937 empty( $current_user->ID )938 || $this->doing_update_display_name939 ) {940 return;941 }942 943 944 $this->doing_update_display_name = true;945 946 947 if ( ! ( $display_name = trim( $current_user->display_name ) ) ) {948 global $user_identity;949 950 951 if ( ! ( $display_name = trim( trim( $current_user->first_name ) . ' ' . trim( $current_user->last_name ) ) ) ) {952 if ( trim( $current_user->nickname ) ) {953 $display_name = trim( $current_user->nickname );954 } else {955 $display_name = trim( $current_user->user_login );956 }957 958 959 $current_user = $this->update_names( $current_user, $display_name, false );960 }961 962 963 if ( $display_name ) {964 $current_user->display_name = $user_identity = $display_name;965 966 967 wp_update_user( $current_user );968 }969 } elseif (970 (971 ! trim( $current_user->first_name )972 && ! trim( $current_user->last_name )973 )974 || (975 ! trim( $current_user->first_name )976 && trim( $current_user->last_name )977 )978 ) {979 $current_user = $this->update_names( $current_user, $display_name );980 }981 982 983 $this->doing_update_display_name = false;984 }985 986 987 /**988 * @param WP_User $current_user989 * @param string $display_name990 * @param bool $save_now991 *992 * @return WP_User993 * @since 2019.25994 * @verified 2019.09.11995 * @noinspection PhpMissingParamTypeInspection996 */997 function update_names( $current_user, $display_name, $save_now = true )998 {999 if ( ! trim( $current_user->nickname ) ) {1000 $current_user->nickname = $display_name;1001 }1002 1003 1004 if ( strpos( $display_name, ' ' ) === false ) {1005 $current_user->first_name = $display_name;1006 $current_user->last_name = '';1007 } else {1008 $display_name = explode( ' ', $display_name );1009 1010 1011 $current_user->first_name = $display_name[0];1012 1013 1014 unset( $display_name[0] );1015 1016 1017 $display_name = implode( ' ', $display_name );1018 1019 1020 $current_user->last_name = $display_name;1021 }1022 1023 1024 if ( $save_now ) {1025 wp_update_user( $current_user );1026 }1027 1028 1029 return $current_user;1030 }1031 918 } 1032 919 -
lct-useful-shortcodes-functions/trunk/code/api/_cache.php
r3263018 r3450686 3 3 if ( ! defined( 'ABSPATH' ) ) { 4 4 exit; 5 }6 7 8 /**9 * Disable cache when we don't need it10 *11 * @since 2018.6212 * @verified 2019.07.1213 */14 function lct_disable_cache()15 {16 lct_update_setting( 'cache_disabled', true );17 }18 19 20 /**21 * Re-enable cache when we need it22 *23 * @since 2018.6224 * @verified 2019.07.1225 */26 function lct_enable_cache()27 {28 lct_update_setting( 'cache_disabled', null );29 5 } 30 6 … … 241 217 242 218 243 if ( ! ( $cache_data = lct_get_data( '_cache' ) ) ) {244 $cache_data = [];245 }246 247 248 $cache_data[ $key ] = true;249 250 251 lct_set_data( '_cache', $cache_data );252 253 254 219 return wp_cache_set( $key, $data, 'lct' ); 255 220 } … … 267 232 function lct_delete_cache( $key ) 268 233 { 269 if ( ! ( $cache_data = lct_get_data( '_cache' ) ) ) {270 $cache_data = [];271 }272 273 274 unset( $cache_data[ $key ] );275 276 277 lct_set_data( '_cache', $cache_data );278 279 280 234 return wp_cache_delete( $key, 'lct' ); 281 235 } 282 283 284 /**285 * delete_cache for all LCT keys286 *287 * @return bool288 * @since 2018.46289 * @verified 2019.07.12290 */291 function lct_delete_cache_all()292 {293 $r = false;294 295 296 if (297 ( $cache_data = lct_get_data( '_cache' ) )298 && ! empty( $cache_data )299 ) {300 foreach ( $cache_data as $key => $v ) {301 lct_delete_cache( $key );302 }303 304 305 $r = true;306 }307 308 309 return $r;310 } -
lct-useful-shortcodes-functions/trunk/code/api/_helpers.php
r3384881 r3450686 1005 1005 * @param array $custom_data 1006 1006 * @param bool $process_before 1007 * @param array $f nr1007 * @param array $find_replace 1008 1008 * @param null $parent_id 1009 1009 * … … 1012 1012 * @verified 2019.02.07 1013 1013 */ 1014 function lct_update_reminder( $template, $org = null, $custom_data = [], $process_before = false, $f nr= [], $parent_id = null )1014 function lct_update_reminder( $template, $org = null, $custom_data = [], $process_before = false, $find_replace = [], $parent_id = null ) 1015 1015 { 1016 1016 if ( … … 1023 1023 1024 1024 if ( $process_before ) { 1025 $template['title'] = str_replace( $fnr['find'], $fnr['replace'], $template['title'] );1026 $template['body'] = str_replace( $fnr['find'], $fnr['replace'], $template['body'] );1025 lct_str_replace( $find_replace, $template['title'] ); 1026 lct_str_replace( $find_replace, $template['body'] ); 1027 1027 } else { 1028 1028 $template['body'] = '...'; … … 1274 1274 1275 1275 /** 1276 * Take a single array and parse it into a find array and replace array 1277 * 1278 * @param $fr 1279 * 1280 * @return array 1276 * Take a single array and parse it into a 'find' & 'replace' array 1277 * 1278 * @param array $find_replace //key = find, value = replace 1279 * @param string $placeholder //The common wrapper of the find keys, include both the start & end chars -- [] | {} | etc. 1280 * 1281 * @return array[] 1281 1282 * @since LCT 4.2.2.26 1282 1283 * @verified 2022.02.10 1283 1284 */ 1284 function lct_create_find_and_replace_arrays( $fr ) 1285 { 1286 $f = []; 1287 $r = []; 1288 1289 1290 if ( is_array( $fr ) ) { 1291 foreach ( $fr as $ff => $rr ) { 1292 if ( ! is_string( $rr ) ) { 1293 if ( empty( $rr ) ) { 1294 $rr = ''; 1295 } else { 1296 $rr = print_r( $rr, true ); 1297 } 1298 } 1299 1300 1301 $f[] = $ff; 1302 $r[] = $rr; 1303 } 1285 function lct_create_find_and_replace_arrays( array $find_replace, string $placeholder = '' ) 1286 { 1287 /** 1288 * Skip search if 'find & replace' is empty 1289 */ 1290 if ( empty( $find_replace ) ) { 1291 return []; 1292 } 1293 1294 1295 /** 1296 * Vars 1297 */ 1298 $final_find = []; 1299 $final_replace = []; 1300 $placeholder = lct_split_placeholder( $placeholder ); 1301 1302 1303 /** 1304 * Parse the find & replace array 1305 */ 1306 foreach ( $find_replace as $find => $replace ) { 1307 //Type -- bool 1308 if ( is_bool( $replace ) ) { 1309 $replace = var_export( $replace, true ); 1310 1311 //Anything empty 1312 } elseif ( empty( $replace ) ) { 1313 $replace = ''; 1314 1315 //arrays & objects 1316 } elseif ( 1317 is_array( $replace ) 1318 || is_object( $replace ) 1319 ) { 1320 $replace = var_export( $replace, true ); 1321 } 1322 1323 1324 $final_find[] = $placeholder['start'] . $find . $placeholder['end']; 1325 $final_replace[] = $replace; 1304 1326 } 1305 1327 1306 1328 1307 1329 return [ 1308 'find' => $f ,1309 'replace' => $ r1330 'find' => $final_find, 1331 'replace' => $final_replace 1310 1332 ]; 1333 } 1334 1335 1336 /** 1337 * Split the placeholder 1338 * 1339 * @param string $placeholder 1340 * 1341 * @return array 1342 * @date 2025.11.24 1343 * @since 2025.04 1344 * @verified 2025.11.24 1345 */ 1346 function lct_split_placeholder( string $placeholder ) 1347 { 1348 /** 1349 * Vars 1350 */ 1351 $ph_start = ''; 1352 $ph_end = ''; 1353 1354 1355 /** 1356 * Split the placeholder 1357 */ 1358 if ( 1359 $placeholder 1360 && strlen( $placeholder ) % 2 === 0 1361 ) { 1362 $half = strlen( $placeholder ) / 2; 1363 $ph_start = substr( $placeholder, 0, $half ); 1364 $ph_end = substr( $placeholder, $half ); 1365 } 1366 1367 1368 return [ 1369 'start' => $ph_start, 1370 'end' => $ph_end 1371 ]; 1372 } 1373 1374 1375 /** 1376 * Process placeholders of a string 1377 * 1378 * @param array $find_replace 1379 * @param string $subject 1380 * @param string $placeholder 1381 * 1382 * @date 2025.11.24 1383 * @since 2025.04 1384 * @verified 2025.11.24 1385 */ 1386 function lct_str_replace( array $find_replace, string &$subject, string $placeholder = '' ) 1387 { 1388 /** 1389 * Skip search if 'find & replace' is empty 1390 * Skip search if subject is empty 1391 */ 1392 if ( 1393 empty( $find_replace ) 1394 || ! $subject 1395 ) { 1396 return; 1397 } 1398 1399 1400 /** 1401 * Process the placeholders 1402 */ 1403 ! ( $fnr = lct_create_find_and_replace_arrays( $find_replace, $placeholder ) ) 1404 || $subject = str_replace( $fnr['find'], $fnr['replace'], $subject ); 1311 1405 } 1312 1406 … … 1430 1524 * @return string 1431 1525 * @since LCT 2017.9 1432 * @verified 20 18.09.191526 * @verified 2025.11.24 1433 1527 */ 1434 1528 function process_nested_shortcode( $content, $scs, $delimiter = null ) 1435 1529 { 1436 $unset_link = false; 1437 $html_encode_fnr = lct_shortcode_html_decode(); 1438 $find = []; 1439 $replace = []; 1440 $sc_to_esc_html = apply_filters( 'lct/process_nested_shortcode/sc_to_esc_html', [ 'get_directions' ] ); 1530 $unset_link = false; 1531 $find = []; 1532 $replace = []; 1533 $sc_to_esc_html = apply_filters( 'lct/process_nested_shortcode/sc_to_esc_html', [ 'get_directions' ] ); 1441 1534 1442 1535 … … 1463 1556 } 1464 1557 1465 $sc = str_replace( $html_encode_fnr['find'], $html_encode_fnr['replace'], $sc ); 1466 1558 lct_shortcode_html_decode( $sc ); 1467 1559 $sc = html_entity_decode( $sc ); 1468 1560 … … 1500 1592 * Array of special decode maps for shortcodes 1501 1593 * 1502 * @return array 1594 * @param string $sc 1595 * 1503 1596 * @since LCT 2017.9 1504 * @verified 20 17.02.071505 */ 1506 function lct_shortcode_html_decode( )1507 { 1508 $ html_encode_find_n_replace = [1597 * @verified 2025.11.24 1598 */ 1599 function lct_shortcode_html_decode( &$sc ) 1600 { 1601 $find_replace = [ 1509 1602 '"' => '"', 1510 1603 '“' => '"', … … 1517 1610 '′' => '\'', 1518 1611 ]; 1519 1520 1521 return lct_create_find_and_replace_arrays( $html_encode_find_n_replace ); 1612 lct_str_replace( $find_replace, $sc ); 1522 1613 } 1523 1614 … … 1675 1766 * @return string 1676 1767 * @since LCT 7.3 1677 * @verified 2020.12.08 1678 * @noinspection PhpMissingParamTypeInspection 1768 * @verified 2025.11.24 1679 1769 */ 1680 1770 function lct_add_url_site_to_content( $content, $force_live_url = false ) … … 1690 1780 1691 1781 1692 $find_ n_replace = [1782 $find_replace = [ 1693 1783 '//' => '~~~slash_slash~~~', 1694 1784 … … 1713 1803 '~~~slash_slash~~~' => '//', 1714 1804 ]; 1715 $fnr = lct_create_find_and_replace_arrays( $find_n_replace);1716 1717 1718 return str_replace( $fnr['find'], $fnr['replace'], $content );1805 lct_str_replace( $find_replace, $content ); 1806 1807 1808 return $content; 1719 1809 } 1720 1810 … … 3099 3189 call_user_func_array( [ $ud['class'], $ud['function'] ], $ud['args'] ); 3100 3190 } else { 3101 if ( function_exists( 'afwp_ flush_cache' ) && $ud['function'] === 'xbs_calculate_totals' && ! empty( $ud['args'][0] ) ) {3102 afwp_ flush_cache( 'xbs_calculate_totals::' . $ud['args'][0] );3191 if ( function_exists( 'afwp_cache_delete' ) && $ud['function'] === 'xbs_calculate_totals' && ! empty( $ud['args'][0] ) ) { 3192 afwp_cache_delete( 'xbs_calculate_totals::' . $ud['args'][0] ); 3103 3193 } 3104 3194 call_user_func_array( $ud['function'], $ud['args'] ); -
lct-useful-shortcodes-functions/trunk/code/api/class.php
r3384881 r3450686 584 584 * 585 585 * @since 2017.42 586 * @verified 20 19.03.11586 * @verified 2026.01.28 587 587 */ 588 588 function autoload_checker() 589 589 { 590 if ( lct_get_option( 'per_version_updated_autoload_checker' ) ) { 590 if ( 591 lct_get_option( 'per_version_updated_autoload_checker' ) 592 || ! function_exists( 'AFWP' ) 593 ) { 591 594 return; 592 595 } -
lct-useful-shortcodes-functions/trunk/code/api/hacky.php
r3158878 r3450686 131 131 132 132 133 $ html_encode_fnr = lct_shortcode_html_decode();134 $output = str_replace( $html_encode_fnr['find'], $html_encode_fnr['replace'], fusion_get_post_content());133 $output = fusion_get_post_content(); 134 lct_shortcode_html_decode( $output ); 135 135 136 136 … … 229 229 remove_filter( 'do_shortcode_tag', [ $this, 'do_shortcode_tag' ] ); 230 230 231 $html_encode_fnr = lct_shortcode_html_decode(); 232 $output = str_replace( $html_encode_fnr['find'], $html_encode_fnr['replace'],$output );231 232 lct_shortcode_html_decode( $output ); 233 233 234 234 -
lct-useful-shortcodes-functions/trunk/code/features/api/geocode.php
r3050689 r3450686 164 164 * @return string 165 165 * @since 5.0 166 * @verified 20 19.07.18166 * @verified 2025.11.24 167 167 */ 168 168 function lct_get_street_address( $address, $type = 'long_name' ) … … 200 200 201 201 if ( $tmp[1] ) { 202 $find_ and_replace = [202 $find_replace = [ 203 203 PHP_EOL => ' ', 204 204 '.' => '', … … 208 208 $comp['route']['short_name'] => '', 209 209 ]; 210 $fnr = lct_create_find_and_replace_arrays( $find_and_replace );211 210 212 211 213 212 $subpremise_prefix = preg_replace( "#\r|\n#", ' ', $tmp[0] ); 214 $subpremise_prefix = str_replace( $fnr['find'], $fnr['replace'], $subpremise_prefix );213 lct_str_replace( $find_replace, $subpremise_prefix ); 215 214 $subpremise_prefix = trim( $subpremise_prefix ); 216 215 -
lct-useful-shortcodes-functions/trunk/code/plugins/Avada/testimony.php
r2894473 r3450686 160 160 * @return string 161 161 * @since 7.56 162 * @verified 20 17.05.18162 * @verified 2025.11.24 163 163 */ 164 164 function testimony( $a ) … … 202 202 '{content}' => $testimony->post_content, 203 203 ]; 204 $fnr = lct_create_find_and_replace_arrays( $find_replace ); 205 206 207 $a['r'][] = do_shortcode( str_replace( $fnr['find'], $fnr['replace'], $template_content ) ); 204 lct_str_replace( $find_replace, $template_content ); 205 $a['r'][] = do_shortcode( $template_content ); 208 206 } 209 207 } -
lct-useful-shortcodes-functions/trunk/code/plugins/acf/_admin.php
r3150229 r3450686 465 465 */ 466 466 if ( 467 get_post_meta( $post_id, zxzacf( 'is_css_file' ), true ) 468 && //Don't use get_field() 469 ( $files = get_field( zxzacf( 'css_files' ), $post_id ) ) 467 get_post_meta( $post_id, zxzacf( 'is_css_file' ), true ) //Don't use get_field() 468 && ( $files = get_field( zxzacf( 'css_files' ), $post_id ) ) 470 469 ) { 471 470 foreach ( $files as $file ) { -
lct-useful-shortcodes-functions/trunk/code/plugins/acf/_loaded.php
r3384881 r3450686 453 453 * @date 2023.08.30 454 454 * @since 2023.03 455 * @verified 202 3.08.31455 * @verified 2026.01.26 456 456 */ 457 457 function load_references() … … 464 464 } 465 465 466 if ( ! isset( $this->references['groups'] ) ) { 467 $this->references['groups'] = []; 468 } 469 470 if ( ! isset( $this->references['groups_complete'] ) ) { 471 $this->references['groups_complete'] = []; 472 } 473 474 if ( ! isset( $this->references['parents'] ) ) { 475 $this->references['parents'] = []; 476 } 477 478 if ( ! isset( $this->references['sub_fields'] ) ) { 479 $this->references['sub_fields'] = []; 480 } 481 482 if ( ! isset( $this->references['clones'] ) ) { 483 $this->references['clones'] = []; 484 } 485 486 if ( ! isset( $this->references['keys'] ) ) { 487 $this->references['keys'] = []; 488 } 489 490 if ( ! isset( $this->references['names'] ) ) { 491 $this->references['names'] = []; 492 } 493 494 if ( ! isset( $this->references['dupe_keys'] ) ) { 495 $this->references['dupe_keys'] = []; 496 } 497 498 if ( ! isset( $this->references['dupe_names'] ) ) { 499 $this->references['dupe_names'] = []; 500 } 501 502 if ( ! isset( $this->references['dupe_data'] ) ) { 503 $this->references['dupe_data'] = []; 504 } 505 506 if ( ! isset( $this->references['count_key'] ) ) { 507 $this->references['count_key'] = []; 508 } 509 510 if ( ! isset( $this->references['count_name'] ) ) { 511 $this->references['count_name'] = []; 512 } 513 514 if ( ! isset( $this->references['map_name_key'] ) ) { 515 $this->references['map_name_key'] = []; 516 } 466 isset( $this->references['groups'] ) || $this->references['groups'] = []; 467 isset( $this->references['groups_complete'] ) || $this->references['groups_complete'] = []; 468 isset( $this->references['parents'] ) || $this->references['parents'] = []; 469 isset( $this->references['sub_fields'] ) || $this->references['sub_fields'] = []; 470 isset( $this->references['clones'] ) || $this->references['clones'] = []; 471 isset( $this->references['keys'] ) || $this->references['keys'] = []; 472 isset( $this->references['names'] ) || $this->references['names'] = []; 473 isset( $this->references['dupe_keys'] ) || $this->references['dupe_keys'] = []; 474 isset( $this->references['dupe_names'] ) || $this->references['dupe_names'] = []; 475 isset( $this->references['dupe_data'] ) || $this->references['dupe_data'] = []; 476 isset( $this->references['count_key'] ) || $this->references['count_key'] = []; 477 isset( $this->references['count_name'] ) || $this->references['count_name'] = []; 478 isset( $this->references['map_name_key'] ) || $this->references['map_name_key'] = []; 479 isset( $this->references['save_now_ify'] ) || $this->references['save_now_ify'] = []; 517 480 } 518 481 … … 784 747 * @return string 785 748 * @since 2018.0 786 * @verified 202 3.12.07749 * @verified 2026.01.30 787 750 */ 788 751 function pre_load_reference( $reference, $field_name, $post_id ) … … 842 805 $reference === null 843 806 //&& lct_is_dev() 807 && ! str_contains( $_SERVER['HTTP_HOST'], 'wpdev' ) 844 808 && apply_filters( 'lct/acf_loaded/pre_load_reference/show_error_log', true, $field_name ) 845 809 ) { … … 937 901 * @return string 938 902 * @since 2018.0 939 * @verified 202 4.01.24903 * @verified 2026.01.30 940 904 */ 941 905 function load_reference( $reference, $field_name, $post_id ) 942 906 { 943 907 if ( 944 $reference !== null 945 || ! $field_name 908 ! $field_name 946 909 || is_array( $field_name ) 910 || ( 911 $reference !== null 912 && ! in_array( $field_name, $this->references['dupe_names'] ?? [] ) 913 ) 947 914 ) { 948 915 return $reference; … … 1260 1227 $reference === null 1261 1228 //&& lct_is_dev() 1229 && ! str_contains( $_SERVER['HTTP_HOST'], 'wpdev' ) 1262 1230 && apply_filters( 'lct/acf_loaded/load_reference/show_error_log', true, $field_name ) 1263 1231 ) { -
lct-useful-shortcodes-functions/trunk/code/plugins/acf/_shortcodes.php
r3337494 r3450686 149 149 * @return string 150 150 * @since 0.0 151 * @verified 20 19.02.16151 * @verified 2025.11.24 152 152 */ 153 153 function copyright() … … 211 211 212 212 213 $find_ n_replace = [213 $find_replace = [ 214 214 '{copy_symbol}' => '©', 215 215 '{year}' => lct_format_current_time( 'Y' ), … … 219 219 220 220 if ( $replace = $this->sc( 'xml' ) ) { 221 $find_ n_replace['{XML_sitemap}'] = sprintf( "<a href='%s'>Sitemap</a>", home_url( $replace ) );221 $find_replace['{XML_sitemap}'] = sprintf( "<a href='%s'>Sitemap</a>", home_url( $replace ) ); 222 222 } 223 223 224 224 if ( $replace = $this->sc( 'privacy_policy_page' ) ) { 225 $find_ n_replace['{privacy}'] = sprintf( "<a href='%s' rel='nofollow'>%s</a>", get_the_permalink( $replace ), get_the_title( $replace ) );225 $find_replace['{privacy}'] = sprintf( "<a href='%s' rel='nofollow'>%s</a>", get_the_permalink( $replace ), get_the_title( $replace ) ); 226 226 } 227 227 228 228 if ( $replace = $this->sc( 'terms_page' ) ) { 229 $find_ n_replace['{terms}'] = sprintf( "<a href='%s' rel='nofollow'>%s</a>", get_the_permalink( $replace ), get_the_title( $replace ) );230 } 231 232 $fnr = lct_create_find_and_replace_arrays( $find_n_replace ); 233 234 235 $a['r'] = do_shortcode( str_replace( $fnr['find'], $fnr['replace'], do_shortcode( $copyright_layout ) ));229 $find_replace['{terms}'] = sprintf( "<a href='%s' rel='nofollow'>%s</a>", get_the_permalink( $replace ), get_the_title( $replace ) ); 230 } 231 232 233 $a['r'] = do_shortcode( $copyright_layout ); 234 lct_str_replace( $find_replace, $a['r'] ); 235 $a['r'] = do_shortcode( $a['r'] ); 236 236 } 237 237 -
lct-useful-shortcodes-functions/trunk/code/plugins/acf/api/get.php
r3384881 r3450686 202 202 // return early if cache is found 203 203 $cache_key = lct_cache_key( compact( 'group_args', 'args_field' ) ); 204 if ( $r = wp_cache_get( $cache_key ) ) {204 if ( $r = wp_cache_get( $cache_key, 'lct' ) ) { 205 205 return $r; 206 206 } … … 392 392 393 393 394 wp_cache_set( $cache_key, $r );394 wp_cache_set( $cache_key, $r, 'lct' ); 395 395 396 396 -
lct-useful-shortcodes-functions/trunk/code/plugins/acf/dev_checks.php
r3384881 r3450686 1157 1157 * @return array 1158 1158 * @since 2019.19 1159 * @verified 202 5.02.201159 * @verified 2026.01.30 1160 1160 */ 1161 1161 function option_names_to_ignore() … … 1187 1187 */ 1188 1188 if ( 1189 ( $option_groups_fields = afwp_acf_get_fields_of_groups( [ 'options_page' => true ] ) ) 1189 function_exists( 'AFWP' ) 1190 && ( $option_groups_fields = afwp_acf_get_fields_of_groups( [ 'options_page' => true ] ) ) 1190 1191 && ! empty( $option_groups_fields ) 1191 1192 ) { … … 1225 1226 * @return array 1226 1227 * @since 2019.19 1227 * @verified 202 5.02.201228 * @verified 2026.01.30 1228 1229 */ 1229 1230 function option_names_LIKE_to_ignore() … … 1252 1253 */ 1253 1254 if ( 1254 ( $option_groups_fields = afwp_acf_get_fields_of_groups( [ 'options_page' => true ] ) ) 1255 function_exists( 'AFWP' ) 1256 && ( $option_groups_fields = afwp_acf_get_fields_of_groups( [ 'options_page' => true ] ) ) 1255 1257 && ! empty( $option_groups_fields ) 1256 1258 ) { … … 1404 1406 * @return array 1405 1407 * @since 2019.19 1406 * @verified 202 5.02.201408 * @verified 2026.01.30 1407 1409 * @noinspection DuplicatedCode 1408 1410 */ … … 1426 1428 1427 1429 1430 if ( ! function_exists( 'AFWP' ) ) { 1431 $ignore = array_keys( $ignore ); 1432 1433 return $ignore; 1434 } 1435 1436 1428 1437 /** 1429 1438 * Add LCT ACF Fields … … 1472 1481 * @return array 1473 1482 * @since 2019.19 1474 * @verified 202 5.02.201483 * @verified 2026.01.30 1475 1484 * @noinspection DuplicatedCode 1476 1485 */ … … 1491 1500 'sbg_selected_sidebar' => true, 1492 1501 ]; 1502 1503 1504 if ( ! function_exists( 'AFWP' ) ) { 1505 $ignore = array_keys( $ignore ); 1506 1507 return $ignore; 1508 } 1493 1509 1494 1510 … … 1643 1659 * @return array 1644 1660 * @since 2019.19 1645 * @verified 202 5.02.201661 * @verified 2026.01.30 1646 1662 */ 1647 1663 function usermeta_to_ignore() … … 1658 1674 $groups_fields = []; 1659 1675 $ignore = []; 1676 1677 1678 if ( ! function_exists( 'AFWP' ) ) { 1679 $ignore = array_keys( $ignore ); 1680 1681 return $ignore; 1682 } 1660 1683 1661 1684 … … 1706 1729 * @return array 1707 1730 * @since 2019.19 1708 * @verified 202 5.02.201731 * @verified 2026.01.30 1709 1732 * @noinspection DuplicatedCode 1710 1733 */ … … 1722 1745 $groups_fields = []; 1723 1746 $ignore = []; 1747 1748 1749 if ( ! function_exists( 'AFWP' ) ) { 1750 $ignore = array_keys( $ignore ); 1751 1752 return $ignore; 1753 } 1724 1754 1725 1755 -
lct-useful-shortcodes-functions/trunk/code/plugins/acf/field_settings.php
r3337494 r3450686 556 556 * @return array 557 557 * @since 7.29 558 * @verified 202 1.04.30558 * @verified 2026.01.26 559 559 */ 560 560 function load_field_update_choices( $field ) … … 592 592 && strpos( $GLOBALS['lct_mu']->action, 'acf/' ) === 0 593 593 && strpos( $GLOBALS['lct_mu']->action, '/query' ) !== false 594 ) 595 || ( 596 function_exists( 'afwp_doing_api' ) 597 && afwp_doing_api() 594 598 ) 595 599 ) { -
lct-useful-shortcodes-functions/trunk/code/plugins/acf/form.php
r3337494 r3450686 297 297 * 298 298 * @return string 299 * @ noinspection PhpMissingParamTypeInspection299 * @verified 2025.11.24 300 300 */ 301 301 function process_pdf_fields( $args ) … … 422 422 423 423 424 $f r= [424 $find_replace = [ 425 425 '{value}' => $field['value'], 426 426 '{label}' => $field['label'], 427 427 ]; 428 $ fnr = lct_create_find_and_replace_arrays( $fr );429 $this_field_html = str_replace( $fnr['find'], $fnr['replace'], $args['lct_pdf_layout']);428 $this_field_html = $args['lct_pdf_layout']; 429 lct_str_replace( $find_replace, $this_field_html ); 430 430 431 431 -
lct-useful-shortcodes-functions/trunk/code/plugins/acf/op_main_fixes_cleanups.php
r3384881 r3450686 19 19 public $post_post_content; 20 20 public $post_info; 21 public $post_content_f nr;21 public $post_content_find_replace; 22 22 public $post_types; 23 23 public $post_types_excluded; … … 316 316 $this->post_types_excluded = apply_filters( 'lct_startup_cleanup_guid_post_types_excluded', $this->post_types_excluded ); 317 317 318 $this->siteurl = parse_url( rtrim( esc_url( $wpdb->get_var( $wpdb->prepare( "SELECT `option_value` FROM {$wpdb->options} WHERE option_name = %s", 'home' ) ) ), '/' ) );319 $this->siteurl_host_non_www = str_replace( 'www.', '', $this->siteurl['host'] );320 $this->clientzz = lct_acf_get_option_raw( 'clientzz' );321 $this->post_content_f nr = $this->lct_get_post_content_fnr();318 $this->siteurl = parse_url( rtrim( esc_url( $wpdb->get_var( $wpdb->prepare( "SELECT `option_value` FROM {$wpdb->options} WHERE option_name = %s", 'home' ) ) ), '/' ) ); 319 $this->siteurl_host_non_www = str_replace( 'www.', '', $this->siteurl['host'] ); 320 $this->clientzz = lct_acf_get_option_raw( 'clientzz' ); 321 $this->post_content_find_replace = $this->lct_get_post_content_find_replace(); 322 322 } 323 323 … … 2591 2591 * @return array 2592 2592 * @since 5.40 2593 * @verified 202 1.07.062593 * @verified 2025.11.24 2594 2594 */ 2595 function lct_get_post_content_f nr()2595 function lct_get_post_content_find_replace() 2596 2596 { 2597 2597 $find_replace = []; … … 2683 2683 2684 2684 2685 return lct_create_find_and_replace_arrays( $find_replace );2685 return $find_replace; 2686 2686 } 2687 2687 … … 2694 2694 * 2695 2695 * @since 5.40 2696 * @verified 20 18.02.282696 * @verified 2025.11.24 2697 2697 */ 2698 2698 function cleanup_guid_post_content( $post, $single = false ) … … 2749 2749 && ! is_serialized( $post_content_new ) 2750 2750 ) { 2751 $post_content_new = str_replace( $this->post_content_fnr['find'], $this->post_content_fnr['replace'], $post_content_new );2751 lct_str_replace( $this->post_content_find_replace, $post_content_new ); 2752 2752 } 2753 2753 … … 2940 2940 * 2941 2941 * @since 5.40 2942 * @verified 202 0.04.242942 * @verified 2025.11.24 2943 2943 */ 2944 2944 function cleanup_guid_link_cleanup( $post, $single = false ) … … 2972 2972 $check_for_nested_shortcode = []; 2973 2973 $wp_slash = false; 2974 $find_replace = []; 2974 2975 2975 2976 $excluded_shortcodes = [ … … 3050 3051 || ! empty( $hrefs_link_single ) 3051 3052 ) { 3052 $path_fnrs = [];3053 3054 3055 3053 if ( empty( $hrefs_double[2] ) ) { 3056 3054 $hrefs_double[0] = []; … … 3249 3247 3250 3248 3251 $path_fnrs[ $hrefs_double[0][ $path_key ] ] = $shortcode_wrapper['start'] . 'link ' . lct_return( $link_attrs_string, ' ' ) . $shortcode_wrapper['end']; 3252 } 3253 } 3254 } 3255 } 3256 3257 3258 if ( ! empty( $path_fnrs ) ) { 3259 $link_cleanup_fnr = lct_create_find_and_replace_arrays( $path_fnrs ); 3260 $link_cleanup_new = str_replace( $link_cleanup_fnr['find'], $link_cleanup_fnr['replace'], $link_cleanup_new ); 3261 } 3249 $find_replace[ $hrefs_double[0][ $path_key ] ] = $shortcode_wrapper['start'] . 'link ' . lct_return( $link_attrs_string, ' ' ) . $shortcode_wrapper['end']; 3250 } 3251 } 3252 } 3253 } 3254 3255 3256 lct_str_replace( $find_replace, $link_cleanup_new ); 3262 3257 } 3263 3258 -
lct-useful-shortcodes-functions/trunk/code/plugins/acf/public_choices.php
r3337494 r3450686 194 194 function pretty_state_list( $field ) 195 195 { 196 /** 197 * Verify we can adjust 198 */ 199 if ( 200 function_exists( 'afwp_acf_is_choice_altering_allowed' ) 201 && ! afwp_acf_is_choice_altering_allowed( $field ) //Don't alter anything when ACf field_group is being saved, imported or exported 202 ) { 203 return $field; 204 } 205 206 196 207 $field['placeholder'] = 'Choose a State...'; 197 208 … … 286 297 function pretty_state_abbr_value_list( $field ) 287 298 { 299 /** 300 * Verify we can adjust 301 */ 302 if ( 303 function_exists( 'afwp_acf_is_choice_altering_allowed' ) 304 && ! afwp_acf_is_choice_altering_allowed( $field ) //Don't alter anything when ACf field_group is being saved, imported or exported 305 ) { 306 return $field; 307 } 308 309 288 310 $field['placeholder'] = 'Choose a State...'; 289 311 … … 364 386 function pretty_acf_field_groups_list( $field ) 365 387 { 388 /** 389 * Verify we can adjust 390 */ 391 if ( 392 function_exists( 'afwp_acf_is_choice_altering_allowed' ) 393 && ! afwp_acf_is_choice_altering_allowed( $field ) //Don't alter anything when ACf field_group is being saved, imported or exported 394 ) { 395 return $field; 396 } 397 398 366 399 $field['choices'] = $this->pretty_acf_field_groups_list_data(); 367 400 … … 432 465 function pretty_acf_fields_list( $field ) 433 466 { 467 /** 468 * Verify we can adjust 469 */ 470 if ( 471 function_exists( 'afwp_acf_is_choice_altering_allowed' ) 472 && ! afwp_acf_is_choice_altering_allowed( $field ) //Don't alter anything when ACf field_group is being saved, imported or exported 473 ) { 474 return $field; 475 } 476 477 434 478 $field['choices'] = $this->pretty_acf_fields_list_data( $field ); 435 479 … … 496 540 function exhaustive_acf_field_groups_list( $field ) 497 541 { 542 /** 543 * Verify we can adjust 544 */ 545 if ( 546 function_exists( 'afwp_acf_is_choice_altering_allowed' ) 547 && ! afwp_acf_is_choice_altering_allowed( $field ) //Don't alter anything when ACf field_group is being saved, imported or exported 548 ) { 549 return $field; 550 } 551 552 498 553 $field['choices'] = $this->exhaustive_acf_field_groups_list_data(); 499 554 … … 571 626 function pretty_wp_roles( $field ) 572 627 { 628 /** 629 * Verify we can adjust 630 */ 631 if ( 632 function_exists( 'afwp_acf_is_choice_altering_allowed' ) 633 && ! afwp_acf_is_choice_altering_allowed( $field ) //Don't alter anything when ACf field_group is being saved, imported or exported 634 ) { 635 return $field; 636 } 637 638 573 639 $field['placeholder'] = 'Choose a Role...'; 574 640 … … 650 716 function pretty_wp_caps( $field ) 651 717 { 718 /** 719 * Verify we can adjust 720 */ 721 if ( 722 function_exists( 'afwp_acf_is_choice_altering_allowed' ) 723 && ! afwp_acf_is_choice_altering_allowed( $field ) //Don't alter anything when ACf field_group is being saved, imported or exported 724 ) { 725 return $field; 726 } 727 728 652 729 $field['choices'] = apply_filters( 'lct/pretty_wp_caps', $this->pretty_wp_caps_data() ); 653 730 … … 671 748 function pretty_wp_roles_n_caps( $field ) 672 749 { 750 /** 751 * Verify we can adjust 752 */ 753 if ( 754 function_exists( 'afwp_acf_is_choice_altering_allowed' ) 755 && ! afwp_acf_is_choice_altering_allowed( $field ) //Don't alter anything when ACf field_group is being saved, imported or exported 756 ) { 757 return $field; 758 } 759 760 673 761 $field['placeholder'] = 'Choose a Role or Capability...'; 674 762 … … 787 875 function pretty_wp_post_types( $field ) 788 876 { 877 /** 878 * Verify we can adjust 879 */ 880 if ( 881 function_exists( 'afwp_acf_is_choice_altering_allowed' ) 882 && ! afwp_acf_is_choice_altering_allowed( $field ) //Don't alter anything when ACf field_group is being saved, imported or exported 883 ) { 884 return $field; 885 } 886 887 789 888 $field['choices'] = apply_filters( 'lct/pretty_wp_post_types', $this->pretty_wp_post_types_data( $field ) ); 790 889 … … 871 970 function pretty_wp_taxonomies( $field ) 872 971 { 972 /** 973 * Verify we can adjust 974 */ 975 if ( 976 function_exists( 'afwp_acf_is_choice_altering_allowed' ) 977 && ! afwp_acf_is_choice_altering_allowed( $field ) //Don't alter anything when ACf field_group is being saved, imported or exported 978 ) { 979 return $field; 980 } 981 982 873 983 $field['choices'] = apply_filters( 'lct/pretty_wp_taxonomies', $this->pretty_wp_taxonomies_data( $field ) ); 874 984 … … 916 1026 function pretty_us_timezone( $field ) 917 1027 { 1028 /** 1029 * Verify we can adjust 1030 */ 1031 if ( 1032 function_exists( 'afwp_acf_is_choice_altering_allowed' ) 1033 && ! afwp_acf_is_choice_altering_allowed( $field ) //Don't alter anything when ACf field_group is being saved, imported or exported 1034 ) { 1035 return $field; 1036 } 1037 1038 918 1039 $field['choices'] = $this->pretty_us_timezone_data(); 919 1040 … … 969 1090 { 970 1091 if ( ! class_exists( 'GFForms' ) ) { 1092 return $field; 1093 } 1094 1095 1096 /** 1097 * Verify we can adjust 1098 */ 1099 if ( 1100 function_exists( 'afwp_acf_is_choice_altering_allowed' ) 1101 && ! afwp_acf_is_choice_altering_allowed( $field ) //Don't alter anything when ACf field_group is being saved, imported or exported 1102 ) { 971 1103 return $field; 972 1104 } … … 1022 1154 function pretty_months( $field ) 1023 1155 { 1156 /** 1157 * Verify we can adjust 1158 */ 1159 if ( 1160 function_exists( 'afwp_acf_is_choice_altering_allowed' ) 1161 && ! afwp_acf_is_choice_altering_allowed( $field ) //Don't alter anything when ACf field_group is being saved, imported or exported 1162 ) { 1163 return $field; 1164 } 1165 1166 1024 1167 $field['choices'] = $this->pretty_months_data(); 1025 1168 … … 1042 1185 function pretty_months_leading_zero( $field ) 1043 1186 { 1187 /** 1188 * Verify we can adjust 1189 */ 1190 if ( 1191 function_exists( 'afwp_acf_is_choice_altering_allowed' ) 1192 && ! afwp_acf_is_choice_altering_allowed( $field ) //Don't alter anything when ACf field_group is being saved, imported or exported 1193 ) { 1194 return $field; 1195 } 1196 1197 1044 1198 $field['choices'] = $this->pretty_months_data(); 1045 1199 -
lct-useful-shortcodes-functions/trunk/code/plugins/gforms/_admin.php
r2894473 r3450686 436 436 * 437 437 * @return mixed 438 * @since 0.0 438 * @since 0.0 439 * @verified 2025.11.24 439 440 */ 440 441 function gform_submit_button( … … 447 448 && $custom_class = lct_acf_get_option( 'gform_button_custom_class' ) 448 449 ) { 449 $f nr= [450 $find_replace = [ 450 451 "class='button " => "class='{$custom_class} button ", 451 452 "class='gform_button " => "class='{$custom_class} gform_button ", … … 453 454 "class=\"gform_button " => "class=\"{$custom_class} gform_button ", 454 455 ]; 455 $fnr = lct_create_find_and_replace_arrays( $fnr ); 456 457 $button = str_replace( $fnr['find'], $fnr['replace'], $button ); 456 lct_str_replace( $find_replace, $button ); 458 457 } 459 458 -
lct-useful-shortcodes-functions/trunk/code/plugins/stream/_admin.php
r2894473 r3450686 87 87 * @return bool 88 88 * @since 2019.23 89 * @verified 20 19.08.2189 * @verified 2025.11.24 90 90 */ 91 91 function trigger_check( … … 97 97 $class 98 98 ) { 99 $find_n_replace = [100 '{site}' => get_bloginfo(),101 ];102 $fnr = lct_create_find_and_replace_arrays( $find_n_replace );103 104 105 99 if ( isset( $class->alert_meta['email_subject'] ) ) { 106 $class->alert_meta['email_subject'] = str_replace( $fnr['find'], $fnr['replace'], $class->alert_meta['email_subject'] ); 100 $find_replace = [ 101 '{site}' => get_bloginfo(), 102 ]; 103 lct_str_replace( $find_replace, $class->alert_meta['email_subject'] ); 107 104 } 108 105 -
lct-useful-shortcodes-functions/trunk/code/plugins/wc/_admin.php
r2894473 r3450686 52 52 53 53 /** 54 * everytime55 */56 /**57 * actions58 */59 add_action( 'woocommerce_save_account_details', [ $this, 'wc_save_account_details' ] );60 61 62 /**63 54 * filters 64 55 */ … … 68 59 add_filter( 'woocommerce_get_image_size_gallery_thumbnail', [ $this, 'update_image_size' ] ); 69 60 add_filter( 'woocommerce_get_image_size_thumbnail', [ $this, 'update_image_size' ] ); 70 71 72 //if ( lct_frontend() ) {}73 74 75 //if ( lct_wp_admin_all() ) {}76 77 78 //if ( lct_wp_admin_non_ajax() ) {}79 80 81 //if ( lct_ajax_only() ) {}82 61 } 83 62 … … 100 79 101 80 return $strength; 102 }103 104 105 /**106 * Update the nickname & display name when we change the first or last name107 *108 * @param $user_id109 *110 * @since 7.35111 * @verified 2016.11.17112 */113 function wc_save_account_details( $user_id )114 {115 $user = get_userdata( $user_id );116 117 118 $user->display_name = $user->first_name . ' ' . $user->last_name;119 $user->nickname = $user->first_name . ' ' . $user->last_name;120 121 wp_update_user( $user );122 81 } 123 82 -
lct-useful-shortcodes-functions/trunk/code/wp-admin/admin/_admin.php
r3337494 r3450686 831 831 * @return array 832 832 * @since 4.2.2.26 833 * @verified 20 18.08.30833 * @verified 2025.11.24 834 834 */ 835 835 function acf_settings_tools_title_mod( $field_groups ) 836 836 { 837 837 foreach ( $field_groups as $key => $field_group ) { 838 $location = $field_group; 839 $location = acf_extract_var( $location, 'location' ); 840 $location = $location[0][0]; 841 842 $title_addition = $location['param'] . '__' . $location['value'] . '___' . $field_group['title']; 843 844 $fnr = lct_create_find_and_replace_arrays( 845 [ 846 ' ' => '_', 847 '-' => '_', 848 '=' => '', 849 ] 850 ); 851 $file_name = str_replace( $fnr['find'], $fnr['replace'], sanitize_title( $title_addition ) ) . '.json'; 852 838 $location = $field_group; 839 $location = acf_extract_var( $location, 'location' ); 840 $location = $location[0][0]; 841 $title_addition = sanitize_title( $location['param'] . '__' . $location['value'] . '___' . $field_group['title'] ); 842 843 $find_replace = [ 844 ' ' => '_', 845 '-' => '_', 846 '=' => '', 847 ]; 848 lct_str_replace( $find_replace, $title_addition ); 849 850 $file_name = $title_addition . '.json'; 853 851 854 852 $field_groups[ $key ]['title'] .= sprintf( ' — %s — Filename: %s', $field_group['key'], $file_name ); -
lct-useful-shortcodes-functions/trunk/code/wp-admin/admin/onetime.php
r3384881 r3450686 737 737 738 738 if ( $wpseo ) { 739 $f r= [739 $find_replace = [ 740 740 'FOY™' => 'FOY®', 741 741 'FOY Dentures™' => 'FOY Dentures®', … … 744 744 'Denture Nation™' => 'Denture Nation®', 745 745 ]; 746 $fnr = lct_create_find_and_replace_arrays( $fr );747 746 748 747 … … 750 749 foreach ( $terms as $term_id => $infos ) { 751 750 foreach ( $infos as $info_key => $info ) { 752 $wpseo[ $tax_key ][ $term_id ][ $info_key ] = str_replace( $fnr['find'], $fnr['replace'], $info ); 751 lct_str_replace( $find_replace, $info ); 752 $wpseo[ $tax_key ][ $term_id ][ $info_key ] = $info; 753 753 } 754 754 } … … 1230 1230 * 1231 1231 * @since 2019.11 1232 * @verified 20 19.05.211232 * @verified 2026.01.30 1233 1233 */ 1234 1234 function scanner_postmeta() … … 1502 1502 1503 1503 foreach ( $post_types as $post_type ) { 1504 if ( $post_type === 'afwp_input_group' ) { 1504 if ( 1505 $post_type === 'afwp_input_group' 1506 || ! function_exists( 'AFWP' ) 1507 ) { 1505 1508 continue; 1506 1509 } -
lct-useful-shortcodes-functions/trunk/lct-useful-shortcodes-functions.php
r3384881 r3450686 4 4 * Plugin URI: https://www.simplesmithmedia.com 5 5 * Description: Shortcodes & Functions that will help make your life easier. 6 * Version: 2025.0 36 * Version: 2025.04 7 7 * Author: SimpleSmithMedia 8 8 * Author URI: https://www.simplesmithmedia.com -
lct-useful-shortcodes-functions/trunk/readme.txt
r3384881 r3450686 33 33 34 34 == Changelog == 35 = 2025.04 = 36 *Release Date - 30 January 2026* 37 38 * Added: 39 * lct_split_placeholder() 40 * lct_str_replace() 41 * Removed: 42 * add_action( 'updated_user_meta', [ $this, 'updated_user_meta' ], 10, 4 ); 43 * add_action( 'woocommerce_save_account_details', [ $this, 'wc_save_account_details' ] ); 44 * add_action( 'set_current_user', [ $this, 'update_display_name' ] ); 45 35 46 = 2025.03 = 36 47 *Release Date - 26 October 2025*
Note: See TracChangeset
for help on using the changeset viewer.