Plugin Directory

Changeset 3450686


Ignore:
Timestamp:
01/30/2026 07:51:48 PM (6 weeks ago)
Author:
ircary
Message:

2025.04

*Release Date - 30 January 2026*

  • Added:
    • lct_split_placeholder()
    • lct_str_replace()
  • Removed:
    • add_action( 'updated_user_meta', [ $this, 'updated_user_meta' ], 10, 4 );
    • add_action( 'woocommerce_save_account_details', [ $this, 'wc_save_account_details' ] );
    • add_action( 'set_current_user', [ $this, 'update_display_name' ] );
Location:
lct-useful-shortcodes-functions/trunk
Files:
25 edited

Legend:

Unmodified
Added
Removed
  • lct-useful-shortcodes-functions/trunk/available/email-reminder/includes/classes/PDER_Admin.php

    r3150229 r3450686  
    275275             * create new / update post
    276276             */
    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 
    285277            if ( ! empty( $reminder['ID'] ) ) {
    286278                $insert_post_id = wp_update_post( $reminder );
    287279            } else {
    288280                $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 );
    294281            }
    295282
  • lct-useful-shortcodes-functions/trunk/code/admin/_admin.php

    r3337494 r3450686  
    8080        //add_action( 'updated_{$meta_type}_meta' ); //$meta_id, $object_id, $meta_key, $_meta_value
    8181        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_value
    85         add_action( 'updated_user_meta', [ $this, 'updated_user_meta' ], 10, 4 );
    8682
    8783
     
    635631
    636632    /**
    637      * Update the nickname & display name when we change the first or last name
    638      *
    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.35
    645      * @verified 2025.03.05
    646      */
    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     /**
    663633     * Update the modified time of a post when we edit any meta
    664634     *
     
    946916     * NOT Trackbacks, Pingbacks or any other custom comment type
    947917     *
    948      * @param int $new
    949      * @param int $old
    950      * @param int $post_id
     918     * @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.
    951921     *
    952922     * @return int
    953923     * @since        2018.59
    954      * @verified     2020.10.26
    955      * @noinspection PhpUnusedParameterInspection
     924     * @verified     2025.12.05
    956925     */
    957926    function only_count_comments( $new, $old, $post_id )
     
    960929
    961930
    962         $new_count = (int) $wpdb->get_var(
     931        return (int) $wpdb->get_var(
    963932            $wpdb->prepare(
    964933                "SELECT COUNT(*) FROM `{$wpdb->comments}`
     
    969938            )
    970939        );
    971 
    972 
    973         if ( is_int( $new_count ) ) {
    974             $new = $new_count;
    975         }
    976 
    977 
    978         return $new;
    979940    }
    980941
  • lct-useful-shortcodes-functions/trunk/code/admin/lct.php

    r3337494 r3450686  
    208208        ];
    209209
    210         public $doing_update_display_name = false;
    211 
    212210
    213211        /**
     
    410408         * @verified 2019.09.11
    411409         */
    412         function load_hooks()
    413         {
    414             add_action( 'set_current_user', [ $this, 'update_display_name' ] );
    415         }
     410        function load_hooks() {}
    416411
    417412
     
    921916            return 'None';
    922917        }
    923 
    924 
    925         /**
    926          * Programmatically update Display Name or First Name & Last Name when some info is missing
    927          *
    928          * @since    2019.25
    929          * @verified 2021.11.02
    930          */
    931         function update_display_name()
    932         {
    933             global $current_user;
    934 
    935 
    936             if (
    937                 empty( $current_user->ID )
    938                 || $this->doing_update_display_name
    939             ) {
    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_user
    989          * @param string  $display_name
    990          * @param bool    $save_now
    991          *
    992          * @return WP_User
    993          * @since        2019.25
    994          * @verified     2019.09.11
    995          * @noinspection PhpMissingParamTypeInspection
    996          */
    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         }
    1031918    }
    1032919
  • lct-useful-shortcodes-functions/trunk/code/api/_cache.php

    r3263018 r3450686  
    33if ( ! defined( 'ABSPATH' ) ) {
    44    exit;
    5 }
    6 
    7 
    8 /**
    9  * Disable cache when we don't need it
    10  *
    11  * @since    2018.62
    12  * @verified 2019.07.12
    13  */
    14 function lct_disable_cache()
    15 {
    16     lct_update_setting( 'cache_disabled', true );
    17 }
    18 
    19 
    20 /**
    21  * Re-enable cache when we need it
    22  *
    23  * @since    2018.62
    24  * @verified 2019.07.12
    25  */
    26 function lct_enable_cache()
    27 {
    28     lct_update_setting( 'cache_disabled', null );
    295}
    306
     
    241217
    242218
    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 
    254219    return wp_cache_set( $key, $data, 'lct' );
    255220}
     
    267232function lct_delete_cache( $key )
    268233{
    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 
    280234    return wp_cache_delete( $key, 'lct' );
    281235}
    282 
    283 
    284 /**
    285  * delete_cache for all LCT keys
    286  *
    287  * @return bool
    288  * @since    2018.46
    289  * @verified 2019.07.12
    290  */
    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  
    10051005 * @param array $custom_data
    10061006 * @param bool  $process_before
    1007  * @param array $fnr
     1007 * @param array $find_replace
    10081008 * @param null  $parent_id
    10091009 *
     
    10121012 * @verified 2019.02.07
    10131013 */
    1014 function lct_update_reminder( $template, $org = null, $custom_data = [], $process_before = false, $fnr = [], $parent_id = null )
     1014function lct_update_reminder( $template, $org = null, $custom_data = [], $process_before = false, $find_replace = [], $parent_id = null )
    10151015{
    10161016    if (
     
    10231023
    10241024    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'] );
    10271027    } else {
    10281028        $template['body'] = '...';
     
    12741274
    12751275/**
    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[]
    12811282 * @since    LCT 4.2.2.26
    12821283 * @verified 2022.02.10
    12831284 */
    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         }
     1285function 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;
    13041326    }
    13051327
    13061328
    13071329    return [
    1308         'find'    => $f,
    1309         'replace' => $r
     1330        'find'    => $final_find,
     1331        'replace' => $final_replace
    13101332    ];
     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 */
     1346function 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 */
     1386function 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 );
    13111405}
    13121406
     
    14301524 * @return string
    14311525 * @since    LCT 2017.9
    1432  * @verified 2018.09.19
     1526 * @verified 2025.11.24
    14331527 */
    14341528function process_nested_shortcode( $content, $scs, $delimiter = null )
    14351529{
    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' ] );
    14411534
    14421535
     
    14631556        }
    14641557
    1465         $sc = str_replace( $html_encode_fnr['find'], $html_encode_fnr['replace'], $sc );
    1466 
     1558        lct_shortcode_html_decode( $sc );
    14671559        $sc = html_entity_decode( $sc );
    14681560
     
    15001592 * Array of special decode maps for shortcodes
    15011593 *
    1502  * @return array
     1594 * @param string $sc
     1595 *
    15031596 * @since    LCT 2017.9
    1504  * @verified 2017.02.07
    1505  */
    1506 function lct_shortcode_html_decode()
    1507 {
    1508     $html_encode_find_n_replace = [
     1597 * @verified 2025.11.24
     1598 */
     1599function lct_shortcode_html_decode( &$sc )
     1600{
     1601    $find_replace = [
    15091602        '"'  => '"',
    15101603        '“' => '"',
     
    15171610        '′' => '\'',
    15181611    ];
    1519 
    1520 
    1521     return lct_create_find_and_replace_arrays( $html_encode_find_n_replace );
     1612    lct_str_replace( $find_replace, $sc );
    15221613}
    15231614
     
    16751766 * @return string
    16761767 * @since        LCT 7.3
    1677  * @verified     2020.12.08
    1678  * @noinspection PhpMissingParamTypeInspection
     1768 * @verified     2025.11.24
    16791769 */
    16801770function lct_add_url_site_to_content( $content, $force_live_url = false )
     
    16901780
    16911781
    1692     $find_n_replace = [
     1782    $find_replace = [
    16931783        '//' => '~~~slash_slash~~~',
    16941784
     
    17131803        '~~~slash_slash~~~' => '//',
    17141804    ];
    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;
    17191809}
    17201810
     
    30993189                call_user_func_array( [ $ud['class'], $ud['function'] ], $ud['args'] );
    31003190            } 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] );
    31033193                }
    31043194                call_user_func_array( $ud['function'], $ud['args'] );
  • lct-useful-shortcodes-functions/trunk/code/api/class.php

    r3384881 r3450686  
    584584     *
    585585     * @since    2017.42
    586      * @verified 2019.03.11
     586     * @verified 2026.01.28
    587587     */
    588588    function autoload_checker()
    589589    {
    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        ) {
    591594            return;
    592595        }
  • lct-useful-shortcodes-functions/trunk/code/api/hacky.php

    r3158878 r3450686  
    131131
    132132
    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 );
    135135
    136136
     
    229229            remove_filter( 'do_shortcode_tag', [ $this, 'do_shortcode_tag' ] );
    230230
    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 );
    233233
    234234
  • lct-useful-shortcodes-functions/trunk/code/features/api/geocode.php

    r3050689 r3450686  
    164164 * @return string
    165165 * @since    5.0
    166  * @verified 2019.07.18
     166 * @verified 2025.11.24
    167167 */
    168168function lct_get_street_address( $address, $type = 'long_name' )
     
    200200
    201201        if ( $tmp[1] ) {
    202             $find_and_replace = [
     202            $find_replace = [
    203203                PHP_EOL                              => ' ',
    204204                '.'                                  => '',
     
    208208                $comp['route']['short_name']         => '',
    209209            ];
    210             $fnr              = lct_create_find_and_replace_arrays( $find_and_replace );
    211210
    212211
    213212            $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 );
    215214            $subpremise_prefix = trim( $subpremise_prefix );
    216215
  • lct-useful-shortcodes-functions/trunk/code/plugins/Avada/testimony.php

    r2894473 r3450686  
    160160     * @return string
    161161     * @since    7.56
    162      * @verified 2017.05.18
     162     * @verified 2025.11.24
    163163     */
    164164    function testimony( $a )
     
    202202                        '{content}' => $testimony->post_content,
    203203                    ];
    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 );
    208206                }
    209207            }
  • lct-useful-shortcodes-functions/trunk/code/plugins/acf/_admin.php

    r3150229 r3450686  
    465465             */
    466466            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 ) )
    470469            ) {
    471470                foreach ( $files as $file ) {
  • lct-useful-shortcodes-functions/trunk/code/plugins/acf/_loaded.php

    r3384881 r3450686  
    453453     * @date     2023.08.30
    454454     * @since    2023.03
    455      * @verified 2023.08.31
     455     * @verified 2026.01.26
    456456     */
    457457    function load_references()
     
    464464        }
    465465
    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'] = [];
    517480    }
    518481
     
    784747     * @return string
    785748     * @since    2018.0
    786      * @verified 2023.12.07
     749     * @verified 2026.01.30
    787750     */
    788751    function pre_load_reference( $reference, $field_name, $post_id )
     
    842805            $reference === null
    843806            //&& lct_is_dev()
     807            && ! str_contains( $_SERVER['HTTP_HOST'], 'wpdev' )
    844808            && apply_filters( 'lct/acf_loaded/pre_load_reference/show_error_log', true, $field_name )
    845809        ) {
     
    937901     * @return string
    938902     * @since    2018.0
    939      * @verified 2024.01.24
     903     * @verified 2026.01.30
    940904     */
    941905    function load_reference( $reference, $field_name, $post_id )
    942906    {
    943907        if (
    944             $reference !== null
    945             || ! $field_name
     908            ! $field_name
    946909            || is_array( $field_name )
     910            || (
     911                $reference !== null
     912                && ! in_array( $field_name, $this->references['dupe_names'] ?? [] )
     913            )
    947914        ) {
    948915            return $reference;
     
    12601227            $reference === null
    12611228            //&& lct_is_dev()
     1229            && ! str_contains( $_SERVER['HTTP_HOST'], 'wpdev' )
    12621230            && apply_filters( 'lct/acf_loaded/load_reference/show_error_log', true, $field_name )
    12631231        ) {
  • lct-useful-shortcodes-functions/trunk/code/plugins/acf/_shortcodes.php

    r3337494 r3450686  
    149149     * @return string
    150150     * @since    0.0
    151      * @verified 2019.02.16
     151     * @verified 2025.11.24
    152152     */
    153153    function copyright()
     
    211211
    212212
    213             $find_n_replace = [
     213            $find_replace = [
    214214                '{copy_symbol}'  => '©',
    215215                '{year}'         => lct_format_current_time( 'Y' ),
     
    219219
    220220            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 ) );
    222222            }
    223223
    224224            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 ) );
    226226            }
    227227
    228228            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'] );
    236236        }
    237237
  • lct-useful-shortcodes-functions/trunk/code/plugins/acf/api/get.php

    r3384881 r3450686  
    202202    // return early if cache is found
    203203    $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' ) ) {
    205205        return $r;
    206206    }
     
    392392
    393393
    394     wp_cache_set( $cache_key, $r );
     394    wp_cache_set( $cache_key, $r, 'lct' );
    395395
    396396
  • lct-useful-shortcodes-functions/trunk/code/plugins/acf/dev_checks.php

    r3384881 r3450686  
    11571157     * @return array
    11581158     * @since    2019.19
    1159      * @verified 2025.02.20
     1159     * @verified 2026.01.30
    11601160     */
    11611161    function option_names_to_ignore()
     
    11871187         */
    11881188        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 ] ) )
    11901191            && ! empty( $option_groups_fields )
    11911192        ) {
     
    12251226     * @return array
    12261227     * @since    2019.19
    1227      * @verified 2025.02.20
     1228     * @verified 2026.01.30
    12281229     */
    12291230    function option_names_LIKE_to_ignore()
     
    12521253         */
    12531254        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 ] ) )
    12551257            && ! empty( $option_groups_fields )
    12561258        ) {
     
    14041406     * @return array
    14051407     * @since        2019.19
    1406      * @verified     2025.02.20
     1408     * @verified     2026.01.30
    14071409     * @noinspection DuplicatedCode
    14081410     */
     
    14261428
    14271429
     1430        if ( ! function_exists( 'AFWP' ) ) {
     1431            $ignore = array_keys( $ignore );
     1432
     1433            return $ignore;
     1434        }
     1435
     1436
    14281437        /**
    14291438         * Add LCT ACF Fields
     
    14721481     * @return array
    14731482     * @since        2019.19
    1474      * @verified     2025.02.20
     1483     * @verified     2026.01.30
    14751484     * @noinspection DuplicatedCode
    14761485     */
     
    14911500            'sbg_selected_sidebar' => true,
    14921501        ];
     1502
     1503
     1504        if ( ! function_exists( 'AFWP' ) ) {
     1505            $ignore = array_keys( $ignore );
     1506
     1507            return $ignore;
     1508        }
    14931509
    14941510
     
    16431659     * @return array
    16441660     * @since    2019.19
    1645      * @verified 2025.02.20
     1661     * @verified 2026.01.30
    16461662     */
    16471663    function usermeta_to_ignore()
     
    16581674        $groups_fields = [];
    16591675        $ignore        = [];
     1676
     1677
     1678        if ( ! function_exists( 'AFWP' ) ) {
     1679            $ignore = array_keys( $ignore );
     1680
     1681            return $ignore;
     1682        }
    16601683
    16611684
     
    17061729     * @return array
    17071730     * @since        2019.19
    1708      * @verified     2025.02.20
     1731     * @verified     2026.01.30
    17091732     * @noinspection DuplicatedCode
    17101733     */
     
    17221745        $groups_fields = [];
    17231746        $ignore        = [];
     1747
     1748
     1749        if ( ! function_exists( 'AFWP' ) ) {
     1750            $ignore = array_keys( $ignore );
     1751
     1752            return $ignore;
     1753        }
    17241754
    17251755
  • lct-useful-shortcodes-functions/trunk/code/plugins/acf/field_settings.php

    r3337494 r3450686  
    556556     * @return array
    557557     * @since    7.29
    558      * @verified 2021.04.30
     558     * @verified 2026.01.26
    559559     */
    560560    function load_field_update_choices( $field )
     
    592592                    && strpos( $GLOBALS['lct_mu']->action, 'acf/' ) === 0
    593593                    && strpos( $GLOBALS['lct_mu']->action, '/query' ) !== false
     594                )
     595                || (
     596                    function_exists( 'afwp_doing_api' )
     597                    && afwp_doing_api()
    594598                )
    595599            ) {
  • lct-useful-shortcodes-functions/trunk/code/plugins/acf/form.php

    r3337494 r3450686  
    297297     *
    298298     * @return string
    299      * @noinspection PhpMissingParamTypeInspection
     299     * @verified 2025.11.24
    300300     */
    301301    function process_pdf_fields( $args )
     
    422422
    423423
    424                 $fr              = [
     424                $find_replace    = [
    425425                    '{value}' => $field['value'],
    426426                    '{label}' => $field['label'],
    427427                ];
    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 );
    430430
    431431
  • lct-useful-shortcodes-functions/trunk/code/plugins/acf/op_main_fixes_cleanups.php

    r3384881 r3450686  
    1919    public $post_post_content;
    2020    public $post_info;
    21     public $post_content_fnr;
     21    public $post_content_find_replace;
    2222    public $post_types;
    2323    public $post_types_excluded;
     
    316316        $this->post_types_excluded = apply_filters( 'lct_startup_cleanup_guid_post_types_excluded', $this->post_types_excluded );
    317317
    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_fnr     = $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();
    322322    }
    323323
     
    25912591     * @return array
    25922592     * @since    5.40
    2593      * @verified 2021.07.06
     2593     * @verified 2025.11.24
    25942594     */
    2595     function lct_get_post_content_fnr()
     2595    function lct_get_post_content_find_replace()
    25962596    {
    25972597        $find_replace = [];
     
    26832683
    26842684
    2685         return lct_create_find_and_replace_arrays( $find_replace );
     2685        return $find_replace;
    26862686    }
    26872687
     
    26942694     *
    26952695     * @since    5.40
    2696      * @verified 2018.02.28
     2696     * @verified 2025.11.24
    26972697     */
    26982698    function cleanup_guid_post_content( $post, $single = false )
     
    27492749            && ! is_serialized( $post_content_new )
    27502750        ) {
    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 );
    27522752        }
    27532753
     
    29402940     *
    29412941     * @since    5.40
    2942      * @verified 2020.04.24
     2942     * @verified 2025.11.24
    29432943     */
    29442944    function cleanup_guid_link_cleanup( $post, $single = false )
     
    29722972        $check_for_nested_shortcode = [];
    29732973        $wp_slash                   = false;
     2974        $find_replace               = [];
    29742975
    29752976        $excluded_shortcodes = [
     
    30503051                || ! empty( $hrefs_link_single )
    30513052            ) {
    3052                 $path_fnrs = [];
    3053 
    3054 
    30553053                if ( empty( $hrefs_double[2] ) ) {
    30563054                    $hrefs_double[0] = [];
     
    32493247
    32503248
    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 );
    32623257        }
    32633258
  • lct-useful-shortcodes-functions/trunk/code/plugins/acf/public_choices.php

    r3337494 r3450686  
    194194    function pretty_state_list( $field )
    195195    {
     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
    196207        $field['placeholder'] = 'Choose a State...';
    197208
     
    286297    function pretty_state_abbr_value_list( $field )
    287298    {
     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
    288310        $field['placeholder'] = 'Choose a State...';
    289311
     
    364386    function pretty_acf_field_groups_list( $field )
    365387    {
     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
    366399        $field['choices'] = $this->pretty_acf_field_groups_list_data();
    367400
     
    432465    function pretty_acf_fields_list( $field )
    433466    {
     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
    434478        $field['choices'] = $this->pretty_acf_fields_list_data( $field );
    435479
     
    496540    function exhaustive_acf_field_groups_list( $field )
    497541    {
     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
    498553        $field['choices'] = $this->exhaustive_acf_field_groups_list_data();
    499554
     
    571626    function pretty_wp_roles( $field )
    572627    {
     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
    573639        $field['placeholder'] = 'Choose a Role...';
    574640
     
    650716    function pretty_wp_caps( $field )
    651717    {
     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
    652729        $field['choices'] = apply_filters( 'lct/pretty_wp_caps', $this->pretty_wp_caps_data() );
    653730
     
    671748    function pretty_wp_roles_n_caps( $field )
    672749    {
     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
    673761        $field['placeholder'] = 'Choose a Role or Capability...';
    674762
     
    787875    function pretty_wp_post_types( $field )
    788876    {
     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
    789888        $field['choices'] = apply_filters( 'lct/pretty_wp_post_types', $this->pretty_wp_post_types_data( $field ) );
    790889
     
    871970    function pretty_wp_taxonomies( $field )
    872971    {
     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
    873983        $field['choices'] = apply_filters( 'lct/pretty_wp_taxonomies', $this->pretty_wp_taxonomies_data( $field ) );
    874984
     
    9161026    function pretty_us_timezone( $field )
    9171027    {
     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
    9181039        $field['choices'] = $this->pretty_us_timezone_data();
    9191040
     
    9691090    {
    9701091        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        ) {
    9711103            return $field;
    9721104        }
     
    10221154    function pretty_months( $field )
    10231155    {
     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
    10241167        $field['choices'] = $this->pretty_months_data();
    10251168
     
    10421185    function pretty_months_leading_zero( $field )
    10431186    {
     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
    10441198        $field['choices'] = $this->pretty_months_data();
    10451199
  • lct-useful-shortcodes-functions/trunk/code/plugins/gforms/_admin.php

    r2894473 r3450686  
    436436     *
    437437     * @return mixed
    438      * @since 0.0
     438     * @since    0.0
     439     * @verified 2025.11.24
    439440     */
    440441    function gform_submit_button(
     
    447448            && $custom_class = lct_acf_get_option( 'gform_button_custom_class' )
    448449        ) {
    449             $fnr = [
     450            $find_replace = [
    450451                "class='button "        => "class='{$custom_class} button ",
    451452                "class='gform_button "  => "class='{$custom_class} gform_button ",
     
    453454                "class=\"gform_button " => "class=\"{$custom_class} gform_button ",
    454455            ];
    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 );
    458457        }
    459458
  • lct-useful-shortcodes-functions/trunk/code/plugins/stream/_admin.php

    r2894473 r3450686  
    8787     * @return bool
    8888     * @since    2019.23
    89      * @verified 2019.08.21
     89     * @verified 2025.11.24
    9090     */
    9191    function trigger_check(
     
    9797        $class
    9898    ) {
    99         $find_n_replace = [
    100             '{site}' => get_bloginfo(),
    101         ];
    102         $fnr            = lct_create_find_and_replace_arrays( $find_n_replace );
    103 
    104 
    10599        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'] );
    107104        }
    108105
  • lct-useful-shortcodes-functions/trunk/code/plugins/wc/_admin.php

    r2894473 r3450686  
    5252
    5353        /**
    54          * everytime
    55          */
    56         /**
    57          * actions
    58          */
    59         add_action( 'woocommerce_save_account_details', [ $this, 'wc_save_account_details' ] );
    60 
    61 
    62         /**
    6354         * filters
    6455         */
     
    6859        add_filter( 'woocommerce_get_image_size_gallery_thumbnail', [ $this, 'update_image_size' ] );
    6960        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() ) {}
    8261    }
    8362
     
    10079
    10180        return $strength;
    102     }
    103 
    104 
    105     /**
    106      * Update the nickname & display name when we change the first or last name
    107      *
    108      * @param $user_id
    109      *
    110      * @since    7.35
    111      * @verified 2016.11.17
    112      */
    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 );
    12281    }
    12382
  • lct-useful-shortcodes-functions/trunk/code/wp-admin/admin/_admin.php

    r3337494 r3450686  
    831831     * @return array
    832832     * @since    4.2.2.26
    833      * @verified 2018.08.30
     833     * @verified 2025.11.24
    834834     */
    835835    function acf_settings_tools_title_mod( $field_groups )
    836836    {
    837837        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';
    853851
    854852            $field_groups[ $key ]['title'] .= sprintf( ' &mdash; %s &mdash; Filename: %s', $field_group['key'], $file_name );
  • lct-useful-shortcodes-functions/trunk/code/wp-admin/admin/onetime.php

    r3384881 r3450686  
    737737
    738738        if ( $wpseo ) {
    739             $fr = [
     739            $find_replace = [
    740740                'FOY™'                        => 'FOY&reg;',
    741741                'FOY Dentures™'               => 'FOY Dentures&reg;',
     
    744744                'Denture Nation™'             => 'Denture Nation&reg;',
    745745            ];
    746             $fnr = lct_create_find_and_replace_arrays( $fr );
    747746
    748747
     
    750749                foreach ( $terms as $term_id => $infos ) {
    751750                    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;
    753753                    }
    754754                }
     
    12301230     *
    12311231     * @since    2019.11
    1232      * @verified 2019.05.21
     1232     * @verified 2026.01.30
    12331233     */
    12341234    function scanner_postmeta()
     
    15021502
    15031503                    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                        ) {
    15051508                            continue;
    15061509                        }
  • lct-useful-shortcodes-functions/trunk/lct-useful-shortcodes-functions.php

    r3384881 r3450686  
    44 * Plugin URI: https://www.simplesmithmedia.com
    55 * Description: Shortcodes & Functions that will help make your life easier.
    6  * Version: 2025.03
     6 * Version: 2025.04
    77 * Author: SimpleSmithMedia
    88 * Author URI: https://www.simplesmithmedia.com
  • lct-useful-shortcodes-functions/trunk/readme.txt

    r3384881 r3450686  
    3333
    3434== 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
    3546= 2025.03 =
    3647*Release Date - 26 October 2025*
Note: See TracChangeset for help on using the changeset viewer.