display()->register_assets();
wp_enqueue_style( 'eu-check' );
}
}
/**
* The band at the bottom of every page (setting "sal").
*/
public function footer() {
if ( 'auto' !== Settings::get( 'sal' ) || is_admin() ) {
return;
}
echo '
' . self::html() . '
'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaped in html().
}
/**
* The [eu_check_anpc_sal] shortcode.
*
* @return string
*/
public function shortcode() {
return self::html();
}
/**
* The pictogram, linked to ANPC's SAL platform. The image is ANPC's own
* file from anpc.ro/sal, shipped with the plugin so no visitor's browser
* calls an outside server for it. The order asks for 250 x 50 pixels and
* ANPC's file is 201 x 50, so the image box is 250 x 50 and the file sits
* in its middle, unchanged.
*
* @return string
*/
public static function html() {
if ( ! wp_style_is( 'eu-check', 'registered' ) ) {
Plugin::instance()->display()->register_assets();
}
wp_enqueue_style( 'eu-check' );
return sprintf(
'
',
esc_url( self::URL ),
esc_url( EUCHECK_URL . 'assets/images/anpc-sal.png?ver=' . EUCHECK_VERSION ),
esc_attr( 'ANPC: SoluČionarea alternativÄ a litigiilor (SAL)' )
);
}
}