当前位置: 首页>>代码示例>>PHP>>正文


PHP WDWLibrary::get方法代码示例

本文整理汇总了PHP中WDWLibrary::get方法的典型用法代码示例。如果您正苦于以下问题:PHP WDWLibrary::get方法的具体用法?PHP WDWLibrary::get怎么用?PHP WDWLibrary::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WDWLibrary的用法示例。


在下文中一共展示了WDWLibrary::get方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: execute

 public function execute()
 {
     $task = WDWLibrary::get('task');
     if (method_exists($this, $task)) {
         $this->{$task}();
     }
     $this->display();
 }
开发者ID:marleexoxo,项目名称:FWC,代码行数:8,代码来源:BWGControllerBWGShortcode.php

示例2: execute

 public function execute()
 {
     $task = WDWLibrary::get('task');
     $from_menu = isset($_GET['page']) && esc_html($_GET['page']) == 'BWGShortcode' ? TRUE : FALSE;
     if ($task != '' && $from_menu) {
         if (!WDWLibrary::verify_nonce('BWGShortcode')) {
             die('Sorry, your nonce did not verify.');
         }
     }
     if (method_exists($this, $task)) {
         $this->{$task}();
     }
     $this->display();
 }
开发者ID:RA2WP,项目名称:RA2WP,代码行数:14,代码来源:BWGControllerBWGShortcode.php

示例3: edit

    public function edit($id, $reset)
    {
        $row = $this->model->get_row_data($id, $reset);
        $page_title = $id != 0 ? 'Edit theme ' . $row->name : 'Create new theme';
        $current_type = WDWLibrary::get('current_type', 'Thumbnail');
        $border_styles = array('none' => 'None', 'solid' => 'Solid', 'dotted' => 'Dotted', 'dashed' => 'Dashed', 'double' => 'Double', 'groove' => 'Groove', 'ridge' => 'Ridge', 'inset' => 'Inset', 'outset' => 'Outset');
        $font_families = array('arial' => 'Arial', 'lucida grande' => 'Lucida grande', 'segoe ui' => 'Segoe ui', 'tahoma' => 'Tahoma', 'trebuchet ms' => 'Trebuchet ms', 'verdana' => 'Verdana', 'cursive' => 'Cursive', 'fantasy' => 'Fantasy', 'monospace' => 'Monospace', 'serif' => 'Serif');
        $aligns = array('left' => 'Left', 'center' => 'Center', 'right' => 'Right');
        $font_weights = array('lighter' => 'Lighter', 'normal' => 'Normal', 'bold' => 'Bold');
        $hover_effects = array('none' => 'None', 'rotate' => 'Rotate', 'scale' => 'Scale', 'skew' => 'Skew');
        $button_styles = array('fa-chevron' => 'Chevron', 'fa-angle' => 'Angle', 'fa-angle-double' => 'Double');
        $rate_icons = array('star' => 'Star', 'bell' => 'Bell', 'circle' => 'Circle', 'flag' => 'Flag', 'heart' => 'Heart', 'square' => 'Square');
        ?>
    <div style="clear: both; float: left; width: 99%;">
      <div style="float:left; font-size: 14px; font-weight: bold;">
        This section allows you to add/edit theme.
        <a style="color: blue; text-decoration: none;" target="_blank" href="http://web-dorado.com/wordpress-gallery-guide-step-6/6-1.html">Read More in User Manual</a>
      </div>
      <div style="float: right; text-align: right;">
        <a style="text-decoration: none;" target="_blank" href="http://web-dorado.com/products/wordpress-photo-gallery-plugin.html">
          <img width="215" border="0" alt="web-dorado.com" src="<?php 
        echo WD_BWG_URL . '/images/logo.png';
        ?>
" />
        </a>
      </div>
    </div>
    <form class="wrap" method="post" action="admin.php?page=themes_bwg" style="float: left; width: 99%;">
      <?php 
        wp_nonce_field('themes_bwg', 'bwg_nonce');
        ?>
      <span class="theme_icon"></span>
      <h2><?php 
        echo $page_title;
        ?>
</h2>
      <div style="float: right; margin: 0 5px 0 0;">
        <input class="button-secondary" type="submit" onclick="if (spider_check_required('name', 'Name')) {return false;}; spider_set_input_value('task', 'save')" value="Save"/>
        <input class="button-secondary" type="submit" onclick="if (spider_check_required('name', 'Name')) {return false;}; spider_set_input_value('task', 'apply')" value="Apply"/>
        <input class="button-secondary" type="submit" onclick="spider_set_input_value('task', 'cancel')" value="Cancel"/>
        <input title="Reset to default theme" class="button-primary" type="submit" onclick="if (confirm('Do you want to reset to default?')) {
                                                                 spider_set_input_value('task', 'reset');
                                                               } else {
                                                                 return false;
                                                               }" value="Reset"/>
      </div>
      <div style="float: left; margin: 10px 0 0; display: none;" id="type_menu">
        <div id="type_Thumbnail" class="theme_type" onclick="bwg_change_theme_type('Thumbnail')">Thumbnails</div>
        <div id="type_Masonry" class="theme_type" style="opacity: 0.4; filter: Alpha(opacity=40);" title="This tab is disabled in free version">Masonry</div>
        <div id="type_Mosaic" class="theme_type" style="opacity: 0.4; filter: Alpha(opacity=40);" title="This tab is disabled in free version">Mosaic</div>
        <div id="type_Slideshow" class="theme_type" onclick="bwg_change_theme_type('Slideshow')">Slideshow</div>
        <div id="type_Image_browser" class="theme_type" onclick="bwg_change_theme_type('Image_browser')">Image Browser</div>
        <div id="type_Compact_album" class="theme_type" onclick="bwg_change_theme_type('Compact_album')">Compact Album</div>
        <div id="type_Masonry_album" class="theme_type" style="opacity: 0.4; filter: Alpha(opacity=40);" title="This tab is disabled in free version">Masonry Album</div>
        <div id="type_Extended_album" class="theme_type" onclick="bwg_change_theme_type('Extended_album')">Extended Album</div>
        <div id="type_Blog_style" class="theme_type" style="opacity: 0.4; filter: Alpha(opacity=40);" title="This tab is disabled in free version">Blog Style</div>
        <div id="type_Lightbox" class="theme_type" onclick="bwg_change_theme_type('Lightbox')">Lightbox</div>
        <div id="type_Navigation" class="theme_type" onclick="bwg_change_theme_type('Navigation')">Page Navigation</div>
        <input type="hidden" id="current_type" name="current_type" value="<?php 
        echo $current_type;
        ?>
