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/CalculateBridgeNumbers.php

    r3637152 r3639910  
    2222        public const TAG = 'roxy_calculate_bridge_numbers';
    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                'full_name' => '',
     33                'year' => '',
     34                'month' => '',
     35                'day' => '',
     36                'lang' => '',
     37                'hide_readings' => 'inherit',
     38        );
     39
    2440        public static function register(): void {
    2541                if ( shortcode_exists( self::TAG ) ) {
    … …  
    3147        public static function render( $atts, $content = '', $tag = '' ): string {
    3248                $atts = shortcode_atts(
    33                         array(
    34                         'full_name' => '',
    35                         'year' => '',
    36                         'month' => '',
    37                         'day' => '',
    38                         'hide_readings' => 'inherit',
    39                         ),
     49                        self::DEFAULTS,
    4050                        is_array( $atts ) ? $atts : array(),
    4151                        (string) $tag
    … …  
    5565                        }
    5666                );
    57                 $data = \RoxyAPI\Generated\Client::calculateBridgeNumbers( $body );
     67                $query = array_filter(
     68                        array(
     69                                'lang' => $atts['lang'],
     70                        ),
     71                        static function ( $v ) {
     72                                return $v !== '';
     73                        }
     74                );
     75                $data = \RoxyAPI\Generated\Client::calculateBridgeNumbers( $body, $query );
    5876
    5977                if ( is_wp_error( $data ) ) {
Note: See TracChangeset for help on using the changeset viewer.