当前位置: 首页>>代码示例>>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;未经允许,请勿转载。