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


PHP Bootstrap::getPluginPath方法代码示例

本文整理汇总了PHP中Bootstrap::getPluginPath方法的典型用法代码示例。如果您正苦于以下问题:PHP Bootstrap::getPluginPath方法的具体用法?PHP Bootstrap::getPluginPath怎么用?PHP Bootstrap::getPluginPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Bootstrap的用法示例。


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

示例1: dwci_footer_hook

 function dwci_footer_hook()
 {
     $path = Bootstrap::getPluginPath();
     $viewPath = $path . 'templates/footer-back-to-top.php';
     ob_start();
     require $viewPath;
     $output = ob_get_contents();
     ob_end_clean();
     echo $output;
 }
开发者ID:Socratemus,项目名称:ptf-wp-plugin,代码行数:10,代码来源:GeneralCtrl.php

示例2: dwci_user_account_menu

 function dwci_user_account_menu()
 {
     @session_start();
     $path = Bootstrap::getPluginPath();
     //Check the user state first and render logged or not template.
     if (!empty($_SESSION) && !empty($_SESSION['dwci-logged'])) {
         global $wpdb;
         $userId = $_SESSION['dwci-logged'];
         $__table = "wp__dwci_ptf_users";
         $query = "SELECT * FROM " . $__table . " ";
         $query .= "WHERE id = '" . $userId . "'";
         // var_dump($query);
         $results = $wpdb->get_results($query);
         $user = $results[0];
         $viewPath = $path . 'templates/account/user-menu-logged.php';
     } else {
         $viewPath = $path . 'templates/account/user-menu.php';
     }
     ob_start();
     require $viewPath;
     $output = ob_get_contents();
     ob_end_clean();
     return $output;
 }
开发者ID:Socratemus,项目名称:ptf-wp-plugin,代码行数:24,代码来源:AccountCtrl.php

示例3: dwci_navtab_content_callback

 /**
  * TODO ADD DOCS
  */
 function dwci_navtab_content_callback($attrs, $content)
 {
     $attrs = shortcode_atts(array('id' => md5(time() . uniqid() . 'dwcinavtab'), 'active' => false, 'class' => "", 'innerClass' => ""), $attrs);
     //var_dump($attrs);
     $content = trim($content);
     $content = str_replace("<br />", "", $content);
     $content = do_shortcode($content);
     $path = Bootstrap::getPluginPath();
     $viewPath = $path . 'templates/navtabs/navtab-content.php';
     ob_start();
     require $viewPath;
     $output = ob_get_contents();
     ob_end_clean();
     return $output;
 }
开发者ID:Socratemus,项目名称:ptf-wp-plugin,代码行数:18,代码来源:ShortCodeCtrl.php

示例4: register_callback

 /**
  * Allow registration to a given event id
  */
 function register_callback($atts)
 {
     wp_enqueue_style('dwci_form_css', Bootstrap::getPluginUrl() . '/assets/css/admin-events-form.css');
     wp_enqueue_script('dwci_form_js', Bootstrap::getPluginUrl() . '/assets/js/admin-events-form.js', array('jquery', 'jquery-ui-datepicker'), '20151228', true);
     wp_enqueue_script('dwci_form_validator_js', '//cdnjs.cloudflare.com/ajax/libs/jquery-form-validator/2.2.8/jquery.form-validator.min.js', array('jquery'), '20151230', true);
     $atts = shortcode_atts(array('id' => 'no foo', 'title' => 'Default title'), $atts, 'bartag');
     //Check post by id.
     $myquery = new WP_Query("post_type=event&meta_key=event_id&meta_value={$atts['id']}&order=ASC");
     //var_dump($myquery);
     if (!$myquery->posts[0]) {
         return '<p class="dwci-error-msg">Undefined event for this contact form.</p>';
     }
     $post = $myquery->posts[0];
     $path = Bootstrap::getPluginPath();
     $viewPath = $path . 'templates/form.php';
     ob_start();
     require $viewPath;
     $output = ob_get_contents();
     ob_end_clean();
     return $output;
 }
开发者ID:Socratemus,项目名称:ptf-wp-plugin,代码行数:24,代码来源:EventCtrl.php


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