WordPress.org

Plugin Directory

Changeset 514237


Ignore:
Timestamp:
03/04/12 14:23:10 (2 years ago)
Author:
ramon fincken
Message:

Bugfix

Location:
find-replace
Files:
8 added
4 edited

Legend:

Unmodified
Added
Removed
  • find-replace/trunk/find_replace.php

    r505388 r514237  
    44Plugin URI: http://www.websitefreelancers.nl 
    55Description: Lets you find and replace pages and posts with a GUI. 
    6 Version: 1.6 
     6Version: 1.7 
    77Author: Ramon Fincken, Bas Bosman 
    88Author URI: http://www.websitefreelancers.nl 
  • find-replace/trunk/form.php

    r505388 r514237  
    2525    else if (!isset($_POST['replace']) || !$_POST['replace']){ 
    2626        echo '<div id="message" class="error">No replace string</div>'; 
    27     }else{ 
     27    } 
     28    elseif (!isset($_POST['posttype']) || !count($_POST['posttype'])){ 
     29        echo '<div id="message" class="error">No post type selected</div>'; 
     30    } else { 
     31 
    2832        //Is magic quotes on? 
    2933        if (get_magic_quotes_gpc()) { 
     34            $posttype_org = $_POST['posttype']; 
    3035            // Yes? Strip the added slashes 
    3136            $_POST = array_map('stripslashes', $_POST); 
     37            $_POST['posttype'] = $posttype_org; 
    3238        } 
    3339 
    3440        //logic 
    3541        $query          = ""; 
     42         
    3643        foreach ($_POST['post_type'] as $type) { 
    3744         $query         = $query == '' ? 'WHERE p.post_type IN(' : $query . ', '; 
     
    4350        $search         = $_POST['search']; 
    4451        $replace        = $_POST['replace']; 
    45       $prio           = ($_POST['low_priority'] == 'yes') ? ' LOW_PRIORITY ' : ''; 
     52        $prio           = ($_POST['low_priority'] == 'yes') ? ' LOW_PRIORITY ' : ''; 
    4653 
    4754 
     
    112119 
    113120<h3>How to use?</h3> 
    114 <p class="updated">* Search & replace works case sensitive!<br /> 
     121<p class="updated">* Search &amp; replace works case sensitive!<br /> 
    115122&nbsp;&nbsp;&nbsp;A search for "MySearch" will not find content with 
    116123"mysearch".<br /> 
     124* Warning, Search &amp; replace postmeta will replace all postmeta, regardless of post type!<br /> 
    117125* Only the current version of your page or post will be updated.<br /> 
    118126* Example when you moved domains and you want to replace all links in 
  • find-replace/trunk/mijnpress_plugin_framework.php

    r505388 r514237  
    4444 * 1.5 
    4545 * Changed: credits 
     46 *  
     47 * 1.5.1 
     48 * Added: return functions 
    4649 * ------------------------------------------------------------------ 
    4750 *  
     
    5659    var $showcredits = true; 
    5760    var $showcredits_fordevelopers = true; 
    58     var $all_plugins = array('Admin renamer extended','Find replace','Simple add pages or posts','Force apply terms and conditions','GTmetrix website performance','Antispam for all fields','Mass Delete Tags','Auto Prune Posts','Warm cache','See attachments','Automatic Comment Scheduler','Register plus redux export users','Subscribe2 widget','Define Constants','Mass Delete Unused Tags','Prevent core update'); 
     61    var $all_plugins = array('Admin renamer extended','Find replace','Simple add pages or posts','Force apply terms and conditions','GTmetrix website performance','Antispam for all fields','Mass Delete Tags','Auto Prune Posts','Warm cache','See attachments','Automatic Comment Scheduler','Register plus redux export users','Subscribe2 widget','Define Constants','Mass Delete Unused Tags','Prevent core update','WPML flag in menu', 'WPsc MijnPress'); 
    5962     
    6063    /** 
     
    8083        } 
    8184        return $links; 
     85    } 
     86     
     87    // To implement later 
     88    function refresh_rewrite() 
     89    { 
     90        if(isset($_GET['rwflush'])) 
     91        { 
     92            global $wp_rewrite; 
     93            $wp_rewrite->flush_rules(); 
     94        }        
    8295    } 
    8396 
     
    143156    } 
    144157 
     158    function return_zero() 
     159    { 
     160        return 0; 
     161    } 
     162     
     163    function return_false() 
     164    { 
     165        return false; 
     166    } 
     167     
     168    function return_true() 
     169    { 
     170        return true; 
     171    }     
     172     
    145173    /** 
    146174     * Shows credits or info for developers 
  • find-replace/trunk/readme.txt

    r507333 r514237  
    55Requires at least: 2.0.2 
    66Tested up to: 3.3.1 
    7 Stable tag: 1.6 
     7Stable tag: 1.7 
    88 
    99Lets you find and replace text in pages, posts, Custom Post types and trashed items with a GUI. 
     
    3030 
    3131== Changelog == 
     32= 1.7 = 
     33Bugfix: Stripslashes (deep bypass) 
     34 
    3235= 1.6 = 
    3336Added: Custom Post Type support (CPT)  
Note: See TracChangeset for help on using the changeset viewer.