Plugin Directory

Changeset 3111885


Ignore:
Timestamp:
07/03/2024 05:40:03 PM (21 months ago)
Author:
ircary
Message:

2024.06

*Release Date - 3 July 2024*

  • Added:
    • lct_get_WP_UTC_DateTime_from_today()
Location:
lct-useful-shortcodes-functions/trunk
Files:
7 edited

Legend:

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

    r3086744 r3111885  
    243243     * @param int $post_id
    244244     *
    245      * @since        2018.26
    246      * @verified     2022.08.26
     245     * @since    2018.26
     246     * @verified 2024.06.19
    247247     */
    248248    function send_ereminder( $post_id )
     
    548548
    549549                    if ( function_exists( 'afwp_create_logged_error' ) ) {
    550                         $con1 = afwp_create_logged_error_condition( $ereminder->ID, 'draft', 'post_status', '!=' );
    551                         $con2 = afwp_create_logged_error_condition( $ereminder->ID, false, 'post_exists', 'IS' );
    552                         afwp_create_logged_error( [ $con1, $con2 ], [ 'afwp:::wp_error' => $error ] );
     550                        $conditions = null;
     551                        afwp_create_logged_error_condition( $conditions, $ereminder->ID, 'draft', 'post_status', '!=' );
     552                        afwp_create_logged_error_condition( $conditions, $ereminder->ID, null, 'post_exists', 'NOT' );
     553                        afwp_create_logged_error( $conditions, null, $error );
    553554                    } else {
    554555                        lct_debug_to_error_log( $error );
     
    579580
    580581                    if ( function_exists( 'afwp_create_logged_error' ) ) {
    581                         afwp_create_logged_error( null, [ 'afwp:::wp_error' => $error ] );
     582                        afwp_create_logged_error( null, null, $error );
    582583                    } else {
    583584                        lct_debug_to_error_log( $error );
  • lct-useful-shortcodes-functions/trunk/code/api/_helpers.php

    r3095789 r3111885  
    31423142 *
    31433143 * @since    2019.1
    3144  * @verified 2022.11.30
     3144 * @verified 2024.06.27
    31453145 */
    31463146function lct_do_function_later()
     
    31513151                call_user_func_array( [ $ud['class'], $ud['function'] ], $ud['args'] );
    31523152            } else {
     3153                if ( function_exists( 'afwp_flush_cache' ) && $ud['function'] === 'xbs_calculate_totals' && ! empty( $ud['args'][0] ) ) {
     3154                    afwp_flush_cache( 'xbs_calculate_totals::' . $ud['args'][0] );
     3155                }
    31533156                call_user_func_array( $ud['function'], $ud['args'] );
    31543157            }
  • lct-useful-shortcodes-functions/trunk/code/api/get.php

    r3086744 r3111885  
    943943
    944944/**
     945 * Get the DateTime object of the date & time of a day in reference to today
     946 *
     947 * @param string      $inc
     948 * @param string      $type
     949 * @param string|null $format
     950 *
     951 * @return DateTime|string
     952 * @date     2024.06.18
     953 * @since    2024.06
     954 * @verified 2024.06.18
     955 */
     956function lct_get_WP_UTC_DateTime_from_today( $inc = '+1', $type = 'day', $format = null )
     957{
     958    $DateTime = lct_DateTime();
     959
     960
     961    if ( $tmp = lct_get_setting( 'timezone_wp' ) ) {
     962        $DateTime->setTimezone( new DateTimeZone( $tmp ) );
     963    } else {
     964        $DateTime->setTimezone( new DateTimeZone( 'UTC' ) );
     965    }
     966
     967
     968    $DateTime->modify( sprintf( '%s %s', $inc, $type ) );
     969
     970
     971    if ( $format ) {
     972        return $DateTime->format( $format );
     973    }
     974
     975    return $DateTime;
     976}
     977
     978
     979/**
    945980 * Get the start date & time of a day in reference to today
    946981 *
     
    10681103        if ( $error = new WP_Error( 'lct_get_DateTime_from_date', 'lct_get_DateTime_from_date() Function failed', $data ) ) {
    10691104            if ( function_exists( 'afwp_create_logged_error' ) ) {
    1070                 afwp_create_logged_error( null, [ 'afwp:::wp_error' => $error ] );
     1105                afwp_create_logged_error( null, null, $error );
    10711106            } else {
    10721107                lct_debug_to_error_log( $error );
  • lct-useful-shortcodes-functions/trunk/code/features/access.php

    r2991310 r3111885  
    14751475     *
    14761476     * @since    2017.34
    1477      * @verified 2021.02.27
     1477     * @verified 2024.06.17
    14781478     */
    14791479    function render_field_viewonly( $field )
     
    15511551            && isset( $parent_field[ $viewonly ] )
    15521552        ) {
     1553            echo '<span class="lct_render_field_viewonly">';
    15531554            echo lct_acf_format_value( $field['value'], lct_get_field_post_id( $field ), $field );
     1555            echo '</span>';
    15541556        }
    15551557
  • lct-useful-shortcodes-functions/trunk/code/features/api/comments.php

    r2894473 r3111885  
    1414 * @return array
    1515 * @since    5.38
    16  * @verified 2017.11.07
     16 * @verified 2024.06.04
    1717 */
    1818function lct_get_comment_meta_field_keys( $comment_ID, $exclude = [] )
     
    2525        foreach ( $meta as $k => $v ) {
    2626            if ( strpos( $k, '_' ) === 0 ) {
    27                 if ( in_array( lct_un_pre_us( $k ), $exclude ) ) {
     27                if (
     28                    in_array( lct_un_pre_us( $k ), $exclude )
     29                    || lct_is_empty( $v[0] )
     30                ) {
    2831                    continue;
    2932                }
  • lct-useful-shortcodes-functions/trunk/lct-useful-shortcodes-functions.php

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

    r3095789 r3111885  
    3333
    3434== Changelog ==
     35= 2024.06 =
     36*Release Date - 3 July 2024*
     37
     38* Added:
     39    * lct_get_WP_UTC_DateTime_from_today()
     40
    3541= 2024.05 =
    3642*Release Date - 31 May 2024*
Note: See TracChangeset for help on using the changeset viewer.