本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}