| 1 |
<?php |
| 2 |
/** |
| 3 |
* The public-facing functionality of the module. |
| 4 |
* |
| 5 |
* @link https://codesupply.co |
| 6 |
* @since 1.0.0 |
| 7 |
* |
| 8 |
* @package Powerkit |
| 9 |
* @subpackage Modules/public |
| 10 |
*/ |
| 11 |
|
| 12 |
/** |
| 13 |
* The public-facing functionality of the module. |
| 14 |
*/ |
| 15 |
class Powerkit_Content_Formatting_Public extends Powerkit_Module_Public { |
| 16 |
/** |
| 17 |
* Initialize |
| 18 |
*/ |
| 19 |
public function initialize() { |
| 20 |
add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ), 6 ); |
| 21 |
add_action( 'after_setup_theme', array( $this, 'after_setup_theme' ), 6 ); |
| 22 |
} |
| 23 |
|
| 24 |
/** |
| 25 |
* This function will register scripts and styles for admin dashboard. |
| 26 |
* |
| 27 |
* @param string $page Current page. |
| 28 |
*/ |
| 29 |
public function admin_enqueue_scripts( $page ) { |
| 30 |
wp_enqueue_style( 'powerkit-content-formatting', powerkit_style( plugin_dir_url( __FILE__ ) . 'css/public-powerkit-content-formatting.css' ), array(), powerkit_get_setting( 'version' ) ); |
| 31 |
} |
| 32 |
|
| 33 |
/** |
| 34 |
* Sets up theme defaults and registers support for various WordPress features. |
| 35 |
*/ |
| 36 |
public function after_setup_theme() { |
| 37 |
add_editor_style( powerkit_style( plugin_dir_url( __FILE__ ) . 'css/public-powerkit-content-formatting.css' ) ); |
| 38 |
} |
| 39 |
|
| 40 |
/** |
| 41 |
* Register the stylesheets for the public-facing side of the site. |
| 42 |
*/ |
| 43 |
public function wp_enqueue_scripts() { |
| 44 |
wp_enqueue_style( 'powerkit-content-formatting', powerkit_style( plugin_dir_url( __FILE__ ) . 'css/public-powerkit-content-formatting.css' ), array(), powerkit_get_setting( 'version' ), 'all' ); |
| 45 |
|
| 46 |
// Add RTL support. |
| 47 |
wp_style_add_data( 'powerkit-content-formatting', 'rtl', 'replace' ); |
| 48 |
} |
| 49 |
} |
| 50 |
|