function Gallery()
 {
     $url = explode("&", $_SERVER['REQUEST_URI']);
     $this->url = $url[0];
     $this->referer = empty($_SERVER['HTTP_REFERER']) ? $this->url : $_SERVER['HTTP_REFERER'];
     $this->plugin_name = basename(dirname(__FILE__));
     $this->plugin_file = plugin_basename(__FILE__);
     $this->register_plugin($this->plugin_name, __FILE__);
     //WordPress action hooks
     $this->add_action('plugins_loaded');
     $this->add_action('wp_head');
     $this->add_action('wp_footer');
     $this->add_action('admin_menu');
     $this->add_action('admin_head');
     $this->add_action('admin_notices');
     $this->add_action('wp_print_styles', 'print_styles');
     $this->add_action('admin_print_styles', 'print_styles');
     $this->add_action('wp_print_scripts', 'print_scripts');
     $this->add_action('admin_print_scripts', 'print_scripts');
     $this->add_action('init', 'init_textdomain', 10, 1);
     $this->add_action('admin_init', 'custom_redirect', 1, 1);
     //WordPress Ajax hooks
     $this->add_action('wp_ajax_slideshow_slides_order', 'ajax_slides_order', 10, 1);
     $this->add_action('wp_ajax_slideshow_tinymce', 'ajax_tinymce', 10, 1);
     //WordPress filter hooks
     $this->add_filter('mce_buttons');
     $this->add_filter('mce_external_plugins');
     $this->add_filter("plugin_action_links_" . $this->plugin_file, 'plugin_action_links', 10, 4);
     $this->add_action('slideshow_ratereviewhook', 'ratereview_hook');
     if (!is_admin()) {
         add_shortcode('slideshow', array($this, 'embed'));
         add_shortcode('tribulant_slideshow', array($this, 'embed'));
     }
     $this->updating_plugin();
 }
 function __construct()
 {
     add_shortcode("ult_ihover", array($this, "ult_ihover_callback"));
     add_shortcode("ult_ihover_item", array($this, "ult_ihover_item_callback"));
     add_action('init', array($this, 'ult_ihover_init'));
     add_action('wp_enqueue_scripts', array($this, 'ult_ihover_scripts'), 1);
 }
Example #3
0
 public function add()
 {
     if (!empty($this->p->options['plugin_shortcodes'])) {
         add_shortcode(NGFB_SHARING_SHORTCODE, array(&$this, 'shortcode'));
         $this->p->debug->log('[' . NGFB_SHARING_SHORTCODE . '] sharing shortcode added');
     }
 }
 function __construct()
 {
     //register shortcodes
     add_shortcode('tc_cart', array(&$this, 'tc_cart_page'));
     add_shortcode('tc_additional_fields', array(&$this, 'tc_additional_fields'));
     add_shortcode('tc_process_payment', array(&$this, 'tc_process_payment_page'));
     add_shortcode('tc_ipn', array(&$this, 'tc_ipn_page'));
     add_shortcode('tc_order_history', array(&$this, 'tc_order_history_page'));
     add_shortcode('tc_payment', array(&$this, 'tc_payment_page'));
     add_shortcode('tc_order_confirmation', array(&$this, 'tc_order_confirmation_page'));
     add_shortcode('tc_order_details', array(&$this, 'tc_order_details_page'));
     add_shortcode('ticket', array(&$this, 'ticket_cart_button'));
     add_shortcode('tc_ticket', array(&$this, 'ticket_cart_button'));
     add_shortcode('ticket_price', array(&$this, 'ticket_price'));
     add_shortcode('tc_ticket_price', array(&$this, 'ticket_price'));
     add_shortcode('tickets_sold', array(&$this, 'tickets_sold'));
     add_shortcode('tickets_left', array(&$this, 'tickets_left'));
     add_shortcode('event', array(&$this, 'event'));
     add_shortcode('tc_event', array(&$this, 'event'));
     add_shortcode('event_tickets_sold', array(&$this, 'event_tickets_sold'));
     add_shortcode('event_tickets_left', array(&$this, 'event_tickets_left'));
     add_shortcode('tc_event_date', array(&$this, 'event_date'));
     add_shortcode('tc_event_location', array(&$this, 'event_location'));
     add_shortcode('tc_event_terms', array(&$this, 'event_terms'));
     add_shortcode('tc_event_sponsors_logo', array(&$this, 'event_sponsors_logo'));
     add_shortcode('tc_event_logo', array(&$this, 'event_logo'));
 }
