'url', 'url' => '', 'ssid' => '', 'password' => '', 'security' => 'wpa', 'hidden' => '', 'name' => '', 'org' => '', 'phone' => '', 'email' => '', 'website' => '', 'text' => '', 'size' => 200, 'caption' => '', 'align' => '', 'alt' => '', 'download' => '', 'download_text' => '', ); public static function register() { add_shortcode( 'qrotto', array( __CLASS__, 'render' ) ); } public static function render( $atts ) { $a = shortcode_atts( self::DEFAULTS, (array) $atts, 'qrotto' ); $a['type'] = strtolower( trim( $a['type'] ) ); $a['hidden'] = self::yes( $a['hidden'] ); $a['download'] = self::yes( $a['download'] ); return Render::code( $a ); } private static function yes( $value ) { return in_array( strtolower( (string) $value ), array( '1', 'true', 'yes' ), true ); } }