Ejemplo n.º 1
0
 /**
  * Load assets.
  */
 public function load_assets()
 {
     wp_register_style('hl-admin-css', $this->plugin->url() . '/includes/css/heyloyalty.css', array(), $this->plugin->version());
     wp_register_script('hl-admin-js', $this->plugin->url() . '/includes/js/heyloyalty.js', array('jquery'), $this->plugin->version(), true);
     wp_register_script('hl-ajax-request', $this->plugin->url() . '/includes/js/heyloyalty-ajax.js', array('jquery'));
     wp_enqueue_script('hl-ajax-request');
     wp_enqueue_script('hl-admin-js');
     wp_enqueue_style('hl-admin-css');
     wp_enqueue_script('jquery-ui-draggable', false, array('jquery'));
     wp_enqueue_script('jquery-ui-droppable', false, array('jquery'));
     wp_localize_script('hl-ajax-request', 'HLajax', array('ajaxurl' => admin_url('admin-ajax.php')));
 }
Ejemplo n.º 2
0
    /**
     * Outputs the boxes in the footer
     */
    public function print_boxes_html()
    {
        ?>
<!-- Scroll Triggered Boxes v<?php 
        echo $this->plugin->version();
        ?>
 - https://wordpress.org/plugins/scroll-triggered-boxes/--><?php 
        // print HTML for each of the boxes
        foreach ($this->get_matched_boxes() as $box) {
            /* @var $box Box */
            $box->print_html();
        }
        // print overlay element, we only need this once (it's re-used for all boxes)
        echo '<div id="stb-overlay"></div>';
        ?>
<!-- / Scroll Triggered Box --><?php 
    }