當前位置: 首頁>>代碼示例>>PHP>>正文


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怎麽用?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);
 }
開發者ID:amankatoch,項目名稱:wp-plugin,代碼行數:30,代碼來源:wpl_main.php

示例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;
 }
開發者ID:amankatoch,項目名稱:wp-plugin,代碼行數:16,代碼來源:extensions.php

示例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 
}
開發者ID:amankatoch,項目名稱:wp-plugin,代碼行數:31,代碼來源:default.php


注:本文中的wpl_global::get_wp_admin_url方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。