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


PHP WDWLibrary::spider_redirect方法代码示例

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


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

示例1: 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

示例2: display

    public function display($reset = FALSE)
    {
        if (isset($_GET['bwg_start_tour']) && $_GET['bwg_start_tour'] == '1') {
            update_user_meta(get_current_user_id(), 'bwg_photo_gallery', '1');
            WDWLibrary::spider_redirect('admin.php?page=options_bwg');
        }
        global $WD_BWG_UPLOAD_DIR;
        ?>
    <div style="clear: both; float: left; width: 99%;">
      <div style="float:left; font-size: 14px; font-weight: bold;">
        <?php 
        _e("This section allows you to change settings for different views and general options.", 'bwg_back');
        ?>
        <a style="color: blue; text-decoration: none;" target="_blank" href="https://web-dorado.com/wordpress-gallery/editing-options/global-options.html"><?php 
        _e("Read More in User Manual", 'bwg_back');
        ?>
</a>
      </div>
      <div style="float: right; text-align: right;">
        <a style="text-decoration: none;" target="_blank" href="https://web-dorado.com/files/fromPhotoGallery.php">
          <img width="215" border="0" alt="web-dorado.com" src="<?php 
        echo WD_BWG_URL . '/images/logo.png';
        ?>
" />
        </a>
      </div>
    </div>
    <script>
      function bwg_add_music(files) {
        document.getElementById("slideshow_audio_url").value = files[0]['url'];
      }
      function bwg_add_built_in_watermark_image(files) {
        document.getElementById("built_in_watermark_url").value = '<?php 
        echo site_url() . '/' . $WD_BWG_UPLOAD_DIR;
        ?>
' + files[0]['url'];
      }
      function bwg_add_watermark_image(files) {
        document.getElementById("watermark_url").value = '<?php 
        echo site_url() . '/' . $WD_BWG_UPLOAD_DIR;
        ?>
' + files[0]['url'];
      }
    </script>
    <?php 
        $row = $this->model->get_row_data($reset);
        $built_in_watermark_fonts = array();
        foreach (scandir(path_join(WD_BWG_DIR, 'fonts')) as $filename) {
            if (strpos($filename, '.') === 0) {
                continue;
            } else {
                $built_in_watermark_fonts[] = $filename;
            }
        }
        $watermark_fonts = 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');
        $effects = array('none' => 'None', 'cubeH' => 'Cube Horizontal', 'cubeV' => 'Cube Vertical', 'fade' => 'Fade', 'sliceH' => 'Slice Horizontal', 'sliceV' => 'Slice Vertical', 'slideH' => 'Slide Horizontal', 'slideV' => 'Slide Vertical', 'scaleOut' => 'Scale Out', 'scaleIn' => 'Scale In', 'blockScale' => 'Block Scale', 'kaleidoscope' => 'Kaleidoscope', 'fan' => 'Fan', 'blindH' => 'Blind Horizontal', 'blindV' => 'Blind Vertical', 'random' => 'Random');
        ?>
    <form method="post" class="wrap bwg_form" action="admin.php?page=options_bwg" style="float: left; width: 99%;">      
      <?php 
        wp_nonce_field('options_bwg', 'bwg_nonce');
        ?>
      <span class="option-icon"></span>
      <h2 id="ed_options"><?php 
        _e("Edit options", 'bwg_back');
        ?>
</h2>
      <div style="display: inline-block; width: 100%;">
        <div style="float: right;">
          <input class="button-primary" type="submit" onclick="if (spider_check_required('title', 'Title')) {return false;}; spider_set_input_value('task', 'save')" value="<?php 
        _e("Save", 'bwg_back');
        ?>
" />
          <input class="button-secondary" type="submit" onclick="if (confirm('<?php 
        echo addslashes(__("Do you want to reset to default?", 'bwg_back'));
        ?>
')) {
                                                                 spider_set_input_value('task', 'reset');
                                                               } else {
                                                                 return false;
                                                               }" value="<?php 
        _e("Reset all options", 'bwg_back');
        ?>
" />
        </div>
      </div>
      <div style="display: none; width: 100%;" id="display_panel">
        <div style="float:left;">
          <div id="div_1" class="gallery_type" onclick="bwg_change_option_type('1')"> <?php 
        _e("Global options", 'bwg_back');
        ?>
</div><br/>
          <div id="div_8" class="gallery_type" onclick="bwg_change_option_type('8')"> <?php 
        _e("Watermark", 'bwg_back');
        ?>
</div><br/>
          <div id="div_2" class="gallery_type" onclick="bwg_change_option_type('2')"> <?php 
        _e("Advertisement", 'bwg_back');
        ?>
</div><br/>
          <div id="div_3" class="gallery_type" onclick="bwg_change_option_type('3')"> <?php 
//.........这里部分代码省略.........
开发者ID:jun200,项目名称:wordpress,代码行数:101,代码来源:BWGViewOptions_bwg.php

示例3: 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

示例4: 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

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