Current Path : /storage/v11800/affypharma/public_html/wp-content/themes/raft/inc/

Linux v11800 5.3.0-1023-aws #25~18.04.1-Ubuntu SMP Fri Jun 5 15:19:18 UTC 2020 aarch64

Upload File :
Current File : /storage/v11800/affypharma/public_html/wp-content/themes/raft/inc/Block_Styles.php
<?php
/**
 * Block Styles Handler.
 *
 * @author Themeisle
 * @package raft
 * @since 1.0.0
 */

namespace Raft;

/**
 * Class Block_Styles
 *
 * @package raft
 */
class Block_Styles {
	/**
	 * Block styles.
	 *
	 * @var \array[][] | void
	 */
	private $styles;

	/**
	 * Block Styles constructor.
	 */
	public function __construct() {
		$this->styles = array(
			'core/categories' => array(
				array(
					'name'  => 'raft-pills',
					'label' => esc_html__( 'Pills', 'raft' ),
				),
			),
		);

		add_action( 'init', array( $this, 'add_block_styles' ) );

	}

	/**
	 * Add the block styles.
	 *
	 * @return void
	 */
	public function add_block_styles() {
		foreach ( $this->styles as $block => $styles ) {
			foreach ( $styles as $block_style ) {
				register_block_style( $block, $block_style );
			}
		}
	}
}

Log In ‹ Affy Pharma Pvt Ltd — WordPress

Powered by WordPress

← Go to Affy Pharma Pvt Ltd