enqueue_style() public method

Enqueues the style with the given handle.
Since: 3.0.0
public enqueue_style ( Inpsyde\MultilingualPress\Asset\Style | string $style ) : boolean
$style Inpsyde\MultilingualPress\Asset\Style | string Style object or handle.
return boolean Whether or not the style was enqueued successfully.
Beispiel #1
0
    /**
     * Renders the markup.
     *
     * @since 3.0.0
     *
     * @return void
     */
    public function render()
    {
        $this->asset_manager->enqueue_style('multilingualpress-admin');
        $action = PluginSettingsUpdater::ACTION;
        ?>
		<div class="wrap">
			<h1><?php 
        echo esc_html(get_admin_page_title());
        ?>
</h1>
			<form method="post" action="<?php 
        echo admin_url("admin-post.php?action={$action}");
        ?>
"
				id="multilingualpress-modules">
				<?php 
        echo \Inpsyde\MultilingualPress\nonce_field($this->nonce);
        ?>
				<table class="mlp-module-list">
					<?php 
        foreach ($this->module_manager->get_modules() as $id => $module) {
            /**
             * Filters if the module should be listed on the settings page.
             *
             * @since 3.0.0
             *
             * @param bool $show_module Whether or not the module should be listed on the settings page.
             */
            if (apply_filters("multilingualpress.show_module_{$id}", true)) {
                $this->render_module($module);
            }
        }
        /**
         * Fires at the end of but still inside the module list on the settings page.
         *
         * @since 3.0.0
         */
        do_action('multilingualpress.in_module_list');
        ?>
				</table>
				<?php 
        /**
         * Fires right after after the module list on the settings page.
         *
         * @since 3.0.0
         */
        do_action('multilingualpress.after_module_list');
        submit_button(__('Save Changes', 'multilingual-press'));
        ?>
			</form>
		</div>
		<?php 
    }
Beispiel #2
0
 /**
  * Enqueues the front-end styles.
  *
  * @return void
  */
 private function enqueue_style()
 {
     $theme_support = get_theme_support('multilingualpress');
     if (empty($theme_support[0]['language_switcher_widget_style'])) {
         $this->asset_manager->enqueue_style('multilingualpress');
     }
 }
 /**
  * Requires the stylesheet.
  *
  * @return bool
  */
 public function load_style()
 {
     $translations = $this->get_translations();
     if (!$translations) {
         return false;
     }
     $theme_support = get_theme_support('multilingualpress');
     if (!empty($theme_support[0]['quicklink_style'])) {
         return false;
     }
     return $this->asset_manager->enqueue_style('multilingualpress');
 }
 /**
  * @return void
  */
 public function register_script()
 {
     $this->asset_manager->enqueue_script('multilingualpress-admin');
     $this->asset_manager->enqueue_style('multilingualpress-admin');
 }