<?php
if ( ! class_exists( 'NISHIKI_PRO_SHORTCODE_BR' ) ) {
	/**
	 * CONTENT Shortcode.
	 */
	class NISHIKI_PRO_SHORTCODE_BR {

		/**
		 * Construct
		 */
		public function __construct() {
			add_shortcode( 'nishiki_pro_br', array( $this, 'nishiki_pro_br_sc' ) );
		}

		/**
		 * ショートコード作成
		 *
		 * @param array $atts 属性
		 *
		 * @return bool|string
		 */
		public function nishiki_pro_br_sc( $atts ) {
			// default value
			$args = shortcode_atts(
				array(
					'display' => '',
				),
				$atts
			);

			if ( empty( $args['display'] ) ) {
				return false;
			}

			return '<br class="nishiki-pro-br nishiki-pro-br-' . esc_attr( $args['display'] ) . '">';
		}

	}
}

$shortcode = new NISHIKI_PRO_SHORTCODE_BR();
