array( 'act' => '2011/83/EU', 'consolidated' => '2026-09-27', 'url' => 'https://eur-lex.europa.eu/legal-content/EN/TXT/HTML/?uri=CELEX:02011L0083-20260927', ), 'legal_guarantee' => array( 'act' => '2025/1960', 'adopted' => '2025-09-25', 'published' => '2025-10-02', 'applies' => '2026-09-27', 'url' => 'https://eur-lex.europa.eu/legal-content/EN/TXT/HTML/?uri=CELEX:32025R1960', ), ); /** The acknowledgement of the source the EU's reuse rules ask for. */ const SOURCE = '© European Union, https://eur-lex.europa.eu/'; /** * One date of the list, as a day (25 September 2025) or as the Official * Journal writes it (2.10.2025); month names in the language of the screen * unless $english. * * @param string $ymd The date, Y-m-d. * @param string $format 'day' or 'journal'. * @param bool $english In English whatever the language of the screen. * @return string */ private static function date( $ymd, $format, $english ) { $time = strtotime( $ymd . ' 00:00:00 UTC' ); if ( 'journal' === $format ) { return gmdate( 'j.n.Y', $time ); } if ( $english ) { return gmdate( 'j F Y', $time ); } /* translators: a PHP date() format for a full date (25 September 2025): keep the letters, set the order, words and separators of your language. */ return (string) wp_date( _x( 'j F Y', 'full date format (PHP date())', 'careback' ), $time, new \DateTimeZone( 'UTC' ) ); } /** * Which version of the text the plugin shows, as one sentence; in English * (the support report, the readme) or in the language of the screen. * * @param string $key model_form or legal_guarantee. * @param bool $english In English whatever the language of the screen. * @return string '' for a text not on the list. */ public static function version( $key, $english = false ) { if ( ! isset( self::TEXTS[ $key ] ) ) { return ''; } $text = self::TEXTS[ $key ]; if ( 'model_form' === $key ) { if ( $english ) { $sentence = 'Annex I(B) of Directive %1$s, consolidated version of %2$s.'; } else { /* translators: 1: number of the directive, 2011/83/EU; 2: date of the consolidated version followed. */ $sentence = __( 'Annex I(B) of Directive %1$s, consolidated version of %2$s.', 'careback' ); } return sprintf( $sentence, $text['act'], self::date( $text['consolidated'], 'day', $english ) ); } if ( $english ) { $sentence = 'Official notice from Commission Implementing Regulation (EU) %1$s of %2$s (OJ L, %3$s), applies from %4$s.'; } else { /* translators: 1: number of the regulation, 2025/1960; 2: date it was adopted; 3: date of its publication in the Official Journal, such as 2.10.2025; 4: date it applies from. */ $sentence = __( 'Official notice from Commission Implementing Regulation (EU) %1$s of %2$s (OJ L, %3$s), applies from %4$s.', 'careback' ); } return sprintf( $sentence, $text['act'], self::date( $text['adopted'], 'day', $english ), self::date( $text['published'], 'journal', $english ), self::date( $text['applies'], 'day', $english ) ); } /** * The version line under a setting or a readiness item: the sentence and * the link to check EUR-Lex for later changes, in a new tab. * * @param string $key model_form or legal_guarantee. * @return void */ public static function render_version( $key ) { if ( ! isset( self::TEXTS[ $key ] ) ) { return; } ?>

— [' . Model_Form::SHORTCODE . ']' ), array( 'code' => array() ) ); ?>

— [' . Legal_Guarantee::SHORTCODE . ']' ), array( 'code' => array() ) ); ?>