Ejemplo n.º 1
0
 /**
  * Constructor.
  *
  * @param \Aelia\WC\Settings settings_controller The controller that will handle
  * the plugin settings.
  * @param \Aelia\WC\Messages messages_controller The controller that will handle
  * the messages produced by the plugin.
  */
 public function __construct($settings_controller = null, $messages_controller = null)
 {
     // Load Composer autoloader
     require_once __DIR__ . '/vendor/autoload.php';
     parent::__construct($settings_controller, $messages_controller);
     $this->initialize_integration();
 }
Ejemplo n.º 2
0
 /**
  * Constructor.
  *
  * @param \Aelia\WC\Settings settings_controller The controller that will handle
  * the plugin settings.
  * @param \Aelia\WC\Messages messages_controller The controller that will handle
  * the messages produced by the plugin.
  */
 public function __construct($settings_controller, $messages_controller)
 {
     // Load Composer autoloader
     require_once __DIR__ . '/vendor/autoload.php';
     parent::__construct($settings_controller, $messages_controller);
 }
Ejemplo n.º 3
0
 /**
  * Registers the script and style files needed by the admin pages of the
  * plugin. Extend in descendant plugins.
  */
 protected function register_plugin_admin_scripts()
 {
     // Scripts
     wp_register_script('jquery-ui', '//code.jquery.com/ui/1.10.3/jquery-ui.js', array('jquery'), null, true);
     wp_register_script('chosen', '//cdnjs.cloudflare.com/ajax/libs/chosen/1.1.0/chosen.jquery.min.js', array('jquery'), null, true);
     // Styles
     wp_register_style('chosen', '//cdnjs.cloudflare.com/ajax/libs/chosen/1.1.0/chosen.min.css', array(), null, 'all');
     wp_register_style('jquery-ui', '//code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css', array(), null, 'all');
     wp_enqueue_style('jquery-ui');
     wp_enqueue_style('chosen');
     wp_enqueue_script('jquery-ui');
     wp_enqueue_script('chosen');
     parent::register_plugin_admin_scripts();
 }