Learn more  » Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

jsarnowski / jsarnowski/jet-engine   php

Repository URL to install this package:

Version: 2.7.7 

/ core / accessibility.php

<?php
/**
 * Accessibility manager
 */

// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
	die;
}

if ( ! class_exists( 'Jet_Engine_Accessibility' ) ) {

	class Jet_Engine_Accessibility {

		/**
		 * Contrast UI
		 * @return [type] [description]
		 */
		public function contrast_ui( $handle ) {

			if ( ! apply_filters( 'jet-engine/accessibility/contrast-ui', false ) ) {
				return;
			}

			wp_add_inline_style( $handle, $this->get_cotrast_css() );

		}

		/**
		 * Returns contrast UI
		 *
		 * @return [type] [description]
		 */
		public function get_cotrast_css() {
			ob_start();
			include jet_engine()->plugin_path( 'assets/css/admin/cotrast-ui.css' );
			return ob_get_clean();
		}

	}

}