Plugin Directory


Ignore:
Timestamp:
08/10/2026 03:32:57 AM (2 months ago)
Author:
roxyapi
Message:

Update to version 1.10.0 from GitHub

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roxyapi/trunk/src/Generated/Shortcodes/GetPhases.php

    r3637152 r3639910  
    2222        public const TAG = 'roxy_get_phases';
    2323
     24        /**
     25         * Every attribute this shortcode accepts. shortcode_atts() silently
     26         * discards anything absent from here, so this is also the contract the
     27         * library copy-paste sample is checked against.
     28         *
     29         * @var array<string, string>
     30         */
     31        public const DEFAULTS = array(
     32                'birth_date' => '',
     33                'target_date' => '',
     34                'lang' => '',
     35                'hide_readings' => 'inherit',
     36        );
     37
    2438        public static function register(): void {
    2539                if ( shortcode_exists( self::TAG ) ) {
    … …  
    3145        public static function render( $atts, $content = '', $tag = '' ): string {
    3246                $atts = shortcode_atts(
    33                         array(
    34                         'birth_date' => '',
    35                         'target_date' => '',
    36                         'hide_readings' => 'inherit',
    37                         ),
     47                        self::DEFAULTS,
    3848                        is_array( $atts ) ? $atts : array(),
    3949                        (string) $tag
    … …  
    5161                        }
    5262                );
    53                 $data = \RoxyAPI\Generated\Client::getPhases( $body );
     63                $query = array_filter(
     64                        array(
     65                                'lang' => $atts['lang'],
     66                        ),
     67                        static function ( $v ) {
     68                                return $v !== '';
     69                        }
     70                );
     71                $data = \RoxyAPI\Generated\Client::getPhases( $body, $query );
    5472
    5573                if ( is_wp_error( $data ) ) {
Note: See TracChangeset for help on using the changeset viewer.