" />
      </div>
      <fieldset class="spider_fieldset">
        <legend>Parameters</legend>
        <table style="clear:both;">
          <tbody>
          <tr>
            <td class="spider_label"><label for="name">Name: <span style="color:#FF0000;"> * </span> </label></td>
            <td><input type="text" id="name" name="name" value="<?php 
        echo $row->name;
        ?>
" class="spider_text_input"/></td>
          </tr>
          </tbody>
        </table>

        <fieldset class="spider_type_fieldset" id="Thumbnail">
          <fieldset class="spider_child_fieldset" id="Thumbnail_1">
            <table style="clear:both;">
              <tbody>
                <tr>
                  <td class="spider_label"><label for="thumb_margin">Margin: </label></td>
                  <td>
                    <input type="text" name="thumb_margin" id="thumb_margin" value="<?php 
        echo $row->thumb_margin;
        ?>
" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> px
                  </td>
                </tr>
                <tr>
                  <td class="spider_label"><label for="thumb_padding">Padding: </label></td>
                  <td>
                    <input type="text" name="thumb_padding" id="thumb_padding" value="<?php 
        echo $row->thumb_padding;
        ?>
" class="spider_int_input" onkeypress="return spider_check_isnum(event)"/> px
                  </td>
                </tr>
                <tr>
//.........这里部分代码省略.........
开发者ID:nirav90,项目名称:gharena,代码行数:101,代码来源:BWGViewThemes_bwg.php

示例4: bwg_ajax

function bwg_ajax()
{
    if (function_exists('current_user_can')) {
        if (!current_user_can('manage_options')) {
            die('Access Denied');
        }
    } else {
        die('Access Denied');
    }
    global $wpdb;
    require_once WD_BWG_DIR . '/framework/WDWLibrary.php';
    $page = WDWLibrary::get('action');
    if ($page != '' && ($page == 'BWGShortcode' || $page == 'addAlbumsGalleries' || $page == 'editThumb' || $page == 'addTags')) {
        if (!WDWLibrary::verify_nonce($page) && $page != 'BWGShortcode') {
            die('Sorry, your nonce did not verify.');
        }
        require_once WD_BWG_DIR . '/admin/controllers/BWGController' . ucfirst($page) . '.php';
        $controller_class = 'BWGController' . ucfirst($page);
        $controller = new $controller_class();
        $controller->execute();
    }
}
开发者ID:benshez,项目名称:DreamWeddingCeremonies,代码行数:22,代码来源:photo-gallery.php