Example #5
0
 public function __construct()
 {
     //Admin functions
     $this->spc_admin();
     add_action('init', array($this, 'register_scripts'));
     add_shortcode('spc-form', array($this, 'spc_shortcode'));
 }
Example #6
0
 function vr_shortcode_point()
 {
     // Add the [vr_point] shortcode.
     add_shortcode('vr_point', function ($atts, $content = '') {
         return '<div class="vr_wFeature"><span class="vr-check-mark"></span> <p>' . $content . '<p></div>';
     });
 }
Example #7
0
 /**
  * Initiate the shortcode
  */
 public function __construct()
 {
     add_filter('fusion_attr_tagline-shortcode', array($this, 'attr'));
     add_filter('fusion_attr_tagline-shortcode-reading-box', array($this, 'reading_box_attr'));
     add_filter('fusion_attr_tagline-shortcode-button', array($this, 'button_attr'));
     add_shortcode('tagline_box', array($this, 'render'));
 }
	public function addHooks() {
		add_action( 'wp_ajax_vc_load_shortcode', array( &$this, 'loadShortcodes' ) );
		add_action( 'wp_ajax_vc_inline_template', array( &$this, 'renderTemplate' ) );
		add_filter( 'page_row_actions', array( &$this, 'renderRowAction' ) );
		add_filter( 'post_row_actions', array( &$this, 'renderRowAction' ) );
		add_shortcode( 'vc_container_anchor', 'vc_container_anchor' );
	}
 function __construct()
 {
     add_shortcode('wpuf_profile', array($this, 'shortcode_handler'));
     // ajax requests
     add_action('wp_ajax_nopriv_wpuf_submit_register', array($this, 'user_register'));
     add_action('wp_ajax_wpuf_update_profile', array($this, 'update_profile'));
 }
Example #10
0
 function __construct()
 {
     add_shortcode('accordion-title', array($this, 'accordionTitle'));
     add_shortcode('accordion-content', array($this, 'accordionContent'));
     add_shortcode('accordion-wrapper', array($this, 'accordionWrapper'));
     add_shortcode('chapter-title', array($this, 'chapterTitle'));
 }
 /**
  * Initiate the shortcode
  */
 public function __construct()
 {
     add_filter('fusion_attr_separator-shortcode', array($this, 'attr'));
     add_filter('fusion_attr_separator-shortcode-icon-wrapper', array($this, 'icon_wrapper_attr'));
     add_filter('fusion_attr_separator-shortcode-icon', array($this, 'icon_attr'));
     add_shortcode('separator', array($this, 'render'));
 }
Example #12
0
 /**
  * All calls to add_shortcode should be here.
  */
 public static function init()
 {
     add_shortcode('xi_event_details', array('XiShortcode', 'event_details'));
     add_shortcode('xi_calendar', array('XiShortcode', 'calendar'));
     add_shortcode('xi_events_list', array('XiShortcode', 'events_list'));
     add_shortcode('xi_event_list', array('XiShortcode', 'events_list'));
 }
 function __construct()
 {
     add_shortcode('job_field', array($this, 'shortcode_output'));
     add_shortcode('company_field', array($this, 'shortcode_output'));
     add_shortcode('custom_field', array($this, 'shortcode_output'));
     add_shortcode('resume_field', array($this, 'shortcode_output'));
 }
