/** * Sets up our actions/filters. * * @since 1.0.0 */ public function __construct() { // Register shortcode on 'init'. add_action('init', array($this, 'register_shortcode')); // Register shortcode and add it to the dialog. add_filter('cherry_shortcodes/data/shortcodes', array($this, 'shortcodes')); add_filter('cherry_templater/data/shortcodes', array($this, 'shortcodes')); add_filter('cherry_templater_target_dirs', array($this, 'add_target_dir'), 11); add_filter('cherry_templater_macros_buttons', array($this, 'add_macros_buttons'), 11, 2); // Modify swiper_carousel shortcode to allow it process services add_filter('cherry_shortcodes_add_carousel_macros', array($this, 'extend_carousel_macros')); add_filter('cherry-shortcode-swiper-carousel-postdata', array($this, 'add_carousel_data'), 10, 3); $this->data = Cherry_Services_Data::get_instance(); }
<?php /** * The Template for displaying archive CPT Services. */ $args = array('template' => 'image-box.tmpl', 'before_title' => '<h3 class="cherry-services_title">', 'after_title' => '</h3>', 'container' => false, 'size' => 'cherry-thumb-s', 'pager' => true, 'col_xs' => '12', 'col_sm' => '6', 'col_md' => '4', 'col_lg' => 'none', 'limit' => Cherry_Services_Templater::$posts_per_archive_page); $data = new Cherry_Services_Data(); $data->the_services($args);
/** * Returns the instance. * * @since 1.0.0 * @return object */ public static function get_instance() { // If the single instance hasn't been set, set it now. if (null == self::$instance) { self::$instance = new self(); } return self::$instance; }