本文整理汇总了PHP中wpl_global::get_wp_admin_url方法的典型用法代码示例。如果您正苦于以下问题:PHP wpl_global::get_wp_admin_url方法的具体用法?PHP wpl_global::get_wp_admin_url怎么用?PHP wpl_global::get_wp_admin_url使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wpl_global
的用法示例。
在下文中一共展示了wpl_global::get_wp_admin_url方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: home
public function home()
{
/** check permission **/
wpl_global::min_access('administrator');
$this->level = trim(wpl_request::getVar('level')) != '' ? wpl_request::getVar('level') : 1;
$this->parent = trim(wpl_request::getVar('sf_select_parent')) != '' ? wpl_request::getVar('sf_select_parent') : "";
$this->enabled = trim(wpl_request::getVar('sf_select_enabled')) != '' ? wpl_request::getVar('sf_select_enabled') : 1;
$this->text_search = trim(wpl_request::getVar('sf_text_name')) != '' ? wpl_request::getVar('sf_text_name') : '';
$this->admin_url = wpl_global::get_wp_admin_url();
$this->load_zipcodes = trim(wpl_request::getVar('load_zipcodes')) != '' ? 1 : 0;
/** set show all based on level **/
if ($this->level != 1) {
$this->enabled = '';
}
$possible_orders = array('id', 'name');
$orderby = in_array(wpl_request::getVar('orderby'), $possible_orders) ? wpl_request::getVar('orderby') : $possible_orders[0];
$order = in_array(strtoupper(wpl_request::getVar('order')), array('ASC', 'DESC')) ? wpl_request::getVar('order') : 'ASC';
$page_size = trim(wpl_request::getVar('page_size')) != '' ? wpl_request::getVar('page_size') : NULL;
/** create where **/
$vars = array_merge(wpl_request::get('POST'), wpl_request::get('GET'));
$vars = array_merge($vars, array('sf_select_parent' => $this->parent, 'sf_select_enabled' => $this->enabled));
$where_query = wpl_db::create_query($vars);
$num_result = wpl_db::num("SELECT COUNT(id) FROM `#__wpl_location" . $this->level . "` WHERE 1 " . $where_query);
$this->pagination = wpl_pagination::get_pagination($num_result, $page_size);
$where_query .= " ORDER BY {$orderby} {$order} " . $this->pagination->limit_query;
$this->wp_locations = wpl_locations::get_locations(!$this->load_zipcodes ? $this->level : 'zips', '', '', $where_query);
$this->zipcode_parent_level = wpl_settings::get('zipcode_parent_level');
/** import tpl **/
parent::render($this->tpl_path, $this->tpl);
}
示例2: wpl_plugin_links
/**
*
* @author Howard <howard@realtyna.com>
* @param array $links
* @param string $file
* @return array
*/
public static function wpl_plugin_links($links, $file)
{
if (strpos($file, WPL_BASENAME) !== false) {
$links[] = '<a href="' . wpl_global::get_wp_admin_url() . 'admin.php?page=wpl_admin_settings">' . __('Settings', WPL_TEXTDOMAIN) . '</a>';
$links[] = '<a href="http://wpl.realtyna.com/wassets/wpl-manual.pdf" target="_blank">' . __('WPL Manual', WPL_TEXTDOMAIN) . '</a>';
$links[] = '<a href="http://wpl.realtyna.com/redirect.php?action=shop" target="_blank">' . __('WPL Add-ons', WPL_TEXTDOMAIN) . '</a>';
}
return $links;
}
示例3: foreach
?>
</span>
</h2>
</header>
<div id="dashboard-links-wp">
<ul>
<?php
foreach ($this->submenus as $submenu) {
?>
<li class="link-<?php
echo $submenu->id;
?>
">
<a href="<?php
echo wpl_global::get_wp_admin_url();
?>
admin.php?page=<?php
echo $submenu->menu_slug;
?>
">
<span class="box"><i></i></span>
<span class="title">
<?php
echo __($submenu->menu_title, WPL_TEXTDOMAIN);
?>
</span>
</a>
</li>
<?php
}