Example #14
0
 public function __construct()
 {
     global $plugin_label, $plugin_slug;
     $this->plugin_slug = $plugin_slug;
     $this->plugin_label = $plugin_label;
     $this->plugin_dir = plugins_url('', __FILE__);
     //do when class is instantiated
     add_shortcode('spacer', array($this, 'addShortcodeHandler'));
     add_filter('tiny_mce_version', array($this, 'my_refresh_mce'));
     //plugin row links
     add_filter('plugin_row_meta', array($this, 'plugin_row_links'), 10, 2);
     if (is_admin()) {
         add_action('admin_init', array($this, 'page_init'));
         add_action('admin_menu', array($this, 'add_plugin_page'));
         //custom image picker css for admin page
         add_action('admin_head', array($this, 'motech_imagepicker_admin_css'));
         //custom image picker jquery for admin page
         add_action('admin_footer', array($this, 'motech_imagepicker_admin_jquery'));
         //add Settings link to plugin page
         add_filter('plugin_action_links_' . plugin_basename(__FILE__), array($this, 'add_plugin_action_links'));
         //image upload script
         add_action('admin_enqueue_scripts', array($this, 'spacer_imageupload_script'));
         add_action('admin_enqueue_scripts', array($this, 'enqueue_color_picker'));
         //enqueue color picker
         add_action('wp_ajax_motech_spacer', array($this, 'motech_spacer_callback'));
         //admin messages
         add_action('admin_notices', array($this, 'admin_show_message'));
         add_action('admin_init', array($this, 'adminmessage_init'));
     }
 }
 private function __construct()
 {
     add_shortcode('case_meta', array($this, 'shortcode_meta'));
     add_action('wp', array($this, 'save_case_data_control'));
     add_action('wp_enqueue_scripts', array($this, 'add_ss'));
     add_action('wp_ajax_query_posts_cases', array($this, 'query_posts_cases_callback'));
 }
 function __construct()
 {
     /**
      * Đây là action thêm style vào header
      */
     add_action('wp_enqueue_scripts', array($this, 'tp_enqueue_styles'));
     /**
      * Đây là action thêm script vào header vs footer
      */
     add_action('wp_enqueue_scripts', array($this, 'tp_enqueue_scripts'));
     /**
      * Đây là action để thêm shortcode [tp_upload]
      */
     add_shortcode('tp_upload', array($this, 'tp_shortcode'));
     /**
      * Đây là action đăng ký ajax upload
      */
     add_action('wp_ajax_tp_upload', array($this, 'tp_upload'));
     add_action('wp_ajax_nopriv_tp_upload', array($this, 'tp_upload'));
     /**
      * Đây là action đăng ký ajax delete upload
      */
     add_action('wp_ajax_tp_delete_upload', array($this, 'tp_delete_upload'));
     add_action('wp_ajax_nopriv_tp_delete_upload', array($this, 'tp_delete_upload'));
 }
Example #17
0
 function __construct()
 {
     add_shortcode('ult_createlink', array($this, 'ult_createlink_shortcode'));
     add_action('init', array($this, 'ultimate_createlink'));
     add_action('wp_enqueue_scripts', array($this, 'creative_link_scripts'), 1);
     //add_action( 'admin_enqueue_scripts', array( $this, 'link_backend_scripts') );
 }
 public function __construct()
 {
     /**
      * [happiness_report]
      * Show all ratings (great, okay, not good) as an unordered list
      *
      * [happiness_report rating="great"]
      * Show only the "great" rating
      *
      * [happiness_report rating="okay"]
      * Show only the "okay" rating
      *
      * [happiness_report rating="not good"]
      * Show only the "not good" ratings
      *
      * [happiness_report graph="yes"]
      * Show all ratings (great, okay, not good) as individual graphs
      *
      * [happiness_report rating="great" graph="yes"]
      * Show only the "great" rating as a graph
      *
      * [happiness_report rating="okay" graph="yes"]
      * Show only the "okay" rating as a graph
      *
      * [happiness_report rating="not good" graph="yes"]
      * Show only the "not good" rating as a graph
      *
      */
     add_shortcode('happiness_report', array($this, 'happiness_report_shortcode'));
 }
