本文整理汇总了PHP中wpl_global::get_wpl_admin_menu方法的典型用法代码示例。如果您正苦于以下问题:PHP wpl_global::get_wpl_admin_menu方法的具体用法?PHP wpl_global::get_wpl_admin_menu怎么用?PHP wpl_global::get_wpl_admin_menu使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wpl_global
的用法示例。
在下文中一共展示了wpl_global::get_wpl_admin_menu方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __
<div class="message-wp">
<span>
<?php
echo __('Your property successfully finalized!', WPL_TEXTDOMAIN);
?>
</span>
<div class="finilize-btn-wp">
<?php
$listing_target_page = wpl_global::get_client() == 1 ? wpl_global::get_setting('backend_listing_target_page') : NULL;
$property_link = wpl_property::get_property_link('', $this->property_id, $listing_target_page);
$new_link = wpl_global::remove_qs_var('pid', wpl_global::get_full_url());
if ($this->kind) {
$new_link = wpl_global::add_qs_var('kind', $this->kind, $new_link);
}
if (wpl_global::get_client() == 1) {
$manager_link = wpl_global::add_qs_var('kind', $this->kind, wpl_global::get_wpl_admin_menu('wpl_admin_listings'));
} else {
$manager_link = wpl_global::add_qs_var('kind', $this->kind, wpl_global::remove_qs_var('wplmethod', wpl_global::remove_qs_var('pid')));
}
?>
<a class="wpl-button button-2" target="_blank" href="<?php
echo $property_link;
?>
"><?php
echo __('View this listing', WPL_TEXTDOMAIN);
?>
</a>
<a class="wpl-button button-2" href="<?php
echo $new_link;
?>
"><?php
示例2: get_property_edit_link
/**
* Returns Property Edit Link
* @author Howard <howard@realtyna.com>
* @static
* @param int $property_id
* @return boolean|string
*/
public static function get_property_edit_link($property_id = 0)
{
/** first validation **/
if (!$property_id) {
return false;
}
$target_id = wpl_request::getVar('wpltarget', 0);
if ($target_id) {
$url = wpl_global::add_qs_var('pid', $property_id, wpl_sef::get_page_link($target_id));
} else {
$url = wpl_global::add_qs_var('pid', $property_id, wpl_global::get_wpl_admin_menu('wpl_admin_add_listing'));
}
return $url;
}
示例3: defined
<?php
/** no direct access **/
defined('_WPLEXEC') or die('Restricted access');
$this->_wpl_import($this->tpl_path . '.scripts.css');
$this->_wpl_import($this->tpl_path . '.scripts.js');
?>
<div class="wrap wpl-wp pmanager-wp">
<header>
<div id="icon-pmanager" class="icon48"></div>
<h2><?php
echo __(ucfirst($this->kind_label) . ' Manager', WPL_TEXTDOMAIN);
?>
</h2>
<button class="wpl-button button-1" onclick="window.location.href = wplj(this).data('href');" data-href="<?php
echo wpl_global::add_qs_var('kind', $this->kind, wpl_global::get_wpl_admin_menu('wpl_admin_add_listing'));
?>
"><?php
echo __('Add Listing', WPL_TEXTDOMAIN);
?>
</button>
</header>
<?php
$this->include_tabs();
?>
<div class="wpl_property_manager_list"><div class="wpl_show_message"></div></div>
<div class="pmanager-cnt">
<!-- generate search form -->
<?php
$this->generate_search_form();
示例4:
$wpl_data = wpl_users::get_wpl_data($wp_user->ID);
?>
<tr id="item_row<?php
echo $wp_user->ID;
?>
">
<td class="size-1"><?php
echo $wp_user->ID;
?>
</td>
<td>
<?php
if ($wp_user->id) {
?>
<a href="<?php
echo wpl_global::add_qs_var('id', $wp_user->ID, wpl_global::get_wpl_admin_menu('wpl_admin_profile'));
?>
"><?php
echo $wp_user->user_login;
?>
</a>
<?php
} else {
?>
<?php
echo $wp_user->user_login;
?>
<?php
}
?>
</td>
示例5: init_page
/**
* written by Francis
* description: initialize pagination and properties for property manager page
*/
private function init_page()
{
/** global settings **/
$settings = wpl_settings::get_settings();
/** listing settings **/
$this->page_number = wpl_request::getVar('wplpage', 1);
$limit = wpl_request::getVar('limit', $settings['default_page_size']);
$start = wpl_request::getVar('start', ($this->page_number - 1) * $limit);
$orderby = wpl_request::getVar('orderby', $settings['default_orderby']);
$order = wpl_request::getVar('order', $settings['default_order']);
$current_user_id = wpl_users::get_cur_user_id();
$where = array();
/** set page if start var passed **/
$this->page_number = $start / $limit + 1;
wpl_request::setVar('wplpage', $this->page_number);
$this->model = new wpl_property();
/** load user properties **/
if (!wpl_users::is_administrator($current_user_id)) {
$where['sf_select_user_id'] = $current_user_id;
}
/** detect kind **/
$this->kind = wpl_request::getVar('kind', 0);
if (!in_array($this->kind, wpl_flex::get_valid_kinds())) {
/** import message tpl **/
$this->message = __('Invalid Request!', WPL_TEXTDOMAIN);
parent::render($this->tpl_path, 'message');
return false;
}
/** Access **/
$access = true;
_wpl_import('libraries.filters');
@extract(wpl_filters::apply('listing_manager_access', array('kind' => $this->kind, 'user_id' => $current_user_id)));
if (!$access) {
/** import message tpl **/
$this->message = __("You don't have access to this page!", WPL_TEXTDOMAIN);
parent::render($this->tpl_path, 'message');
return false;
}
$this->kind_label = wpl_flex::get_kind_label($this->kind);
$where['sf_select_kind'] = $this->kind;
/** Add search conditions to the where **/
$vars = array_merge(wpl_request::get('POST'), wpl_request::get('GET'));
$where = array_merge($vars, $where);
$this->model->start($start, $limit, $orderby, $order, $where, $this->kind);
$query = $this->model->query();
$properties = $this->model->search($query);
$this->model->finish();
/** get the number of all properties according to our query **/
$properties_count = $this->model->get_properties_count();
/** set pagination according to the number of items and limit **/
$this->pagination = wpl_pagination::get_pagination($properties_count, $limit);
$plisting_fields = $this->model->get_plisting_fields();
$wpl_properties = array();
foreach ($properties as $property) {
$wpl_properties[$property->id] = $this->model->full_render($property->id, $plisting_fields, $property);
}
$this->wpl_properties = $wpl_properties;
$this->client = wpl_global::get_client();
if ($this->client) {
$this->backend = true;
$this->frontend = false;
$this->add_link = wpl_global::add_qs_var('kind', $this->kind, wpl_global::get_wpl_admin_menu('wpl_admin_add_listing'));
} else {
$this->backend = false;
$this->frontend = true;
$this->add_link = wpl_global::add_qs_var('kind', $this->kind, wpl_global::add_qs_var('wplmethod', 'wizard'));
}
return true;
}