示例5: setdefault

 public function setdefault($id)
 {
     global $wpdb;
     $save = $wpdb->update($wpdb->prefix . 'bwg_theme', array('default_theme' => 0), array('default_theme' => 1));
     $save = $wpdb->update($wpdb->prefix . 'bwg_theme', array('default_theme' => 1), array('id' => $id));
     if ($save !== FALSE) {
         $message = 7;
     } else {
         $message = 2;
     }
     $page = WDWLibrary::get('page');
     $query_url = wp_nonce_url(admin_url('admin.php'), 'themes_bwg', 'bwg_nonce');
     $query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
     WDWLibrary::spider_redirect($query_url);
 }
开发者ID:ssesto,项目名称:wordpress-pvc,代码行数:15,代码来源:BWGControllerThemes_bwg.php

示例6: save_order

 public function save_order($flag = TRUE)
 {
     global $wpdb;
     $album_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . 'bwg_album');
     $message = 0;
     if ($album_ids_col) {
         foreach ($album_ids_col as $album_id) {
             if (isset($_POST['order_input_' . $album_id])) {
                 $order_values[$album_id] = (int) $_POST['order_input_' . $album_id];
             } else {
                 $order_values[$album_id] = (int) $wpdb->get_var($wpdb->prepare('SELECT `order` FROM ' . $wpdb->prefix . 'bwg_album WHERE `id`="%d"', $album_id));
             }
         }
         asort($order_values);
         $i = 1;
         foreach ($order_values as $key => $order_value) {
             $wpdb->update($wpdb->prefix . 'bwg_album', array('order' => $i), array('id' => $key));
             $i++;
         }
         if ($flag) {
             $message = 13;
         }
     }
     $page = WDWLibrary::get('page');
     $query_url = wp_nonce_url(admin_url('admin.php'), 'albums_bwg', 'bwg_nonce');
     $query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
     WDWLibrary::spider_redirect($query_url);
 }
开发者ID:sergeyleonovV,项目名称:numo.dp.ua,代码行数:28,代码来源:BWGControllerAlbums_bwg.php

示例7: delete_all

 public function delete_all()
 {
     global $wpdb;
     $flag = FALSE;
     $tag_ids_col = $wpdb->get_col("SELECT term_id FROM " . $wpdb->prefix . "terms");
     foreach ($tag_ids_col as $tag_id) {
         if (isset($_POST['check_' . $tag_id])) {
             wp_delete_term($tag_id, 'bwg_tag');
             $wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE tag_id="%d"', $tag_id));
             $flag = TRUE;
         }
     }
     /*delete corresponding posts and their meta*/
     $query2 = "SELECT ID, post_content FROM " . $wpdb->posts . " WHERE post_type = 'bwg_tag' ";
     $posts = $wpdb->get_results($query2, OBJECT);
     foreach ($posts as $post) {
         $post_content = $post->post_content;
         if (strpos($post_content, ' type="tag" ')) {
             wp_delete_post($post->ID, true);
         }
     }
     if ($flag) {
         $message = 5;
     } else {
         $message = 6;
     }
     $page = WDWLibrary::get('page');
     $query_url = wp_nonce_url(admin_url('admin.php'), 'tags_bwg', 'bwg_nonce');
     $query_url = add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), $query_url);
     WDWLibrary::spider_redirect($query_url);
 }
开发者ID:sergeyleonovV,项目名称:numo.dp.ua,代码行数:31,代码来源:BWGControllerTags_bwg.php

示例8: bwg_ajax

function bwg_ajax()
{
    global $wpdb;
    require_once WD_BWG_DIR . '/framework/WDWLibrary.php';
    $page = WDWLibrary::get('action');
    if ($page != '' && ($page == 'BWGShortcode' || $page == 'addAlbumsGalleries' || $page == 'editThumb' || $page == 'addTags')) {
        require_once WD_BWG_DIR . '/admin/controllers/BWGController' . ucfirst($page) . '.php';
        $controller_class = 'BWGController' . ucfirst($page);
        $controller = new $controller_class();
        $controller->execute();
    }
}
开发者ID:phuluang,项目名称:rosewellmusic,代码行数:12,代码来源:photo-gallery.php

示例9: delete_all

 public function delete_all()
 {
     global $wpdb;
     $flag = FALSE;
     $tag_ids_col = $wpdb->get_col("SELECT term_id FROM " . $wpdb->prefix . "terms");
     foreach ($tag_ids_col as $tag_id) {
         if (isset($_POST['check_' . $tag_id])) {
             wp_delete_term($tag_id, 'bwg_tag');
             $wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'bwg_image_tag WHERE tag_id="%d"', $tag_id));
             $flag = TRUE;
         }
     }
     if ($flag) {
         $message = 5;
     } else {
         $message = 6;
     }
     $page = WDWLibrary::get('page');
     WDWLibrary::spider_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
 }
开发者ID:marleexoxo,项目名称:FWC,代码行数:20,代码来源:BWGControllerTags_bwg.php


注:本文中的WDWLibrary::get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。