Example #19
0
 function __construct()
 {
     add_shortcode('ultimatemember_password', array(&$this, 'ultimatemember_password'), 1);
     add_action('template_redirect', array(&$this, 'password_reset'), 10001);
     add_action('template_redirect', array(&$this, 'form_init'), 10002);
     add_action('init', array(&$this, 'listen_to_password_reset_uri'), 1);
 }
Example #20
0
 function __construct()
 {
     add_action('init', array($this, 'init_buttons'));
     add_shortcode('ult_buttons', array($this, 'ult_buttons_shortcode'));
     add_action('admin_enqueue_scripts', array($this, 'button_admin_scripts'));
     add_action("wp_enqueue_scripts", array($this, "advanced_button_scripts"), 1);
 }
 protected function __construct()
 {
     add_shortcode('dt_progress_bars', array($this, 'shortcode_bars'));
     add_shortcode('dt_progress_bar', array($this, 'shortcode_bar'));
     // add shortcode button
     $tinymce_button = new DT_ADD_MCE_BUTTON($this->plugin_name, basename(dirname(__FILE__)), false, 4);
 }
Example #22
0
 function __construct()
 {
     add_action('init', array($this, 'init_team'));
     add_shortcode('ult_team', array($this, 'ult_team_shortcode'));
     //add_action('admin_enqueue_scripts',array($this,'admin_scripts'));
     add_action("wp_enqueue_scripts", array($this, "register_team_assets"), 1);
 }
Example #23
0
 public function __construct($file_loc)
 {
     self::$abs_file = $file_loc;
     add_filter('widget_text', 'do_shortcode');
     register_activation_hook(self::$abs_file, array($this, 'set_edsanimate_options'));
     /*checking for version updates*/
     add_action('plugins_loaded', array($this, 'update_plugin'));
     /* Adding Settings Menu */
     add_action('admin_menu', array($this, 'modify_menu'));
     /* Enqueuing Scrips and CSS */
     add_action('wp_enqueue_scripts', array($this, 'add_eds_script_and_css'));
     /* adding shortcodes */
     add_shortcode('edsanimate_start', array($this, 'edsanimate_start_handler'));
     add_shortcode('edsanimate_end', array($this, 'edsanimate_end_handler'));
     add_shortcode('edsanimate', array($this, 'edsanimate_handler'));
     /*widget related actions*/
     add_filter('widget_text', 'do_shortcode');
     add_action('in_widget_form', array($this, 'eds_add_custom_class_field'), 5, 3);
     add_filter('widget_update_callback', array($this, 'eds_update_widget_animation_class'), 5, 3);
     add_filter('dynamic_sidebar_params', array($this, 'eds_add_widget_animation_class'));
     /* TinyMCE Related Handlers */
     $tinymce_handler = new EDS_TinyMCE();
     add_action('init', array($tinymce_handler, 'add_edsanimate_button'));
     add_filter('tiny_mce_version', array($tinymce_handler, 'refresh_mce'));
     //Registering Ajax action to get the popup on click of animate it buton in editor
     add_action('wp_ajax_edsanimate_get_popup', array($tinymce_handler, 'get_popup'));
 }
Example #24
0
 public function public_init()
 {
     add_filter("previous_post_link", array(&$this, "linkFilter"));
     add_filter("next_post_link", array(&$this, "linkFilter"));
     add_shortcode('club_event', array(&$this, 'eventShortCode'));
     $this->urlHandler();
 }
 /**
  * Registers the [mc4wp_form] shortcode
  */
 protected function register_shortcodes()
 {
     // register shortcodes
     add_shortcode('mc4wp_form', array($this, 'output_form'));
     // @deprecated, use [mc4wp_form] instead
     add_shortcode('mc4wp-form', array($this, 'output_form'));
 }
