Version Description
- December 7, 2020 =
- Improvement: WordPress 5.6 and PHP 8 compatible
- Fix: Strings that have been serialized twice showing up as false-positives
Download this release
Release Info
Developer | deliciousbrains |
Plugin | Better Search Replace |
Version | 1.3.4 |
Comparing to | |
See all releases |
Version 1.3.4
- LICENSE.txt +674 -0
- README.txt +200 -0
- assets/css/better-search-replace.css +44 -0
- assets/css/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
- assets/css/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
- assets/css/images/ui-bg_flat_10_000000_40x100.png +0 -0
- assets/css/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
- assets/css/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
- assets/css/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- assets/css/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
- assets/css/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
- assets/css/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
- assets/css/images/ui-icons_222222_256x240.png +0 -0
- assets/css/images/ui-icons_228ef1_256x240.png +0 -0
- assets/css/images/ui-icons_ef8c08_256x240.png +0 -0
- assets/css/images/ui-icons_ffd27a_256x240.png +0 -0
- assets/css/images/ui-icons_ffffff_256x240.png +0 -0
- assets/css/jquery-ui.min.css +7 -0
- assets/img/bsr-logo-white.svg +21 -0
- assets/img/phil-gravatar.jpeg +0 -0
- assets/img/sidebar-upgrade.png +0 -0
- assets/index.php +1 -0
- assets/js/better-search-replace.js +132 -0
- assets/js/better-search-replace.min.js +1 -0
- better-search-replace.php +84 -0
- includes/class-bsr-admin.php +295 -0
- includes/class-bsr-ajax.php +243 -0
- includes/class-bsr-compatibility.php +97 -0
- includes/class-bsr-db.php +451 -0
- includes/class-bsr-i18n.php +54 -0
- includes/class-bsr-loader.php +131 -0
- includes/class-bsr-main.php +163 -0
- includes/index.php +1 -0
- index.php +1 -0
- languages/better-search-replace-de_DE.mo +0 -0
- languages/better-search-replace-de_DE.po +204 -0
- languages/better-search-replace-es_ES.mo +0 -0
- languages/better-search-replace-es_ES.po +136 -0
- languages/better-search-replace-fr_FR.mo +0 -0
- languages/better-search-replace-fr_FR.po +145 -0
- languages/better-search-replace.pot +288 -0
- templates/bsr-dashboard.php +134 -0
- templates/bsr-help.php +31 -0
- templates/bsr-search-replace.php +81 -0
- templates/bsr-settings.php +40 -0
LICENSE.txt
ADDED
@@ -0,0 +1,674 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
GNU GENERAL PUBLIC LICENSE
|
2 |
+
Version 3, 29 June 2007
|
3 |
+
|
4 |
+
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
5 |
+
Everyone is permitted to copy and distribute verbatim copies
|
6 |
+
of this license document, but changing it is not allowed.
|
7 |
+
|
8 |
+
Preamble
|
9 |
+
|
10 |
+
The GNU General Public License is a free, copyleft license for
|
11 |
+
software and other kinds of works.
|
12 |
+
|
13 |
+
The licenses for most software and other practical works are designed
|
14 |
+
to take away your freedom to share and change the works. By contrast,
|
15 |
+
the GNU General Public License is intended to guarantee your freedom to
|
16 |
+
share and change all versions of a program--to make sure it remains free
|
17 |
+
software for all its users. We, the Free Software Foundation, use the
|
18 |
+
GNU General Public License for most of our software; it applies also to
|
19 |
+
any other work released this way by its authors. You can apply it to
|
20 |
+
your programs, too.
|
21 |
+
|
22 |
+
When we speak of free software, we are referring to freedom, not
|
23 |
+
price. Our General Public Licenses are designed to make sure that you
|
24 |
+
have the freedom to distribute copies of free software (and charge for
|
25 |
+
them if you wish), that you receive source code or can get it if you
|
26 |
+
want it, that you can change the software or use pieces of it in new
|
27 |
+
free programs, and that you know you can do these things.
|
28 |
+
|
29 |
+
To protect your rights, we need to prevent others from denying you
|
30 |
+
these rights or asking you to surrender the rights. Therefore, you have
|
31 |
+
certain responsibilities if you distribute copies of the software, or if
|
32 |
+
you modify it: responsibilities to respect the freedom of others.
|
33 |
+
|
34 |
+
For example, if you distribute copies of such a program, whether
|
35 |
+
gratis or for a fee, you must pass on to the recipients the same
|
36 |
+
freedoms that you received. You must make sure that they, too, receive
|
37 |
+
or can get the source code. And you must show them these terms so they
|
38 |
+
know their rights.
|
39 |
+
|
40 |
+
Developers that use the GNU GPL protect your rights with two steps:
|
41 |
+
(1) assert copyright on the software, and (2) offer you this License
|
42 |
+
giving you legal permission to copy, distribute and/or modify it.
|
43 |
+
|
44 |
+
For the developers' and authors' protection, the GPL clearly explains
|
45 |
+
that there is no warranty for this free software. For both users' and
|
46 |
+
authors' sake, the GPL requires that modified versions be marked as
|
47 |
+
changed, so that their problems will not be attributed erroneously to
|
48 |
+
authors of previous versions.
|
49 |
+
|
50 |
+
Some devices are designed to deny users access to install or run
|
51 |
+
modified versions of the software inside them, although the manufacturer
|
52 |
+
can do so. This is fundamentally incompatible with the aim of
|
53 |
+
protecting users' freedom to change the software. The systematic
|
54 |
+
pattern of such abuse occurs in the area of products for individuals to
|
55 |
+
use, which is precisely where it is most unacceptable. Therefore, we
|
56 |
+
have designed this version of the GPL to prohibit the practice for those
|
57 |
+
products. If such problems arise substantially in other domains, we
|
58 |
+
stand ready to extend this provision to those domains in future versions
|
59 |
+
of the GPL, as needed to protect the freedom of users.
|
60 |
+
|
61 |
+
Finally, every program is threatened constantly by software patents.
|
62 |
+
States should not allow patents to restrict development and use of
|
63 |
+
software on general-purpose computers, but in those that do, we wish to
|
64 |
+
avoid the special danger that patents applied to a free program could
|
65 |
+
make it effectively proprietary. To prevent this, the GPL assures that
|
66 |
+
patents cannot be used to render the program non-free.
|
67 |
+
|
68 |
+
The precise terms and conditions for copying, distribution and
|
69 |
+
modification follow.
|
70 |
+
|
71 |
+
TERMS AND CONDITIONS
|
72 |
+
|
73 |
+
0. Definitions.
|
74 |
+
|
75 |
+
"This License" refers to version 3 of the GNU General Public License.
|
76 |
+
|
77 |
+
"Copyright" also means copyright-like laws that apply to other kinds of
|
78 |
+
works, such as semiconductor masks.
|
79 |
+
|
80 |
+
"The Program" refers to any copyrightable work licensed under this
|
81 |
+
License. Each licensee is addressed as "you". "Licensees" and
|
82 |
+
"recipients" may be individuals or organizations.
|
83 |
+
|
84 |
+
To "modify" a work means to copy from or adapt all or part of the work
|
85 |
+
in a fashion requiring copyright permission, other than the making of an
|
86 |
+
exact copy. The resulting work is called a "modified version" of the
|
87 |
+
earlier work or a work "based on" the earlier work.
|
88 |
+
|
89 |
+
A "covered work" means either the unmodified Program or a work based
|
90 |
+
on the Program.
|
91 |
+
|
92 |
+
To "propagate" a work means to do anything with it that, without
|
93 |
+
permission, would make you directly or secondarily liable for
|
94 |
+
infringement under applicable copyright law, except executing it on a
|
95 |
+
computer or modifying a private copy. Propagation includes copying,
|
96 |
+
distribution (with or without modification), making available to the
|
97 |
+
public, and in some countries other activities as well.
|
98 |
+
|
99 |
+
To "convey" a work means any kind of propagation that enables other
|
100 |
+
parties to make or receive copies. Mere interaction with a user through
|
101 |
+
a computer network, with no transfer of a copy, is not conveying.
|
102 |
+
|
103 |
+
An interactive user interface displays "Appropriate Legal Notices"
|
104 |
+
to the extent that it includes a convenient and prominently visible
|
105 |
+
feature that (1) displays an appropriate copyright notice, and (2)
|
106 |
+
tells the user that there is no warranty for the work (except to the
|
107 |
+
extent that warranties are provided), that licensees may convey the
|
108 |
+
work under this License, and how to view a copy of this License. If
|
109 |
+
the interface presents a list of user commands or options, such as a
|
110 |
+
menu, a prominent item in the list meets this criterion.
|
111 |
+
|
112 |
+
1. Source Code.
|
113 |
+
|
114 |
+
The "source code" for a work means the preferred form of the work
|
115 |
+
for making modifications to it. "Object code" means any non-source
|
116 |
+
form of a work.
|
117 |
+
|
118 |
+
A "Standard Interface" means an interface that either is an official
|
119 |
+
standard defined by a recognized standards body, or, in the case of
|
120 |
+
interfaces specified for a particular programming language, one that
|
121 |
+
is widely used among developers working in that language.
|
122 |
+
|
123 |
+
The "System Libraries" of an executable work include anything, other
|
124 |
+
than the work as a whole, that (a) is included in the normal form of
|
125 |
+
packaging a Major Component, but which is not part of that Major
|
126 |
+
Component, and (b) serves only to enable use of the work with that
|
127 |
+
Major Component, or to implement a Standard Interface for which an
|
128 |
+
implementation is available to the public in source code form. A
|
129 |
+
"Major Component", in this context, means a major essential component
|
130 |
+
(kernel, window system, and so on) of the specific operating system
|
131 |
+
(if any) on which the executable work runs, or a compiler used to
|
132 |
+
produce the work, or an object code interpreter used to run it.
|
133 |
+
|
134 |
+
The "Corresponding Source" for a work in object code form means all
|
135 |
+
the source code needed to generate, install, and (for an executable
|
136 |
+
work) run the object code and to modify the work, including scripts to
|
137 |
+
control those activities. However, it does not include the work's
|
138 |
+
System Libraries, or general-purpose tools or generally available free
|
139 |
+
programs which are used unmodified in performing those activities but
|
140 |
+
which are not part of the work. For example, Corresponding Source
|
141 |
+
includes interface definition files associated with source files for
|
142 |
+
the work, and the source code for shared libraries and dynamically
|
143 |
+
linked subprograms that the work is specifically designed to require,
|
144 |
+
such as by intimate data communication or control flow between those
|
145 |
+
subprograms and other parts of the work.
|
146 |
+
|
147 |
+
The Corresponding Source need not include anything that users
|
148 |
+
can regenerate automatically from other parts of the Corresponding
|
149 |
+
Source.
|
150 |
+
|
151 |
+
The Corresponding Source for a work in source code form is that
|
152 |
+
same work.
|
153 |
+
|
154 |
+
2. Basic Permissions.
|
155 |
+
|
156 |
+
All rights granted under this License are granted for the term of
|
157 |
+
copyright on the Program, and are irrevocable provided the stated
|
158 |
+
conditions are met. This License explicitly affirms your unlimited
|
159 |
+
permission to run the unmodified Program. The output from running a
|
160 |
+
covered work is covered by this License only if the output, given its
|
161 |
+
content, constitutes a covered work. This License acknowledges your
|
162 |
+
rights of fair use or other equivalent, as provided by copyright law.
|
163 |
+
|
164 |
+
You may make, run and propagate covered works that you do not
|
165 |
+
convey, without conditions so long as your license otherwise remains
|
166 |
+
in force. You may convey covered works to others for the sole purpose
|
167 |
+
of having them make modifications exclusively for you, or provide you
|
168 |
+
with facilities for running those works, provided that you comply with
|
169 |
+
the terms of this License in conveying all material for which you do
|
170 |
+
not control copyright. Those thus making or running the covered works
|
171 |
+
for you must do so exclusively on your behalf, under your direction
|
172 |
+
and control, on terms that prohibit them from making any copies of
|
173 |
+
your copyrighted material outside their relationship with you.
|
174 |
+
|
175 |
+
Conveying under any other circumstances is permitted solely under
|
176 |
+
the conditions stated below. Sublicensing is not allowed; section 10
|
177 |
+
makes it unnecessary.
|
178 |
+
|
179 |
+
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
180 |
+
|
181 |
+
No covered work shall be deemed part of an effective technological
|
182 |
+
measure under any applicable law fulfilling obligations under article
|
183 |
+
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
184 |
+
similar laws prohibiting or restricting circumvention of such
|
185 |
+
measures.
|
186 |
+
|
187 |
+
When you convey a covered work, you waive any legal power to forbid
|
188 |
+
circumvention of technological measures to the extent such circumvention
|
189 |
+
is effected by exercising rights under this License with respect to
|
190 |
+
the covered work, and you disclaim any intention to limit operation or
|
191 |
+
modification of the work as a means of enforcing, against the work's
|
192 |
+
users, your or third parties' legal rights to forbid circumvention of
|
193 |
+
technological measures.
|
194 |
+
|
195 |
+
4. Conveying Verbatim Copies.
|
196 |
+
|
197 |
+
You may convey verbatim copies of the Program's source code as you
|
198 |
+
receive it, in any medium, provided that you conspicuously and
|
199 |
+
appropriately publish on each copy an appropriate copyright notice;
|
200 |
+
keep intact all notices stating that this License and any
|
201 |
+
non-permissive terms added in accord with section 7 apply to the code;
|
202 |
+
keep intact all notices of the absence of any warranty; and give all
|
203 |
+
recipients a copy of this License along with the Program.
|
204 |
+
|
205 |
+
You may charge any price or no price for each copy that you convey,
|
206 |
+
and you may offer support or warranty protection for a fee.
|
207 |
+
|
208 |
+
5. Conveying Modified Source Versions.
|
209 |
+
|
210 |
+
You may convey a work based on the Program, or the modifications to
|
211 |
+
produce it from the Program, in the form of source code under the
|
212 |
+
terms of section 4, provided that you also meet all of these conditions:
|
213 |
+
|
214 |
+
a) The work must carry prominent notices stating that you modified
|
215 |
+
it, and giving a relevant date.
|
216 |
+
|
217 |
+
b) The work must carry prominent notices stating that it is
|
218 |
+
released under this License and any conditions added under section
|
219 |
+
7. This requirement modifies the requirement in section 4 to
|
220 |
+
"keep intact all notices".
|
221 |
+
|
222 |
+
c) You must license the entire work, as a whole, under this
|
223 |
+
License to anyone who comes into possession of a copy. This
|
224 |
+
License will therefore apply, along with any applicable section 7
|
225 |
+
additional terms, to the whole of the work, and all its parts,
|
226 |
+
regardless of how they are packaged. This License gives no
|
227 |
+
permission to license the work in any other way, but it does not
|
228 |
+
invalidate such permission if you have separately received it.
|
229 |
+
|
230 |
+
d) If the work has interactive user interfaces, each must display
|
231 |
+
Appropriate Legal Notices; however, if the Program has interactive
|
232 |
+
interfaces that do not display Appropriate Legal Notices, your
|
233 |
+
work need not make them do so.
|
234 |
+
|
235 |
+
A compilation of a covered work with other separate and independent
|
236 |
+
works, which are not by their nature extensions of the covered work,
|
237 |
+
and which are not combined with it such as to form a larger program,
|
238 |
+
in or on a volume of a storage or distribution medium, is called an
|
239 |
+
"aggregate" if the compilation and its resulting copyright are not
|
240 |
+
used to limit the access or legal rights of the compilation's users
|
241 |
+
beyond what the individual works permit. Inclusion of a covered work
|
242 |
+
in an aggregate does not cause this License to apply to the other
|
243 |
+
parts of the aggregate.
|
244 |
+
|
245 |
+
6. Conveying Non-Source Forms.
|
246 |
+
|
247 |
+
You may convey a covered work in object code form under the terms
|
248 |
+
of sections 4 and 5, provided that you also convey the
|
249 |
+
machine-readable Corresponding Source under the terms of this License,
|
250 |
+
in one of these ways:
|
251 |
+
|
252 |
+
a) Convey the object code in, or embodied in, a physical product
|
253 |
+
(including a physical distribution medium), accompanied by the
|
254 |
+
Corresponding Source fixed on a durable physical medium
|
255 |
+
customarily used for software interchange.
|
256 |
+
|
257 |
+
b) Convey the object code in, or embodied in, a physical product
|
258 |
+
(including a physical distribution medium), accompanied by a
|
259 |
+
written offer, valid for at least three years and valid for as
|
260 |
+
long as you offer spare parts or customer support for that product
|
261 |
+
model, to give anyone who possesses the object code either (1) a
|
262 |
+
copy of the Corresponding Source for all the software in the
|
263 |
+
product that is covered by this License, on a durable physical
|
264 |
+
medium customarily used for software interchange, for a price no
|
265 |
+
more than your reasonable cost of physically performing this
|
266 |
+
conveying of source, or (2) access to copy the
|
267 |
+
Corresponding Source from a network server at no charge.
|
268 |
+
|
269 |
+
c) Convey individual copies of the object code with a copy of the
|
270 |
+
written offer to provide the Corresponding Source. This
|
271 |
+
alternative is allowed only occasionally and noncommercially, and
|
272 |
+
only if you received the object code with such an offer, in accord
|
273 |
+
with subsection 6b.
|
274 |
+
|
275 |
+
d) Convey the object code by offering access from a designated
|
276 |
+
place (gratis or for a charge), and offer equivalent access to the
|
277 |
+
Corresponding Source in the same way through the same place at no
|
278 |
+
further charge. You need not require recipients to copy the
|
279 |
+
Corresponding Source along with the object code. If the place to
|
280 |
+
copy the object code is a network server, the Corresponding Source
|
281 |
+
may be on a different server (operated by you or a third party)
|
282 |
+
that supports equivalent copying facilities, provided you maintain
|
283 |
+
clear directions next to the object code saying where to find the
|
284 |
+
Corresponding Source. Regardless of what server hosts the
|
285 |
+
Corresponding Source, you remain obligated to ensure that it is
|
286 |
+
available for as long as needed to satisfy these requirements.
|
287 |
+
|
288 |
+
e) Convey the object code using peer-to-peer transmission, provided
|
289 |
+
you inform other peers where the object code and Corresponding
|
290 |
+
Source of the work are being offered to the general public at no
|
291 |
+
charge under subsection 6d.
|
292 |
+
|
293 |
+
A separable portion of the object code, whose source code is excluded
|
294 |
+
from the Corresponding Source as a System Library, need not be
|
295 |
+
included in conveying the object code work.
|
296 |
+
|
297 |
+
A "User Product" is either (1) a "consumer product", which means any
|
298 |
+
tangible personal property which is normally used for personal, family,
|
299 |
+
or household purposes, or (2) anything designed or sold for incorporation
|
300 |
+
into a dwelling. In determining whether a product is a consumer product,
|
301 |
+
doubtful cases shall be resolved in favor of coverage. For a particular
|
302 |
+
product received by a particular user, "normally used" refers to a
|
303 |
+
typical or common use of that class of product, regardless of the status
|
304 |
+
of the particular user or of the way in which the particular user
|
305 |
+
actually uses, or expects or is expected to use, the product. A product
|
306 |
+
is a consumer product regardless of whether the product has substantial
|
307 |
+
commercial, industrial or non-consumer uses, unless such uses represent
|
308 |
+
the only significant mode of use of the product.
|
309 |
+
|
310 |
+
"Installation Information" for a User Product means any methods,
|
311 |
+
procedures, authorization keys, or other information required to install
|
312 |
+
and execute modified versions of a covered work in that User Product from
|
313 |
+
a modified version of its Corresponding Source. The information must
|
314 |
+
suffice to ensure that the continued functioning of the modified object
|
315 |
+
code is in no case prevented or interfered with solely because
|
316 |
+
modification has been made.
|
317 |
+
|
318 |
+
If you convey an object code work under this section in, or with, or
|
319 |
+
specifically for use in, a User Product, and the conveying occurs as
|
320 |
+
part of a transaction in which the right of possession and use of the
|
321 |
+
User Product is transferred to the recipient in perpetuity or for a
|
322 |
+
fixed term (regardless of how the transaction is characterized), the
|
323 |
+
Corresponding Source conveyed under this section must be accompanied
|
324 |
+
by the Installation Information. But this requirement does not apply
|
325 |
+
if neither you nor any third party retains the ability to install
|
326 |
+
modified object code on the User Product (for example, the work has
|
327 |
+
been installed in ROM).
|
328 |
+
|
329 |
+
The requirement to provide Installation Information does not include a
|
330 |
+
requirement to continue to provide support service, warranty, or updates
|
331 |
+
for a work that has been modified or installed by the recipient, or for
|
332 |
+
the User Product in which it has been modified or installed. Access to a
|
333 |
+
network may be denied when the modification itself materially and
|
334 |
+
adversely affects the operation of the network or violates the rules and
|
335 |
+
protocols for communication across the network.
|
336 |
+
|
337 |
+
Corresponding Source conveyed, and Installation Information provided,
|
338 |
+
in accord with this section must be in a format that is publicly
|
339 |
+
documented (and with an implementation available to the public in
|
340 |
+
source code form), and must require no special password or key for
|
341 |
+
unpacking, reading or copying.
|
342 |
+
|
343 |
+
7. Additional Terms.
|
344 |
+
|
345 |
+
"Additional permissions" are terms that supplement the terms of this
|
346 |
+
License by making exceptions from one or more of its conditions.
|
347 |
+
Additional permissions that are applicable to the entire Program shall
|
348 |
+
be treated as though they were included in this License, to the extent
|
349 |
+
that they are valid under applicable law. If additional permissions
|
350 |
+
apply only to part of the Program, that part may be used separately
|
351 |
+
under those permissions, but the entire Program remains governed by
|
352 |
+
this License without regard to the additional permissions.
|
353 |
+
|
354 |
+
When you convey a copy of a covered work, you may at your option
|
355 |
+
remove any additional permissions from that copy, or from any part of
|
356 |
+
it. (Additional permissions may be written to require their own
|
357 |
+
removal in certain cases when you modify the work.) You may place
|
358 |
+
additional permissions on material, added by you to a covered work,
|
359 |
+
for which you have or can give appropriate copyright permission.
|
360 |
+
|
361 |
+
Notwithstanding any other provision of this License, for material you
|
362 |
+
add to a covered work, you may (if authorized by the copyright holders of
|
363 |
+
that material) supplement the terms of this License with terms:
|
364 |
+
|
365 |
+
a) Disclaiming warranty or limiting liability differently from the
|
366 |
+
terms of sections 15 and 16 of this License; or
|
367 |
+
|
368 |
+
b) Requiring preservation of specified reasonable legal notices or
|
369 |
+
author attributions in that material or in the Appropriate Legal
|
370 |
+
Notices displayed by works containing it; or
|
371 |
+
|
372 |
+
c) Prohibiting misrepresentation of the origin of that material, or
|
373 |
+
requiring that modified versions of such material be marked in
|
374 |
+
reasonable ways as different from the original version; or
|
375 |
+
|
376 |
+
d) Limiting the use for publicity purposes of names of licensors or
|
377 |
+
authors of the material; or
|
378 |
+
|
379 |
+
e) Declining to grant rights under trademark law for use of some
|
380 |
+
trade names, trademarks, or service marks; or
|
381 |
+
|
382 |
+
f) Requiring indemnification of licensors and authors of that
|
383 |
+
material by anyone who conveys the material (or modified versions of
|
384 |
+
it) with contractual assumptions of liability to the recipient, for
|
385 |
+
any liability that these contractual assumptions directly impose on
|
386 |
+
those licensors and authors.
|
387 |
+
|
388 |
+
All other non-permissive additional terms are considered "further
|
389 |
+
restrictions" within the meaning of section 10. If the Program as you
|
390 |
+
received it, or any part of it, contains a notice stating that it is
|
391 |
+
governed by this License along with a term that is a further
|
392 |
+
restriction, you may remove that term. If a license document contains
|
393 |
+
a further restriction but permits relicensing or conveying under this
|
394 |
+
License, you may add to a covered work material governed by the terms
|
395 |
+
of that license document, provided that the further restriction does
|
396 |
+
not survive such relicensing or conveying.
|
397 |
+
|
398 |
+
If you add terms to a covered work in accord with this section, you
|
399 |
+
must place, in the relevant source files, a statement of the
|
400 |
+
additional terms that apply to those files, or a notice indicating
|
401 |
+
where to find the applicable terms.
|
402 |
+
|
403 |
+
Additional terms, permissive or non-permissive, may be stated in the
|
404 |
+
form of a separately written license, or stated as exceptions;
|
405 |
+
the above requirements apply either way.
|
406 |
+
|
407 |
+
8. Termination.
|
408 |
+
|
409 |
+
You may not propagate or modify a covered work except as expressly
|
410 |
+
provided under this License. Any attempt otherwise to propagate or
|
411 |
+
modify it is void, and will automatically terminate your rights under
|
412 |
+
this License (including any patent licenses granted under the third
|
413 |
+
paragraph of section 11).
|
414 |
+
|
415 |
+
However, if you cease all violation of this License, then your
|
416 |
+
license from a particular copyright holder is reinstated (a)
|
417 |
+
provisionally, unless and until the copyright holder explicitly and
|
418 |
+
finally terminates your license, and (b) permanently, if the copyright
|
419 |
+
holder fails to notify you of the violation by some reasonable means
|
420 |
+
prior to 60 days after the cessation.
|
421 |
+
|
422 |
+
Moreover, your license from a particular copyright holder is
|
423 |
+
reinstated permanently if the copyright holder notifies you of the
|
424 |
+
violation by some reasonable means, this is the first time you have
|
425 |
+
received notice of violation of this License (for any work) from that
|
426 |
+
copyright holder, and you cure the violation prior to 30 days after
|
427 |
+
your receipt of the notice.
|
428 |
+
|
429 |
+
Termination of your rights under this section does not terminate the
|
430 |
+
licenses of parties who have received copies or rights from you under
|
431 |
+
this License. If your rights have been terminated and not permanently
|
432 |
+
reinstated, you do not qualify to receive new licenses for the same
|
433 |
+
material under section 10.
|
434 |
+
|
435 |
+
9. Acceptance Not Required for Having Copies.
|
436 |
+
|
437 |
+
You are not required to accept this License in order to receive or
|
438 |
+
run a copy of the Program. Ancillary propagation of a covered work
|
439 |
+
occurring solely as a consequence of using peer-to-peer transmission
|
440 |
+
to receive a copy likewise does not require acceptance. However,
|
441 |
+
nothing other than this License grants you permission to propagate or
|
442 |
+
modify any covered work. These actions infringe copyright if you do
|
443 |
+
not accept this License. Therefore, by modifying or propagating a
|
444 |
+
covered work, you indicate your acceptance of this License to do so.
|
445 |
+
|
446 |
+
10. Automatic Licensing of Downstream Recipients.
|
447 |
+
|
448 |
+
Each time you convey a covered work, the recipient automatically
|
449 |
+
receives a license from the original licensors, to run, modify and
|
450 |
+
propagate that work, subject to this License. You are not responsible
|
451 |
+
for enforcing compliance by third parties with this License.
|
452 |
+
|
453 |
+
An "entity transaction" is a transaction transferring control of an
|
454 |
+
organization, or substantially all assets of one, or subdividing an
|
455 |
+
organization, or merging organizations. If propagation of a covered
|
456 |
+
work results from an entity transaction, each party to that
|
457 |
+
transaction who receives a copy of the work also receives whatever
|
458 |
+
licenses to the work the party's predecessor in interest had or could
|
459 |
+
give under the previous paragraph, plus a right to possession of the
|
460 |
+
Corresponding Source of the work from the predecessor in interest, if
|
461 |
+
the predecessor has it or can get it with reasonable efforts.
|
462 |
+
|
463 |
+
You may not impose any further restrictions on the exercise of the
|
464 |
+
rights granted or affirmed under this License. For example, you may
|
465 |
+
not impose a license fee, royalty, or other charge for exercise of
|
466 |
+
rights granted under this License, and you may not initiate litigation
|
467 |
+
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
468 |
+
any patent claim is infringed by making, using, selling, offering for
|
469 |
+
sale, or importing the Program or any portion of it.
|
470 |
+
|
471 |
+
11. Patents.
|
472 |
+
|
473 |
+
A "contributor" is a copyright holder who authorizes use under this
|
474 |
+
License of the Program or a work on which the Program is based. The
|
475 |
+
work thus licensed is called the contributor's "contributor version".
|
476 |
+
|
477 |
+
A contributor's "essential patent claims" are all patent claims
|
478 |
+
owned or controlled by the contributor, whether already acquired or
|
479 |
+
hereafter acquired, that would be infringed by some manner, permitted
|
480 |
+
by this License, of making, using, or selling its contributor version,
|
481 |
+
but do not include claims that would be infringed only as a
|
482 |
+
consequence of further modification of the contributor version. For
|
483 |
+
purposes of this definition, "control" includes the right to grant
|
484 |
+
patent sublicenses in a manner consistent with the requirements of
|
485 |
+
this License.
|
486 |
+
|
487 |
+
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
488 |
+
patent license under the contributor's essential patent claims, to
|
489 |
+
make, use, sell, offer for sale, import and otherwise run, modify and
|
490 |
+
propagate the contents of its contributor version.
|
491 |
+
|
492 |
+
In the following three paragraphs, a "patent license" is any express
|
493 |
+
agreement or commitment, however denominated, not to enforce a patent
|
494 |
+
(such as an express permission to practice a patent or covenant not to
|
495 |
+
sue for patent infringement). To "grant" such a patent license to a
|
496 |
+
party means to make such an agreement or commitment not to enforce a
|
497 |
+
patent against the party.
|
498 |
+
|
499 |
+
If you convey a covered work, knowingly relying on a patent license,
|
500 |
+
and the Corresponding Source of the work is not available for anyone
|
501 |
+
to copy, free of charge and under the terms of this License, through a
|
502 |
+
publicly available network server or other readily accessible means,
|
503 |
+
then you must either (1) cause the Corresponding Source to be so
|
504 |
+
available, or (2) arrange to deprive yourself of the benefit of the
|
505 |
+
patent license for this particular work, or (3) arrange, in a manner
|
506 |
+
consistent with the requirements of this License, to extend the patent
|
507 |
+
license to downstream recipients. "Knowingly relying" means you have
|
508 |
+
actual knowledge that, but for the patent license, your conveying the
|
509 |
+
covered work in a country, or your recipient's use of the covered work
|
510 |
+
in a country, would infringe one or more identifiable patents in that
|
511 |
+
country that you have reason to believe are valid.
|
512 |
+
|
513 |
+
If, pursuant to or in connection with a single transaction or
|
514 |
+
arrangement, you convey, or propagate by procuring conveyance of, a
|
515 |
+
covered work, and grant a patent license to some of the parties
|
516 |
+
receiving the covered work authorizing them to use, propagate, modify
|
517 |
+
or convey a specific copy of the covered work, then the patent license
|
518 |
+
you grant is automatically extended to all recipients of the covered
|
519 |
+
work and works based on it.
|
520 |
+
|
521 |
+
A patent license is "discriminatory" if it does not include within
|
522 |
+
the scope of its coverage, prohibits the exercise of, or is
|
523 |
+
conditioned on the non-exercise of one or more of the rights that are
|
524 |
+
specifically granted under this License. You may not convey a covered
|
525 |
+
work if you are a party to an arrangement with a third party that is
|
526 |
+
in the business of distributing software, under which you make payment
|
527 |
+
to the third party based on the extent of your activity of conveying
|
528 |
+
the work, and under which the third party grants, to any of the
|
529 |
+
parties who would receive the covered work from you, a discriminatory
|
530 |
+
patent license (a) in connection with copies of the covered work
|
531 |
+
conveyed by you (or copies made from those copies), or (b) primarily
|
532 |
+
for and in connection with specific products or compilations that
|
533 |
+
contain the covered work, unless you entered into that arrangement,
|
534 |
+
or that patent license was granted, prior to 28 March 2007.
|
535 |
+
|
536 |
+
Nothing in this License shall be construed as excluding or limiting
|
537 |
+
any implied license or other defenses to infringement that may
|
538 |
+
otherwise be available to you under applicable patent law.
|
539 |
+
|
540 |
+
12. No Surrender of Others' Freedom.
|
541 |
+
|
542 |
+
If conditions are imposed on you (whether by court order, agreement or
|
543 |
+
otherwise) that contradict the conditions of this License, they do not
|
544 |
+
excuse you from the conditions of this License. If you cannot convey a
|
545 |
+
covered work so as to satisfy simultaneously your obligations under this
|
546 |
+
License and any other pertinent obligations, then as a consequence you may
|
547 |
+
not convey it at all. For example, if you agree to terms that obligate you
|
548 |
+
to collect a royalty for further conveying from those to whom you convey
|
549 |
+
the Program, the only way you could satisfy both those terms and this
|
550 |
+
License would be to refrain entirely from conveying the Program.
|
551 |
+
|
552 |
+
13. Use with the GNU Affero General Public License.
|
553 |
+
|
554 |
+
Notwithstanding any other provision of this License, you have
|
555 |
+
permission to link or combine any covered work with a work licensed
|
556 |
+
under version 3 of the GNU Affero General Public License into a single
|
557 |
+
combined work, and to convey the resulting work. The terms of this
|
558 |
+
License will continue to apply to the part which is the covered work,
|
559 |
+
but the special requirements of the GNU Affero General Public License,
|
560 |
+
section 13, concerning interaction through a network will apply to the
|
561 |
+
combination as such.
|
562 |
+
|
563 |
+
14. Revised Versions of this License.
|
564 |
+
|
565 |
+
The Free Software Foundation may publish revised and/or new versions of
|
566 |
+
the GNU General Public License from time to time. Such new versions will
|
567 |
+
be similar in spirit to the present version, but may differ in detail to
|
568 |
+
address new problems or concerns.
|
569 |
+
|
570 |
+
Each version is given a distinguishing version number. If the
|
571 |
+
Program specifies that a certain numbered version of the GNU General
|
572 |
+
Public License "or any later version" applies to it, you have the
|
573 |
+
option of following the terms and conditions either of that numbered
|
574 |
+
version or of any later version published by the Free Software
|
575 |
+
Foundation. If the Program does not specify a version number of the
|
576 |
+
GNU General Public License, you may choose any version ever published
|
577 |
+
by the Free Software Foundation.
|
578 |
+
|
579 |
+
If the Program specifies that a proxy can decide which future
|
580 |
+
versions of the GNU General Public License can be used, that proxy's
|
581 |
+
public statement of acceptance of a version permanently authorizes you
|
582 |
+
to choose that version for the Program.
|
583 |
+
|
584 |
+
Later license versions may give you additional or different
|
585 |
+
permissions. However, no additional obligations are imposed on any
|
586 |
+
author or copyright holder as a result of your choosing to follow a
|
587 |
+
later version.
|
588 |
+
|
589 |
+
15. Disclaimer of Warranty.
|
590 |
+
|
591 |
+
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
592 |
+
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
593 |
+
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
594 |
+
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
595 |
+
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
596 |
+
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
597 |
+
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
598 |
+
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
599 |
+
|
600 |
+
16. Limitation of Liability.
|
601 |
+
|
602 |
+
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
603 |
+
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
604 |
+
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
605 |
+
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
606 |
+
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
607 |
+
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
608 |
+
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
609 |
+
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
610 |
+
SUCH DAMAGES.
|
611 |
+
|
612 |
+
17. Interpretation of Sections 15 and 16.
|
613 |
+
|
614 |
+
If the disclaimer of warranty and limitation of liability provided
|
615 |
+
above cannot be given local legal effect according to their terms,
|
616 |
+
reviewing courts shall apply local law that most closely approximates
|
617 |
+
an absolute waiver of all civil liability in connection with the
|
618 |
+
Program, unless a warranty or assumption of liability accompanies a
|
619 |
+
copy of the Program in return for a fee.
|
620 |
+
|
621 |
+
END OF TERMS AND CONDITIONS
|
622 |
+
|
623 |
+
How to Apply These Terms to Your New Programs
|
624 |
+
|
625 |
+
If you develop a new program, and you want it to be of the greatest
|
626 |
+
possible use to the public, the best way to achieve this is to make it
|
627 |
+
free software which everyone can redistribute and change under these terms.
|
628 |
+
|
629 |
+
To do so, attach the following notices to the program. It is safest
|
630 |
+
to attach them to the start of each source file to most effectively
|
631 |
+
state the exclusion of warranty; and each file should have at least
|
632 |
+
the "copyright" line and a pointer to where the full notice is found.
|
633 |
+
|
634 |
+
<one line to give the program's name and a brief idea of what it does.>
|
635 |
+
Copyright (C) <year> <name of author>
|
636 |
+
|
637 |
+
This program is free software: you can redistribute it and/or modify
|
638 |
+
it under the terms of the GNU General Public License as published by
|
639 |
+
the Free Software Foundation, either version 3 of the License, or
|
640 |
+
(at your option) any later version.
|
641 |
+
|
642 |
+
This program is distributed in the hope that it will be useful,
|
643 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
644 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
645 |
+
GNU General Public License for more details.
|
646 |
+
|
647 |
+
You should have received a copy of the GNU General Public License
|
648 |
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
649 |
+
|
650 |
+
Also add information on how to contact you by electronic and paper mail.
|
651 |
+
|
652 |
+
If the program does terminal interaction, make it output a short
|
653 |
+
notice like this when it starts in an interactive mode:
|
654 |
+
|
655 |
+
<program> Copyright (C) <year> <name of author>
|
656 |
+
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
657 |
+
This is free software, and you are welcome to redistribute it
|
658 |
+
under certain conditions; type `show c' for details.
|
659 |
+
|
660 |
+
The hypothetical commands `show w' and `show c' should show the appropriate
|
661 |
+
parts of the General Public License. Of course, your program's commands
|
662 |
+
might be different; for a GUI interface, you would use an "about box".
|
663 |
+
|
664 |
+
You should also get your employer (if you work as a programmer) or school,
|
665 |
+
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
666 |
+
For more information on this, and how to apply and follow the GNU GPL, see
|
667 |
+
<http://www.gnu.org/licenses/>.
|
668 |
+
|
669 |
+
The GNU General Public License does not permit incorporating your program
|
670 |
+
into proprietary programs. If your program is a subroutine library, you
|
671 |
+
may consider it more useful to permit linking proprietary applications with
|
672 |
+
the library. If this is what you want to do, use the GNU Lesser General
|
673 |
+
Public License instead of this License. But first, please read
|
674 |
+
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
README.txt
ADDED
@@ -0,0 +1,200 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== Better Search Replace ===
|
2 |
+
Contributors: deliciousbrains, mattshaw
|
3 |
+
Tags: search replace, search and replace, update urls, database, search replace database, update database urls, update live url, better search replace, search&replace
|
4 |
+
Requires at least: 3.0.1
|
5 |
+
Tested up to: 5.9
|
6 |
+
Stable tag: trunk
|
7 |
+
License: GPLv3 or later
|
8 |
+
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
+
|
10 |
+
A simple plugin to update URLs or other text in a database.
|
11 |
+
|
12 |
+
== Description ==
|
13 |
+
|
14 |
+
When moving your WordPress site to a new domain or server, you will likely run into a need to run a search/replace on the database for everything to work correctly. Fortunately, there are several plugins available for this task, however, all have a different approach to a few key features. This plugin consolidates the best features from these plugins, incorporating the following features in one simple plugin:
|
15 |
+
|
16 |
+
* Serialization support for all tables
|
17 |
+
* The ability to select specific tables
|
18 |
+
* The ability to run a "dry run" to see how many fields will be updated
|
19 |
+
* No server requirements aside from a running installation of WordPress
|
20 |
+
* WordPress Multisite support
|
21 |
+
|
22 |
+
> **Time-saving features available in the Pro version:**
|
23 |
+
>
|
24 |
+
> * View exactly what changed during a search/replace
|
25 |
+
> * Backup and import the database while running a search/replace
|
26 |
+
> * Priority email support from the developer of the plugin
|
27 |
+
> * Save or load custom profiles for quickly repeating a search/replace in the future
|
28 |
+
> * Support and updates for 1 year
|
29 |
+
>
|
30 |
+
> **[Learn more about Better Search Replace Pro](https://bettersearchreplace.com/)**
|
31 |
+
|
32 |
+
The search and replace functionality is heavily based on interconnect/it's great and open-source Search Replace DB script, modified to use WordPress native database functions to ensure compatibility.
|
33 |
+
|
34 |
+
**Supported Languages**
|
35 |
+
|
36 |
+
* English
|
37 |
+
* French
|
38 |
+
* German
|
39 |
+
* Spanish
|
40 |
+
|
41 |
+
**Want to contribute?**
|
42 |
+
|
43 |
+
Feel free to open an issue or submit a pull request on [GitHub](https://github.com/deliciousbrains/better-search-replace/).
|
44 |
+
|
45 |
+
== Installation ==
|
46 |
+
|
47 |
+
Install Better Search Replace like you would install any other WordPress plugin.
|
48 |
+
|
49 |
+
Dashboard Method:
|
50 |
+
|
51 |
+
1. Login to your WordPress admin and go to Plugins -> Add New
|
52 |
+
2. Type "Better Search Replace" in the search bar and select this plugin
|
53 |
+
3. Click "Install", and then "Activate Plugin"
|
54 |
+
|
55 |
+
|
56 |
+
Upload Method:
|
57 |
+
|
58 |
+
1. Unzip the plugin and upload the "better-search-replace" folder to your 'wp-content/plugins' directory
|
59 |
+
2. Activate the plugin through the Plugins menu in WordPress
|
60 |
+
|
61 |
+
== Frequently Asked Questions ==
|
62 |
+
|
63 |
+
= Using Better Search Replace =
|
64 |
+
|
65 |
+
Once activated, Better Search Replace will add a page under the "Tools" menu page in your WordPress admin.
|
66 |
+
|
67 |
+
= Is my host supported? =
|
68 |
+
|
69 |
+
Yes! This plugin should be compatible with any host.
|
70 |
+
|
71 |
+
= Can I damage my site with this plugin? =
|
72 |
+
|
73 |
+
Yes! Entering a wrong search or replace string could damage your database. Because of this, it is always adviseable to have a backup of your database before using this plugin.
|
74 |
+
|
75 |
+
= How does this work on WordPress Multisite? =
|
76 |
+
|
77 |
+
When running this plugin on a WordPress Multisite installation, it will only be loaded and visible for Network admins. Network admins can go to the dashboard of any subsite to run a search/replace on just the tables for that subsite, or go to the dashboard of the main/base site to run a search/replace on all tables.
|
78 |
+
|
79 |
+
= How can I use this plugin when changing URLs? =
|
80 |
+
|
81 |
+
If you're moving your site from one server to another and changing the URL of your WordPress installation, the approach below allows you to do so easily without affecting the old site:
|
82 |
+
|
83 |
+
1. Backup the database on your current site
|
84 |
+
2. Install the database on your new host
|
85 |
+
3. On the new host, define the new site URL in the `wp-config.php` file, as shown [here](http://codex.wordpress.org/Changing_The_Site_URL#Edit_wp-config.php)
|
86 |
+
4. Log in at your new admin URL and run Better Search Replace on the old site URL for the new site URL
|
87 |
+
5. Delete the site_url constant you added to `wp-config.php`. You may also need to regenerate your .htaccess by going to Settings -> Permalinks and saving the settings.
|
88 |
+
|
89 |
+
More information on moving WordPress can be found [here](http://codex.wordpress.org/Moving_WordPress).
|
90 |
+
|
91 |
+
== Screenshots ==
|
92 |
+
|
93 |
+
1. The Better Search Replace page added to the "Tools" menu
|
94 |
+
2. After running a search/replace dry-run.
|
95 |
+
|
96 |
+
== Changelog ==
|
97 |
+
|
98 |
+
= 1.3.4 - December 7, 2020 =
|
99 |
+
* Improvement: WordPress 5.6 and PHP 8 compatible
|
100 |
+
* Fix: Strings that have been serialized twice showing up as false-positives
|
101 |
+
|
102 |
+
= 1.3.3 - February 26, 2019 =
|
103 |
+
* Fix: Some special characters interfering with search/replace
|
104 |
+
* Security: Pass template filenames through `sanitize_file_name()`
|
105 |
+
* Security: Verify nonce when downloading diagnostic info
|
106 |
+
|
107 |
+
= 1.3.2 - January 3, 2018 =
|
108 |
+
* Fix: Only one table searched on some environments (props @Ov3rfly)
|
109 |
+
* Tweak: Update text in sidebar
|
110 |
+
|
111 |
+
= 1.3.1 - September 14, 2017 =
|
112 |
+
* Security: Check if data is serialized before unserializing it
|
113 |
+
* Improvement: Increased size of table select
|
114 |
+
|
115 |
+
= 1.3 - November 10, 2016 =
|
116 |
+
* Improvement: Updated sidebar and added pro version discount
|
117 |
+
* Fix: Outdated links to old website
|
118 |
+
* Fix: Prevent requests to invalid tabs
|
119 |
+
|
120 |
+
= 1.2.10 - June 2, 2016 =
|
121 |
+
* Fix: CSS not loaded on details page
|
122 |
+
|
123 |
+
= 1.2.9 - December 8, 2015 =
|
124 |
+
* Fix: Bug with case-insensitive searches in serialized objects
|
125 |
+
* Fix: Bug with early skip due to lack of primary key
|
126 |
+
|
127 |
+
= 1.2.8 - November 25, 2015 =
|
128 |
+
* Fix: Bug with report details
|
129 |
+
|
130 |
+
= 1.2.7 - November 24, 2015 =
|
131 |
+
* Fix: Untranslateable string
|
132 |
+
* Tweak: Check BSR_PATH instead of ABSPATH to be consistent
|
133 |
+
* Tested with 4.4
|
134 |
+
|
135 |
+
= 1.2.6 =
|
136 |
+
* Removed unused code/small cleanup
|
137 |
+
|
138 |
+
= 1.2.5 =
|
139 |
+
* Improved progress bar info and styles
|
140 |
+
* Small cleanup
|
141 |
+
|
142 |
+
= 1.2.4 =
|
143 |
+
* Added "Settings saved" notice when saving settings
|
144 |
+
* Fixed bug with wp_magic_quotes interfering with some search strings
|
145 |
+
|
146 |
+
= 1.2.3 =
|
147 |
+
* Fixed bug with searching for backslashes
|
148 |
+
* Fixed potential bug with getting tables in large multisites
|
149 |
+
* Fixed potential notice in append_report
|
150 |
+
* Improved handling of missing primary keys
|
151 |
+
|
152 |
+
= 1.2.2 =
|
153 |
+
* Fixed AJAX conflict with WooCommerce
|
154 |
+
* Fixed a few issues with translations
|
155 |
+
* Tweaked "System Info" to use get_locale() instead of WP_LANG constant
|
156 |
+
* Updated German translation (props @Linus Ziegenhagen)
|
157 |
+
|
158 |
+
= 1.2.1 =
|
159 |
+
* Fixed minor issue with display of progress bar
|
160 |
+
* Updated translation file
|
161 |
+
|
162 |
+
= 1.2 =
|
163 |
+
* Switched to AJAX bulk processing for search/replaces
|
164 |
+
* Decreased minimum "Max Page Size" to 1000
|
165 |
+
* Added "Help" tab with system info for easier troubleshooting
|
166 |
+
|
167 |
+
= 1.1.1 =
|
168 |
+
* Added ability to change max page size
|
169 |
+
* Decreased default page size to prevent white screen issue on some environments
|
170 |
+
|
171 |
+
= 1.1 =
|
172 |
+
* Added ability to change capability required to use plugin
|
173 |
+
* Small bugfixes and translation fixes
|
174 |
+
|
175 |
+
= 1.0.6 =
|
176 |
+
* Added table sizes to the database table listing
|
177 |
+
* Added French translation (props @Jean Philippe)
|
178 |
+
|
179 |
+
= 1.0.5 =
|
180 |
+
* Added support for case-insensitive searches
|
181 |
+
* Added German translation (props @Linus Ziegenhagen)
|
182 |
+
|
183 |
+
= 1.0.4 =
|
184 |
+
* Potential security fixes
|
185 |
+
|
186 |
+
= 1.0.3 =
|
187 |
+
* Fixed issue with searching for special characters like '\'
|
188 |
+
* Fixed bug with replacing some objects
|
189 |
+
|
190 |
+
= 1.0.2 =
|
191 |
+
* Fixed untranslateable strings on submit button and submenu page.
|
192 |
+
|
193 |
+
= 1.0.1 =
|
194 |
+
* Fixed issue with loading translations and added Spanish translation (props Eduardo Larequi)
|
195 |
+
* Fixed bug with reporting timing
|
196 |
+
* Updated to use "Dry Run" as default
|
197 |
+
* Added support for WordPress Multisite (see FAQs for more info)
|
198 |
+
|
199 |
+
= 1.0 =
|
200 |
+
* Initial release
|
assets/css/better-search-replace.css
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* better-search-replace.css
|
3 |
+
*
|
4 |
+
* Custom CSS for the Better Search Replace administration page.
|
5 |
+
*/
|
6 |
+
|
7 |
+
#bsr-results-table th { font-weight: bold; }
|
8 |
+
#bsr-results-table tbody tr:nth-child(odd) { background-color: #F9F9F9; }
|
9 |
+
.bsr-second, .bsr-third, .bsr-fourth { text-align: center !important; }
|
10 |
+
#bsr-details-view { table-layout: fixed; }
|
11 |
+
.bsr-old-val { background-color: #fdd; }
|
12 |
+
.bsr-new-val { background-color: #cfc; }
|
13 |
+
.bsr-change { width: 400px !important; }
|
14 |
+
.bsr-slider { width: 23em; }
|
15 |
+
.bsr-progress-wrap { width: 95%; height: 12px; background-color: #e4e4e4; }
|
16 |
+
.bsr-progress { width: 0%; height: 100%; background-color: #0073aa; }
|
17 |
+
#bsr-search-replace-wrap { margin-top: 10px; }
|
18 |
+
.bsr-description { display: block; margin-top: 6px !important; color: #444 !important; }
|
19 |
+
#bsr-nav-tab-wrapper { margin-top: 0 !important; padding: 0 0 0 10px !important; font-size: 23px !important; }
|
20 |
+
#bsr-help-heading { font-size: 1.3em !important; padding: 0 !important; }
|
21 |
+
.bsr-processing-wrap { background: #fff; padding: 16px 16px 32px; overflow: auto; border-top: 1px solid #eae9e9; margin: 20px -12px -12px -12px; }
|
22 |
+
.bsr-spinner { margin: -3px 0 0 0; }
|
23 |
+
#select_tables { width: 357px; height: 150px; }
|
24 |
+
#bsr-main { width: 800px; min-height: 872px; position: relative; padding-top: 10px; }
|
25 |
+
#bsr-sidebar-wrap { width: 292px; position: absolute; right: -312px; }
|
26 |
+
#bsr-upgrade { background-color: #23282d; padding: 30px; }
|
27 |
+
#bsr-upgrade-form .interesting { color: #666; }
|
28 |
+
#bsr-upgrade a { display: block; width: 100%; height: 100%; text-decoration: none; color: #fff; }
|
29 |
+
#bsr-upgrade img { width: 110px; height: auto; display: block; margin: 0 auto; }
|
30 |
+
#bsr-upgrade h1 { font-size: 30px; font-weight: bold; color: #fff; text-align: center; }
|
31 |
+
#bsr-upgrade ul { font-size: 16px; margin-left: 30px; }
|
32 |
+
#bsr-upgrade ul li { margin: 5px 0 10px 0; }
|
33 |
+
#bsr-upgrade ul li span { margin-left: -31px; font-size: 26px; margin-right: 6px; }
|
34 |
+
#bsr-upgrade-form { background-color: #fff; padding: 20px; }
|
35 |
+
#bsr-upgrade-form h1 { margin-top: 0; padding: 0; font-weight: bold; color: #444; }
|
36 |
+
#bsr-upgrade-form input[type="text"], input[type="email"] { width: 90%; margin-bottom: 10px; }
|
37 |
+
#bsr-upgrade-form .promise { color: #a5a5a5; }
|
38 |
+
.bsr-stars { width: 100px; margin: 15px auto 0 auto; color: #444; }
|
39 |
+
.bsr-review-details h3 { font-size: 22px; font-weight: normal; text-align: center; margin-bottom: 15px; color: #444; }
|
40 |
+
.bsr-review-details a { color: #666; text-decoration: none; }
|
41 |
+
.bsr-review-avatar { border-radius: 90%; width: 65px; height: auto; float: left; margin-right: 15px; margin-left: 50px; }
|
42 |
+
.bsr-review-author { display: block; padding-top: 12px; }
|
43 |
+
#bsr-tabs { width: 100%; min-width: 463px; float: left; margin-bottom: 20px; }
|
44 |
+
#bsr-table-select { width:25em; height: 180px; }
|
assets/css/images/ui-bg_diagonals-thick_18_b81900_40x40.png
ADDED
Binary file
|
assets/css/images/ui-bg_diagonals-thick_20_666666_40x40.png
ADDED
Binary file
|
assets/css/images/ui-bg_flat_10_000000_40x100.png
ADDED
Binary file
|
assets/css/images/ui-bg_glass_100_f6f6f6_1x400.png
ADDED
Binary file
|
assets/css/images/ui-bg_glass_100_fdf5ce_1x400.png
ADDED
Binary file
|
assets/css/images/ui-bg_glass_65_ffffff_1x400.png
ADDED
Binary file
|
assets/css/images/ui-bg_gloss-wave_35_f6a828_500x100.png
ADDED
Binary file
|
assets/css/images/ui-bg_highlight-soft_100_eeeeee_1x100.png
ADDED
Binary file
|
assets/css/images/ui-bg_highlight-soft_75_ffe45c_1x100.png
ADDED
Binary file
|
assets/css/images/ui-icons_222222_256x240.png
ADDED
Binary file
|
assets/css/images/ui-icons_228ef1_256x240.png
ADDED
Binary file
|
assets/css/images/ui-icons_ef8c08_256x240.png
ADDED
Binary file
|
assets/css/images/ui-icons_ffd27a_256x240.png
ADDED
Binary file
|
assets/css/images/ui-icons_ffffff_256x240.png
ADDED
Binary file
|
assets/css/jquery-ui.min.css
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*! jQuery UI - v1.11.4 - 2015-03-11
|
2 |
+
* http://jqueryui.com
|
3 |
+
* Includes: core.css, accordion.css, autocomplete.css, button.css, datepicker.css, dialog.css, draggable.css, menu.css, progressbar.css, resizable.css, selectable.css, selectmenu.css, slider.css, sortable.css, spinner.css, tabs.css, tooltip.css, theme.css
|
4 |
+
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS%2CTahoma%2CVerdana%2CArial%2Csans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=gloss_wave&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=highlight_soft&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=glass&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=glass&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=highlight_soft&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=diagonals_thick&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=diagonals_thick&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=flat&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px
|
5 |
+
* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */
|
6 |
+
|
7 |
+
.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin:2px 0 0 0;padding:.5em .5em .5em .7em;min-height:0;font-size:100%}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:normal}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:45%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-dialog{overflow:hidden;position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:20px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:none;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:12px;height:12px;right:-5px;bottom:-5px;background-position:16px 16px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-draggable-handle{-ms-touch-action:none;touch-action:none}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:none}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{position:relative;margin:0;padding:3px 1em 3px .4em;cursor:pointer;min-height:0;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{background:url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==");height:100%;filter:alpha(opacity=25);opacity:0.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block;-ms-touch-action:none;touch-action:none}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable{-ms-touch-action:none;touch-action:none}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}.ui-selectmenu-menu{padding:0;margin:0;position:absolute;top:0;left:0;display:none}.ui-selectmenu-menu .ui-menu{overflow:auto;overflow-x:hidden;padding-bottom:1px}.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup{font-size:1em;font-weight:bold;line-height:1.5;padding:2px 0.4em;margin:0.5em 0 0 0;height:auto;border:0}.ui-selectmenu-open{display:block}.ui-selectmenu-button{display:inline-block;overflow:hidden;position:relative;text-decoration:none;cursor:pointer}.ui-selectmenu-button span.ui-icon{right:0.5em;left:auto;margin-top:-8px;position:absolute;top:50%}.ui-selectmenu-button span.ui-selectmenu-text{text-align:left;padding:0.4em 2.1em 0.4em 1em;display:block;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default;-ms-touch-action:none;touch-action:none}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:none;background:none;color:inherit;padding:0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:22px}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:none;border-bottom:none;border-right:none}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav .ui-tabs-anchor{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor{cursor:text}.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}body .ui-tooltip{border-width:2px}.ui-widget{font-family:Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #ddd;background:#eee url("images/ui-bg_highlight-soft_100_eeeeee_1x100.png") 50% top repeat-x;color:#333}.ui-widget-content a{color:#333}.ui-widget-header{border:1px solid #e78f08;background:#f6a828 url("images/ui-bg_gloss-wave_35_f6a828_500x100.png") 50% 50% repeat-x;color:#fff;font-weight:bold}.ui-widget-header a{color:#fff}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #ccc;background:#f6f6f6 url("images/ui-bg_glass_100_f6f6f6_1x400.png") 50% 50% repeat-x;font-weight:bold;color:#1c94c4}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#1c94c4;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #fbcb09;background:#fdf5ce url("images/ui-bg_glass_100_fdf5ce_1x400.png") 50% 50% repeat-x;font-weight:bold;color:#c77405}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited{color:#c77405;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #fbd850;background:#fff url("images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x;font-weight:bold;color:#eb8f00}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#eb8f00;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fed22f;background:#ffe45c url("images/ui-bg_highlight-soft_75_ffe45c_1x100.png") 50% top repeat-x;color:#363636}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#b81900 url("images/ui-bg_diagonals-thick_18_b81900_40x40.png") 50% 50% repeat;color:#fff}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#fff}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#fff}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url("images/ui-icons_222222_256x240.png")}.ui-widget-header .ui-icon{background-image:url("images/ui-icons_ffffff_256x240.png")}.ui-state-default .ui-icon{background-image:url("images/ui-icons_ef8c08_256x240.png")}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url("images/ui-icons_ef8c08_256x240.png")}.ui-state-active .ui-icon{background-image:url("images/ui-icons_ef8c08_256x240.png")}.ui-state-highlight .ui-icon{background-image:url("images/ui-icons_228ef1_256x240.png")}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url("images/ui-icons_ffd27a_256x240.png")}.ui-icon-blank{background-position:16px 16px}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:4px}.ui-widget-overlay{background:#666 url("images/ui-bg_diagonals-thick_20_666666_40x40.png") 50% 50% repeat;opacity:.5;filter:Alpha(Opacity=50)}.ui-widget-shadow{margin:-5px 0 0 -5px;padding:5px;background:#000 url("images/ui-bg_flat_10_000000_40x100.png") 50% 50% repeat-x;opacity:.2;filter:Alpha(Opacity=20);border-radius:5px}
|
assets/img/bsr-logo-white.svg
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="utf-8"?>
|
2 |
+
<!-- Generator: Adobe Illustrator 19.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3 |
+
<svg version="1.1" id="Layer_2" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
4 |
+
viewBox="0 0 543.9 465.7" style="enable-background:new 0 0 543.9 465.7;" xml:space="preserve">
|
5 |
+
<style type="text/css">
|
6 |
+
.st0{fill:#FFFFFF;}
|
7 |
+
</style>
|
8 |
+
<g>
|
9 |
+
<polygon class="st0" points="264.2,331.3 301.8,192 278.4,192 240.9,331.3 "/>
|
10 |
+
<polygon class="st0" points="317,324.3 414.9,275.9 414.9,249.4 317,201.4 317,232.5 385.4,262.5 317,293.1 "/>
|
11 |
+
<polygon class="st0" points="227,201.4 129.1,249.8 129.1,276.3 227,324.3 227,293.3 158.6,263.2 227,232.7 "/>
|
12 |
+
<path class="st0" d="M154.5,412c-1.1,7-2.9,13.7-5.5,20h329.7c17.8,0,32.5-14.6,32.5-32.5V52.8c0-11.5-9.4-21-21-21H53.7
|
13 |
+
c-11.5,0-21,9.4-21,21v267.9c6.7-3.1,13.9-5.4,21.4-6.8V100.8h435.7v289c0,12.2-10,22.1-22.1,22.1H154.5z M101,67.9
|
14 |
+
c0,10.1-8.2,18.4-18.4,18.4c-10.1,0-18.4-8.2-18.4-18.4c0-10.1,8.2-18.4,18.4-18.4C92.8,49.6,101,57.8,101,67.9z"/>
|
15 |
+
<path class="st0" d="M0,401.3c0,35.6,28.8,64.4,64.4,64.4c35.6,0,64.4-28.8,64.4-64.4s-28.8-64.4-64.4-64.4
|
16 |
+
C28.8,336.9,0,365.7,0,401.3z"/>
|
17 |
+
</g>
|
18 |
+
<path d="M68.3,366.6c-16.5,0-30.9,14.3-30.9,30.9c0,5.5,1.5,10.6,4.1,15.1l-11.9,12.8c-1.8,1.8-1.8,4.7,0,6.5l4.6,4.6
|
19 |
+
c1.8,1.8,4.1,1.1,5.9-0.7l11.8-12.7c4.5,2.8,9.9,4.3,15.5,4.3c16.5,0,30.9-14.3,30.9-30.9C98.2,380,84.8,366.6,68.3,366.6z
|
20 |
+
M68.3,375.8c11.5,0,20.7,9.3,20.7,20.7c0,11.5-10.2,21.7-21.7,21.7c-11.5,0-20.7-9.3-20.7-20.7C46.6,386,56.8,375.8,68.3,375.8z"/>
|
21 |
+
</svg>
|
assets/img/phil-gravatar.jpeg
ADDED
Binary file
|
assets/img/sidebar-upgrade.png
ADDED
Binary file
|
assets/index.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php // Silence is golden
|
assets/js/better-search-replace.js
ADDED
@@ -0,0 +1,132 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function( $ ) {
|
2 |
+
'use strict';
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Initializes our event handlers.
|
6 |
+
*/
|
7 |
+
function bsr_init() {
|
8 |
+
bsr_search_replace();
|
9 |
+
bsr_update_sliders();
|
10 |
+
}
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Recursive function for performing batch operations.
|
14 |
+
*/
|
15 |
+
function bsr_process_step( action, step, page, data ) {
|
16 |
+
|
17 |
+
$.ajax({
|
18 |
+
type: 'POST',
|
19 |
+
url: bsr_object_vars.endpoint + action,
|
20 |
+
data: {
|
21 |
+
bsr_ajax_nonce : bsr_object_vars.ajax_nonce,
|
22 |
+
action: action,
|
23 |
+
bsr_step: step,
|
24 |
+
bsr_page: page,
|
25 |
+
bsr_data: data
|
26 |
+
},
|
27 |
+
dataType: 'json',
|
28 |
+
success: function( response ) {
|
29 |
+
|
30 |
+
// Maybe display more details.
|
31 |
+
if ( typeof response.message != 'undefined' ) {
|
32 |
+
$('.bsr-description').remove();
|
33 |
+
$('.bsr-progress-wrap').append( '<p class="description bsr-description">' + response.message + '</p>' );
|
34 |
+
}
|
35 |
+
|
36 |
+
if ( 'done' == response.step ) {
|
37 |
+
|
38 |
+
bsr_update_progress_bar( '100%' );
|
39 |
+
|
40 |
+
// Maybe run another action.
|
41 |
+
if ( typeof response.next_action != 'undefined' ) {
|
42 |
+
bsr_update_progress_bar( '0%', 0 );
|
43 |
+
bsr_process_step( response.next_action, 0, 0, response.bsr_data );
|
44 |
+
} else {
|
45 |
+
$('.bsr-processing-wrap').remove();
|
46 |
+
$('.bsr-disabled').removeClass('bsr-disabled button-disabled' );
|
47 |
+
window.location = response.url;
|
48 |
+
}
|
49 |
+
|
50 |
+
} else {
|
51 |
+
bsr_update_progress_bar( response.percentage );
|
52 |
+
bsr_process_step( action, response.step, response.page, response.bsr_data );
|
53 |
+
}
|
54 |
+
|
55 |
+
}
|
56 |
+
}).fail(function (response) {
|
57 |
+
$('.bsr-processing-wrap').remove();
|
58 |
+
$('.bsr-disabled').removeClass('bsr-disabled button-disabled' );
|
59 |
+
$('#bsr-error-wrap').html( '<div class="error"><p>' + bsr_object_vars.unknown + '</p></div>' );
|
60 |
+
if ( window.console && window.console.log ) {
|
61 |
+
console.log(response);
|
62 |
+
}
|
63 |
+
});
|
64 |
+
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Initializes a search/replace.
|
69 |
+
*/
|
70 |
+
function bsr_search_replace() {
|
71 |
+
|
72 |
+
var search_replace_submit = $( '#bsr-submit' );
|
73 |
+
var bsr_error_wrap = $( '#bsr-error-wrap' );
|
74 |
+
search_replace_submit.on( 'click', function( e ) {
|
75 |
+
|
76 |
+
e.preventDefault();
|
77 |
+
|
78 |
+
if ( ! search_replace_submit.hasClass( 'button-disabled' ) ) {
|
79 |
+
|
80 |
+
if ( ! $( '#search_for' ).val() ) {
|
81 |
+
bsr_error_wrap.html( '<div class="error"><p>' + bsr_object_vars.no_search + '</p></div>' );
|
82 |
+
} else if ( ! $( '#bsr-table-select' ).val() ) {
|
83 |
+
bsr_error_wrap.html( '<div class="error"><p>' + bsr_object_vars.no_tables + '</p></div>' );
|
84 |
+
} else {
|
85 |
+
var str = $( '.bsr-action-form' ).serialize();
|
86 |
+
var data = str.replace(/%5C/g, "#BSR_BACKSLASH#" );
|
87 |
+
|
88 |
+
bsr_error_wrap.html('');
|
89 |
+
search_replace_submit.addClass( 'bsr-disabled button-disabled' );
|
90 |
+
$( '#bsr-submit-wrap' ).append('<div class="bsr-processing-wrap"><div class="spinner is-active bsr-spinner"></div><div class="bsr-progress-wrap"><div class="bsr-progress"></div></div></div>');
|
91 |
+
$('.bsr-progress-wrap').append( '<p class="description bsr-description">' + bsr_object_vars.processing + '</p>' );
|
92 |
+
bsr_process_step( 'process_search_replace', 0, 0, data );
|
93 |
+
}
|
94 |
+
|
95 |
+
}
|
96 |
+
|
97 |
+
});
|
98 |
+
|
99 |
+
}
|
100 |
+
|
101 |
+
/**
|
102 |
+
* Updates the progress bar for AJAX bulk actions.
|
103 |
+
*/
|
104 |
+
function bsr_update_progress_bar( percentage, speed ) {
|
105 |
+
if ( typeof speed == 'undefined' ) {
|
106 |
+
speed = 150;
|
107 |
+
}
|
108 |
+
$( '.bsr-progress' ).animate({
|
109 |
+
width: percentage
|
110 |
+
}, speed );
|
111 |
+
}
|
112 |
+
|
113 |
+
/**
|
114 |
+
* Updates the "Max Page Size" slider.
|
115 |
+
*/
|
116 |
+
function bsr_update_sliders( percentage ) {
|
117 |
+
$('#bsr-page-size-slider').slider({
|
118 |
+
value: bsr_object_vars.page_size,
|
119 |
+
range: "min",
|
120 |
+
min: 1000,
|
121 |
+
max: 50000,
|
122 |
+
step: 1000,
|
123 |
+
slide: function( event, ui ) {
|
124 |
+
$('#bsr-page-size-value').text( ui.value );
|
125 |
+
$('#bsr_page_size').val( ui.value );
|
126 |
+
}
|
127 |
+
});
|
128 |
+
}
|
129 |
+
|
130 |
+
bsr_init();
|
131 |
+
|
132 |
+
})( jQuery );
|
assets/js/better-search-replace.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(s){"use strict";function e(e,r){void 0===r&&(r=150),s(".bsr-progress").animate({width:e},r)}var r,a;r=s("#bsr-submit"),a=s("#bsr-error-wrap"),r.on("click",function(i){if(i.preventDefault(),!r.hasClass("button-disabled"))if(s("#search_for").val())if(s("#bsr-table-select").val()){var o=s(".bsr-action-form").serialize(),n=o.replace(/%5C/g,"#BSR_BACKSLASH#");a.html(""),r.addClass("bsr-disabled button-disabled"),s("#bsr-submit-wrap").append('<div class="bsr-processing-wrap"><div class="spinner is-active bsr-spinner"></div><div class="bsr-progress-wrap"><div class="bsr-progress"></div></div></div>'),s(".bsr-progress-wrap").append('<p class="description bsr-description">'+bsr_object_vars.processing+"</p>"),function r(a,i,o,n){s.ajax({type:"POST",url:bsr_object_vars.endpoint+a,data:{bsr_ajax_nonce:bsr_object_vars.ajax_nonce,action:a,bsr_step:i,bsr_page:o,bsr_data:n},dataType:"json",success:function(i){void 0!==i.message&&(s(".bsr-description").remove(),s(".bsr-progress-wrap").append('<p class="description bsr-description">'+i.message+"</p>")),"done"==i.step?(e("100%"),void 0!==i.next_action?(e("0%",0),r(i.next_action,0,0,i.bsr_data)):(s(".bsr-processing-wrap").remove(),s(".bsr-disabled").removeClass("bsr-disabled button-disabled"),window.location=i.url)):(e(i.percentage),r(a,i.step,i.page,i.bsr_data))}}).fail(function(e){s(".bsr-processing-wrap").remove(),s(".bsr-disabled").removeClass("bsr-disabled button-disabled"),s("#bsr-error-wrap").html('<div class="error"><p>'+bsr_object_vars.unknown+"</p></div>"),window.console&&window.console.log&&console.log(e)})}("process_search_replace",0,0,n)}else a.html('<div class="error"><p>'+bsr_object_vars.no_tables+"</p></div>");else a.html('<div class="error"><p>'+bsr_object_vars.no_search+"</p></div>")}),s("#bsr-page-size-slider").slider({value:bsr_object_vars.page_size,range:"min",min:1e3,max:5e4,step:1e3,slide:function(e,r){s("#bsr-page-size-value").text(r.value),s("#bsr_page_size").val(r.value)}})}(jQuery);
|
better-search-replace.php
ADDED
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Better Search Replace
|
4 |
+
*
|
5 |
+
* This plugin improves upon the database search/replace functionality offered
|
6 |
+
* by some other plugins- offering serialization support, the ability to
|
7 |
+
* select specific tables, and the ability to run a dry run.
|
8 |
+
*
|
9 |
+
* @since 1.0.0
|
10 |
+
* @package Better_Search_Replace
|
11 |
+
*
|
12 |
+
* @wordpress-plugin
|
13 |
+
* Plugin Name: Better Search Replace
|
14 |
+
* Plugin URI: https://bettersearchreplace.com
|
15 |
+
* Description: A small plugin for running a search/replace on your WordPress database.
|
16 |
+
* Version: 1.3.4
|
17 |
+
* Author: Delicious Brains
|
18 |
+
* Author URI: https://bettersearchreplace.com
|
19 |
+
* License: GPL-3.0
|
20 |
+
* License URI: http://www.gnu.org/licenses/gpl-3.0.txt
|
21 |
+
* Text Domain: better-search-replace
|
22 |
+
* Domain Path: /languages
|
23 |
+
* Network: true
|
24 |
+
*
|
25 |
+
* This program is free software: you can redistribute it and/or modify
|
26 |
+
* it under the terms of the GNU General Public License as published by
|
27 |
+
* the Free Software Foundation, either version 3 of the License, or
|
28 |
+
* (at your option) any later version.
|
29 |
+
*
|
30 |
+
* This program is distributed in the hope that it will be useful,
|
31 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
32 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
33 |
+
* GNU General Public License for more details.
|
34 |
+
*
|
35 |
+
* You should have received a copy of the GNU General Public License
|
36 |
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
37 |
+
*/
|
38 |
+
|
39 |
+
// If this file was called directly, abort.
|
40 |
+
if ( ! defined( 'WPINC' ) ) {
|
41 |
+
die;
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Begins execution of the plugin.
|
46 |
+
*
|
47 |
+
* Since everything within the plugin is registered via hooks,
|
48 |
+
* then kicking off the plugin from this point in the file does
|
49 |
+
* not affect the page life cycle.
|
50 |
+
*
|
51 |
+
* @since 1.0.0
|
52 |
+
*/
|
53 |
+
function run_better_search_replace() {
|
54 |
+
|
55 |
+
// Allows for overriding the capability required to run the plugin.
|
56 |
+
$cap = apply_filters( 'bsr_capability', 'install_plugins' );
|
57 |
+
|
58 |
+
// Only load for admins.
|
59 |
+
if ( current_user_can( $cap ) ) {
|
60 |
+
|
61 |
+
// Defines the path to the main plugin file.
|
62 |
+
define( 'BSR_FILE', __FILE__ );
|
63 |
+
|
64 |
+
// Defines the path to be used for includes.
|
65 |
+
define( 'BSR_PATH', plugin_dir_path( BSR_FILE ) );
|
66 |
+
|
67 |
+
// Defines the URL to the plugin.
|
68 |
+
define( 'BSR_URL', plugin_dir_url( BSR_FILE ) );
|
69 |
+
|
70 |
+
// Defines the current version of the plugin.
|
71 |
+
define( 'BSR_VERSION', '1.3.4' );
|
72 |
+
|
73 |
+
/**
|
74 |
+
* The core plugin class that is used to define internationalization,
|
75 |
+
* dashboard-specific hooks, and public-facing site hooks.
|
76 |
+
*/
|
77 |
+
require BSR_PATH . 'includes/class-bsr-main.php';
|
78 |
+
$plugin = new Better_Search_Replace();
|
79 |
+
$plugin->run();
|
80 |
+
|
81 |
+
}
|
82 |
+
|
83 |
+
}
|
84 |
+
add_action( 'after_setup_theme', 'run_better_search_replace' );
|
includes/class-bsr-admin.php
ADDED
@@ -0,0 +1,295 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* The dashboard-specific functionality of the plugin.
|
5 |
+
*
|
6 |
+
* Registers styles and scripts, adds the custom administration page,
|
7 |
+
* and processes user input on the "search/replace" form.
|
8 |
+
*
|
9 |
+
* @link https://bettersearchreplace.com
|
10 |
+
* @since 1.0.0
|
11 |
+
*
|
12 |
+
* @package Better_Search_Replace
|
13 |
+
* @subpackage Better_Search_Replace/includes
|
14 |
+
*/
|
15 |
+
|
16 |
+
// Prevent direct access.
|
17 |
+
if ( ! defined( 'BSR_PATH' ) ) exit;
|
18 |
+
|
19 |
+
class BSR_Admin {
|
20 |
+
|
21 |
+
/**
|
22 |
+
* The ID of this plugin.
|
23 |
+
*
|
24 |
+
* @since 1.0.0
|
25 |
+
* @access private
|
26 |
+
* @var string $better_search_replace The ID of this plugin.
|
27 |
+
*/
|
28 |
+
private $better_search_replace;
|
29 |
+
|
30 |
+
/**
|
31 |
+
* The version of this plugin.
|
32 |
+
*
|
33 |
+
* @since 1.0.0
|
34 |
+
* @access private
|
35 |
+
* @var string $version The current version of this plugin.
|
36 |
+
*/
|
37 |
+
private $version;
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Initialize the class and set its properties.
|
41 |
+
*
|
42 |
+
* @since 1.0.0
|
43 |
+
* @var string $better_search_replace The name of this plugin.
|
44 |
+
* @var string $version The version of this plugin.
|
45 |
+
*/
|
46 |
+
public function __construct( $better_search_replace, $version ) {
|
47 |
+
$this->better_search_replace = $better_search_replace;
|
48 |
+
$this->version = $version;
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Register any CSS and JS used by the plugin.
|
53 |
+
* @since 1.0.0
|
54 |
+
* @access public
|
55 |
+
* @param string $hook Used for determining which page(s) to load our scripts.
|
56 |
+
*/
|
57 |
+
public function enqueue_scripts( $hook ) {
|
58 |
+
if ( 'tools_page_better-search-replace' === $hook ) {
|
59 |
+
wp_enqueue_style( 'better-search-replace', BSR_URL . 'assets/css/better-search-replace.css', array(), $this->version, 'all' );
|
60 |
+
wp_enqueue_style( 'jquery-style', BSR_URL . 'assets/css/jquery-ui.min.css', array(), $this->version, 'all' );
|
61 |
+
wp_enqueue_script( 'jquery-ui-slider' );
|
62 |
+
wp_enqueue_script( 'better-search-replace', BSR_URL . 'assets/js/better-search-replace.min.js', array( 'jquery' ), $this->version, true );
|
63 |
+
wp_enqueue_style( 'thickbox' );
|
64 |
+
wp_enqueue_script( 'thickbox' );
|
65 |
+
|
66 |
+
wp_localize_script( 'better-search-replace', 'bsr_object_vars', array(
|
67 |
+
'page_size' => get_option( 'bsr_page_size' ) ? absint( get_option( 'bsr_page_size' ) ) : 20000,
|
68 |
+
'endpoint' => BSR_AJAX::get_endpoint(),
|
69 |
+
'ajax_nonce' => wp_create_nonce( 'bsr_ajax_nonce' ),
|
70 |
+
'no_search' => __( 'No search string was defined, please enter a URL or string to search for.', 'better-search-replace' ),
|
71 |
+
'no_tables' => __( 'Please select the tables that you want to update.', 'better-search-replace' ),
|
72 |
+
'unknown' => __( 'An error occurred processing your request. Try decreasing the "Max Page Size", or contact support.', 'better-search-replace' ),
|
73 |
+
'processing' => __( 'Processing...', 'better-search-replace' )
|
74 |
+
) );
|
75 |
+
}
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Register any menu pages used by the plugin.
|
80 |
+
* @since 1.0.0
|
81 |
+
* @access public
|
82 |
+
*/
|
83 |
+
public function bsr_menu_pages() {
|
84 |
+
$cap = apply_filters( 'bsr_capability', 'install_plugins' );
|
85 |
+
add_submenu_page( 'tools.php', __( 'Better Search Replace', 'better-search-replace' ), __( 'Better Search Replace', 'better-search-replace' ), $cap, 'better-search-replace', array( $this, 'bsr_menu_pages_callback' ) );
|
86 |
+
}
|
87 |
+
|
88 |
+
/**
|
89 |
+
* The callback for creating a new submenu page under the "Tools" menu.
|
90 |
+
* @access public
|
91 |
+
*/
|
92 |
+
public function bsr_menu_pages_callback() {
|
93 |
+
require_once BSR_PATH . 'templates/bsr-dashboard.php';
|
94 |
+
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Renders the result or error onto the better-search-replace admin page.
|
98 |
+
* @access public
|
99 |
+
*/
|
100 |
+
public static function render_result() {
|
101 |
+
|
102 |
+
if ( isset( $_GET['result'] ) && $result = get_transient( 'bsr_results' ) ) {
|
103 |
+
|
104 |
+
if ( isset( $result['dry_run'] ) && $result['dry_run'] === 'on' ) {
|
105 |
+
$msg = sprintf( __( '<p><strong>DRY RUN:</strong> <strong>%d</strong> tables were searched, <strong>%d</strong> cells were found that need to be updated, and <strong>%d</strong> changes were made.</p><p><a href="%s" class="thickbox" title="Dry Run Details">Click here</a> for more details, or use the form below to run the search/replace.</p>', 'better-search-replace' ),
|
106 |
+
$result['tables'],
|
107 |
+
$result['change'],
|
108 |
+
$result['updates'],
|
109 |
+
get_admin_url() . 'admin-post.php?action=bsr_view_details&TB_iframe=true&width=800&height=500'
|
110 |
+
);
|
111 |
+
} else {
|
112 |
+
$msg = sprintf( __( '<p>During the search/replace, <strong>%d</strong> tables were searched, with <strong>%d</strong> cells changed in <strong>%d</strong> updates.</p><p><a href="%s" class="thickbox" title="Search/Replace Details">Click here</a> for more details.</p>', 'better-search-replace' ),
|
113 |
+
$result['tables'],
|
114 |
+
$result['change'],
|
115 |
+
$result['updates'],
|
116 |
+
get_admin_url() . 'admin-post.php?action=bsr_view_details&TB_iframe=true&width=800&height=500'
|
117 |
+
);
|
118 |
+
}
|
119 |
+
|
120 |
+
echo '<div class="updated">' . $msg . '</div>';
|
121 |
+
|
122 |
+
}
|
123 |
+
|
124 |
+
}
|
125 |
+
|
126 |
+
/**
|
127 |
+
* Prefills the given value on the search/replace page (dry run, live run, from profile).
|
128 |
+
* @access public
|
129 |
+
* @param string $value The value to check for.
|
130 |
+
* @param string $type The type of the value we're filling.
|
131 |
+
*/
|
132 |
+
public static function prefill_value( $value, $type = 'text' ) {
|
133 |
+
|
134 |
+
// Grab the correct data to prefill.
|
135 |
+
if ( isset( $_GET['result'] ) && get_transient( 'bsr_results' ) ) {
|
136 |
+
$values = get_transient( 'bsr_results' );
|
137 |
+
} else {
|
138 |
+
$values = array();
|
139 |
+
}
|
140 |
+
|
141 |
+
// Prefill the value.
|
142 |
+
if ( isset( $values[$value] ) ) {
|
143 |
+
|
144 |
+
if ( 'checkbox' === $type && 'on' === $values[$value] ) {
|
145 |
+
echo 'checked';
|
146 |
+
} else {
|
147 |
+
echo str_replace( '#BSR_BACKSLASH#', '\\', esc_attr( htmlentities( $values[$value] ) ) );
|
148 |
+
}
|
149 |
+
|
150 |
+
}
|
151 |
+
|
152 |
+
}
|
153 |
+
|
154 |
+
/**
|
155 |
+
* Loads the tables available to run a search replace, prefilling if already
|
156 |
+
* selected the tables.
|
157 |
+
* @access public
|
158 |
+
*/
|
159 |
+
public static function load_tables() {
|
160 |
+
|
161 |
+
// Get the tables and their sizes.
|
162 |
+
$tables = BSR_DB::get_tables();
|
163 |
+
$sizes = BSR_DB::get_sizes();
|
164 |
+
|
165 |
+
echo '<select id="bsr-table-select" name="select_tables[]" multiple="multiple" style="width:25em;">';
|
166 |
+
|
167 |
+
foreach ( $tables as $table ) {
|
168 |
+
|
169 |
+
// Try to get the size for this specific table.
|
170 |
+
$table_size = isset( $sizes[$table] ) ? $sizes[$table] : '';
|
171 |
+
|
172 |
+
if ( isset( $_GET['result'] ) && get_transient( 'bsr_results' ) ) {
|
173 |
+
|
174 |
+
$result = get_transient( 'bsr_results' );
|
175 |
+
|
176 |
+
if ( isset( $result['table_reports'][$table] ) ) {
|
177 |
+
echo "<option value='$table' selected>$table $table_size</option>";
|
178 |
+
} else {
|
179 |
+
echo "<option value='$table'>$table $table_size</option>";
|
180 |
+
}
|
181 |
+
|
182 |
+
} else {
|
183 |
+
echo "<option value='$table'>$table $table_size</option>";
|
184 |
+
}
|
185 |
+
|
186 |
+
}
|
187 |
+
|
188 |
+
echo '</select>';
|
189 |
+
|
190 |
+
}
|
191 |
+
|
192 |
+
/**
|
193 |
+
* Loads the result details (via Thickbox).
|
194 |
+
* @access public
|
195 |
+
*/
|
196 |
+
public function load_details() {
|
197 |
+
|
198 |
+
if ( get_transient( 'bsr_results' ) ) {
|
199 |
+
$results = get_transient( 'bsr_results' );
|
200 |
+
$min = ( defined( 'SCRIPT_DEBUG' ) && true === SCRIPT_DEBUG ) ? '' : '.min';
|
201 |
+
$bsr_styles = BSR_URL . 'assets/css/better-search-replace.css?v=' . BSR_VERSION;
|
202 |
+
|
203 |
+
?>
|
204 |
+
<link href="<?php echo esc_url( get_admin_url( null, 'css/common' . $min . '.css' ) ); ?>" rel="stylesheet" type="text/css" />
|
205 |
+
<link href="<?php echo esc_url( $bsr_styles ); ?>" rel="stylesheet" type="text/css">
|
206 |
+
|
207 |
+
<div class="container" style="padding:10px;">
|
208 |
+
|
209 |
+
<table id="bsr-results-table" class="widefat">
|
210 |
+
<thead>
|
211 |
+
<tr><th class="bsr-first"><?php _e( 'Table', 'better-search-replace' ); ?></th><th class="bsr-second"><?php _e( 'Changes Found', 'better-search-replace' ); ?></th><th class="bsr-third"><?php _e( 'Rows Updated', 'better-search-replace' ); ?></th><th class="bsr-fourth"><?php _e( 'Time', 'better-search-replace' ); ?></th></tr>
|
212 |
+
</thead>
|
213 |
+
<tbody>
|
214 |
+
<?php
|
215 |
+
foreach ( $results['table_reports'] as $table_name => $report ) {
|
216 |
+
$time = $report['end'] - $report['start'];
|
217 |
+
|
218 |
+
if ( $report['change'] !== 0 ) {
|
219 |
+
$report['change'] = '<strong>' . $report['change'] . '</strong>';
|
220 |
+
}
|
221 |
+
|
222 |
+
if ( $report['updates'] !== 0 ) {
|
223 |
+
$report['updates'] = '<strong>' . $report['updates'] . '</strong>';
|
224 |
+
}
|
225 |
+
|
226 |
+
printf(
|
227 |
+
'<tr><td class="bsr-first">%s</td><td class="bsr-second">%s</td><td class="bsr-third">%s</td><td class="bsr-fourth">%s %s</td></tr>',
|
228 |
+
$table_name,
|
229 |
+
$report['change'],
|
230 |
+
$report['updates'],
|
231 |
+
round( $time, 3 ),
|
232 |
+
__( 'seconds', 'better-search-replace' )
|
233 |
+
);
|
234 |
+
|
235 |
+
}
|
236 |
+
?>
|
237 |
+
</tbody>
|
238 |
+
</table>
|
239 |
+
|
240 |
+
<p style="text-align:center;"><strong><?php _e( 'Want even more details, easy database migrations, and saved search/replace profiles?', 'better-search-replace' ); ?><br>
|
241 |
+
<a href="https://bettersearchreplace.com/?utm_source=insideplugin&utm_medium=web&utm_content=results-modal&utm_campaign=pro-upsell" target="_blank"><?php _e( 'Learn more about the pro version', 'better-search-replace' ); ?></a></strong></p>
|
242 |
+
|
243 |
+
</div>
|
244 |
+
<?php
|
245 |
+
}
|
246 |
+
}
|
247 |
+
|
248 |
+
/**
|
249 |
+
* Registers our settings in the options table.
|
250 |
+
* @access public
|
251 |
+
*/
|
252 |
+
public function register_option() {
|
253 |
+
register_setting( 'bsr_settings_fields', 'bsr_page_size', 'absint' );
|
254 |
+
}
|
255 |
+
|
256 |
+
/**
|
257 |
+
* Downloads the system info file for support.
|
258 |
+
* @access public
|
259 |
+
*/
|
260 |
+
public function download_sysinfo() {
|
261 |
+
check_admin_referer( 'bsr_download_sysinfo', 'bsr_sysinfo_nonce' );
|
262 |
+
|
263 |
+
$cap = apply_filters( 'bsr_capability', 'install_plugins' );
|
264 |
+
if ( ! current_user_can( $cap ) ) {
|
265 |
+
return;
|
266 |
+
}
|
267 |
+
|
268 |
+
nocache_headers();
|
269 |
+
|
270 |
+
header( 'Content-Type: text/plain' );
|
271 |
+
header( 'Content-Disposition: attachment; filename="bsr-system-info.txt"' );
|
272 |
+
|
273 |
+
echo wp_strip_all_tags( $_POST['bsr-sysinfo'] );
|
274 |
+
die();
|
275 |
+
}
|
276 |
+
|
277 |
+
/**
|
278 |
+
* Displays the link to upgrade to BSR Pro
|
279 |
+
* @access public
|
280 |
+
* @param array $links The links assigned to the plugin.
|
281 |
+
*/
|
282 |
+
public function meta_upgrade_link( $links, $file ) {
|
283 |
+
$plugin = plugin_basename( BSR_FILE );
|
284 |
+
|
285 |
+
if ( $file == $plugin ) {
|
286 |
+
return array_merge(
|
287 |
+
$links,
|
288 |
+
array( '<a href="https://bettersearchreplace.com/?utm_source=insideplugin&utm_medium=web&utm_content=plugins-page&utm_campaign=pro-upsell">' . __( 'Upgrade to Pro', 'better-search-replace' ) . '</a>' )
|
289 |
+
);
|
290 |
+
}
|
291 |
+
|
292 |
+
return $links;
|
293 |
+
}
|
294 |
+
|
295 |
+
}
|
includes/class-bsr-ajax.php
ADDED
@@ -0,0 +1,243 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* AJAX-specific functionality for the plugin.
|
5 |
+
*
|
6 |
+
* @link https://bettersearchreplace.com
|
7 |
+
* @since 1.2
|
8 |
+
*
|
9 |
+
* @package Better_Search_Replace
|
10 |
+
* @subpackage Better_Search_Replace/includes
|
11 |
+
*/
|
12 |
+
|
13 |
+
// Prevent direct access.
|
14 |
+
if ( ! defined( 'BSR_PATH' ) ) exit;
|
15 |
+
|
16 |
+
class BSR_AJAX {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Initiate our custom ajax handlers.
|
20 |
+
* @access public
|
21 |
+
*/
|
22 |
+
public function init() {
|
23 |
+
add_action( 'init', array( $this, 'define_ajax' ), 1 );
|
24 |
+
add_action( 'init', array( $this, 'do_bsr_ajax' ), 2 );
|
25 |
+
$this->add_ajax_actions();
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Gets our custom endpoint.
|
30 |
+
* @access public
|
31 |
+
* @return string
|
32 |
+
*/
|
33 |
+
public static function get_endpoint() {
|
34 |
+
return esc_url_raw( get_admin_url() . 'tools.php?page=better-search-replace&bsr-ajax=' );
|
35 |
+
}
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Set BSR AJAX constant and headers.
|
39 |
+
* @access public
|
40 |
+
*/
|
41 |
+
public function define_ajax() {
|
42 |
+
|
43 |
+
if ( isset( $_GET['bsr-ajax'] ) && ! empty( $_GET['bsr-ajax'] ) ) {
|
44 |
+
|
45 |
+
// Define the WordPress "DOING_AJAX" constant.
|
46 |
+
if ( ! defined( 'DOING_AJAX' ) ) {
|
47 |
+
define( 'DOING_AJAX', true );
|
48 |
+
}
|
49 |
+
|
50 |
+
// Prevent notices from breaking AJAX functionality.
|
51 |
+
if ( ! WP_DEBUG || ( WP_DEBUG && ! WP_DEBUG_DISPLAY ) ) {
|
52 |
+
@ini_set( 'display_errors', 0 );
|
53 |
+
}
|
54 |
+
|
55 |
+
// Send the headers.
|
56 |
+
send_origin_headers();
|
57 |
+
@header( 'Content-Type: text/html; charset=' . get_option( 'blog_charset' ) );
|
58 |
+
@header( 'X-Robots-Tag: noindex' );
|
59 |
+
send_nosniff_header();
|
60 |
+
nocache_headers();
|
61 |
+
|
62 |
+
}
|
63 |
+
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Check if we're doing AJAX and fire the related action.
|
68 |
+
* @access public
|
69 |
+
*/
|
70 |
+
public function do_bsr_ajax() {
|
71 |
+
global $wp_query;
|
72 |
+
|
73 |
+
if ( isset( $_GET['bsr-ajax'] ) && ! empty( $_GET['bsr-ajax'] ) ) {
|
74 |
+
$wp_query->set( 'bsr-ajax', sanitize_text_field( $_GET['bsr-ajax'] ) );
|
75 |
+
}
|
76 |
+
|
77 |
+
if ( $action = $wp_query->get( 'bsr-ajax' ) ) {
|
78 |
+
do_action( 'bsr_ajax_' . sanitize_text_field( $action ) );
|
79 |
+
die();
|
80 |
+
}
|
81 |
+
}
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Adds any AJAX-related actions.
|
85 |
+
* @access public
|
86 |
+
*/
|
87 |
+
public function add_ajax_actions() {
|
88 |
+
$actions = array(
|
89 |
+
'process_search_replace',
|
90 |
+
);
|
91 |
+
|
92 |
+
foreach ( $actions as $action ) {
|
93 |
+
add_action( 'bsr_ajax_' . $action, array( $this, $action ) );
|
94 |
+
}
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Processes the search/replace form submitted by the user.
|
99 |
+
* @access public
|
100 |
+
*/
|
101 |
+
public function process_search_replace() {
|
102 |
+
// Bail if not authorized.
|
103 |
+
if ( ! check_admin_referer( 'bsr_ajax_nonce', 'bsr_ajax_nonce' ) ) {
|
104 |
+
return;
|
105 |
+
}
|
106 |
+
|
107 |
+
// Initialize the DB class.
|
108 |
+
$db = new BSR_DB();
|
109 |
+
$step = isset( $_POST['bsr_step' ] ) ? absint( $_POST['bsr_step'] ) : 0;
|
110 |
+
$page = isset( $_POST['bsr_page'] ) ? absint( $_POST['bsr_page'] ) : 0;
|
111 |
+
|
112 |
+
// Any operations that should only be performed at the beginning.
|
113 |
+
if ( $step === 0 && $page === 0 ) {
|
114 |
+
$args = array();
|
115 |
+
parse_str( $_POST['bsr_data'], $args );
|
116 |
+
|
117 |
+
// Build the arguements for this run.
|
118 |
+
$args = array(
|
119 |
+
'select_tables' => isset( $args['select_tables'] ) ? $args['select_tables'] : array(),
|
120 |
+
'case_insensitive' => isset( $args['case_insensitive'] ) ? $args['case_insensitive'] : 'off',
|
121 |
+
'replace_guids' => isset( $args['replace_guids'] ) ? $args['replace_guids'] : 'off',
|
122 |
+
'dry_run' => isset( $args['dry_run'] ) ? $args['dry_run'] : 'off',
|
123 |
+
'search_for' => isset( $args['search_for'] ) ? stripslashes( $args['search_for'] ) : '',
|
124 |
+
'replace_with' => isset( $args['replace_with'] ) ? stripslashes( $args['replace_with'] ) : '',
|
125 |
+
'completed_pages' => isset( $args['completed_pages'] ) ? absint( $args['completed_pages'] ) : 0,
|
126 |
+
);
|
127 |
+
|
128 |
+
$args['total_pages'] = isset( $args['total_pages'] ) ? absint( $args['total_pages'] ) : $db->get_total_pages( $args['select_tables'] );
|
129 |
+
|
130 |
+
// Clear the results of the last run.
|
131 |
+
delete_transient( 'bsr_results' );
|
132 |
+
delete_option( 'bsr_data' );
|
133 |
+
} else {
|
134 |
+
$args = get_option( 'bsr_data' );
|
135 |
+
}
|
136 |
+
|
137 |
+
// Start processing data.
|
138 |
+
if ( isset( $args['select_tables'][$step] ) ) {
|
139 |
+
|
140 |
+
$result = $db->srdb( $args['select_tables'][$step], $page, $args );
|
141 |
+
$this->append_report( $args['select_tables'][$step], $result['table_report'], $args );
|
142 |
+
|
143 |
+
if ( false === $result['table_complete'] ) {
|
144 |
+
$page++;
|
145 |
+
} else {
|
146 |
+
$step++;
|
147 |
+
$page = 0;
|
148 |
+
}
|
149 |
+
|
150 |
+
// Check if isset() again as the step may have changed since last check.
|
151 |
+
if ( isset( $args['select_tables'][$step] ) ) {
|
152 |
+
$message = sprintf(
|
153 |
+
__( 'Processing table %d of %d: %s', 'better-search-replace' ),
|
154 |
+
$step + 1,
|
155 |
+
count( $args['select_tables'] ),
|
156 |
+
esc_html( $args['select_tables'][$step] )
|
157 |
+
);
|
158 |
+
}
|
159 |
+
|
160 |
+
$args['completed_pages']++;
|
161 |
+
$percentage = $args['completed_pages'] / $args['total_pages'] * 100 . '%';
|
162 |
+
|
163 |
+
} else {
|
164 |
+
$db->maybe_update_site_url();
|
165 |
+
$step = 'done';
|
166 |
+
$percentage = '100%';
|
167 |
+
}
|
168 |
+
|
169 |
+
update_option( 'bsr_data', $args );
|
170 |
+
|
171 |
+
// Store results in an array.
|
172 |
+
$result = array(
|
173 |
+
'step' => $step,
|
174 |
+
'page' => $page,
|
175 |
+
'percentage' => $percentage,
|
176 |
+
'url' => get_admin_url() . 'tools.php?page=better-search-replace&tab=bsr_search_replace&result=true',
|
177 |
+
'bsr_data' => build_query( $args )
|
178 |
+
);
|
179 |
+
|
180 |
+
if ( isset( $message ) ) {
|
181 |
+
$result['message'] = $message;
|
182 |
+
}
|
183 |
+
|
184 |
+
// Send output as JSON for processing via AJAX.
|
185 |
+
echo json_encode( $result );
|
186 |
+
exit;
|
187 |
+
|
188 |
+
}
|
189 |
+
|
190 |
+
/**
|
191 |
+
* Helper function for assembling the BSR Results.
|
192 |
+
* @access public
|
193 |
+
* @param string $table The name of the table to append to.
|
194 |
+
* @param array $report The report for that table.
|
195 |
+
* @param array $args An array of arguements used for this run.
|
196 |
+
* @return boolean
|
197 |
+
*/
|
198 |
+
public function append_report( $table, $report, $args ) {
|
199 |
+
|
200 |
+
// Bail if not authorized.
|
201 |
+
if ( ! check_admin_referer( 'bsr_ajax_nonce', 'bsr_ajax_nonce' ) ) {
|
202 |
+
return;
|
203 |
+
}
|
204 |
+
|
205 |
+
// Retrieve the existing transient.
|
206 |
+
$results = get_transient( 'bsr_results' ) ? get_transient( 'bsr_results') : array();
|
207 |
+
|
208 |
+
// Grab any values from the run args.
|
209 |
+
$results['search_for'] = isset( $args['search_for'] ) ? $args['search_for'] : '';
|
210 |
+
$results['replace_with'] = isset( $args['replace_with'] ) ? $args['replace_with'] : '';
|
211 |
+
$results['dry_run'] = isset( $args['dry_run'] ) ? $args['dry_run'] : 'off';
|
212 |
+
$results['case_insensitive'] = isset( $args['case_insensitive'] ) ? $args['case_insensitive'] : 'off';
|
213 |
+
$results['replace_guids'] = isset( $args['replace_guids'] ) ? $args['replace_guids'] : 'off';
|
214 |
+
|
215 |
+
// Sum the values of the new and existing reports.
|
216 |
+
$results['change'] = isset( $results['change'] ) ? $results['change'] + $report['change'] : $report['change'];
|
217 |
+
$results['updates'] = isset( $results['updates'] ) ? $results['updates'] + $report['updates'] : $report['updates'];
|
218 |
+
|
219 |
+
// Append the table report, or create a new one if necessary.
|
220 |
+
if ( isset( $results['table_reports'] ) && isset( $results['table_reports'][$table] ) ) {
|
221 |
+
$results['table_reports'][$table]['change'] = $results['table_reports'][$table]['change'] + $report['change'];
|
222 |
+
$results['table_reports'][$table]['updates'] = $results['table_reports'][$table]['updates'] + $report['updates'];
|
223 |
+
$results['table_reports'][$table]['end'] = $report['end'];
|
224 |
+
} else {
|
225 |
+
$results['table_reports'][$table] = $report;
|
226 |
+
}
|
227 |
+
|
228 |
+
// Count the number of tables.
|
229 |
+
$results['tables'] = count( $results['table_reports'] );
|
230 |
+
|
231 |
+
// Update the transient.
|
232 |
+
if ( ! set_transient( 'bsr_results', $results, DAY_IN_SECONDS ) ) {
|
233 |
+
return false;
|
234 |
+
}
|
235 |
+
|
236 |
+
return true;
|
237 |
+
|
238 |
+
}
|
239 |
+
|
240 |
+
}
|
241 |
+
|
242 |
+
$bsr_ajax = new BSR_AJAX;
|
243 |
+
$bsr_ajax->init();
|
includes/class-bsr-compatibility.php
ADDED
@@ -0,0 +1,97 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Processes compatibility functionality.
|
5 |
+
* @since 1.0
|
6 |
+
*
|
7 |
+
* @package Better_Search_Replace
|
8 |
+
* @subpackage Better_Search_Replace/includes
|
9 |
+
*/
|
10 |
+
|
11 |
+
// Prevent direct access.
|
12 |
+
if ( ! defined( 'BSR_PATH' ) ) exit;
|
13 |
+
|
14 |
+
class BSR_Compatibility {
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Returns the system info.
|
18 |
+
* @access public
|
19 |
+
* @return string
|
20 |
+
*/
|
21 |
+
public static function get_sysinfo() {
|
22 |
+
|
23 |
+
global $wpdb;
|
24 |
+
|
25 |
+
$return = '### Begin System Info ###' . "\n\n";
|
26 |
+
|
27 |
+
// Basic site info
|
28 |
+
$return .= '-- WordPress Configuration' . "\n\n";
|
29 |
+
$return .= 'Site URL: ' . site_url() . "\n";
|
30 |
+
$return .= 'Home URL: ' . home_url() . "\n";
|
31 |
+
$return .= 'Multisite: ' . ( is_multisite() ? 'Yes' : 'No' ) . "\n";
|
32 |
+
$return .= 'Version: ' . get_bloginfo( 'version' ) . "\n";
|
33 |
+
$return .= 'Language: ' . get_locale() . "\n";
|
34 |
+
$return .= 'Table Prefix: ' . 'Length: ' . strlen( $wpdb->prefix ) . "\n";
|
35 |
+
$return .= 'WP_DEBUG: ' . ( defined( 'WP_DEBUG' ) ? WP_DEBUG ? 'Enabled' : 'Disabled' : 'Not set' ) . "\n";
|
36 |
+
$return .= 'Memory Limit: ' . WP_MEMORY_LIMIT . "\n";
|
37 |
+
|
38 |
+
// Plugin Configuration
|
39 |
+
$return .= "\n" . '-- Better Search Replace Configuration' . "\n\n";
|
40 |
+
$return .= 'Plugin Version: ' . BSR_VERSION . "\n";
|
41 |
+
$db = new BSR_DB();
|
42 |
+
$return .= 'Max Page Size: ' . $db->get_page_size() . "\n";
|
43 |
+
|
44 |
+
// Server Configuration
|
45 |
+
$return .= "\n" . '-- Server Configuration' . "\n\n";
|
46 |
+
$return .= 'Operating System: ' . php_uname( 's' ) . "\n";
|
47 |
+
$return .= 'PHP Version: ' . PHP_VERSION . "\n";
|
48 |
+
$return .= 'MySQL Version: ' . $wpdb->db_version() . "\n";
|
49 |
+
|
50 |
+
$return .= 'Server Software: ' . $_SERVER['SERVER_SOFTWARE'] . "\n";
|
51 |
+
|
52 |
+
// PHP configs... now we're getting to the important stuff
|
53 |
+
$return .= "\n" . '-- PHP Configuration' . "\n\n";
|
54 |
+
$return .= 'Memory Limit: ' . ini_get( 'memory_limit' ) . "\n";
|
55 |
+
$return .= 'Post Max Size: ' . ini_get( 'post_max_size' ) . "\n";
|
56 |
+
$return .= 'Upload Max Filesize: ' . ini_get( 'upload_max_filesize' ) . "\n";
|
57 |
+
$return .= 'Time Limit: ' . ini_get( 'max_execution_time' ) . "\n";
|
58 |
+
$return .= 'Max Input Vars: ' . ini_get( 'max_input_vars' ) . "\n";
|
59 |
+
$return .= 'Display Errors: ' . ( ini_get( 'display_errors' ) ? 'On (' . ini_get( 'display_errors' ) . ')' : 'N/A' ) . "\n";
|
60 |
+
|
61 |
+
// WordPress active plugins
|
62 |
+
$return .= "\n" . '-- WordPress Active Plugins' . "\n\n";
|
63 |
+
$plugins = get_plugins();
|
64 |
+
$active_plugins = get_option( 'active_plugins', array() );
|
65 |
+
foreach( $plugins as $plugin_path => $plugin ) {
|
66 |
+
if( !in_array( $plugin_path, $active_plugins ) )
|
67 |
+
continue;
|
68 |
+
$return .= $plugin['Name'] . ': ' . $plugin['Version'] . "\n";
|
69 |
+
}
|
70 |
+
|
71 |
+
// WordPress inactive plugins
|
72 |
+
$return .= "\n" . '-- WordPress Inactive Plugins' . "\n\n";
|
73 |
+
foreach( $plugins as $plugin_path => $plugin ) {
|
74 |
+
if( in_array( $plugin_path, $active_plugins ) )
|
75 |
+
continue;
|
76 |
+
$return .= $plugin['Name'] . ': ' . $plugin['Version'] . "\n";
|
77 |
+
}
|
78 |
+
|
79 |
+
if( is_multisite() ) {
|
80 |
+
// WordPress Multisite active plugins
|
81 |
+
$return .= "\n" . '-- Network Active Plugins' . "\n\n";
|
82 |
+
$plugins = wp_get_active_network_plugins();
|
83 |
+
$active_plugins = get_site_option( 'active_sitewide_plugins', array() );
|
84 |
+
foreach( $plugins as $plugin_path ) {
|
85 |
+
$plugin_base = plugin_basename( $plugin_path );
|
86 |
+
if( !array_key_exists( $plugin_base, $active_plugins ) )
|
87 |
+
continue;
|
88 |
+
$plugin = get_plugin_data( $plugin_path );
|
89 |
+
$return .= $plugin['Name'] . ': ' . $plugin['Version'] . "\n";
|
90 |
+
}
|
91 |
+
}
|
92 |
+
|
93 |
+
$return .= "\n" . '### End System Info ###';
|
94 |
+
return $return;
|
95 |
+
}
|
96 |
+
|
97 |
+
}
|
includes/class-bsr-db.php
ADDED
@@ -0,0 +1,451 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Processes database-related functionality.
|
5 |
+
* @since 1.0
|
6 |
+
*
|
7 |
+
* @package Better_Search_Replace
|
8 |
+
* @subpackage Better_Search_Replace/includes
|
9 |
+
*/
|
10 |
+
|
11 |
+
// Prevent direct access.
|
12 |
+
if ( ! defined( 'BSR_PATH' ) ) exit;
|
13 |
+
|
14 |
+
class BSR_DB {
|
15 |
+
|
16 |
+
/**
|
17 |
+
* The page size used throughout the plugin.
|
18 |
+
* @var int
|
19 |
+
*/
|
20 |
+
public $page_size;
|
21 |
+
|
22 |
+
/**
|
23 |
+
* The name of the backup file.
|
24 |
+
* @var string
|
25 |
+
*/
|
26 |
+
public $file;
|
27 |
+
|
28 |
+
/**
|
29 |
+
* The WordPress database class.
|
30 |
+
* @var WPDB
|
31 |
+
*/
|
32 |
+
private $wpdb;
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Initializes the class and its properties.
|
36 |
+
* @access public
|
37 |
+
*/
|
38 |
+
public function __construct() {
|
39 |
+
|
40 |
+
global $wpdb;
|
41 |
+
$this->wpdb = $wpdb;
|
42 |
+
|
43 |
+
$this->page_size = $this->get_page_size();
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Returns an array of tables in the database.
|
48 |
+
* @access public
|
49 |
+
* @return array
|
50 |
+
*/
|
51 |
+
public static function get_tables() {
|
52 |
+
global $wpdb;
|
53 |
+
|
54 |
+
if ( function_exists( 'is_multisite' ) && is_multisite() ) {
|
55 |
+
|
56 |
+
if ( is_main_site() ) {
|
57 |
+
$tables = $wpdb->get_col( 'SHOW TABLES' );
|
58 |
+
} else {
|
59 |
+
$blog_id = get_current_blog_id();
|
60 |
+
$tables = $wpdb->get_col( "SHOW TABLES LIKE '" . $wpdb->base_prefix . absint( $blog_id ) . "\_%'" );
|
61 |
+
}
|
62 |
+
|
63 |
+
} else {
|
64 |
+
$tables = $wpdb->get_col( 'SHOW TABLES' );
|
65 |
+
}
|
66 |
+
|
67 |
+
return $tables;
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Returns an array containing the size of each database table.
|
72 |
+
* @access public
|
73 |
+
* @return array
|
74 |
+
*/
|
75 |
+
public static function get_sizes() {
|
76 |
+
global $wpdb;
|
77 |
+
|
78 |
+
$sizes = array();
|
79 |
+
$tables = $wpdb->get_results( 'SHOW TABLE STATUS', ARRAY_A );
|
80 |
+
|
81 |
+
if ( is_array( $tables ) && ! empty( $tables ) ) {
|
82 |
+
|
83 |
+
foreach ( $tables as $table ) {
|
84 |
+
$size = round( $table['Data_length'] / 1024 / 1024, 2 );
|
85 |
+
$sizes[$table['Name']] = sprintf( __( '(%s MB)', 'better-search-replace' ), $size );
|
86 |
+
}
|
87 |
+
|
88 |
+
}
|
89 |
+
|
90 |
+
return $sizes;
|
91 |
+
}
|
92 |
+
|
93 |
+
/**
|
94 |
+
* Returns the current page size.
|
95 |
+
* @access public
|
96 |
+
* @return int
|
97 |
+
*/
|
98 |
+
public function get_page_size() {
|
99 |
+
$page_size = get_option( 'bsr_page_size' ) ? get_option( 'bsr_page_size' ) : 20000;
|
100 |
+
return absint( $page_size );
|
101 |
+
}
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Returns the number of pages in a table.
|
105 |
+
* @access public
|
106 |
+
* @return int
|
107 |
+
*/
|
108 |
+
public function get_pages_in_table( $table ) {
|
109 |
+
$table = esc_sql( $table );
|
110 |
+
$rows = $this->wpdb->get_var( "SELECT COUNT(*) FROM `$table`" );
|
111 |
+
$pages = ceil( $rows / $this->page_size );
|
112 |
+
return absint( $pages );
|
113 |
+
}
|
114 |
+
|
115 |
+
/**
|
116 |
+
* Gets the total number of pages in the DB.
|
117 |
+
* @access public
|
118 |
+
* @return int
|
119 |
+
*/
|
120 |
+
public function get_total_pages( $tables ) {
|
121 |
+
$total_pages = 0;
|
122 |
+
|
123 |
+
foreach ( $tables as $table ) {
|
124 |
+
|
125 |
+
// Get the number of rows & pages in the table.
|
126 |
+
$pages = $this->get_pages_in_table( $table );
|
127 |
+
|
128 |
+
// Always include 1 page in case we have to create schemas, etc.
|
129 |
+
if ( $pages == 0 ) {
|
130 |
+
$pages = 1;
|
131 |
+
}
|
132 |
+
|
133 |
+
$total_pages += $pages;
|
134 |
+
}
|
135 |
+
|
136 |
+
return absint( $total_pages );
|
137 |
+
}
|
138 |
+
|
139 |
+
/**
|
140 |
+
* Gets the columns in a table.
|
141 |
+
* @access public
|
142 |
+
* @param string $table The table to check.
|
143 |
+
* @return array
|
144 |
+
*/
|
145 |
+
public function get_columns( $table ) {
|
146 |
+
$primary_key = null;
|
147 |
+
$columns = array();
|
148 |
+
$fields = $this->wpdb->get_results( 'DESCRIBE ' . $table );
|
149 |
+
|
150 |
+
if ( is_array( $fields ) ) {
|
151 |
+
foreach ( $fields as $column ) {
|
152 |
+
$columns[] = $column->Field;
|
153 |
+
if ( $column->Key == 'PRI' ) {
|
154 |
+
$primary_key = $column->Field;
|
155 |
+
}
|
156 |
+
}
|
157 |
+
}
|
158 |
+
|
159 |
+
return array( $primary_key, $columns );
|
160 |
+
}
|
161 |
+
|
162 |
+
/**
|
163 |
+
* Adapated from interconnect/it's search/replace script.
|
164 |
+
*
|
165 |
+
* Modified to use WordPress wpdb functions instead of PHP's native mysql/pdo functions,
|
166 |
+
* and to be compatible with batch processing via AJAX.
|
167 |
+
*
|
168 |
+
* @link https://interconnectit.com/products/search-and-replace-for-wordpress-databases/
|
169 |
+
*
|
170 |
+
* @access public
|
171 |
+
* @param string $table The table to run the replacement on.
|
172 |
+
* @param int $page The page/block to begin the query on.
|
173 |
+
* @param array $args An associative array containing arguements for this run.
|
174 |
+
* @return array
|
175 |
+
*/
|
176 |
+
public function srdb( $table, $page, $args ) {
|
177 |
+
|
178 |
+
// Load up the default settings for this chunk.
|
179 |
+
$table = esc_sql( $table );
|
180 |
+
$current_page = absint( $page );
|
181 |
+
$pages = $this->get_pages_in_table( $table );
|
182 |
+
$done = false;
|
183 |
+
|
184 |
+
$args['search_for'] = str_replace( '#BSR_BACKSLASH#', '\\', $args['search_for'] );
|
185 |
+
$args['replace_with'] = str_replace( '#BSR_BACKSLASH#', '\\', $args['replace_with'] );
|
186 |
+
|
187 |
+
$table_report = array(
|
188 |
+
'change' => 0,
|
189 |
+
'updates' => 0,
|
190 |
+
'start' => microtime( true ),
|
191 |
+
'end' => microtime( true ),
|
192 |
+
'errors' => array(),
|
193 |
+
'skipped' => false
|
194 |
+
);
|
195 |
+
|
196 |
+
// Get a list of columns in this table.
|
197 |
+
list( $primary_key, $columns ) = $this->get_columns( $table );
|
198 |
+
|
199 |
+
// Bail out early if there isn't a primary key.
|
200 |
+
if ( null === $primary_key ) {
|
201 |
+
$table_report['skipped'] = true;
|
202 |
+
return array( 'table_complete' => true, 'table_report' => $table_report );
|
203 |
+
}
|
204 |
+
|
205 |
+
$current_row = 0;
|
206 |
+
$start = $page * $this->page_size;
|
207 |
+
$end = $this->page_size;
|
208 |
+
|
209 |
+
// Grab the content of the table.
|
210 |
+
$data = $this->wpdb->get_results( "SELECT * FROM `$table` LIMIT $start, $end", ARRAY_A );
|
211 |
+
|
212 |
+
// Loop through the data.
|
213 |
+
foreach ( $data as $row ) {
|
214 |
+
$current_row++;
|
215 |
+
$update_sql = array();
|
216 |
+
$where_sql = array();
|
217 |
+
$upd = false;
|
218 |
+
|
219 |
+
foreach( $columns as $column ) {
|
220 |
+
|
221 |
+
$data_to_fix = $row[ $column ];
|
222 |
+
|
223 |
+
if ( $column == $primary_key ) {
|
224 |
+
$where_sql[] = $column . ' = "' . $this->mysql_escape_mimic( $data_to_fix ) . '"';
|
225 |
+
continue;
|
226 |
+
}
|
227 |
+
|
228 |
+
// Skip GUIDs by default.
|
229 |
+
if ( 'on' !== $args['replace_guids'] && 'guid' == $column ) {
|
230 |
+
continue;
|
231 |
+
}
|
232 |
+
|
233 |
+
if ( $this->wpdb->options === $table ) {
|
234 |
+
|
235 |
+
// Skip any BSR options as they may contain the search field.
|
236 |
+
if ( isset( $should_skip ) && true === $should_skip ) {
|
237 |
+
$should_skip = false;
|
238 |
+
continue;
|
239 |
+
}
|
240 |
+
|
241 |
+
// If the Site URL needs to be updated, let's do that last.
|
242 |
+
if ( isset( $update_later ) && true === $update_later ) {
|
243 |
+
$update_later = false;
|
244 |
+
$edited_data = $this->recursive_unserialize_replace( $args['search_for'], $args['replace_with'], $data_to_fix, false, $args['case_insensitive'] );
|
245 |
+
|
246 |
+
if ( $edited_data != $data_to_fix ) {
|
247 |
+
$table_report['change']++;
|
248 |
+
$table_report['updates']++;
|
249 |
+
update_option( 'bsr_update_site_url', $edited_data );
|
250 |
+
continue;
|
251 |
+
}
|
252 |
+
}
|
253 |
+
|
254 |
+
if ( '_transient_bsr_results' === $data_to_fix || 'bsr_profiles' === $data_to_fix || 'bsr_update_site_url' === $data_to_fix || 'bsr_data' === $data_to_fix ) {
|
255 |
+
$should_skip = true;
|
256 |
+
}
|
257 |
+
|
258 |
+
if ( 'siteurl' === $data_to_fix && $args['dry_run'] !== 'on' ) {
|
259 |
+
$update_later = true;
|
260 |
+
}
|
261 |
+
|
262 |
+
}
|
263 |
+
|
264 |
+
// Run a search replace on the data that'll respect the serialisation.
|
265 |
+
$edited_data = $this->recursive_unserialize_replace( $args['search_for'], $args['replace_with'], $data_to_fix, false, $args['case_insensitive'] );
|
266 |
+
|
267 |
+
// Something was changed
|
268 |
+
if ( $edited_data != $data_to_fix ) {
|
269 |
+
$update_sql[] = $column . ' = "' . $this->mysql_escape_mimic( $edited_data ) . '"';
|
270 |
+
$upd = true;
|
271 |
+
$table_report['change']++;
|
272 |
+
}
|
273 |
+
|
274 |
+
}
|
275 |
+
|
276 |
+
// Determine what to do with updates.
|
277 |
+
if ( $args['dry_run'] === 'on' ) {
|
278 |
+
// Don't do anything if a dry run
|
279 |
+
} elseif ( $upd && ! empty( $where_sql ) ) {
|
280 |
+
// If there are changes to make, run the query.
|
281 |
+
$sql = 'UPDATE ' . $table . ' SET ' . implode( ', ', $update_sql ) . ' WHERE ' . implode( ' AND ', array_filter( $where_sql ) );
|
282 |
+
$result = $this->wpdb->query( $sql );
|
283 |
+
|
284 |
+
if ( ! $result ) {
|
285 |
+
$table_report['errors'][] = sprintf( __( 'Error updating row: %d.', 'better-search-replace' ), $current_row );
|
286 |
+
} else {
|
287 |
+
$table_report['updates']++;
|
288 |
+
}
|
289 |
+
|
290 |
+
}
|
291 |
+
|
292 |
+
} // end row loop
|
293 |
+
|
294 |
+
if ( $current_page >= $pages - 1 ) {
|
295 |
+
$done = true;
|
296 |
+
}
|
297 |
+
|
298 |
+
// Flush the results and return the report.
|
299 |
+
$table_report['end'] = microtime( true );
|
300 |
+
$this->wpdb->flush();
|
301 |
+
return array( 'table_complete' => $done, 'table_report' => $table_report );
|
302 |
+
}
|
303 |
+
|
304 |
+
/**
|
305 |
+
* Adapated from interconnect/it's search/replace script.
|
306 |
+
*
|
307 |
+
* @link https://interconnectit.com/products/search-and-replace-for-wordpress-databases/
|
308 |
+
*
|
309 |
+
* Take a serialised array and unserialise it replacing elements as needed and
|
310 |
+
* unserialising any subordinate arrays and performing the replace on those too.
|
311 |
+
*
|
312 |
+
* @access private
|
313 |
+
* @param string $from String we're looking to replace.
|
314 |
+
* @param string $to What we want it to be replaced with
|
315 |
+
* @param array $data Used to pass any subordinate arrays back to in.
|
316 |
+
* @param boolean $serialised Does the array passed via $data need serialising.
|
317 |
+
* @param sting|boolean $case_insensitive Set to 'on' if we should ignore case, false otherwise.
|
318 |
+
*
|
319 |
+
* @return string|array The original array with all elements replaced as needed.
|
320 |
+
*/
|
321 |
+
public function recursive_unserialize_replace( $from = '', $to = '', $data = '', $serialised = false, $case_insensitive = false ) {
|
322 |
+
try {
|
323 |
+
|
324 |
+
if ( is_string( $data ) && ! is_serialized_string( $data ) && ( $unserialized = $this->unserialize( $data ) ) !== false ) {
|
325 |
+
$data = $this->recursive_unserialize_replace( $from, $to, $unserialized, true, $case_insensitive );
|
326 |
+
}
|
327 |
+
|
328 |
+
elseif ( is_array( $data ) ) {
|
329 |
+
$_tmp = array( );
|
330 |
+
foreach ( $data as $key => $value ) {
|
331 |
+
$_tmp[ $key ] = $this->recursive_unserialize_replace( $from, $to, $value, false, $case_insensitive );
|
332 |
+
}
|
333 |
+
|
334 |
+
$data = $_tmp;
|
335 |
+
unset( $_tmp );
|
336 |
+
}
|
337 |
+
|
338 |
+
// Submitted by Tina Matter
|
339 |
+
elseif ( is_object( $data ) ) {
|
340 |
+
if ('__PHP_Incomplete_Class' !== get_class($data)) {
|
341 |
+
$_tmp = $data;
|
342 |
+
$props = get_object_vars( $data );
|
343 |
+
foreach ( $props as $key => $value ) {
|
344 |
+
$_tmp->$key = $this->recursive_unserialize_replace( $from, $to, $value, false, $case_insensitive );
|
345 |
+
}
|
346 |
+
|
347 |
+
$data = $_tmp;
|
348 |
+
unset( $_tmp );
|
349 |
+
}
|
350 |
+
}
|
351 |
+
|
352 |
+
elseif ( is_serialized_string( $data ) ) {
|
353 |
+
$unserialized = $this->unserialize( $data );
|
354 |
+
|
355 |
+
if ( $unserialized !== false ) {
|
356 |
+
$data = $this->recursive_unserialize_replace( $from, $to, $unserialized, true, $case_insensitive );
|
357 |
+
}
|
358 |
+
}
|
359 |
+
|
360 |
+
else {
|
361 |
+
if ( is_string( $data ) ) {
|
362 |
+
$data = $this->str_replace( $from, $to, $data, $case_insensitive );
|
363 |
+
}
|
364 |
+
}
|
365 |
+
|
366 |
+
if ( $serialised ) {
|
367 |
+
return serialize( $data );
|
368 |
+
}
|
369 |
+
|
370 |
+
} catch( Exception $error ) {
|
371 |
+
|
372 |
+
}
|
373 |
+
|
374 |
+
return $data;
|
375 |
+
}
|
376 |
+
|
377 |
+
/**
|
378 |
+
* Updates the Site URL if necessary.
|
379 |
+
* @access public
|
380 |
+
* @return boolean
|
381 |
+
*/
|
382 |
+
public function maybe_update_site_url() {
|
383 |
+
$option = get_option( 'bsr_update_site_url' );
|
384 |
+
|
385 |
+
if ( $option ) {
|
386 |
+
update_option( 'siteurl', $option );
|
387 |
+
delete_option( 'bsr_update_site_url' );
|
388 |
+
return true;
|
389 |
+
}
|
390 |
+
|
391 |
+
return false;
|
392 |
+
}
|
393 |
+
|
394 |
+
/**
|
395 |
+
* Mimics the mysql_real_escape_string function. Adapted from a post by 'feedr' on php.net.
|
396 |
+
* @link http://php.net/manual/en/function.mysql-real-escape-string.php#101248
|
397 |
+
* @access public
|
398 |
+
* @param string $input The string to escape.
|
399 |
+
* @return string
|
400 |
+
*/
|
401 |
+
public function mysql_escape_mimic( $input ) {
|
402 |
+
if ( is_array( $input ) ) {
|
403 |
+
return array_map( __METHOD__, $input );
|
404 |
+
}
|
405 |
+
if ( ! empty( $input ) && is_string( $input ) ) {
|
406 |
+
return str_replace( array( '\\', "\0", "\n", "\r", "'", '"', "\x1a" ), array( '\\\\', '\\0', '\\n', '\\r', "\\'", '\\"', '\\Z' ), $input );
|
407 |
+
}
|
408 |
+
|
409 |
+
return $input;
|
410 |
+
}
|
411 |
+
|
412 |
+
/**
|
413 |
+
* Return unserialized object or array
|
414 |
+
*
|
415 |
+
* @param string $serialized_string Serialized string.
|
416 |
+
* @param string $method The name of the caller method.
|
417 |
+
*
|
418 |
+
* @return mixed, false on failure
|
419 |
+
*/
|
420 |
+
public static function unserialize( $serialized_string ) {
|
421 |
+
if ( ! is_serialized( $serialized_string ) ) {
|
422 |
+
return false;
|
423 |
+
}
|
424 |
+
|
425 |
+
$serialized_string = trim( $serialized_string );
|
426 |
+
$unserialized_string = @unserialize( $serialized_string );
|
427 |
+
|
428 |
+
return $unserialized_string;
|
429 |
+
}
|
430 |
+
|
431 |
+
/**
|
432 |
+
* Wrapper for str_replace
|
433 |
+
*
|
434 |
+
* @param string $from
|
435 |
+
* @param string $to
|
436 |
+
* @param string $data
|
437 |
+
* @param string|bool $case_insensitive
|
438 |
+
*
|
439 |
+
* @return string
|
440 |
+
*/
|
441 |
+
public function str_replace( $from, $to, $data, $case_insensitive = false ) {
|
442 |
+
if ( 'on' === $case_insensitive ) {
|
443 |
+
$data = str_ireplace( $from, $to, $data );
|
444 |
+
} else {
|
445 |
+
$data = str_replace( $from, $to, $data );
|
446 |
+
}
|
447 |
+
|
448 |
+
return $data;
|
449 |
+
}
|
450 |
+
|
451 |
+
}
|
includes/class-bsr-i18n.php
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Define the internationalization functionality.
|
5 |
+
*
|
6 |
+
* Loads and defines the internationalization files for this plugin
|
7 |
+
* so that it is ready for translation.
|
8 |
+
*
|
9 |
+
* @since 1.0.0
|
10 |
+
* @package Better_Search_Replace
|
11 |
+
* @subpackage Better_Search_Replace/includes
|
12 |
+
*/
|
13 |
+
|
14 |
+
// Prevent direct access.
|
15 |
+
if ( ! defined( 'BSR_PATH' ) ) exit;
|
16 |
+
|
17 |
+
class BSR_i18n {
|
18 |
+
|
19 |
+
/**
|
20 |
+
* The domain specified for this plugin.
|
21 |
+
*
|
22 |
+
* @since 1.0.0
|
23 |
+
* @access private
|
24 |
+
* @var string $domain The domain identifier for this plugin.
|
25 |
+
*/
|
26 |
+
private $domain;
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Load the plugin text domain for translation.
|
30 |
+
*
|
31 |
+
* @since 1.0.0
|
32 |
+
*/
|
33 |
+
public function load_plugin_textdomain() {
|
34 |
+
|
35 |
+
load_plugin_textdomain(
|
36 |
+
$this->domain,
|
37 |
+
false,
|
38 |
+
dirname( dirname( plugin_basename( __FILE__ ) ) ) . '/languages/'
|
39 |
+
);
|
40 |
+
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Set the domain equal to that of the specified domain.
|
45 |
+
*
|
46 |
+
* @since 1.0.0
|
47 |
+
* @param string $domain The domain that represents the locale of this plugin.
|
48 |
+
*/
|
49 |
+
public function set_domain( $domain ) {
|
50 |
+
$this->domain = $domain;
|
51 |
+
$this->load_plugin_textdomain();
|
52 |
+
}
|
53 |
+
|
54 |
+
}
|
includes/class-bsr-loader.php
ADDED
@@ -0,0 +1,131 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Register all actions and filters for the plugin
|
5 |
+
*
|
6 |
+
* @link https://bettersearchreplace.com
|
7 |
+
* @since 1.0.0
|
8 |
+
*
|
9 |
+
* @package Better_Search_Replace
|
10 |
+
* @subpackage Better_Search_Replace/includes
|
11 |
+
*/
|
12 |
+
|
13 |
+
// Prevent direct access.
|
14 |
+
if ( ! defined( 'BSR_PATH' ) ) exit;
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Register all actions and filters for the plugin.
|
18 |
+
*
|
19 |
+
* Maintain a list of all hooks that are registered throughout
|
20 |
+
* the plugin, and register them with the WordPress API. Call the
|
21 |
+
* run function to execute the list of actions and filters.
|
22 |
+
*
|
23 |
+
* @package Better_Search_Replace
|
24 |
+
* @subpackage Better_Search_Replace/includes
|
25 |
+
*/
|
26 |
+
class BSR_Loader {
|
27 |
+
|
28 |
+
/**
|
29 |
+
* The array of actions registered with WordPress.
|
30 |
+
*
|
31 |
+
* @since 1.0.0
|
32 |
+
* @access protected
|
33 |
+
* @var array $actions The actions registered with WordPress to fire when the plugin loads.
|
34 |
+
*/
|
35 |
+
protected $actions;
|
36 |
+
|
37 |
+
/**
|
38 |
+
* The array of filters registered with WordPress.
|
39 |
+
*
|
40 |
+
* @since 1.0.0
|
41 |
+
* @access protected
|
42 |
+
* @var array $filters The filters registered with WordPress to fire when the plugin loads.
|
43 |
+
*/
|
44 |
+
protected $filters;
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Initialize the collections used to maintain the actions and filters.
|
48 |
+
*
|
49 |
+
* @since 1.0.0
|
50 |
+
*/
|
51 |
+
public function __construct() {
|
52 |
+
|
53 |
+
$this->actions = array();
|
54 |
+
$this->filters = array();
|
55 |
+
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Add a new action to the collection to be registered with WordPress.
|
60 |
+
*
|
61 |
+
* @since 1.0.0
|
62 |
+
* @var string $hook The name of the WordPress action that is being registered.
|
63 |
+
* @var object $component A reference to the instance of the object on which the action is defined.
|
64 |
+
* @var string $callback The name of the function definition on the $component.
|
65 |
+
* @var int Optional $priority The priority at which the function should be fired.
|
66 |
+
* @var int Optional $accepted_args The number of arguments that should be passed to the $callback.
|
67 |
+
*/
|
68 |
+
public function add_action( $hook, $component, $callback, $priority = 10, $accepted_args = 1 ) {
|
69 |
+
$this->actions = $this->add( $this->actions, $hook, $component, $callback, $priority, $accepted_args );
|
70 |
+
}
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Add a new filter to the collection to be registered with WordPress.
|
74 |
+
*
|
75 |
+
* @since 1.0.0
|
76 |
+
* @var string $hook The name of the WordPress filter that is being registered.
|
77 |
+
* @var object $component A reference to the instance of the object on which the filter is defined.
|
78 |
+
* @var string $callback The name of the function definition on the $component.
|
79 |
+
* @var int Optional $priority The priority at which the function should be fired.
|
80 |
+
* @var int Optional $accepted_args The number of arguments that should be passed to the $callback.
|
81 |
+
*/
|
82 |
+
public function add_filter( $hook, $component, $callback, $priority = 10, $accepted_args = 1 ) {
|
83 |
+
$this->filters = $this->add( $this->filters, $hook, $component, $callback, $priority, $accepted_args );
|
84 |
+
}
|
85 |
+
|
86 |
+
/**
|
87 |
+
* A utility function that is used to register the actions and hooks into a single
|
88 |
+
* collection.
|
89 |
+
*
|
90 |
+
* @since 1.0.0
|
91 |
+
* @access private
|
92 |
+
* @var array $hooks The collection of hooks that is being registered (that is, actions or filters).
|
93 |
+
* @var string $hook The name of the WordPress filter that is being registered.
|
94 |
+
* @var object $component A reference to the instance of the object on which the filter is defined.
|
95 |
+
* @var string $callback The name of the function definition on the $component.
|
96 |
+
* @var int Optional $priority The priority at which the function should be fired.
|
97 |
+
* @var int Optional $accepted_args The number of arguments that should be passed to the $callback.
|
98 |
+
* @return type The collection of actions and filters registered with WordPress.
|
99 |
+
*/
|
100 |
+
private function add( $hooks, $hook, $component, $callback, $priority, $accepted_args ) {
|
101 |
+
|
102 |
+
$hooks[] = array(
|
103 |
+
'hook' => $hook,
|
104 |
+
'component' => $component,
|
105 |
+
'callback' => $callback,
|
106 |
+
'priority' => $priority,
|
107 |
+
'accepted_args' => $accepted_args
|
108 |
+
);
|
109 |
+
|
110 |
+
return $hooks;
|
111 |
+
|
112 |
+
}
|
113 |
+
|
114 |
+
/**
|
115 |
+
* Register the filters and actions with WordPress.
|
116 |
+
*
|
117 |
+
* @since 1.0.0
|
118 |
+
*/
|
119 |
+
public function run() {
|
120 |
+
|
121 |
+
foreach ( $this->filters as $hook ) {
|
122 |
+
add_filter( $hook['hook'], array( $hook['component'], $hook['callback'] ), $hook['priority'], $hook['accepted_args'] );
|
123 |
+
}
|
124 |
+
|
125 |
+
foreach ( $this->actions as $hook ) {
|
126 |
+
add_action( $hook['hook'], array( $hook['component'], $hook['callback'] ), $hook['priority'], $hook['accepted_args'] );
|
127 |
+
}
|
128 |
+
|
129 |
+
}
|
130 |
+
|
131 |
+
}
|
includes/class-bsr-main.php
ADDED
@@ -0,0 +1,163 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* The core plugin class.
|
5 |
+
*
|
6 |
+
* This is used to define internationalization, dashboard-specific hooks, and
|
7 |
+
* public-facing site hooks.
|
8 |
+
*
|
9 |
+
* Also maintains the unique identifier of this plugin as well as the current
|
10 |
+
* version of the plugin.
|
11 |
+
*
|
12 |
+
* @since 1.0
|
13 |
+
* @package Better_Search_Replace
|
14 |
+
* @subpackage Better_Search_Replace/includes
|
15 |
+
*/
|
16 |
+
|
17 |
+
// Prevent direct access.
|
18 |
+
if ( ! defined( 'BSR_PATH' ) ) exit;
|
19 |
+
|
20 |
+
class Better_Search_Replace {
|
21 |
+
|
22 |
+
/**
|
23 |
+
* The loader that's responsible for maintaining and registering all hooks that power
|
24 |
+
* the plugin.
|
25 |
+
*
|
26 |
+
* @since 1.0
|
27 |
+
* @access protected
|
28 |
+
* @var BSR_Loader $loader Maintains and registers all hooks for the plugin.
|
29 |
+
*/
|
30 |
+
protected $loader;
|
31 |
+
|
32 |
+
/**
|
33 |
+
* The unique identifier of this plugin.
|
34 |
+
*
|
35 |
+
* @since 1.0
|
36 |
+
* @access protected
|
37 |
+
* @var string $plugin_name The string used to uniquely identify this plugin.
|
38 |
+
*/
|
39 |
+
protected $plugin_name;
|
40 |
+
|
41 |
+
/**
|
42 |
+
* The current version of the plugin.
|
43 |
+
*
|
44 |
+
* @since 1.0
|
45 |
+
* @access protected
|
46 |
+
* @var string $version The current version of the plugin.
|
47 |
+
*/
|
48 |
+
protected $version;
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Define the core functionality of the plugin.
|
52 |
+
*
|
53 |
+
* Set the plugin name and the plugin version that can be used throughout the plugin.
|
54 |
+
* Load the dependencies, define the locale, and set the hooks for the Dashboard and
|
55 |
+
* the public-facing side of the site.
|
56 |
+
*
|
57 |
+
* @since 1.0
|
58 |
+
*/
|
59 |
+
public function __construct() {
|
60 |
+
$this->plugin_name = 'better-search-replace';
|
61 |
+
$this->version = BSR_VERSION;
|
62 |
+
$this->load_dependencies();
|
63 |
+
$this->set_locale();
|
64 |
+
$this->define_admin_hooks();
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Load the required dependencies for this plugin.
|
69 |
+
*
|
70 |
+
* Create an instance of the loader which will be used to register the hooks
|
71 |
+
* with WordPress.
|
72 |
+
*
|
73 |
+
* @since 1.0
|
74 |
+
* @access private
|
75 |
+
*/
|
76 |
+
private function load_dependencies() {
|
77 |
+
require_once BSR_PATH . 'includes/class-bsr-loader.php';
|
78 |
+
require_once BSR_PATH . 'includes/class-bsr-i18n.php';
|
79 |
+
require_once BSR_PATH . 'includes/class-bsr-admin.php';
|
80 |
+
require_once BSR_PATH . 'includes/class-bsr-ajax.php';
|
81 |
+
require_once BSR_PATH . 'includes/class-bsr-db.php';
|
82 |
+
require_once BSR_PATH . 'includes/class-bsr-compatibility.php';
|
83 |
+
$this->loader = new BSR_Loader();
|
84 |
+
}
|
85 |
+
|
86 |
+
/**
|
87 |
+
* Define the locale for this plugin for internationalization.
|
88 |
+
*
|
89 |
+
* Uses the BSR_i18n class in order to set the domain and to register the hook
|
90 |
+
* with WordPress.
|
91 |
+
*
|
92 |
+
* @since 1.0
|
93 |
+
* @access private
|
94 |
+
*/
|
95 |
+
private function set_locale() {
|
96 |
+
$plugin_i18n = new BSR_i18n();
|
97 |
+
$plugin_i18n->set_domain( $this->get_plugin_name() );
|
98 |
+
}
|
99 |
+
|
100 |
+
/**
|
101 |
+
* Register all of the hooks related to the dashboard functionality
|
102 |
+
* of the plugin.
|
103 |
+
*
|
104 |
+
* @since 1.0
|
105 |
+
* @access private
|
106 |
+
*/
|
107 |
+
private function define_admin_hooks() {
|
108 |
+
|
109 |
+
// Initialize the admin class.
|
110 |
+
$plugin_admin = new BSR_Admin( $this->get_plugin_name(), $this->get_version() );
|
111 |
+
|
112 |
+
/// Register the admin pages and scripts.
|
113 |
+
$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
|
114 |
+
$this->loader->add_action( 'admin_menu', $plugin_admin, 'bsr_menu_pages' );
|
115 |
+
|
116 |
+
// Other admin actions.
|
117 |
+
$this->loader->add_action( 'admin_init', $plugin_admin, 'register_option' );
|
118 |
+
$this->loader->add_action( 'admin_post_bsr_view_details', $plugin_admin, 'load_details' );
|
119 |
+
$this->loader->add_action( 'admin_post_bsr_download_sysinfo', $plugin_admin, 'download_sysinfo' );
|
120 |
+
$this->loader->add_action( 'plugin_row_meta', $plugin_admin, 'meta_upgrade_link', 10, 2 );
|
121 |
+
}
|
122 |
+
|
123 |
+
/**
|
124 |
+
* Run the loader to execute all of the hooks with WordPress.
|
125 |
+
*
|
126 |
+
* @since 1.0
|
127 |
+
*/
|
128 |
+
public function run() {
|
129 |
+
$this->loader->run();
|
130 |
+
}
|
131 |
+
|
132 |
+
/**
|
133 |
+
* The name of the plugin used to uniquely identify it within the context of
|
134 |
+
* WordPress and to define internationalization functionality.
|
135 |
+
*
|
136 |
+
* @since 1.0
|
137 |
+
* @return string The name of the plugin.
|
138 |
+
*/
|
139 |
+
public function get_plugin_name() {
|
140 |
+
return $this->plugin_name;
|
141 |
+
}
|
142 |
+
|
143 |
+
/**
|
144 |
+
* The reference to the class that orchestrates the hooks with the plugin.
|
145 |
+
*
|
146 |
+
* @since 1.0
|
147 |
+
* @return Better_Search_Replace_Loader Orchestrates the hooks of the plugin.
|
148 |
+
*/
|
149 |
+
public function get_loader() {
|
150 |
+
return $this->loader;
|
151 |
+
}
|
152 |
+
|
153 |
+
/**
|
154 |
+
* Retrieve the version number of the plugin.
|
155 |
+
*
|
156 |
+
* @since 1.0
|
157 |
+
* @return string The version number of the plugin.
|
158 |
+
*/
|
159 |
+
public function get_version() {
|
160 |
+
return $this->version;
|
161 |
+
}
|
162 |
+
|
163 |
+
}
|
includes/index.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php // Silence is golden
|
index.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php // Silence is golden
|
languages/better-search-replace-de_DE.mo
ADDED
Binary file
|
languages/better-search-replace-de_DE.po
ADDED
@@ -0,0 +1,204 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2014
|
2 |
+
# This file is distributed under the same license as the plugin package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: Better Search Replace en español\n"
|
6 |
+
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/better-search-replace\n"
|
7 |
+
"POT-Creation-Date: 2015-09-09 01:51:36+00:00\n"
|
8 |
+
"PO-Revision-Date: 2015-09-10 01:27+0100\n"
|
9 |
+
"Last-Translator: zork media <info@zork-media.de>\n"
|
10 |
+
"Language-Team: PNTE <blogs@educacion.navarra.es>\n"
|
11 |
+
"MIME-Version: 1.0\n"
|
12 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
13 |
+
"Content-Transfer-Encoding: 8bit\n"
|
14 |
+
"Language: es\n"
|
15 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
16 |
+
"X-Generator: Poedit 1.6.3\n"
|
17 |
+
"X-Poedit-Basepath: ..\n"
|
18 |
+
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_ex:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
|
19 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
20 |
+
"X-Poedit-SearchPath-0: .\n"
|
21 |
+
|
22 |
+
#: includes/class-bsr-admin.php:71
|
23 |
+
msgid "No search string was defined, please enter a URL or string to search for."
|
24 |
+
msgstr "Bitte gib ein, wonach die Datenbank durchsucht werden soll (z. B. eine URL)."
|
25 |
+
|
26 |
+
#: includes/class-bsr-admin.php:72
|
27 |
+
msgid "Please select the tables that you want to update."
|
28 |
+
msgstr "Bitte wähle die Tabellen aus, die durchsucht werden sollen."
|
29 |
+
|
30 |
+
#: includes/class-bsr-admin.php:73
|
31 |
+
msgid "An error occurred processing your request. Try decreasing the \"Max Page Size\", or contact support."
|
32 |
+
msgstr "Ein Fehler ist aufgetreten. Versuche entweder die \"Max. Seiten-Anzahl\" zu verringern, oder wende dich an unseren Support."
|
33 |
+
|
34 |
+
#. #-#-#-#-# plugin.pot (Better Search Replace 1.2.2) #-#-#-#-#
|
35 |
+
#. Plugin Name of the plugin/theme
|
36 |
+
#: includes/class-bsr-admin.php:85
|
37 |
+
#: templates/bsr-dashboard.php:29
|
38 |
+
msgid "Better Search Replace"
|
39 |
+
msgstr "Better Search Replace "
|
40 |
+
|
41 |
+
#: includes/class-bsr-admin.php:105
|
42 |
+
msgid "<p><strong>DRY RUN:</strong> <strong>%d</strong> tables were searched, <strong>%d</strong> cells were found that need to be updated, and <strong>%d</strong> changes were made.</p><p><a href=\"%s\" class=\"thickbox\" title=\"Dry Run Details\">Click here</a> for more details, or use the form below to run the search/replace.</p>"
|
43 |
+
msgstr "<p><strong>TESTLAUF:</strong> <strong>%d</strong> Tabellen wurden durchsucht, <strong>%d</strong> Tabellenzellen wurden gefunden, die aktualisiert werden sollen. <strong>%d</strong> Änderungen wurden vorgenommen.</p><p>Für mehr Details zum Testlauf <a href=\"%s\" class=\"thickbox\" title=\"Details des Testlaufes\">hier klicken</a>.</p>"
|
44 |
+
|
45 |
+
#: includes/class-bsr-admin.php:112
|
46 |
+
msgid "<p>During the search/replace, <strong>%d</strong> tables were searched, with <strong>%d</strong> cells changed in <strong>%d</strong> updates.</p><p><a href=\"%s\" class=\"thickbox\" title=\"Search/Replace Details\">Click here</a> for more details.</p>"
|
47 |
+
msgstr "<p>Beim Suchen/Ersetzen wurden <strong>%d</strong> Tabellen mit insgesamt <strong>%d</strong> Zellen durchsucht. <strong>%d</strong> Aktualisierungen wurden vorgenommen.</p><p>Für mehr Details zur Aktualisierung <a href=\"%s\" class=\"thickbox\" title=\"Details zur Aktualisierung\">hier klicken</a>.</p>"
|
48 |
+
|
49 |
+
#: includes/class-bsr-admin.php:212
|
50 |
+
msgid "Table"
|
51 |
+
msgstr "Tabelle"
|
52 |
+
|
53 |
+
#: includes/class-bsr-admin.php:212
|
54 |
+
msgid "Changes Found"
|
55 |
+
msgstr "Änderungen gefunden"
|
56 |
+
|
57 |
+
#: includes/class-bsr-admin.php:212
|
58 |
+
msgid "Rows Updated"
|
59 |
+
msgstr "Zeilen aktualisiert"
|
60 |
+
|
61 |
+
#: includes/class-bsr-admin.php:212
|
62 |
+
msgid "Time"
|
63 |
+
msgstr "Zeit"
|
64 |
+
|
65 |
+
#: includes/class-bsr-admin.php:233
|
66 |
+
msgid "Want even more details, easy database migrations, and saved search/replace profiles?"
|
67 |
+
msgstr "Du möchtest noch mehr Einstellungsmöglichkeiten, eine einfache Datenbank-Migration und die Möglichkeit Suchen/Ersetzen-Profile anzulegen?"
|
68 |
+
|
69 |
+
#: includes/class-bsr-admin.php:234
|
70 |
+
msgid "Learn more about the pro version"
|
71 |
+
msgstr "Lerne die Pro-Version kennen"
|
72 |
+
|
73 |
+
#: includes/class-bsr-admin.php:279
|
74 |
+
msgid "Upgrade to Pro"
|
75 |
+
msgstr "Upgrade auf die Pro-Version"
|
76 |
+
|
77 |
+
#: includes/class-bsr-db.php:81
|
78 |
+
msgid "(%s MB)"
|
79 |
+
msgstr "(%s MB)"
|
80 |
+
|
81 |
+
#: includes/class-bsr-db.php:251
|
82 |
+
msgid "Error updating row: %d."
|
83 |
+
msgstr "Fehler beim Aktualisieren in Zeile: %d."
|
84 |
+
|
85 |
+
#: includes/class-bsr-db.php:257
|
86 |
+
msgid "Row %d has no primary key, manual change needed."
|
87 |
+
msgstr "Zeile %d hat keinen Primärschlüssel. Du musst sie manuell ändern."
|
88 |
+
|
89 |
+
#: templates/bsr-dashboard.php:36
|
90 |
+
msgid "Search/Replace"
|
91 |
+
msgstr "Suchen/Ersetzen"
|
92 |
+
|
93 |
+
#: templates/bsr-dashboard.php:37
|
94 |
+
msgid "Settings"
|
95 |
+
msgstr "Einstellungen"
|
96 |
+
|
97 |
+
#: templates/bsr-dashboard.php:38
|
98 |
+
msgid "Help"
|
99 |
+
msgstr "Hilfe"
|
100 |
+
|
101 |
+
#: templates/bsr-help.php:17
|
102 |
+
msgid "Help & Troubleshooting"
|
103 |
+
msgstr "Hilfe & Fehlerbehebung"
|
104 |
+
|
105 |
+
#: templates/bsr-help.php:19
|
106 |
+
msgid "Free support is available on the <a href=\"%s\">plugin support forums</a>."
|
107 |
+
msgstr "Kostenlosen Support gibt es im <a href=\"%s\">Plugin Support-Forum</a>."
|
108 |
+
|
109 |
+
#: templates/bsr-help.php:21
|
110 |
+
msgid "For premium features and priority email support, <a href=\"%s\" style=\"font-weight:bold;\">upgrade to pro</a>."
|
111 |
+
msgstr "Weitere Premium-Features und schneller Support per E-Mail: <a href=\"%s\" style=\"font-weight:bold;\">Upgrade auf die Pro-Version</a>."
|
112 |
+
|
113 |
+
#: templates/bsr-help.php:23
|
114 |
+
msgid "Found a bug or have a feature request? Please submit an issue on <a href=\"%s\">GitHub</a>!"
|
115 |
+
msgstr "Du hast einen Fehler gefunden? Du wünschst dir eine neue Funktion? Schreib uns auf <a href=\"%s\">GitHub</a>!"
|
116 |
+
|
117 |
+
#: templates/bsr-help.php:29
|
118 |
+
msgid "Download System Info"
|
119 |
+
msgstr "System-Info herunterladen"
|
120 |
+
|
121 |
+
#: templates/bsr-search-replace.php:21
|
122 |
+
msgid "This tool allows you to search and replace text in your database (supports serialized arrays and objects)."
|
123 |
+
msgstr "Mit diesem Tool kannst du Zeichenketten in der Datenbank suchen und durch andere ersetzen (serialisierte Arrays und Objekte werden unterstützt)."
|
124 |
+
|
125 |
+
#: templates/bsr-search-replace.php:22
|
126 |
+
msgid "To get started, use the form below to enter the text to be replaced and select the tables to update."
|
127 |
+
msgstr "Gib im Formular an, welche Zeichenkette gesucht und ersetzt werden soll. Wähle aus, welche Tabellen der Datenbank durchsucht werden sollen."
|
128 |
+
|
129 |
+
#: templates/bsr-search-replace.php:23
|
130 |
+
msgid "<strong>WARNING:</strong> Make sure you backup your database before using this plugin!"
|
131 |
+
msgstr "<strong>Achtung:</strong> Mach' bitte ein Backup von deiner Datenbank bevor du dieses Plugin benutzt!"
|
132 |
+
|
133 |
+
#: templates/bsr-search-replace.php:28
|
134 |
+
msgid "Search for"
|
135 |
+
msgstr "Suchen nach:"
|
136 |
+
|
137 |
+
#: templates/bsr-search-replace.php:33
|
138 |
+
msgid "Replace with"
|
139 |
+
msgstr "Ersetzen durch:"
|
140 |
+
|
141 |
+
#: templates/bsr-search-replace.php:38
|
142 |
+
msgid "Select tables"
|
143 |
+
msgstr "Tabellen auswählen:"
|
144 |
+
|
145 |
+
#: templates/bsr-search-replace.php:41
|
146 |
+
msgid "Select multiple tables with Ctrl-Click for Windows or Cmd-Click for Mac."
|
147 |
+
msgstr "Steurungs-/Befehlstaste (Win/Mac) oder SHIFT gedrückt halten, um mehrere Tabellen auszuwählen."
|
148 |
+
|
149 |
+
#: templates/bsr-search-replace.php:46
|
150 |
+
msgid "Case-Insensitive?"
|
151 |
+
msgstr "Groß -und Kleinschreibung ignorieren?"
|
152 |
+
|
153 |
+
#: templates/bsr-search-replace.php:49
|
154 |
+
msgid "Searches are case-sensitive by default."
|
155 |
+
msgstr "Groß- und Kleinschreibung wird bei der Suche standardmäßig beachtet"
|
156 |
+
|
157 |
+
#: templates/bsr-search-replace.php:54
|
158 |
+
msgid "Replace GUIDs<a href=\"http://codex.wordpress.org/Changing_The_Site_URL#Important_GUID_Note\" target=\"_blank\">?</a>"
|
159 |
+
msgstr "Auch <a href=\"http://codex.wordpress.org/Changing_The_Site_URL#Important_GUID_Note\" target=\"_blank\">GUIDs ersetzen?</a>"
|
160 |
+
|
161 |
+
#: templates/bsr-search-replace.php:57
|
162 |
+
msgid "If left unchecked, all database columns titled 'guid' will be skipped."
|
163 |
+
msgstr "Lasse das Feld frei, um alle Datenbank-Spalten mit dem Titel 'guid' beim Suchen/Ersetzen zu überspringen (empfohlen)."
|
164 |
+
|
165 |
+
#: templates/bsr-search-replace.php:62
|
166 |
+
msgid "Run as dry run?"
|
167 |
+
msgstr "Testlauf?"
|
168 |
+
|
169 |
+
#: templates/bsr-search-replace.php:65
|
170 |
+
msgid "If checked, no changes will be made to the database, allowing you to check the results beforehand."
|
171 |
+
msgstr "Beim Testlauf wird die Datenbank nicht verändert. So kannst du vorher prüfen, welche Ersetzungen vorgenommen werden."
|
172 |
+
|
173 |
+
#: templates/bsr-search-replace.php:76
|
174 |
+
msgid "Run Search/Replace"
|
175 |
+
msgstr "Suchen/Ersetzen starten"
|
176 |
+
|
177 |
+
#: templates/bsr-settings.php:27
|
178 |
+
msgid "Max Page Size"
|
179 |
+
msgstr "Max. Seiten-Anzahl"
|
180 |
+
|
181 |
+
#: templates/bsr-settings.php:31
|
182 |
+
msgid "Current Setting: "
|
183 |
+
msgstr "Aktuelle Einstellung: "
|
184 |
+
|
185 |
+
#: templates/bsr-settings.php:33
|
186 |
+
msgid "If you're noticing timeouts or getting a white screen while running a search replace, try decreasing this value."
|
187 |
+
msgstr "Verringere diesen Wert, wenn dein Datenbank-Server ein Timeout zurückmeldet oder du nur einen weißen Screen siehst, während das Suchen/Ersetzen läuft. "
|
188 |
+
|
189 |
+
#. Plugin URI of the plugin/theme
|
190 |
+
msgid "http://expandedfronts.com/better-search-replace"
|
191 |
+
msgstr "http://expandedfronts.com/better-search-replace"
|
192 |
+
|
193 |
+
#. Description of the plugin/theme
|
194 |
+
msgid "A small plugin for running a search/replace on your WordPress database."
|
195 |
+
msgstr "Ein Plugin mit dem Zeichenketten in deiner WordPress-Datenbank gesucht und ersetzt werden können."
|
196 |
+
|
197 |
+
#. Author of the plugin/theme
|
198 |
+
msgid "Expanded Fronts"
|
199 |
+
msgstr "Expanded Fronts"
|
200 |
+
|
201 |
+
#. Author URI of the plugin/theme
|
202 |
+
msgid "http://expandedfronts.com"
|
203 |
+
msgstr "http://expandedfronts.com"
|
204 |
+
|
languages/better-search-replace-es_ES.mo
ADDED
Binary file
|
languages/better-search-replace-es_ES.po
ADDED
@@ -0,0 +1,136 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2014
|
2 |
+
# This file is distributed under the same license as the plugin package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: Better Search Replace en español\n"
|
6 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/plugins/better-search-replace\n"
|
7 |
+
"POT-Creation-Date: 2015-01-09 12:49+0100\n"
|
8 |
+
"PO-Revision-Date: 2015-01-09 12:59+0100\n"
|
9 |
+
"Last-Translator: Eduardo Larequi <elarequi@gmail.com>\n"
|
10 |
+
"Language-Team: PNTE <blogs@educacion.navarra.es>\n"
|
11 |
+
"Language: es\n"
|
12 |
+
"MIME-Version: 1.0\n"
|
13 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
14 |
+
"Content-Transfer-Encoding: 8bit\n"
|
15 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
16 |
+
"X-Generator: Poedit 1.6.3\n"
|
17 |
+
"X-Poedit-Basepath: ..\n"
|
18 |
+
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
|
19 |
+
"_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_ex:1,2c;"
|
20 |
+
"esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
|
21 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
22 |
+
"X-Poedit-SearchPath-0: .\n"
|
23 |
+
|
24 |
+
#: includes/class-better-search-replace-admin.php:141
|
25 |
+
msgid ""
|
26 |
+
"No search string was defined, please enter a URL or string to search for."
|
27 |
+
msgstr ""
|
28 |
+
"No se ha definido ninguna cadena de búsqueda; por favor, escribe una URL o "
|
29 |
+
"cadena que buscar."
|
30 |
+
|
31 |
+
#: includes/class-better-search-replace-admin.php:144
|
32 |
+
msgid "Please select the tables that you want to update."
|
33 |
+
msgstr "Por favor, selecciona las tablas que quieres actualizar."
|
34 |
+
|
35 |
+
#: includes/class-better-search-replace-admin.php:153
|
36 |
+
#, php-format
|
37 |
+
msgid ""
|
38 |
+
"<p><strong>DRY RUN:</strong> <strong>%d</strong> tables were searched, "
|
39 |
+
"<strong>%d</strong> cells were found that need to be updated, and <strong>"
|
40 |
+
"%d</strong> changes were made.</p><p><a href=\"%s\" class=\"thickbox\" title="
|
41 |
+
"\"Dry Run Details\">Click here</a> for more details, or click the submit "
|
42 |
+
"button below to run the search/replace.</p>"
|
43 |
+
msgstr ""
|
44 |
+
"<p><strong>EJECUCIÓN EN SECO:</strong> se hn realizado búsquedas en <strong>"
|
45 |
+
"%d</strong> tablas, se han encontrado <strong>%d</strong> celdas que deben "
|
46 |
+
"ser actualizadas, y se han realizado <strong>%d</strong> cambios.</p><p><a "
|
47 |
+
"href=\"%s\" class=\"thickbox\" title=\"Detalles de la ejecución en seco"
|
48 |
+
"\">Haz clic aquí</a> para ver más detalles, o haz clic en el botón \"Enviar"
|
49 |
+
"\" que tienes a continuación para ejecutar la búsqueda y sustitución.</p>"
|
50 |
+
|
51 |
+
#: includes/class-better-search-replace-admin.php:160
|
52 |
+
#, php-format
|
53 |
+
msgid ""
|
54 |
+
"<p>During the search/replace, <strong>%d</strong> tables were searched, with "
|
55 |
+
"<strong>%d</strong> cells changed in <strong>%d</strong> updates.</p><p><a "
|
56 |
+
"href=\"%s\" class=\"thickbox\" title=\"Search/Replace Details\">Click here</"
|
57 |
+
"a> for more details.</p>"
|
58 |
+
msgstr ""
|
59 |
+
"<p>Durante la búsqueda y sustitución, se han realizado búsquedas en <strong>"
|
60 |
+
"%d</strong> tablas, y se han modificado <strong>%d</strong> celdas en "
|
61 |
+
"<strong>%d</strong> actualizaciones.</p><p><a href=\"%s\" class=\"thickbox\" "
|
62 |
+
"title=\"Detalles sobre la búsqueda y sustitución\">Haz clic aquí</a> para "
|
63 |
+
"ver más detalles.</p>"
|
64 |
+
|
65 |
+
#: templates/bsr-dashboard.php:17
|
66 |
+
msgid "Better Search Replace"
|
67 |
+
msgstr "Better Search Replace"
|
68 |
+
|
69 |
+
#: templates/bsr-dashboard.php:19
|
70 |
+
msgid ""
|
71 |
+
"This tool allows you to search and replace text in your database (supports "
|
72 |
+
"serialized arrays and objects)."
|
73 |
+
msgstr ""
|
74 |
+
"Esta herramienta permite buscar y sustituir texto en la base de datos; "
|
75 |
+
"soporta matrices y objetos serializados."
|
76 |
+
|
77 |
+
#: templates/bsr-dashboard.php:20
|
78 |
+
msgid ""
|
79 |
+
"To get started, use the form below to enter the text to be replaced and "
|
80 |
+
"select the tables to update."
|
81 |
+
msgstr ""
|
82 |
+
"Para comenzar, utiliza el formulario que tienes a continuación para escribir "
|
83 |
+
"el texto que será sustituido y selecciona las tablas que se actualizarán."
|
84 |
+
|
85 |
+
#: templates/bsr-dashboard.php:21
|
86 |
+
msgid ""
|
87 |
+
"<strong>WARNING:</strong> Make sure you backup your database before using "
|
88 |
+
"this plugin!"
|
89 |
+
msgstr ""
|
90 |
+
"<strong>ATENCIÓN:</strong> asegúrate de hacer una copia de seguridad de tu "
|
91 |
+
"base de datos antes de utilizar este plugin."
|
92 |
+
|
93 |
+
#: templates/bsr-dashboard.php:28
|
94 |
+
msgid "Search for"
|
95 |
+
msgstr "Buscar"
|
96 |
+
|
97 |
+
#: templates/bsr-dashboard.php:33
|
98 |
+
msgid "Replace with"
|
99 |
+
msgstr "Sustituir con"
|
100 |
+
|
101 |
+
#: templates/bsr-dashboard.php:38
|
102 |
+
msgid "Select tables"
|
103 |
+
msgstr "Seleccionar tablas"
|
104 |
+
|
105 |
+
#: templates/bsr-dashboard.php:41
|
106 |
+
msgid ""
|
107 |
+
"Select multiple tables with Ctrl-Click for Windows or Cmd-Click for Mac."
|
108 |
+
msgstr ""
|
109 |
+
"Selecciona múltiples tablas con Ctrl+Clic (en Windows) o Cmd+Clic (en Mac)."
|
110 |
+
|
111 |
+
#: templates/bsr-dashboard.php:46
|
112 |
+
msgid ""
|
113 |
+
"Replace GUIDs<a href=\"http://codex.wordpress.org/"
|
114 |
+
"Changing_The_Site_URL#Important_GUID_Note\" target=\"_blank\">?</a>"
|
115 |
+
msgstr ""
|
116 |
+
"¿<a href=\"http://codex.wordpress.org/"
|
117 |
+
"Changing_The_Site_URL#Important_GUID_Note\" target=\"_blank\">Quieres "
|
118 |
+
"sustituir los GUIDs ?</a>"
|
119 |
+
|
120 |
+
#: templates/bsr-dashboard.php:49
|
121 |
+
msgid "If left unchecked, all database columns titled 'guid' will be skipped."
|
122 |
+
msgstr ""
|
123 |
+
"Si no activas esta opción, se omitirán todas las columnas de las bases de "
|
124 |
+
"datos tituladas 'guid'."
|
125 |
+
|
126 |
+
#: templates/bsr-dashboard.php:54
|
127 |
+
msgid "Run as dry run?"
|
128 |
+
msgstr "¿Quieres ejecutar \"en seco\"?"
|
129 |
+
|
130 |
+
#: templates/bsr-dashboard.php:57
|
131 |
+
msgid ""
|
132 |
+
"If checked, no changes will be made to the database, allowing you to check "
|
133 |
+
"the results beforehand."
|
134 |
+
msgstr ""
|
135 |
+
"Si activas esta opción, no se realizará ningún cambio en la base de datos, "
|
136 |
+
"lo cual te permite verificar los resultados de antemano."
|
languages/better-search-replace-fr_FR.mo
ADDED
Binary file
|
languages/better-search-replace-fr_FR.po
ADDED
@@ -0,0 +1,145 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2015 Better Search Replace
|
2 |
+
# This file is distributed under the same license as the Better Search Replace package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: Better Search Replace 1.0.2\n"
|
6 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/better-search-replace\n"
|
7 |
+
"POT-Creation-Date: 2015-02-05 04:52:47+00:00\n"
|
8 |
+
"MIME-Version: 1.0\n"
|
9 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
+
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"PO-Revision-Date: 2015-05-12 10:08-0500\n"
|
12 |
+
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
13 |
+
"Last-Translator: TWF <info@themes-wordpress-francais.com>\n"
|
14 |
+
"Language-Team: TWF <info@themes-wordpress-francais.com>\n"
|
15 |
+
"Language: fr\n"
|
16 |
+
"X-Generator: Poedit 1.7.6\n"
|
17 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
18 |
+
"X-Poedit-KeywordsList: __;_e\n"
|
19 |
+
"X-Poedit-Basepath: .\n"
|
20 |
+
"X-Poedit-SearchPath-0: ..\n"
|
21 |
+
|
22 |
+
#. Plugin Name of the plugin/theme
|
23 |
+
#: includes/class-better-search-replace-admin.php:69 templates/bsr-dashboard.php:17
|
24 |
+
msgid "Better Search Replace"
|
25 |
+
msgstr "Better Search Replace"
|
26 |
+
|
27 |
+
#: includes/class-better-search-replace-admin.php:138
|
28 |
+
msgid "No search string was defined, please enter a URL or string to search for."
|
29 |
+
msgstr ""
|
30 |
+
"Aucune chaîne de recherche a été définie, entrez une URL ou une chaîne à rechercher."
|
31 |
+
|
32 |
+
#: includes/class-better-search-replace-admin.php:141
|
33 |
+
msgid "Please select the tables that you want to update."
|
34 |
+
msgstr "Sélectionnez les tables que vous souhaitez mettre à jour."
|
35 |
+
|
36 |
+
#: includes/class-better-search-replace-admin.php:150
|
37 |
+
msgid ""
|
38 |
+
"<p><strong>DRY RUN:</strong> <strong>%d</strong> tables were searched, <strong>%d</"
|
39 |
+
"strong> cells were found that need to be updated, and <strong>%d</strong> changes "
|
40 |
+
"were made.</p><p><a href=\"%s\" class=\"thickbox\" title=\"Dry Run Details\">Click "
|
41 |
+
"here</a> for more details, or use the form below to run the search/replace.</p>"
|
42 |
+
msgstr ""
|
43 |
+
"<p><strong>Résultat de l'essai :</strong> <strong>%d</strong> tables ont été "
|
44 |
+
"parcourues, <strong>%d</strong> chaînes trouvées qui peuvent être mises à jour et "
|
45 |
+
"<strong>%d</strong> modifications auraient pu être apportées.</p><p><a href=\"%s\" "
|
46 |
+
"class=\"thickbox\" title=\"Plus de détails\">Cliquez ici</a> pour plus de détails, "
|
47 |
+
"ou utilisez le formulaire ci-dessous pour exécuter la recherche/remplace.</p>"
|
48 |
+
|
49 |
+
#: includes/class-better-search-replace-admin.php:157
|
50 |
+
msgid ""
|
51 |
+
"<p>During the search/replace, <strong>%d</strong> tables were searched, with <strong>"
|
52 |
+
"%d</strong> cells changed in <strong>%d</strong> updates.</p><p><a href=\"%s\" class="
|
53 |
+
"\"thickbox\" title=\"Search/Replace Details\">Click here</a> for more details.</p>"
|
54 |
+
msgstr ""
|
55 |
+
"<p>Pendant la recherche/remplace, <strong>%d</strong> tables ont été fouillés, avec "
|
56 |
+
"<strong>%d</strong> cellules changées dans <strong>%d</strong> mises à jour.</"
|
57 |
+
"p><p><a href=\"%s\" class=\"thickbox\" title=\"Plus de Details\">Cliquez ici</a> "
|
58 |
+
"pour plus de détails.</p>"
|
59 |
+
|
60 |
+
#: templates/bsr-dashboard.php:19
|
61 |
+
msgid ""
|
62 |
+
"This tool allows you to search and replace text in your database (supports "
|
63 |
+
"serialized arrays and objects)."
|
64 |
+
msgstr ""
|
65 |
+
"Cet outil vous permet de rechercher et remplacer du texte dans votre base de données "
|
66 |
+
"(prend en charge la sérialisation des tables et objets)."
|
67 |
+
|
68 |
+
#: templates/bsr-dashboard.php:20
|
69 |
+
msgid ""
|
70 |
+
"To get started, use the form below to enter the text to be replaced and select the "
|
71 |
+
"tables to update."
|
72 |
+
msgstr ""
|
73 |
+
"Pour commencer, utiliser le formulaire ci-dessous pour entrer dans le texte pour le "
|
74 |
+
"remplacement et sélectionnez les tables à mettre à jour."
|
75 |
+
|
76 |
+
#: templates/bsr-dashboard.php:21
|
77 |
+
msgid ""
|
78 |
+
"<strong>WARNING:</strong> Make sure you backup your database before using this "
|
79 |
+
"plugin!"
|
80 |
+
msgstr ""
|
81 |
+
"<strong>Avertissement :</strong> Assurez-vous que vous avez sauvegardé votre base de "
|
82 |
+
"données avant d'utiliser ce plugin !"
|
83 |
+
|
84 |
+
#: templates/bsr-dashboard.php:28
|
85 |
+
msgid "Search for"
|
86 |
+
msgstr "Rechercher"
|
87 |
+
|
88 |
+
#: templates/bsr-dashboard.php:33
|
89 |
+
msgid "Replace with"
|
90 |
+
msgstr "Remplacer avec"
|
91 |
+
|
92 |
+
#: templates/bsr-dashboard.php:38
|
93 |
+
msgid "Select tables"
|
94 |
+
msgstr "Dans les tables"
|
95 |
+
|
96 |
+
#: templates/bsr-dashboard.php:41
|
97 |
+
msgid "Select multiple tables with Ctrl-Click for Windows or Cmd-Click for Mac."
|
98 |
+
msgstr "Sélectionnez plusieurs tables avec la touche CTRL+clic ou CMD+clic pour Mac"
|
99 |
+
|
100 |
+
#: templates/bsr-dashboard.php:46
|
101 |
+
msgid ""
|
102 |
+
"Replace GUIDs<a href=\"http://codex.wordpress.org/"
|
103 |
+
"Changing_The_Site_URL#Important_GUID_Note\" target=\"_blank\">?</a>"
|
104 |
+
msgstr ""
|
105 |
+
"Remplacez les GUID ?<a href=\"http://codex.wordpress.org/"
|
106 |
+
"Changing_The_Site_URL#Important_GUID_Note\" target=\"_blank\"> En savoir plus sur "
|
107 |
+
"les GUID</a>"
|
108 |
+
|
109 |
+
#: templates/bsr-dashboard.php:49
|
110 |
+
msgid "If left unchecked, all database columns titled 'guid' will be skipped."
|
111 |
+
msgstr "Si décoché, toutes les colonnes 'guid' de la base de données seront igniorés."
|
112 |
+
|
113 |
+
#: templates/bsr-dashboard.php:54
|
114 |
+
msgid "Run as dry run?"
|
115 |
+
msgstr "Juste faire un test ?"
|
116 |
+
|
117 |
+
#: templates/bsr-dashboard.php:57
|
118 |
+
msgid ""
|
119 |
+
"If checked, no changes will be made to the database, allowing you to check the "
|
120 |
+
"results beforehand."
|
121 |
+
msgstr ""
|
122 |
+
"Si coché, aucun changement ne sera apporté à la base de données, vous aurez un bilan "
|
123 |
+
"des résultats possibles"
|
124 |
+
|
125 |
+
#: templates/bsr-dashboard.php:66
|
126 |
+
msgid "Run Search/Replace"
|
127 |
+
msgstr "Rechercher/Remplacer"
|
128 |
+
|
129 |
+
#. Plugin URI of the plugin/theme
|
130 |
+
msgid "http://expandedfronts.com/better-search-replace"
|
131 |
+
msgstr "http://expandedfronts.com/better-search-replace"
|
132 |
+
|
133 |
+
#. Description of the plugin/theme
|
134 |
+
msgid "A small plugin for running a search/replace on your WordPress database."
|
135 |
+
msgstr ""
|
136 |
+
"Un petit plugin pour rechercher et remplacer des cabine dans votre base de données "
|
137 |
+
"WordPress."
|
138 |
+
|
139 |
+
#. Author of the plugin/theme
|
140 |
+
msgid "Expanded Fronts"
|
141 |
+
msgstr "Expanded Fronts"
|
142 |
+
|
143 |
+
#. Author URI of the plugin/theme
|
144 |
+
msgid "http://expandedfronts.com"
|
145 |
+
msgstr "http://expandedfronts.com"
|
languages/better-search-replace.pot
ADDED
@@ -0,0 +1,288 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2016 Delicious Brains
|
2 |
+
# This file is distributed under the GPL-3.0.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: Better Search Replace 1.3\n"
|
6 |
+
"Report-Msgid-Bugs-To: "
|
7 |
+
"http://wordpress.org/support/plugin/better-search-replace\n"
|
8 |
+
"POT-Creation-Date: 2016-11-10 18:01:26+00:00\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=utf-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"PO-Revision-Date: 2016-MO-DA HO:MI+ZONE\n"
|
13 |
+
"Last-Translator: Delicious Brains <mayday@bettersearchreplace.com>\n"
|
14 |
+
"Language-Team: Delicious Brains <mayday@bettersearchreplace.com>\n"
|
15 |
+
"X-Generator: grunt-wp-i18n 0.4.9\n"
|
16 |
+
"X-Poedit-KeywordsList: "
|
17 |
+
"__;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;_nx_noop:1,2,3c;esc_"
|
18 |
+
"attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;esc_html_x:1,2c;\n"
|
19 |
+
"Language: en\n"
|
20 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
21 |
+
"X-Poedit-Country: United States\n"
|
22 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
23 |
+
"X-Poedit-Basepath: ../\n"
|
24 |
+
"X-Poedit-SearchPath-0: .\n"
|
25 |
+
"X-Poedit-Bookmarks: \n"
|
26 |
+
"X-Textdomain-Support: yes\n"
|
27 |
+
|
28 |
+
#: includes/class-bsr-admin.php:70
|
29 |
+
msgid "No search string was defined, please enter a URL or string to search for."
|
30 |
+
msgstr ""
|
31 |
+
|
32 |
+
#: includes/class-bsr-admin.php:71
|
33 |
+
msgid "Please select the tables that you want to update."
|
34 |
+
msgstr ""
|
35 |
+
|
36 |
+
#: includes/class-bsr-admin.php:72
|
37 |
+
msgid ""
|
38 |
+
"An error occurred processing your request. Try decreasing the \"Max Page "
|
39 |
+
"Size\", or contact support."
|
40 |
+
msgstr ""
|
41 |
+
|
42 |
+
#: includes/class-bsr-admin.php:73
|
43 |
+
msgid "Processing..."
|
44 |
+
msgstr ""
|
45 |
+
|
46 |
+
#. Plugin Name of the plugin/theme
|
47 |
+
msgid "Better Search Replace"
|
48 |
+
msgstr ""
|
49 |
+
|
50 |
+
#: includes/class-bsr-admin.php:105
|
51 |
+
msgid ""
|
52 |
+
"<p><strong>DRY RUN:</strong> <strong>%d</strong> tables were searched, "
|
53 |
+
"<strong>%d</strong> cells were found that need to be updated, and "
|
54 |
+
"<strong>%d</strong> changes were made.</p><p><a href=\"%s\" "
|
55 |
+
"class=\"thickbox\" title=\"Dry Run Details\">Click here</a> for more "
|
56 |
+
"details, or use the form below to run the search/replace.</p>"
|
57 |
+
msgstr ""
|
58 |
+
|
59 |
+
#: includes/class-bsr-admin.php:112
|
60 |
+
msgid ""
|
61 |
+
"<p>During the search/replace, <strong>%d</strong> tables were searched, "
|
62 |
+
"with <strong>%d</strong> cells changed in <strong>%d</strong> "
|
63 |
+
"updates.</p><p><a href=\"%s\" class=\"thickbox\" title=\"Search/Replace "
|
64 |
+
"Details\">Click here</a> for more details.</p>"
|
65 |
+
msgstr ""
|
66 |
+
|
67 |
+
#: includes/class-bsr-admin.php:212
|
68 |
+
msgid "Table"
|
69 |
+
msgstr ""
|
70 |
+
|
71 |
+
#: includes/class-bsr-admin.php:212
|
72 |
+
msgid "Changes Found"
|
73 |
+
msgstr ""
|
74 |
+
|
75 |
+
#: includes/class-bsr-admin.php:212
|
76 |
+
msgid "Rows Updated"
|
77 |
+
msgstr ""
|
78 |
+
|
79 |
+
#: includes/class-bsr-admin.php:212
|
80 |
+
msgid "Time"
|
81 |
+
msgstr ""
|
82 |
+
|
83 |
+
#: includes/class-bsr-admin.php:233
|
84 |
+
msgid "seconds"
|
85 |
+
msgstr ""
|
86 |
+
|
87 |
+
#: includes/class-bsr-admin.php:241
|
88 |
+
msgid ""
|
89 |
+
"Want even more details, easy database migrations, and saved search/replace "
|
90 |
+
"profiles?"
|
91 |
+
msgstr ""
|
92 |
+
|
93 |
+
#: includes/class-bsr-admin.php:242
|
94 |
+
msgid "Learn more about the pro version"
|
95 |
+
msgstr ""
|
96 |
+
|
97 |
+
#: includes/class-bsr-admin.php:287 templates/bsr-dashboard.php:74
|
98 |
+
msgid "Upgrade to Pro"
|
99 |
+
msgstr ""
|
100 |
+
|
101 |
+
#: includes/class-bsr-ajax.php:155
|
102 |
+
msgid "Processing table %d of %d: %s"
|
103 |
+
msgstr ""
|
104 |
+
|
105 |
+
#: includes/class-bsr-db.php:85
|
106 |
+
msgid "(%s MB)"
|
107 |
+
msgstr ""
|
108 |
+
|
109 |
+
#: includes/class-bsr-db.php:285
|
110 |
+
msgid "Error updating row: %d."
|
111 |
+
msgstr ""
|
112 |
+
|
113 |
+
#: templates/bsr-dashboard.php:46
|
114 |
+
msgid "Search/Replace"
|
115 |
+
msgstr ""
|
116 |
+
|
117 |
+
#: templates/bsr-dashboard.php:47
|
118 |
+
msgid "Settings"
|
119 |
+
msgstr ""
|
120 |
+
|
121 |
+
#: templates/bsr-dashboard.php:48
|
122 |
+
msgid "Help"
|
123 |
+
msgstr ""
|
124 |
+
|
125 |
+
#: templates/bsr-dashboard.php:77
|
126 |
+
msgid "Backup to an SQL file"
|
127 |
+
msgstr ""
|
128 |
+
|
129 |
+
#: templates/bsr-dashboard.php:78
|
130 |
+
msgid "Import an SQL file and run a find/replace on it"
|
131 |
+
msgstr ""
|
132 |
+
|
133 |
+
#: templates/bsr-dashboard.php:79
|
134 |
+
msgid "Detailed report of exactly what was replaced"
|
135 |
+
msgstr ""
|
136 |
+
|
137 |
+
#: templates/bsr-dashboard.php:87
|
138 |
+
msgid "20% Off!"
|
139 |
+
msgstr ""
|
140 |
+
|
141 |
+
#: templates/bsr-dashboard.php:92
|
142 |
+
msgid ""
|
143 |
+
"Submit your name and email and we'll send you a coupon for 20% off your "
|
144 |
+
"upgrade to the pro version."
|
145 |
+
msgstr ""
|
146 |
+
|
147 |
+
#: templates/bsr-dashboard.php:96
|
148 |
+
msgid "Your Email"
|
149 |
+
msgstr ""
|
150 |
+
|
151 |
+
#: templates/bsr-dashboard.php:100
|
152 |
+
msgid "First Name"
|
153 |
+
msgstr ""
|
154 |
+
|
155 |
+
#: templates/bsr-dashboard.php:104
|
156 |
+
msgid "Last Name"
|
157 |
+
msgstr ""
|
158 |
+
|
159 |
+
#: templates/bsr-dashboard.php:111
|
160 |
+
msgid "Send me the coupon"
|
161 |
+
msgstr ""
|
162 |
+
|
163 |
+
#: templates/bsr-dashboard.php:115
|
164 |
+
msgid ""
|
165 |
+
"We promise we will not use your email for anything else and you can "
|
166 |
+
"unsubscribe with 1-click anytime."
|
167 |
+
msgstr ""
|
168 |
+
|
169 |
+
#: templates/bsr-dashboard.php:126
|
170 |
+
msgid "via WordPress.org"
|
171 |
+
msgstr ""
|
172 |
+
|
173 |
+
#: templates/bsr-help.php:17
|
174 |
+
msgid "Help & Troubleshooting"
|
175 |
+
msgstr ""
|
176 |
+
|
177 |
+
#: templates/bsr-help.php:19
|
178 |
+
msgid "Free support is available on the <a href=\"%s\">plugin support forums</a>."
|
179 |
+
msgstr ""
|
180 |
+
|
181 |
+
#: templates/bsr-help.php:21
|
182 |
+
msgid ""
|
183 |
+
"For premium features and priority email support, <a href=\"%s\" "
|
184 |
+
"style=\"font-weight:bold;\">upgrade to pro</a>."
|
185 |
+
msgstr ""
|
186 |
+
|
187 |
+
#: templates/bsr-help.php:23
|
188 |
+
msgid ""
|
189 |
+
"Found a bug or have a feature request? Please submit an issue on <a "
|
190 |
+
"href=\"%s\">GitHub</a>!"
|
191 |
+
msgstr ""
|
192 |
+
|
193 |
+
#: templates/bsr-help.php:29
|
194 |
+
msgid "Download System Info"
|
195 |
+
msgstr ""
|
196 |
+
|
197 |
+
#: templates/bsr-search-replace.php:21
|
198 |
+
msgid ""
|
199 |
+
"This tool allows you to search and replace text in your database (supports "
|
200 |
+
"serialized arrays and objects)."
|
201 |
+
msgstr ""
|
202 |
+
|
203 |
+
#: templates/bsr-search-replace.php:22
|
204 |
+
msgid ""
|
205 |
+
"To get started, use the form below to enter the text to be replaced and "
|
206 |
+
"select the tables to update."
|
207 |
+
msgstr ""
|
208 |
+
|
209 |
+
#: templates/bsr-search-replace.php:23
|
210 |
+
msgid ""
|
211 |
+
"<strong>WARNING:</strong> Make sure you backup your database before using "
|
212 |
+
"this plugin!"
|
213 |
+
msgstr ""
|
214 |
+
|
215 |
+
#: templates/bsr-search-replace.php:28
|
216 |
+
msgid "Search for"
|
217 |
+
msgstr ""
|
218 |
+
|
219 |
+
#: templates/bsr-search-replace.php:33
|
220 |
+
msgid "Replace with"
|
221 |
+
msgstr ""
|
222 |
+
|
223 |
+
#: templates/bsr-search-replace.php:38
|
224 |
+
msgid "Select tables"
|
225 |
+
msgstr ""
|
226 |
+
|
227 |
+
#: templates/bsr-search-replace.php:41
|
228 |
+
msgid "Select multiple tables with Ctrl-Click for Windows or Cmd-Click for Mac."
|
229 |
+
msgstr ""
|
230 |
+
|
231 |
+
#: templates/bsr-search-replace.php:46
|
232 |
+
msgid "Case-Insensitive?"
|
233 |
+
msgstr ""
|
234 |
+
|
235 |
+
#: templates/bsr-search-replace.php:49
|
236 |
+
msgid "Searches are case-sensitive by default."
|
237 |
+
msgstr ""
|
238 |
+
|
239 |
+
#: templates/bsr-search-replace.php:54
|
240 |
+
msgid ""
|
241 |
+
"Replace GUIDs<a "
|
242 |
+
"href=\"http://codex.wordpress.org/Changing_The_Site_URL#Important_GUID_Note\""
|
243 |
+
" target=\"_blank\">?</a>"
|
244 |
+
msgstr ""
|
245 |
+
|
246 |
+
#: templates/bsr-search-replace.php:57
|
247 |
+
msgid "If left unchecked, all database columns titled 'guid' will be skipped."
|
248 |
+
msgstr ""
|
249 |
+
|
250 |
+
#: templates/bsr-search-replace.php:62
|
251 |
+
msgid "Run as dry run?"
|
252 |
+
msgstr ""
|
253 |
+
|
254 |
+
#: templates/bsr-search-replace.php:65
|
255 |
+
msgid ""
|
256 |
+
"If checked, no changes will be made to the database, allowing you to check "
|
257 |
+
"the results beforehand."
|
258 |
+
msgstr ""
|
259 |
+
|
260 |
+
#: templates/bsr-search-replace.php:76
|
261 |
+
msgid "Run Search/Replace"
|
262 |
+
msgstr ""
|
263 |
+
|
264 |
+
#: templates/bsr-settings.php:27
|
265 |
+
msgid "Max Page Size"
|
266 |
+
msgstr ""
|
267 |
+
|
268 |
+
#: templates/bsr-settings.php:31
|
269 |
+
msgid "Current Setting: "
|
270 |
+
msgstr ""
|
271 |
+
|
272 |
+
#: templates/bsr-settings.php:33
|
273 |
+
msgid ""
|
274 |
+
"If you're noticing timeouts or getting a white screen while running a "
|
275 |
+
"search replace, try decreasing this value."
|
276 |
+
msgstr ""
|
277 |
+
|
278 |
+
#. Author URI of the plugin/theme
|
279 |
+
msgid "https://bettersearchreplace.com"
|
280 |
+
msgstr ""
|
281 |
+
|
282 |
+
#. Description of the plugin/theme
|
283 |
+
msgid "A small plugin for running a search/replace on your WordPress database."
|
284 |
+
msgstr ""
|
285 |
+
|
286 |
+
#. Author of the plugin/theme
|
287 |
+
msgid "Delicious Brains"
|
288 |
+
msgstr ""
|
templates/bsr-dashboard.php
ADDED
@@ -0,0 +1,134 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Displays the main Better Search Replace page under Tools -> Better Search Replace.
|
5 |
+
*
|
6 |
+
* @link https://bettersearchreplace.com
|
7 |
+
* @since 1.0.0
|
8 |
+
*
|
9 |
+
* @package Better_Search_Replace
|
10 |
+
* @subpackage Better_Search_Replace/templates
|
11 |
+
*/
|
12 |
+
|
13 |
+
// Prevent direct access.
|
14 |
+
if ( ! defined( 'BSR_PATH' ) ) exit;
|
15 |
+
|
16 |
+
// Determines which tab to display.
|
17 |
+
$active_tab = isset( $_GET['tab'] ) ? $_GET['tab'] : 'bsr_search_replace';
|
18 |
+
|
19 |
+
switch( $active_tab ) {
|
20 |
+
case 'bsr_settings':
|
21 |
+
$action = 'action="' . get_admin_url() . 'options.php' . '"';
|
22 |
+
break;
|
23 |
+
case 'bsr_help':
|
24 |
+
$action = 'action="' . get_admin_url() . 'admin-post.php' . '"';
|
25 |
+
break;
|
26 |
+
default:
|
27 |
+
$action = '';
|
28 |
+
}
|
29 |
+
|
30 |
+
?>
|
31 |
+
|
32 |
+
<div class="wrap">
|
33 |
+
|
34 |
+
<h1 id="bsr-title"><?php _e( 'Better Search Replace', 'better-search-replace' ); ?></h1>
|
35 |
+
<?php settings_errors(); ?>
|
36 |
+
|
37 |
+
<div id="bsr-error-wrap"></div>
|
38 |
+
|
39 |
+
<?php BSR_Admin::render_result(); ?>
|
40 |
+
|
41 |
+
<div id="bsr-main">
|
42 |
+
|
43 |
+
<div id="bsr-tabs">
|
44 |
+
|
45 |
+
<h2 id="bsr-nav-tab-wrapper" class="nav-tab-wrapper">
|
46 |
+
<a href="?page=better-search-replace&tab=bsr_search_replace" class="nav-tab <?php echo $active_tab == 'bsr_search_replace' ? 'nav-tab-active' : ''; ?>"><?php _e( 'Search/Replace', 'better-search-replace' ); ?></a>
|
47 |
+
<a href="?page=better-search-replace&tab=bsr_settings" class="nav-tab <?php echo $active_tab == 'bsr_settings' ? 'nav-tab-active' : ''; ?>"><?php _e( 'Settings', 'better-search-replace' ); ?></a>
|
48 |
+
<a href="?page=better-search-replace&tab=bsr_help" class="nav-tab <?php echo $active_tab == 'bsr_help' ? 'nav-tab-active' : ''; ?>"><?php _e( 'Help', 'better-search-replace' ); ?></a>
|
49 |
+
</h2>
|
50 |
+
|
51 |
+
<form class="bsr-action-form" <?php echo $action; ?> method="POST">
|
52 |
+
|
53 |
+
<?php
|
54 |
+
// Include the correct tab template.
|
55 |
+
$bsr_template = str_replace( '_', '-', sanitize_file_name( $active_tab ) ) . '.php';
|
56 |
+
if ( file_exists( BSR_PATH . 'templates/' . $bsr_template ) ) {
|
57 |
+
include BSR_PATH . 'templates/' . $bsr_template;
|
58 |
+
} else {
|
59 |
+
include BSR_PATH . 'templates/bsr-search-replace.php';
|
60 |
+
}
|
61 |
+
?>
|
62 |
+
|
63 |
+
</form>
|
64 |
+
|
65 |
+
</div><!-- /#bsr-tabs -->
|
66 |
+
|
67 |
+
<div id="bsr-sidebar-wrap">
|
68 |
+
|
69 |
+
<div id="bsr-upgrade">
|
70 |
+
|
71 |
+
<a href="https://bettersearchreplace.com/?utm_source=insideplugin&utm_medium=web&utm_content=sidebar&utm_campaign=pro-upsell">
|
72 |
+
|
73 |
+
<img src="<?php echo BSR_URL; ?>/assets/img/bsr-logo-white.svg" />
|
74 |
+
<h1><?php _e( 'Upgrade to Pro', 'better-search-replace' ); ?></h1>
|
75 |
+
|
76 |
+
<ul>
|
77 |
+
<li><span class="dashicons dashicons-yes"></span> <?php _e( 'Backup to an SQL file', 'better-search-replace' ); ?></li>
|
78 |
+
<li><span class="dashicons dashicons-yes"></span> <?php _e( 'Import an SQL file and run a find/replace on it', 'better-search-replace' ); ?></li>
|
79 |
+
<li><span class="dashicons dashicons-yes"></span> <?php _e( 'Detailed report of exactly what was replaced', 'better-search-replace' ); ?></li>
|
80 |
+
</ul>
|
81 |
+
|
82 |
+
</a>
|
83 |
+
|
84 |
+
</div>
|
85 |
+
|
86 |
+
<form id="bsr-upgrade-form" method="post" action="https://deliciousbrains.com/email-subscribe/" target="_blank" class="subscribe block">
|
87 |
+
<h1><?php _e( '20% Off!', 'better-search-replace' ); ?></h1>
|
88 |
+
|
89 |
+
<?php $user = wp_get_current_user(); ?>
|
90 |
+
|
91 |
+
<p class="interesting">
|
92 |
+
<?php echo wptexturize( __( "Submit your name and email and we'll send you a coupon for 20% off your upgrade to the pro version.", 'better-search-replace' ) ); ?>
|
93 |
+
</p>
|
94 |
+
|
95 |
+
<div class="field">
|
96 |
+
<input type="email" name="email" value="<?php echo esc_attr( $user->user_email ); ?>" placeholder="<?php _e( 'Your Email', 'better-search-replace' ); ?>"/>
|
97 |
+
</div>
|
98 |
+
|
99 |
+
<div class="field">
|
100 |
+
<input type="text" name="first_name" value="<?php echo esc_attr( trim( $user->first_name ) ); ?>" placeholder="<?php _e( 'First Name', 'better-search-replace' ); ?>"/>
|
101 |
+
</div>
|
102 |
+
|
103 |
+
<div class="field">
|
104 |
+
<input type="text" name="last_name" value="<?php echo esc_attr( trim( $user->last_name ) ); ?>" placeholder="<?php _e( 'Last Name', 'better-search-replace' ); ?>"/>
|
105 |
+
</div>
|
106 |
+
|
107 |
+
<input type="hidden" name="campaigns[]" value="9" />
|
108 |
+
<input type="hidden" name="source" value="10" />
|
109 |
+
|
110 |
+
<div class="field submit-button">
|
111 |
+
<input type="submit" class="button" value="<?php _e( 'Send me the coupon', 'better-search-replace' ); ?>"/>
|
112 |
+
</div>
|
113 |
+
|
114 |
+
<p class="promise">
|
115 |
+
<?php _e( 'You\'ll also receive our awesome weekly posts from the Delicious Brains blog. Unsubscribe anytime.', 'better-search-replace' ); ?>
|
116 |
+
</p>
|
117 |
+
</form>
|
118 |
+
|
119 |
+
<div id="bsr-review">
|
120 |
+
<div class="bsr-stars">
|
121 |
+
<span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span><span class="dashicons dashicons-star-filled"></span>
|
122 |
+
</div>
|
123 |
+
<div class="bsr-review-details">
|
124 |
+
<h3>"Worked Beautifully"</h3>
|
125 |
+
<img class="bsr-review-avatar" src="<?php echo BSR_URL . 'assets/img/phil-gravatar.jpeg'; ?>" />
|
126 |
+
<a href="https://wordpress.org/support/topic/worked-beautifully-10/"><span class="bsr-review-author">@philraymond<br><?php _e( 'via WordPress.org', 'better-search-replace' ); ?></span></a>
|
127 |
+
</div>
|
128 |
+
</div>
|
129 |
+
|
130 |
+
</div><!-- /#bsr-sidebar-wrap -->
|
131 |
+
|
132 |
+
</div><!-- /#bsr-main -->
|
133 |
+
|
134 |
+
</div><!-- /.wrap -->
|
templates/bsr-help.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Displays the "System Info" tab.
|
4 |
+
*
|
5 |
+
* @link https://bettersearchreplace.com
|
6 |
+
* @since 1.1
|
7 |
+
*
|
8 |
+
* @package Better_Search_Replace
|
9 |
+
* @subpackage Better_Search_Replace/templates
|
10 |
+
*/
|
11 |
+
|
12 |
+
// Prevent direct access.
|
13 |
+
if ( ! defined( 'BSR_PATH' ) ) exit;
|
14 |
+
|
15 |
+
?>
|
16 |
+
|
17 |
+
<h3 id="bsr-help-heading"><?php _e( 'Help & Troubleshooting', 'better-search-replace' ); ?></h3>
|
18 |
+
|
19 |
+
<p><?php printf( __( 'Free support is available on the <a href="%s">plugin support forums</a>.', 'better-search-replace' ), 'https://wordpress.org/support/plugin/better-search-replace' ); ?></p>
|
20 |
+
|
21 |
+
<p><?php printf( __( 'For premium features and priority email support, <a href="%s" style="font-weight:bold;">upgrade to pro</a>.', 'better-search-replace' ), 'https://bettersearchreplace.com/?utm_source=insideplugin&utm_medium=web&utm_content=help-tab&utm_campaign=pro-upsell' ); ?></p>
|
22 |
+
|
23 |
+
<p><?php printf( __( 'Found a bug or have a feature request? Please submit an issue on <a href="%s">GitHub</a>!', 'better-search-replace' ), 'https://github.com/deliciousbrains/better-search-replace' ); ?></p>
|
24 |
+
|
25 |
+
<textarea readonly="readonly" onclick="this.focus(); this.select()" style="width:750px;height:500px;font-family:Menlo,Monaco,monospace; margin-top: 15px;" name='bsr-sysinfo'><?php echo BSR_Compatibility::get_sysinfo(); ?></textarea>
|
26 |
+
|
27 |
+
<p class="submit">
|
28 |
+
<input type="hidden" name="action" value="bsr_download_sysinfo" />
|
29 |
+
<?php wp_nonce_field( 'bsr_download_sysinfo', 'bsr_sysinfo_nonce' ); ?>
|
30 |
+
<?php submit_button( __( 'Download System Info', 'better-search-replace' ), 'primary', 'bsr-download-sysinfo', false ); ?>
|
31 |
+
</p>
|
templates/bsr-search-replace.php
ADDED
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Displays the main "Search/Replace" tab.
|
4 |
+
*
|
5 |
+
* @link https://bettersearchreplace.com
|
6 |
+
* @since 1.1
|
7 |
+
*
|
8 |
+
* @package Better_Search_Replace
|
9 |
+
* @subpackage Better_Search_Replace/templates
|
10 |
+
*/
|
11 |
+
|
12 |
+
// Prevent direct/unauthorized access.
|
13 |
+
if ( ! defined( 'BSR_PATH' ) ) exit;
|
14 |
+
|
15 |
+
?>
|
16 |
+
|
17 |
+
<div id="bsr-search-replace-wrap">
|
18 |
+
|
19 |
+
<div class="inside">
|
20 |
+
|
21 |
+
<p><?php _e( 'This tool allows you to search and replace text in your database (supports serialized arrays and objects).', 'better-search-replace' ); ?></p>
|
22 |
+
<p><?php _e( 'To get started, use the form below to enter the text to be replaced and select the tables to update.', 'better-search-replace' ); ?></p>
|
23 |
+
<p><?php _e( '<strong>WARNING:</strong> Make sure you backup your database before using this plugin!', 'better-search-replace' ); ?></p>
|
24 |
+
|
25 |
+
<table id="bsr-search-replace-form" class="form-table">
|
26 |
+
|
27 |
+
<tr>
|
28 |
+
<td><label for="search_for"><strong><?php _e( 'Search for', 'better-search-replace' ); ?></strong></label></td>
|
29 |
+
<td><input id="search_for" class="regular-text" type="text" name="search_for" value="<?php BSR_Admin::prefill_value( 'search_for' ); ?>" /></td>
|
30 |
+
</tr>
|
31 |
+
|
32 |
+
<tr>
|
33 |
+
<td><label for="replace_with"><strong><?php _e( 'Replace with', 'better-search-replace' ); ?></strong></label></td>
|
34 |
+
<td><input id="replace_with" class="regular-text" type="text" name="replace_with" value="<?php BSR_Admin::prefill_value( 'replace_with' ); ?>" /></td>
|
35 |
+
</tr>
|
36 |
+
|
37 |
+
<tr>
|
38 |
+
<td><label for="select_tables"><strong><?php _e( 'Select tables', 'better-search-replace' ); ?></strong></label></td>
|
39 |
+
<td>
|
40 |
+
<?php BSR_Admin::load_tables(); ?>
|
41 |
+
<p class="description"><?php _e( 'Select multiple tables with Ctrl-Click for Windows or Cmd-Click for Mac.', 'better-search-replace' ); ?></p>
|
42 |
+
</td>
|
43 |
+
</tr>
|
44 |
+
|
45 |
+
<tr>
|
46 |
+
<td><label for="case_insensitive"><strong><?php _e( 'Case-Insensitive?', 'better-search-replace' ); ?></strong></label></td>
|
47 |
+
<td>
|
48 |
+
<input id="case_insensitive" type="checkbox" name="case_insensitive" <?php BSR_Admin::prefill_value( 'case_insensitive', 'checkbox' ); ?> />
|
49 |
+
<label for="case_insensitive"><span class="description"><?php _e( 'Searches are case-sensitive by default.', 'better-search-replace' ); ?></span></label>
|
50 |
+
</td>
|
51 |
+
</tr>
|
52 |
+
|
53 |
+
<tr>
|
54 |
+
<td><label for="replace_guids"><strong><?php _e( 'Replace GUIDs<a href="http://codex.wordpress.org/Changing_The_Site_URL#Important_GUID_Note" target="_blank">?</a>', 'better-search-replace' ); ?></strong></label></td>
|
55 |
+
<td>
|
56 |
+
<input id="replace_guids" type="checkbox" name="replace_guids" <?php BSR_Admin::prefill_value( 'replace_guids', 'checkbox' ); ?> />
|
57 |
+
<label for="replace_guids"><span class="description"><?php _e( 'If left unchecked, all database columns titled \'guid\' will be skipped.', 'better-search-replace' ); ?></span></label>
|
58 |
+
</td>
|
59 |
+
</tr>
|
60 |
+
|
61 |
+
<tr>
|
62 |
+
<td><label for="dry_run"><strong><?php _e( 'Run as dry run?', 'better-search-replace' ); ?></strong></label></td>
|
63 |
+
<td>
|
64 |
+
<input id="dry_run" type="checkbox" name="dry_run" checked />
|
65 |
+
<label for="dry_run"><span class="description"><?php _e( 'If checked, no changes will be made to the database, allowing you to check the results beforehand.', 'better-search-replace' ); ?></span></label>
|
66 |
+
</td>
|
67 |
+
</tr>
|
68 |
+
|
69 |
+
</table>
|
70 |
+
|
71 |
+
<br>
|
72 |
+
|
73 |
+
<div id="bsr-submit-wrap">
|
74 |
+
<?php wp_nonce_field( 'process_search_replace', 'bsr_nonce' ); ?>
|
75 |
+
<input type="hidden" name="action" value="bsr_process_search_replace" />
|
76 |
+
<button id="bsr-submit" type="submit" class="button"><?php _e( 'Run Search/Replace', 'better-search-replace' ); ?></button>
|
77 |
+
</div>
|
78 |
+
|
79 |
+
</div><!-- /.inside -->
|
80 |
+
|
81 |
+
</div><!-- /#bsr-search-replace-wrap -->
|
templates/bsr-settings.php
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Displays the main "Settings" tab.
|
4 |
+
*
|
5 |
+
* @link https://bettersearchreplace.com
|
6 |
+
* @since 1.1
|
7 |
+
*
|
8 |
+
* @package Better_Search_Replace
|
9 |
+
* @subpackage Better_Search_Replace/templates
|
10 |
+
*/
|
11 |
+
|
12 |
+
// Prevent direct/unauthorized access.
|
13 |
+
if ( ! defined( 'BSR_PATH' ) ) exit;
|
14 |
+
|
15 |
+
// Other settings.
|
16 |
+
$page_size = get_option( 'bsr_page_size' ) ? absint( get_option( 'bsr_page_size' ) ) : 20000;
|
17 |
+
|
18 |
+
?>
|
19 |
+
|
20 |
+
<?php settings_fields( 'bsr_settings_fields' ); ?>
|
21 |
+
|
22 |
+
<table class="form-table">
|
23 |
+
<tbody>
|
24 |
+
|
25 |
+
<tr valign="top">
|
26 |
+
<th scope="row" valign="top">
|
27 |
+
<?php _e( 'Max Page Size', 'better-search-replace' ); ?>
|
28 |
+
</th>
|
29 |
+
<td>
|
30 |
+
<div id="bsr-page-size-slider" class="bsr-slider"></div>
|
31 |
+
<br><span id="bsr-page-size-info"><?php _e( 'Current Setting: ', 'better-search-replace' ); ?></span><span id="bsr-page-size-value"><?php echo $page_size; ?></span>
|
32 |
+
<input id="bsr_page_size" type="hidden" name="bsr_page_size" value="<?php echo $page_size; ?>" />
|
33 |
+
<p class="description"><?php _e( 'If you\'re noticing timeouts or getting a white screen while running a search replace, try decreasing this value.', 'better-search-replace' ); ?></p>
|
34 |
+
|
35 |
+
</td>
|
36 |
+
</tr>
|
37 |
+
|
38 |
+
</tbody>
|
39 |
+
</table>
|
40 |
+
<?php submit_button(); ?>
|