当前位置: 首页>>代码示例>>PHP>>正文


PHP add_shortcode函数代码示例

本文整理汇总了PHP中add_shortcode函数的典型用法代码示例。如果您正苦于以下问题:PHP add_shortcode函数的具体用法?PHP add_shortcode怎么用?PHP add_shortcode使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了add_shortcode函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Gallery

 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();
 }
开发者ID:networksoft,项目名称:sharesystem.co,代码行数:35,代码来源:slideshow-gallery.php

示例2: __construct

 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);
 }
开发者ID:RDePoppe,项目名称:luminaterealestate,代码行数:7,代码来源:Ultimate_iHover.php

示例3: add

 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');
     }
 }
开发者ID:christocmp,项目名称:bingopaws,代码行数:7,代码来源:sharing.php

示例4: __construct

 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'));
 }
开发者ID:gabriel-dehan,项目名称:erdf-sessions,代码行数:27,代码来源:class.shortcodes.php

示例5: __construct

 public function __construct()
 {
     //Admin functions
     $this->spc_admin();
     add_action('init', array($this, 'register_scripts'));
     add_shortcode('spc-form', array($this, 'spc_shortcode'));
 }
开发者ID:Clear-Space,项目名称:meritq,代码行数:7,代码来源:simplepricecalc.php

示例6: vr_shortcode_point

 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>';
     });
 }
开发者ID:WPTie,项目名称:VRCore,代码行数:7,代码来源:vr_point.php

示例7: __construct

 /**
  * 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'));
 }
开发者ID:jolay,项目名称:maga2.0,代码行数:10,代码来源:class-tagline.php

示例8: addHooks

	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' );
	}
开发者ID:verbazend,项目名称:AWFA,代码行数:7,代码来源:class-vc-frontend-editor.php

示例9: __construct

 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'));
 }
开发者ID:proj-2014,项目名称:vlan247-test-wp,代码行数:7,代码来源:frontend-form-profile.php

示例10: __construct

 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'));
 }
开发者ID:UWAA,项目名称:uwaa-2014,代码行数:7,代码来源:Accordions.php

示例11: init

 /**
  * 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'));
 }
开发者ID:samoldenburg,项目名称:Xi-Events,代码行数:10,代码来源:xishortcode.php

示例12: __construct

 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'));
     }
 }
开发者ID:WestBayResidential,项目名称:wbrsorg,代码行数:30,代码来源:index.php

示例13: __construct

 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'));
 }
开发者ID:Petro-1,项目名称:casepress,代码行数:7,代码来源:cases_shortcode_manage.php

示例14: __construct

 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'));
 }
开发者ID:vuducnam,项目名称:wp-upload-ajax-with-process,代码行数:25,代码来源:wp-upload-ajax-with-process.php

示例15: __construct

 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') );
 }
开发者ID:timb1981,项目名称:ChamferZone,代码行数:7,代码来源:Ultimate_link.php


注:本文中的add_shortcode函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。