Example #26
0
/**
 * Creates new shortcodes for use in any shortcode-ready area.  This function uses the add_shortcode() 
 * function to register new shortcodes with WordPress.
 *
 * @since 0.8.0
 * @access public
 * @uses add_shortcode() to create new shortcodes.
 * @link http://codex.wordpress.org/Shortcode_API
 * @return void
 */
function hybrid_add_shortcodes()
{
    /* Add theme-specific shortcodes. */
    add_shortcode('the-year', 'hybrid_the_year_shortcode');
    add_shortcode('site-link', 'hybrid_site_link_shortcode');
    add_shortcode('wp-link', 'hybrid_wp_link_shortcode');
    add_shortcode('theme-link', 'hybrid_theme_link_shortcode');
    add_shortcode('child-link', 'hybrid_child_link_shortcode');
    /* Only register deprected shortcodes if the theme supports deprecated functions. */
    if (current_theme_supports('hybrid-core-deprecated')) {
        /* Theme shortcodes. */
        add_shortcode('loginout-link', 'hybrid_loginout_link_shortcode');
        add_shortcode('query-counter', 'hybrid_query_counter_shortcode');
        add_shortcode('nav-menu', 'hybrid_nav_menu_shortcode');
        /* Add entry-specific shortcodes. */
        add_shortcode('entry-title', 'hybrid_entry_title_shortcode');
        add_shortcode('entry-author', 'hybrid_entry_author_shortcode');
        add_shortcode('entry-terms', 'hybrid_entry_terms_shortcode');
        add_shortcode('entry-comments-link', 'hybrid_entry_comments_link_shortcode');
        add_shortcode('entry-published', 'hybrid_entry_published_shortcode');
        add_shortcode('entry-edit-link', 'hybrid_entry_edit_link_shortcode');
        add_shortcode('entry-shortlink', 'hybrid_entry_shortlink_shortcode');
        add_shortcode('entry-permalink', 'hybrid_entry_permalink_shortcode');
        add_shortcode('post-format-link', 'hybrid_post_format_link_shortcode');
        /* Add comment-specific shortcodes. */
        add_shortcode('comment-published', 'hybrid_comment_published_shortcode');
        add_shortcode('comment-author', 'hybrid_comment_author_shortcode');
        add_shortcode('comment-edit-link', 'hybrid_comment_edit_link_shortcode');
        add_shortcode('comment-reply-link', 'hybrid_comment_reply_link_shortcode');
        add_shortcode('comment-permalink', 'hybrid_comment_permalink_shortcode');
    }
}
 /**
  * Add Shortcodes
  *
  * @return void
  * @since  1.7
  * @author andrea Grillo <*****@*****.**>
  */
 public static function load()
 {
     $shortcodes = array('yith_wcmv_list' => 'YITH_Multi_Vendor_Shortcodes::vendors_list', 'yith_wcmv_become_a_vendor' => 'YITH_Multi_Vendor_Shortcodes::become_a_vendor');
     foreach ($shortcodes as $shortcode => $callback) {
         add_shortcode($shortcode, $callback);
     }
 }
Example #28
0
/**
 * Things to run during init hook
 *
 * @since 0.8.6
 */
function nktagcloud_init()
{
    // http://codex.wordpress.org/Determining_Plugin_and_Content_Directories
    // Pre-2.6 compatibility
    if (!defined('WP_CONTENT_URL')) {
        define('WP_CONTENT_URL', get_option('siteurl') . '/wp-content');
    }
    if (!defined('WP_CONTENT_DIR')) {
        define('WP_CONTENT_DIR', ABSPATH . 'wp-content');
    }
    if (!defined('WP_PLUGIN_URL')) {
        define('WP_PLUGIN_URL', WP_CONTENT_URL . '/plugins');
    }
    if (!defined('WP_PLUGIN_DIR')) {
        define('WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins');
    }
    global $nktagcloud;
    $nktagcloud = array('path' => WP_PLUGIN_DIR . '/' . str_replace(basename(__FILE__), "", plugin_basename(__FILE__)), 'url' => WP_PLUGIN_URL . '/' . str_replace(basename(__FILE__), "", plugin_basename(__FILE__)));
    // always needed for footer link
    // TODO which footer link? we don't need this in admin, or do we?
    require_once 'inc/page.php';
    if (is_admin()) {
        require_once 'inc/admin.php';
        add_action('admin_menu', 'nktagcloud_add_pages');
        register_widget_control(__('Better Tag Cloud', 'nktagcloud'), 'nktagcloud_control');
        register_sidebar_widget(__('Better Tag Cloud', 'nktagcloud'), 'widget_nktagcloud');
    } else {
        add_shortcode('nktagcloud', 'nktagcloud_shortcode');
        add_shortcode('nktagcloud_single', 'nktagcloud_single_shortcode');
        register_sidebar_widget(__('Better Tag Cloud', 'nktagcloud'), 'widget_nktagcloud');
    }
}
Example #29
-1
 function __construct()
 {
     global $shortcode_tags;
     $needs_scripts = false;
     // Only if the slideshow shortcode has not already been defined.
     if (!array_key_exists('slideshow', $shortcode_tags)) {
         add_shortcode('slideshow', array($this, 'shortcode_callback'));
         $needs_scripts = true;
     }
     // Only if the gallery shortcode has not been redefined.
     if (isset($shortcode_tags['gallery']) && $shortcode_tags['gallery'] == 'gallery_shortcode') {
         add_filter('post_gallery', array($this, 'post_gallery'), 1002, 2);
         add_filter('jetpack_gallery_types', array($this, 'add_gallery_type'), 10);
         $needs_scripts = true;
     }
     if ($needs_scripts) {
         add_action('wp_enqueue_scripts', array($this, 'maybe_enqueue_scripts'), 1);
     }
     /**
      * For the moment, comment out the setting for v2.8.
      * The remainder should work as it always has.
      * See: https://github.com/Automattic/jetpack/pull/85/files
      */
     // add_action( 'admin_init', array( $this, 'register_settings' ), 5 );
 }
Example #30
-1
 function __construct()
 {
     $this->the_path = plugin_dir_path(__FILE__);
     $this->the_url = plugin_dir_url(__FILE__);
     $this->icon_size = get_option('msdsocial_icon_size') ? get_option('msdsocial_icon_size') : '0';
     $this->ver = '0.9.6';
     /*
      * Pull in some stuff from other files
      */
     //$this->requireDir($this->the_path . 'lib/inc');
     require_once $this->the_path . 'lib/inc/settings.php';
     require_once $this->the_path . 'lib/inc/widgets.php';
     if (!is_admin()) {
         wp_enqueue_style('msd-social-style', $this->the_url . 'lib/css/style.css');
         wp_enqueue_style('msd-social-style-' . $this->icon_size, $this->the_url . 'lib/css/style' . $this->icon_size . '.css');
         wp_enqueue_style('font-awesome-style', '//maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css');
     }
     add_action('admin_enqueue_scripts', array(&$this, 'add_admin_scripts'));
     add_action('admin_enqueue_scripts', array(&$this, 'add_admin_styles'));
     add_action('wp_head', array(&$this, 'setup_notification_bar'));
     add_shortcode('msd-address', array(&$this, 'get_address'));
     add_shortcode('msd-additional-locations', array(&$this, 'get_additional_locations'));
     add_shortcode('msd-all-locations', array(&$this, 'get_all_locations'));
     add_shortcode('msd-bizname', array(&$this, 'get_bizname'));
     add_shortcode('msd-copyright', array(&$this, 'get_copyright'));
     add_shortcode('msd-digits', array(&$this, 'get_digits'));
     add_shortcode('msd-social', array(&$this, 'social_media'));
     add_shortcode('msd-hours', array(&$this, 'get_hours'));
 }