Version Description
Download this release
Release Info
Developer | satrya |
Plugin | Recent Posts Widget Extended |
Version | 2.0.2 |
Comparing to | |
See all releases |
Code changes from version 2.0.1 to 2.0.2
- LICENSE +674 -0
- assets/css/rpwe-frontend.css +5 -5
- classes/class-image-resizer.php +3 -1
- classes/class-rpwe-widget.php +325 -1
- includes/compatibility.php +2 -2
- includes/defaults.php +2 -2
- includes/form.php +0 -324
- includes/functions.php +1 -1
- languages/recent-posts-widget-extended.pot +105 -49
- readme.txt +28 -10
- rpwe.php +14 -15
LICENSE
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. <https://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 <https://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 |
+
<https://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 |
+
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
assets/css/rpwe-frontend.css
CHANGED
@@ -6,10 +6,10 @@
|
|
6 |
|
7 |
.rpwe-block li {
|
8 |
border-bottom: 1px solid #eee;
|
9 |
-
margin
|
10 |
-
padding
|
11 |
-
list-style-type: none;
|
12 |
-
display:
|
13 |
}
|
14 |
|
15 |
.rpwe-block a {
|
@@ -30,7 +30,7 @@
|
|
30 |
.rpwe-thumb {
|
31 |
border: 1px solid #eee !important;
|
32 |
box-shadow: none !important;
|
33 |
-
margin: 2px 10px 2px 0;
|
34 |
padding: 3px !important;
|
35 |
}
|
36 |
|
6 |
|
7 |
.rpwe-block li {
|
8 |
border-bottom: 1px solid #eee;
|
9 |
+
margin: 0 0 8px !important;
|
10 |
+
padding: 5px 0 10px !important;
|
11 |
+
list-style-type: none !important;
|
12 |
+
display: block;
|
13 |
}
|
14 |
|
15 |
.rpwe-block a {
|
30 |
.rpwe-thumb {
|
31 |
border: 1px solid #eee !important;
|
32 |
box-shadow: none !important;
|
33 |
+
margin: 2px 10px 2px 0 !important;
|
34 |
padding: 3px !important;
|
35 |
}
|
36 |
|
classes/class-image-resizer.php
CHANGED
@@ -53,7 +53,9 @@ if ( ! class_exists( 'Image_Resizer' ) ) {
|
|
53 |
* For your custom default usage you may want to initialize an Image_Resizer object by yourself and then have own defaults
|
54 |
*/
|
55 |
public static function get_instance() {
|
56 |
-
self::$instance
|
|
|
|
|
57 |
return self::$instance;
|
58 |
}
|
59 |
|
53 |
* For your custom default usage you may want to initialize an Image_Resizer object by yourself and then have own defaults
|
54 |
*/
|
55 |
public static function get_instance() {
|
56 |
+
if ( null === self::$instance ) {
|
57 |
+
self::$instance = new self();
|
58 |
+
}
|
59 |
return self::$instance;
|
60 |
}
|
61 |
|
classes/class-rpwe-widget.php
CHANGED
@@ -228,6 +228,330 @@ class RPWE_Widget extends WP_Widget {
|
|
228 |
$instance = wp_parse_args( (array) $instance, rpwe_get_default_args() );
|
229 |
|
230 |
// Loads the widget form.
|
231 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
232 |
}
|
233 |
}
|
228 |
$instance = wp_parse_args( (array) $instance, rpwe_get_default_args() );
|
229 |
|
230 |
// Loads the widget form.
|
231 |
+
?>
|
232 |
+
<div class="rpwe-options">
|
233 |
+
|
234 |
+
<div class="rpwe-tabs">
|
235 |
+
|
236 |
+
<ul id="rpwe-tabs-nav">
|
237 |
+
<li><a href="#tab1"><?php esc_html_e( 'General', 'recent-posts-widget-extended' ); ?></a></li>
|
238 |
+
<li><a href="#tab2"><?php esc_html_e( 'Posts', 'recent-posts-widget-extended' ); ?></a></li>
|
239 |
+
<li><a href="#tab3"><?php esc_html_e( 'Image', 'recent-posts-widget-extended' ); ?></a></li>
|
240 |
+
<li><a href="#tab4"><?php esc_html_e( 'Excerpt', 'recent-posts-widget-extended' ); ?></a></li>
|
241 |
+
<li><a href="#tab5"><?php esc_html_e( 'Control', 'recent-posts-widget-extended' ); ?></a></li>
|
242 |
+
<li><a href="#tab6"><?php esc_html_e( 'Style', 'recent-posts-widget-extended' ); ?></a></li>
|
243 |
+
<li><a href="#tab7"><?php esc_html_e( 'Support', 'recent-posts-widget-extended' ); ?></a></li>
|
244 |
+
</ul>
|
245 |
+
|
246 |
+
<div id="rpwe-tabs-content">
|
247 |
+
|
248 |
+
<div id="tab1" class="rpwe-tab-content">
|
249 |
+
<p>
|
250 |
+
<label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>">
|
251 |
+
<?php esc_attr_e( 'Title', 'recent-posts-widget-extended' ); ?>
|
252 |
+
</label>
|
253 |
+
<input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" type="text" value="<?php echo esc_attr( $instance['title'] ); ?>" />
|
254 |
+
</p>
|
255 |
+
|
256 |
+
<p>
|
257 |
+
<label for="<?php echo esc_attr( $this->get_field_id( 'title_url' ) ); ?>">
|
258 |
+
<?php esc_attr_e( 'Title URL', 'recent-posts-widget-extended' ); ?>
|
259 |
+
</label>
|
260 |
+
<input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'title_url' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title_url' ) ); ?>" type="text" value="<?php echo esc_url( $instance['title_url'] ); ?>" />
|
261 |
+
</p>
|
262 |
+
|
263 |
+
<p>
|
264 |
+
<label for="<?php echo esc_attr( $this->get_field_id( 'css_id' ) ); ?>">
|
265 |
+
<?php esc_attr_e( 'Container ID', 'recent-posts-widget-extended' ); ?>
|
266 |
+
</label>
|
267 |
+
<input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'css_id' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'css_id' ) ); ?>" type="text" value="<?php echo esc_attr( $instance['css_id'] ); ?>" />
|
268 |
+
</p>
|
269 |
+
|
270 |
+
<p>
|
271 |
+
<label for="<?php echo esc_attr( $this->get_field_id( 'css_class' ) ); ?>">
|
272 |
+
<?php esc_attr_e( 'Container Class', 'recent-posts-widget-extended' ); ?>
|
273 |
+
</label>
|
274 |
+
<input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'css_class' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'css_class' ) ); ?>" type="text" value="<?php echo esc_attr( $instance['css_class'] ); ?>" />
|
275 |
+
</p>
|
276 |
+
|
277 |
+
<p>
|
278 |
+
<label for="<?php echo esc_attr( $this->get_field_id( 'before' ) ); ?>">
|
279 |
+
<?php esc_attr_e( 'HTML or text before the recent posts', 'recent-posts-widget-extended' ); ?>
|
280 |
+
</label>
|
281 |
+
<textarea class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'before' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'before' ) ); ?>" rows="5"><?php echo wp_kses_post( htmlspecialchars( stripslashes( $instance['before'] ) ) ); ?></textarea>
|
282 |
+
</p>
|
283 |
+
|
284 |
+
<p>
|
285 |
+
<label for="<?php echo esc_attr( $this->get_field_id( 'after' ) ); ?>">
|
286 |
+
<?php esc_attr_e( 'HTML or text after the recent posts', 'recent-posts-widget-extended' ); ?>
|
287 |
+
</label>
|
288 |
+
<textarea class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'after' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'after' ) ); ?>" rows="5"><?php echo wp_kses_post( htmlspecialchars( stripslashes( $instance['after'] ) ) ); ?></textarea>
|
289 |
+
</p>
|
290 |
+
</div>
|
291 |
+
|
292 |
+
<div id="tab2" class="rpwe-tab-content">
|
293 |
+
|
294 |
+
<p>
|
295 |
+
<input class="checkbox" type="checkbox" <?php checked( $instance['ignore_sticky'], 1 ); ?> id="<?php echo esc_attr( $this->get_field_id( 'ignore_sticky' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'ignore_sticky' ) ); ?>" />
|
296 |
+
<label for="<?php echo esc_attr( $this->get_field_id( 'ignore_sticky' ) ); ?>">
|
297 |
+
<?php esc_attr_e( 'Ignore sticky posts', 'recent-posts-widget-extended' ); ?>
|
298 |
+
</label>
|
299 |
+
</p>
|
300 |
+
|
301 |
+
<p>
|
302 |
+
<input class="checkbox" type="checkbox" <?php checked( $instance['exclude_current'], 1 ); ?> id="<?php echo esc_attr( $this->get_field_id( 'exclude_current' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'exclude_current' ) ); ?>" />
|
303 |
+
<label for="<?php echo esc_attr( $this->get_field_id( 'exclude_current' ) ); ?>">
|
304 |
+
<?php esc_attr_e( 'Exclude current post', 'recent-posts-widget-extended' ); ?>
|
305 |
+
</label>
|
306 |
+
</p>
|
307 |
+
|
308 |
+
<div class="rpwe-multiple-check-form">
|
309 |
+
<label>
|
310 |
+
<?php esc_attr_e( 'Post Types', 'recent-posts-widget-extended' ); ?>
|
311 |
+
</label>
|
312 |
+
<?php foreach ( get_post_types( array( 'public' => true ), 'objects' ) as $posttype ) : ?>
|
313 |
+
<p>
|
314 |
+
<input type="checkbox" value="<?php echo esc_attr( $posttype->name ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'post_type' ) ) . '-' . esc_attr( $posttype->name ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'post_type' ) ); ?>[]" <?php checked( is_array( $instance['post_type'] ) && in_array( $posttype->name, $instance['post_type'], true ) ); ?> />
|
315 |
+
<label for="<?php echo esc_attr( $this->get_field_id( 'post_type' ) ) . '-' . esc_attr( $posttype->name ); ?>">
|
316 |
+
<?php echo esc_html( $posttype->labels->name ); ?>
|
317 |
+
</label>
|
318 |
+
</p>
|
319 |
+
<?php endforeach; ?>
|
320 |
+
</div>
|
321 |
+
|
322 |
+
<p>
|
323 |
+
<label for="<?php echo esc_attr( $this->get_field_id( 'post_status' ) ); ?>">
|
324 |
+
<?php esc_attr_e( 'Post Status', 'recent-posts-widget-extended' ); ?>
|
325 |
+
</label>
|
326 |
+
<select class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'post_status' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'post_status' ) ); ?>" style="width:100%;">
|
327 |
+
<?php foreach ( array_keys( get_object_vars( wp_count_posts( 'post' ) ) ) as $status_value => $status_label ) { ?>
|
328 |
+
<option value="<?php echo esc_attr( $status_label ); ?>" <?php selected( $instance['post_status'], $status_label ); ?>><?php echo esc_html( ucfirst( $status_label ) ); ?></option>
|
329 |
+
<?php } ?>
|
330 |
+
</select>
|
331 |
+
</p>
|
332 |
+
|
333 |
+
<p>
|
334 |
+
<label for="<?php echo esc_attr( $this->get_field_id( 'order' ) ); ?>">
|
335 |
+
<?php esc_attr_e( 'Order', 'recent-posts-widget-extended' ); ?>
|
336 |
+
</label>
|
337 |
+
<select class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'order' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'order' ) ); ?>" style="width:100%;">
|
338 |
+
<option value="DESC" <?php selected( $instance['order'], 'DESC' ); ?>><?php esc_attr_e( 'Descending', 'recent-posts-widget-extended' ); ?></option>
|
339 |
+
<option value="ASC" <?php selected( $instance['order'], 'ASC' ); ?>><?php esc_attr_e( 'Ascending', 'recent-posts-widget-extended' ); ?></option>
|
340 |
+
</select>
|
341 |
+
</p>
|
342 |
+
|
343 |
+
<p>
|
344 |
+
<label for="<?php echo esc_attr( $this->get_field_id( 'orderby' ) ); ?>">
|
345 |
+
<?php esc_attr_e( 'Orderby', 'recent-posts-widget-extended' ); ?>
|
346 |
+
</label>
|
347 |
+
<select class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'orderby' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'orderby' ) ); ?>" style="width:100%;">
|
348 |
+
<option value="ID" <?php selected( $instance['orderby'], 'ID' ); ?>><?php esc_attr_e( 'ID', 'recent-posts-widget-extended' ); ?></option>
|
349 |
+
<option value="author" <?php selected( $instance['orderby'], 'author' ); ?>><?php esc_attr_e( 'Author', 'recent-posts-widget-extended' ); ?></option>
|
350 |
+
<option value="title" <?php selected( $instance['orderby'], 'title' ); ?>><?php esc_attr_e( 'Title', 'recent-posts-widget-extended' ); ?></option>
|
351 |
+
<option value="date" <?php selected( $instance['orderby'], 'date' ); ?>><?php esc_attr_e( 'Date', 'recent-posts-widget-extended' ); ?></option>
|
352 |
+
<option value="modified" <?php selected( $instance['orderby'], 'modified' ); ?>><?php esc_attr_e( 'Modified', 'recent-posts-widget-extended' ); ?></option>
|
353 |
+
<option value="rand" <?php selected( $instance['orderby'], 'rand' ); ?>><?php esc_attr_e( 'Random', 'recent-posts-widget-extended' ); ?></option>
|
354 |
+
<option value="comment_count" <?php selected( $instance['orderby'], 'comment_count' ); ?>><?php esc_attr_e( 'Comment Count', 'recent-posts-widget-extended' ); ?></option>
|
355 |
+
<option value="menu_order" <?php selected( $instance['orderby'], 'menu_order' ); ?>><?php esc_attr_e( 'Menu Order', 'recent-posts-widget-extended' ); ?></option>
|
356 |
+
</select>
|
357 |
+
</p>
|
358 |
+
|
359 |
+
<div class="rpwe-multiple-check-form">
|
360 |
+
<label>
|
361 |
+
<?php esc_attr_e( 'Limit to Category', 'recent-posts-widget-extended' ); ?>
|
362 |
+
</label>
|
363 |
+
|
364 |
+
<?php foreach ( rpwe_cats_list() as $category ) : ?>
|
365 |
+
<p>
|
366 |
+
<input type="checkbox" value="<?php echo (int) $category->term_id; ?>" id="<?php echo esc_attr( $this->get_field_id( 'cat' ) ) . '-' . (int) $category->term_id; ?>" name="<?php echo esc_attr( $this->get_field_name( 'cat' ) ); ?>[]" <?php checked( is_array( $instance['cat'] ) && in_array( $category->term_id, $instance['cat'], true ) ); ?> />
|
367 |
+
<label for="<?php echo esc_attr( $this->get_field_id( 'cat' ) ) . '-' . (int) $category->term_id; ?>">
|
368 |
+
<?php echo esc_html( $category->name ); ?>
|
369 |
+
</label>
|
370 |
+
</p>
|
371 |
+
<?php endforeach; ?>
|
372 |
+
</div>
|
373 |
+
|
374 |
+
<div class="rpwe-multiple-check-form">
|
375 |
+
<label>
|
376 |
+
<?php esc_attr_e( 'Limit to Tag', 'recent-posts-widget-extended' ); ?>
|
377 |
+
</label>
|
378 |
+
<?php foreach ( rpwe_tags_list() as $post_tag ) : ?>
|
379 |
+
<p>
|
380 |
+
<input type="checkbox" value="<?php echo (int) $post_tag->term_id; ?>" id="<?php echo esc_attr( $this->get_field_id( 'tag' ) ) . '-' . (int) $post_tag->term_id; ?>" name="<?php echo esc_attr( $this->get_field_name( 'tag' ) ); ?>[]" <?php checked( is_array( $instance['tag'] ) && in_array( $post_tag->term_id, $instance['tag'], true ) ); ?> />
|
381 |
+
<label for="<?php echo esc_attr( $this->get_field_id( 'tag' ) ) . '-' . (int) $post_tag->term_id; ?>">
|
382 |
+
<?php echo esc_html( $post_tag->name ); ?>
|
383 |
+
</label>
|
384 |
+
</p>
|
385 |
+
<?php endforeach; ?>
|
386 |
+
</div>
|
387 |
+
|
388 |
+
<p>
|
389 |
+
<label for="<?php echo esc_attr( $this->get_field_id( 'taxonomy' ) ); ?>">
|
390 |
+
<?php esc_attr_e( 'Limit to Taxonomy', 'recent-posts-widget-extended' ); ?>
|
391 |
+
</label>
|
392 |
+
<input type="text" class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'taxonomy' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'taxonomy' ) ); ?>" value="<?php echo esc_attr( $instance['taxonomy'] ); ?>" />
|
393 |
+
<small>
|
394 |
+
<?php esc_attr_e( 'Ex: category=1,2,4&post_tag=6,12. ', 'recent-posts-widget-extended' ); ?>
|
395 |
+
<?php
|
396 |
+
esc_attr_e( 'Available: ', 'recent-posts-widget-extended' );
|
397 |
+
echo implode( ', ', get_taxonomies( array( 'public' => true ) ) );
|
398 |
+
?>
|
399 |
+
</small>
|
400 |
+
</p>
|
401 |
+
|
402 |
+
<p>
|
403 |
+
<label for="<?php echo esc_attr( $this->get_field_id( 'limit' ) ); ?>">
|
404 |
+
<?php esc_attr_e( 'Number of posts to show', 'recent-posts-widget-extended' ); ?>
|
405 |
+
</label>
|
406 |
+
<input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'limit' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'limit' ) ); ?>" type="number" step="1" min="-1" value="<?php echo (int) ( $instance['limit'] ); ?>" />
|
407 |
+
</p>
|
408 |
+
|
409 |
+
<p>
|
410 |
+
<label for="<?php echo esc_attr( $this->get_field_id( 'offset' ) ); ?>">
|
411 |
+
<?php esc_attr_e( 'Offset', 'recent-posts-widget-extended' ); ?>
|
412 |
+
</label>
|
413 |
+
<input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'offset' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'offset' ) ); ?>" type="number" step="1" min="0" value="<?php echo (int) ( $instance['offset'] ); ?>" />
|
414 |
+
<small><?php esc_attr_e( 'The number of posts to skip', 'recent-posts-widget-extended' ); ?></small>
|
415 |
+
</p>
|
416 |
+
</div>
|
417 |
+
|
418 |
+
<div id="tab3" class="rpwe-tab-content">
|
419 |
+
<?php if ( current_theme_supports( 'post-thumbnails' ) ) { ?>
|
420 |
+
|
421 |
+
<p>
|
422 |
+
<input id="<?php echo esc_attr( $this->get_field_id( 'thumb' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'thumb' ) ); ?>" type="checkbox" <?php checked( $instance['thumb'] ); ?> />
|
423 |
+
<label for="<?php echo esc_attr( $this->get_field_id( 'thumb' ) ); ?>">
|
424 |
+
<?php esc_attr_e( 'Display Thumbnail', 'recent-posts-widget-extended' ); ?>
|
425 |
+
</label>
|
426 |
+
</p>
|
427 |
+
|
428 |
+
<p>
|
429 |
+
<label class="rpwe-block" for="<?php echo esc_attr( $this->get_field_id( 'thumb_height' ) ); ?>">
|
430 |
+
<?php esc_attr_e( 'Thumbnail (height,width,align)', 'recent-posts-widget-extended' ); ?>
|
431 |
+
</label>
|
432 |
+
|
433 |
+
<input class="small-input" id="<?php echo esc_attr( $this->get_field_id( 'thumb_height' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'thumb_height' ) ); ?>" type="number" step="1" min="0" value="<?php echo (int) ( $instance['thumb_height'] ); ?>" />
|
434 |
+
|
435 |
+
<input class="small-input" id="<?php echo esc_attr( $this->get_field_id( 'thumb_width' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'thumb_width' ) ); ?>" type="number" step="1" min="0" value="<?php echo (int) ( $instance['thumb_width'] ); ?>" />
|
436 |
+
|
437 |
+
<select class="small-input" id="<?php echo esc_attr( $this->get_field_id( 'thumb_align' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'thumb_align' ) ); ?>">
|
438 |
+
<option value="rpwe-alignleft" <?php selected( $instance['thumb_align'], 'rpwe-alignleft' ); ?>><?php esc_attr_e( 'Left', 'recent-posts-widget-extended' ); ?></option>
|
439 |
+
<option value="rpwe-alignright" <?php selected( $instance['thumb_align'], 'rpwe-alignright' ); ?>><?php esc_attr_e( 'Right', 'recent-posts-widget-extended' ); ?></option>
|
440 |
+
<option value="rpwe-aligncenter" <?php selected( $instance['thumb_align'], 'rpwe-aligncenter' ); ?>><?php esc_attr_e( 'Center', 'recent-posts-widget-extended' ); ?></option>
|
441 |
+
</select>
|
442 |
+
</p>
|
443 |
+
|
444 |
+
<p>
|
445 |
+
<label for="<?php echo esc_attr( $this->get_field_id( 'thumb_default' ) ); ?>">
|
446 |
+
<?php esc_attr_e( 'Default Thumbnail', 'recent-posts-widget-extended' ); ?>
|
447 |
+
</label>
|
448 |
+
<input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'thumb_default' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'thumb_default' ) ); ?>" type="text" value="<?php echo esc_url( $instance['thumb_default'] ); ?>" />
|
449 |
+
<small><?php esc_attr_e( 'Leave it blank to disable.', 'recent-posts-widget-extended' ); ?></small>
|
450 |
+
</p>
|
451 |
+
|
452 |
+
<?php } ?>
|
453 |
+
</div>
|
454 |
+
|
455 |
+
<div id="tab4" class="rpwe-tab-content">
|
456 |
+
<p>
|
457 |
+
<input id="<?php echo esc_attr( $this->get_field_id( 'excerpt' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'excerpt' ) ); ?>" type="checkbox" <?php checked( $instance['excerpt'] ); ?> />
|
458 |
+
<label for="<?php echo esc_attr( $this->get_field_id( 'excerpt' ) ); ?>">
|
459 |
+
<?php esc_attr_e( 'Display Excerpt', 'recent-posts-widget-extended' ); ?>
|
460 |
+
</label>
|
461 |
+
</p>
|
462 |
+
|
463 |
+
<p>
|
464 |
+
<label for="<?php echo esc_attr( $this->get_field_id( 'length' ) ); ?>">
|
465 |
+
<?php esc_attr_e( 'Excerpt Length', 'recent-posts-widget-extended' ); ?>
|
466 |
+
</label>
|
467 |
+
<input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'length' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'length' ) ); ?>" type="number" step="1" min="0" value="<?php echo (int) ( $instance['length'] ); ?>" />
|
468 |
+
</p>
|
469 |
+
|
470 |
+
<p>
|
471 |
+
<input id="<?php echo esc_attr( $this->get_field_id( 'readmore' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'readmore' ) ); ?>" type="checkbox" <?php checked( $instance['readmore'] ); ?> />
|
472 |
+
<label for="<?php echo esc_attr( $this->get_field_id( 'readmore' ) ); ?>">
|
473 |
+
<?php esc_attr_e( 'Display Readmore', 'recent-posts-widget-extended' ); ?>
|
474 |
+
</label>
|
475 |
+
</p>
|
476 |
+
|
477 |
+
<p>
|
478 |
+
<label for="<?php echo esc_attr( $this->get_field_id( 'readmore_text' ) ); ?>">
|
479 |
+
<?php esc_attr_e( 'Readmore Text', 'recent-posts-widget-extended' ); ?>
|
480 |
+
</label>
|
481 |
+
<input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'readmore_text' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'readmore_text' ) ); ?>" type="text" value="<?php echo esc_attr( $instance['readmore_text'] ); ?>" />
|
482 |
+
</p>
|
483 |
+
</div>
|
484 |
+
|
485 |
+
<div id="tab5" class="rpwe-tab-content">
|
486 |
+
<p>
|
487 |
+
<input id="<?php echo esc_attr( $this->get_field_id( 'post_title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'post_title' ) ); ?>" type="checkbox" <?php checked( $instance['post_title'] ); ?> />
|
488 |
+
<label for="<?php echo esc_attr( $this->get_field_id( 'post_title' ) ); ?>">
|
489 |
+
<?php esc_attr_e( 'Display post title', 'recent-posts-widget-extended' ); ?>
|
490 |
+
</label>
|
491 |
+
</p>
|
492 |
+
<p>
|
493 |
+
<input id="<?php echo esc_attr( $this->get_field_id( 'comment_count' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'comment_count' ) ); ?>" type="checkbox" <?php checked( $instance['comment_count'] ); ?> />
|
494 |
+
<label for="<?php echo esc_attr( $this->get_field_id( 'comment_count' ) ); ?>">
|
495 |
+
<?php esc_attr_e( 'Display comment count', 'recent-posts-widget-extended' ); ?>
|
496 |
+
</label>
|
497 |
+
</p>
|
498 |
+
|
499 |
+
<p>
|
500 |
+
<input id="<?php echo esc_attr( $this->get_field_id( 'date' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'date' ) ); ?>" type="checkbox" <?php checked( $instance['date'] ); ?> />
|
501 |
+
<label for="<?php echo esc_attr( $this->get_field_id( 'date' ) ); ?>">
|
502 |
+
<?php esc_attr_e( 'Display date', 'recent-posts-widget-extended' ); ?>
|
503 |
+
</label>
|
504 |
+
</p>
|
505 |
+
|
506 |
+
<p>
|
507 |
+
<input id="<?php echo esc_attr( $this->get_field_id( 'date_modified' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'date_modified' ) ); ?>" type="checkbox" <?php checked( $instance['date_modified'] ); ?> />
|
508 |
+
<label for="<?php echo esc_attr( $this->get_field_id( 'date_modified' ) ); ?>">
|
509 |
+
<?php esc_attr_e( 'Use a modification date', 'recent-posts-widget-extended' ); ?>
|
510 |
+
</label>
|
511 |
+
</p>
|
512 |
+
|
513 |
+
<p>
|
514 |
+
<input id="<?php echo esc_attr( $this->get_field_id( 'date_relative' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'date_relative' ) ); ?>" type="checkbox" <?php checked( $instance['date_relative'] ); ?> />
|
515 |
+
<label for="<?php echo esc_attr( $this->get_field_id( 'date_relative' ) ); ?>">
|
516 |
+
<?php esc_attr_e( 'Use relative date. eg: 5 days ago', 'recent-posts-widget-extended' ); ?>
|
517 |
+
</label>
|
518 |
+
</p>
|
519 |
+
|
520 |
+
<p>
|
521 |
+
<input id="<?php echo esc_attr( $this->get_field_id( 'link_target' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'link_target' ) ); ?>" type="checkbox" <?php checked( $instance['link_target'] ); ?> />
|
522 |
+
<label for="<?php echo esc_attr( $this->get_field_id( 'link_target' ) ); ?>">
|
523 |
+
<?php esc_attr_e( 'Open links in new tab', 'recent-posts-widget-extended' ); ?>
|
524 |
+
</label>
|
525 |
+
</p>
|
526 |
+
</div>
|
527 |
+
|
528 |
+
<div id="tab6" class="rpwe-tab-content">
|
529 |
+
<p>
|
530 |
+
<input id="<?php echo esc_attr( $this->get_field_id( 'styles_default' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'styles_default' ) ); ?>" type="checkbox" <?php checked( $instance['styles_default'] ); ?> />
|
531 |
+
<label for="<?php echo esc_attr( $this->get_field_id( 'styles_default' ) ); ?>">
|
532 |
+
<?php esc_attr_e( 'Use Default Styles', 'recent-posts-widget-extended' ); ?>
|
533 |
+
</label>
|
534 |
+
</p>
|
535 |
+
|
536 |
+
<p>
|
537 |
+
<label for="<?php echo esc_attr( $this->get_field_id( 'css' ) ); ?>">
|
538 |
+
<?php esc_attr_e( 'Custom CSS', 'recent-posts-widget-extended' ); ?>
|
539 |
+
</label>
|
540 |
+
<textarea class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'css' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'css' ) ); ?>" style="height:180px;"><?php echo esc_attr( $instance['css'] ); ?></textarea>
|
541 |
+
<small><?php esc_attr_e( 'If you turn off the default styles, you can use these css code to customize the recent posts style.', 'recent-posts-widget-extended' ); ?></small>
|
542 |
+
</p>
|
543 |
+
</div>
|
544 |
+
|
545 |
+
<div id="tab7" class="rpwe-tab-content">
|
546 |
+
<p>
|
547 |
+
<?php esc_html_e( 'If you are enjoying this plugin. I would appreciate a donation to help me keep coding and supporting this project!', 'recent-posts-widget-extende' ); ?>
|
548 |
+
</p>
|
549 |
+
<p><a class="button" href="https://paypal.me/satrya" target="_blank"><?php esc_html_e( 'Donate Now', 'recent-posts-widget-extended' ); ?></a></p>
|
550 |
+
</div>
|
551 |
+
|
552 |
+
</div>
|
553 |
+
</div>
|
554 |
+
</div>
|
555 |
+
<?php
|
556 |
}
|
557 |
}
|
includes/compatibility.php
CHANGED
@@ -30,7 +30,7 @@ add_filter(
|
|
30 |
add_action(
|
31 |
'siteorigin_panel_enqueue_admin_scripts',
|
32 |
function() {
|
33 |
-
wp_enqueue_script( 'rpwe-siteorigin',
|
34 |
-
wp_enqueue_style( 'rpwe-admin-style',
|
35 |
}
|
36 |
);
|
30 |
add_action(
|
31 |
'siteorigin_panel_enqueue_admin_scripts',
|
32 |
function() {
|
33 |
+
wp_enqueue_script( 'rpwe-siteorigin', RPWE_URL . 'assets/js/rpwe-siteorigin.js', array( 'jquery' ), RPWE_VERSION, true );
|
34 |
+
wp_enqueue_style( 'rpwe-admin-style', RPWE_URL . 'assets/css/rpwe-admin.css', null, RPWE_VERSION );
|
35 |
}
|
36 |
);
|
includes/defaults.php
CHANGED
@@ -10,10 +10,10 @@
|
|
10 |
*/
|
11 |
function rpwe_get_default_args() {
|
12 |
|
13 |
-
$css_defaults = ".rpwe-block ul{\nlist-style: none !important;\nmargin-left: 0 !important;\npadding-left: 0 !important;\n}\n\n.rpwe-block li{\nborder-bottom: 1px solid #eee;\nmargin
|
14 |
|
15 |
$defaults = array(
|
16 |
-
'title' => esc_attr__( 'Recent Posts', '
|
17 |
'title_url' => '',
|
18 |
|
19 |
'limit' => 5,
|
10 |
*/
|
11 |
function rpwe_get_default_args() {
|
12 |
|
13 |
+
$css_defaults = ".rpwe-block ul{\nlist-style: none !important;\nmargin-left: 0 !important;\npadding-left: 0 !important;\n}\n\n.rpwe-block li{\nborder-bottom: 1px solid #eee;\nmargin: 0 0 8px !important;\npadding: 5px 0 10px !important;\nlist-style-type: none !important;\ndisplay: block;\n}\n\n.rpwe-block a{\ndisplay: inline !important;\ntext-decoration: none;\n}\n\n.rpwe-block h3{\nbackground: none !important;\nclear: none;\nmargin-bottom: 0 !important;\nmargin-top: 0 !important;\nfont-weight: 400;\nfont-size: 12px !important;\nline-height: 1.5em;\n}\n\n.rpwe-thumb{\nborder: 1px solid #eee !important;\nbox-shadow: none !important;\nmargin: 2px 10px 2px 0 !important;\npadding: 3px !important;\n}\n\n.rpwe-summary{\nfont-size: 12px;\n}\n\n.rpwe-time{\ncolor: #bbb;\nfont-size: 11px;\n}\n\n.rpwe-comment{\ncolor: #bbb;\nfont-size: 11px;\npadding-left: 5px;\n}\n\n.rpwe-alignleft{\ndisplay: inline;\nfloat: left;\n}\n\n.rpwe-alignright{\ndisplay: inline;\nfloat: right;\n}\n\n.rpwe-aligncenter{\ndisplay: block;\nmargin-left: auto;\nmargin-right: auto;\n}\n\n.rpwe-clearfix:before,\n.rpwe-clearfix:after{\ncontent: \"\";\ndisplay: table !important;\n}\n\n.rpwe-clearfix:after{\nclear: both;\n}\n\n.rpwe-clearfix{\nzoom: 1;\n}\n";
|
14 |
|
15 |
$defaults = array(
|
16 |
+
'title' => esc_attr__( 'Recent Posts', 'recent-posts-widget-extended' ),
|
17 |
'title_url' => '',
|
18 |
|
19 |
'limit' => 5,
|
includes/form.php
DELETED
@@ -1,324 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Widget forms.
|
4 |
-
*
|
5 |
-
* @package Recent Posts Extended
|
6 |
-
*/
|
7 |
-
|
8 |
-
?>
|
9 |
-
|
10 |
-
<div class="rpwe-options">
|
11 |
-
|
12 |
-
<div class="rpwe-tabs">
|
13 |
-
|
14 |
-
<ul id="rpwe-tabs-nav">
|
15 |
-
<li><a href="#tab1"><?php esc_html_e( 'General', 'recent-posts-widget-extended' ); ?></a></li>
|
16 |
-
<li><a href="#tab2"><?php esc_html_e( 'Posts', 'recent-posts-widget-extended' ); ?></a></li>
|
17 |
-
<li><a href="#tab3"><?php esc_html_e( 'Image', 'recent-posts-widget-extended' ); ?></a></li>
|
18 |
-
<li><a href="#tab4"><?php esc_html_e( 'Excerpt', 'recent-posts-widget-extended' ); ?></a></li>
|
19 |
-
<li><a href="#tab5"><?php esc_html_e( 'Control', 'recent-posts-widget-extended' ); ?></a></li>
|
20 |
-
<li><a href="#tab6"><?php esc_html_e( 'Style', 'recent-posts-widget-extended' ); ?></a></li>
|
21 |
-
</ul>
|
22 |
-
|
23 |
-
<div id="rpwe-tabs-content">
|
24 |
-
|
25 |
-
<div id="tab1" class="rpwe-tab-content">
|
26 |
-
<p>
|
27 |
-
<label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>">
|
28 |
-
<?php esc_attr_e( 'Title', 'recent-posts-widget-extended' ); ?>
|
29 |
-
</label>
|
30 |
-
<input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" type="text" value="<?php echo esc_attr( $instance['title'] ); ?>" />
|
31 |
-
</p>
|
32 |
-
|
33 |
-
<p>
|
34 |
-
<label for="<?php echo esc_attr( $this->get_field_id( 'title_url' ) ); ?>">
|
35 |
-
<?php esc_attr_e( 'Title URL', 'recent-posts-widget-extended' ); ?>
|
36 |
-
</label>
|
37 |
-
<input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'title_url' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title_url' ) ); ?>" type="text" value="<?php echo esc_url( $instance['title_url'] ); ?>" />
|
38 |
-
</p>
|
39 |
-
|
40 |
-
<p>
|
41 |
-
<label for="<?php echo esc_attr( $this->get_field_id( 'css_id' ) ); ?>">
|
42 |
-
<?php esc_attr_e( 'Container ID', 'recent-posts-widget-extended' ); ?>
|
43 |
-
</label>
|
44 |
-
<input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'css_id' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'css_id' ) ); ?>" type="text" value="<?php echo esc_attr( $instance['css_id'] ); ?>" />
|
45 |
-
</p>
|
46 |
-
|
47 |
-
<p>
|
48 |
-
<label for="<?php echo esc_attr( $this->get_field_id( 'css_class' ) ); ?>">
|
49 |
-
<?php esc_attr_e( 'Container Class', 'recent-posts-widget-extended' ); ?>
|
50 |
-
</label>
|
51 |
-
<input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'css_class' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'css_class' ) ); ?>" type="text" value="<?php echo esc_attr( $instance['css_class'] ); ?>" />
|
52 |
-
</p>
|
53 |
-
|
54 |
-
<p>
|
55 |
-
<label for="<?php echo esc_attr( $this->get_field_id( 'before' ) ); ?>">
|
56 |
-
<?php esc_attr_e( 'HTML or text before the recent posts', 'recent-posts-widget-extended' ); ?>
|
57 |
-
</label>
|
58 |
-
<textarea class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'before' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'before' ) ); ?>" rows="5"><?php echo wp_kses_post( htmlspecialchars( stripslashes( $instance['before'] ) ) ); ?></textarea>
|
59 |
-
</p>
|
60 |
-
|
61 |
-
<p>
|
62 |
-
<label for="<?php echo esc_attr( $this->get_field_id( 'after' ) ); ?>">
|
63 |
-
<?php esc_attr_e( 'HTML or text after the recent posts', 'recent-posts-widget-extended' ); ?>
|
64 |
-
</label>
|
65 |
-
<textarea class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'after' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'after' ) ); ?>" rows="5"><?php echo wp_kses_post( htmlspecialchars( stripslashes( $instance['after'] ) ) ); ?></textarea>
|
66 |
-
</p>
|
67 |
-
</div>
|
68 |
-
|
69 |
-
<div id="tab2" class="rpwe-tab-content">
|
70 |
-
|
71 |
-
<p>
|
72 |
-
<input class="checkbox" type="checkbox" <?php checked( $instance['ignore_sticky'], 1 ); ?> id="<?php echo esc_attr( $this->get_field_id( 'ignore_sticky' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'ignore_sticky' ) ); ?>" />
|
73 |
-
<label for="<?php echo esc_attr( $this->get_field_id( 'ignore_sticky' ) ); ?>">
|
74 |
-
<?php esc_attr_e( 'Ignore sticky posts', 'recent-posts-widget-extended' ); ?>
|
75 |
-
</label>
|
76 |
-
</p>
|
77 |
-
|
78 |
-
<p>
|
79 |
-
<input class="checkbox" type="checkbox" <?php checked( $instance['exclude_current'], 1 ); ?> id="<?php echo esc_attr( $this->get_field_id( 'exclude_current' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'exclude_current' ) ); ?>" />
|
80 |
-
<label for="<?php echo esc_attr( $this->get_field_id( 'exclude_current' ) ); ?>">
|
81 |
-
<?php esc_attr_e( 'Exclude current post', 'recent-posts-widget-extended' ); ?>
|
82 |
-
</label>
|
83 |
-
</p>
|
84 |
-
|
85 |
-
<div class="rpwe-multiple-check-form">
|
86 |
-
<label>
|
87 |
-
<?php esc_attr_e( 'Post Types', 'recent-posts-widget-extended' ); ?>
|
88 |
-
</label>
|
89 |
-
<?php foreach ( get_post_types( array( 'public' => true ), 'objects' ) as $posttype ) : ?>
|
90 |
-
<p>
|
91 |
-
<input type="checkbox" value="<?php echo esc_attr( $posttype->name ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'post_type' ) ) . '-' . esc_attr( $posttype->name ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'post_type' ) ); ?>[]" <?php checked( is_array( $instance['post_type'] ) && in_array( $posttype->name, $instance['post_type'], true ) ); ?> />
|
92 |
-
<label for="<?php echo esc_attr( $this->get_field_id( 'post_type' ) ) . '-' . esc_attr( $posttype->name ); ?>">
|
93 |
-
<?php echo esc_html( $posttype->labels->name ); ?>
|
94 |
-
</label>
|
95 |
-
</p>
|
96 |
-
<?php endforeach; ?>
|
97 |
-
</div>
|
98 |
-
|
99 |
-
<p>
|
100 |
-
<label for="<?php echo esc_attr( $this->get_field_id( 'post_status' ) ); ?>">
|
101 |
-
<?php esc_attr_e( 'Post Status', 'recent-posts-widget-extended' ); ?>
|
102 |
-
</label>
|
103 |
-
<select class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'post_status' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'post_status' ) ); ?>" style="width:100%;">
|
104 |
-
<?php foreach ( array_keys( get_object_vars( wp_count_posts( 'post' ) ) ) as $status_value => $status_label ) { ?>
|
105 |
-
<option value="<?php echo esc_attr( $status_label ); ?>" <?php selected( $instance['post_status'], $status_label ); ?>><?php echo esc_html( ucfirst( $status_label ) ); ?></option>
|
106 |
-
<?php } ?>
|
107 |
-
</select>
|
108 |
-
</p>
|
109 |
-
|
110 |
-
<p>
|
111 |
-
<label for="<?php echo esc_attr( $this->get_field_id( 'order' ) ); ?>">
|
112 |
-
<?php esc_attr_e( 'Order', 'recent-posts-widget-extended' ); ?>
|
113 |
-
</label>
|
114 |
-
<select class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'order' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'order' ) ); ?>" style="width:100%;">
|
115 |
-
<option value="DESC" <?php selected( $instance['order'], 'DESC' ); ?>><?php esc_attr_e( 'Descending', 'rpwe' ); ?></option>
|
116 |
-
<option value="ASC" <?php selected( $instance['order'], 'ASC' ); ?>><?php esc_attr_e( 'Ascending', 'rpwe' ); ?></option>
|
117 |
-
</select>
|
118 |
-
</p>
|
119 |
-
|
120 |
-
<p>
|
121 |
-
<label for="<?php echo esc_attr( $this->get_field_id( 'orderby' ) ); ?>">
|
122 |
-
<?php esc_attr_e( 'Orderby', 'recent-posts-widget-extended' ); ?>
|
123 |
-
</label>
|
124 |
-
<select class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'orderby' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'orderby' ) ); ?>" style="width:100%;">
|
125 |
-
<option value="ID" <?php selected( $instance['orderby'], 'ID' ); ?>><?php esc_attr_e( 'ID', 'rpwe' ); ?></option>
|
126 |
-
<option value="author" <?php selected( $instance['orderby'], 'author' ); ?>><?php esc_attr_e( 'Author', 'rpwe' ); ?></option>
|
127 |
-
<option value="title" <?php selected( $instance['orderby'], 'title' ); ?>><?php esc_attr_e( 'Title', 'rpwe' ); ?></option>
|
128 |
-
<option value="date" <?php selected( $instance['orderby'], 'date' ); ?>><?php esc_attr_e( 'Date', 'rpwe' ); ?></option>
|
129 |
-
<option value="modified" <?php selected( $instance['orderby'], 'modified' ); ?>><?php esc_attr_e( 'Modified', 'rpwe' ); ?></option>
|
130 |
-
<option value="rand" <?php selected( $instance['orderby'], 'rand' ); ?>><?php esc_attr_e( 'Random', 'rpwe' ); ?></option>
|
131 |
-
<option value="comment_count" <?php selected( $instance['orderby'], 'comment_count' ); ?>><?php esc_attr_e( 'Comment Count', 'rpwe' ); ?></option>
|
132 |
-
<option value="menu_order" <?php selected( $instance['orderby'], 'menu_order' ); ?>><?php esc_attr_e( 'Menu Order', 'rpwe' ); ?></option>
|
133 |
-
</select>
|
134 |
-
</p>
|
135 |
-
|
136 |
-
<div class="rpwe-multiple-check-form">
|
137 |
-
<label>
|
138 |
-
<?php esc_attr_e( 'Limit to Category', 'recent-posts-widget-extended' ); ?>
|
139 |
-
</label>
|
140 |
-
|
141 |
-
<?php foreach ( rpwe_cats_list() as $category ) : ?>
|
142 |
-
<p>
|
143 |
-
<input type="checkbox" value="<?php echo (int) $category->term_id; ?>" id="<?php echo esc_attr( $this->get_field_id( 'cat' ) ) . '-' . (int) $category->term_id; ?>" name="<?php echo esc_attr( $this->get_field_name( 'cat' ) ); ?>[]" <?php checked( is_array( $instance['cat'] ) && in_array( $category->term_id, $instance['cat'], true ) ); ?> />
|
144 |
-
<label for="<?php echo esc_attr( $this->get_field_id( 'cat' ) ) . '-' . (int) $category->term_id; ?>">
|
145 |
-
<?php echo esc_html( $category->name ); ?>
|
146 |
-
</label>
|
147 |
-
</p>
|
148 |
-
<?php endforeach; ?>
|
149 |
-
</div>
|
150 |
-
|
151 |
-
<div class="rpwe-multiple-check-form">
|
152 |
-
<label>
|
153 |
-
<?php esc_attr_e( 'Limit to Tag', 'recent-posts-widget-extended' ); ?>
|
154 |
-
</label>
|
155 |
-
<?php foreach ( rpwe_tags_list() as $post_tag ) : ?>
|
156 |
-
<p>
|
157 |
-
<input type="checkbox" value="<?php echo (int) $post_tag->term_id; ?>" id="<?php echo esc_attr( $this->get_field_id( 'tag' ) ) . '-' . (int) $post_tag->term_id; ?>" name="<?php echo esc_attr( $this->get_field_name( 'tag' ) ); ?>[]" <?php checked( is_array( $instance['tag'] ) && in_array( $post_tag->term_id, $instance['tag'], true ) ); ?> />
|
158 |
-
<label for="<?php echo esc_attr( $this->get_field_id( 'tag' ) ) . '-' . (int) $post_tag->term_id; ?>">
|
159 |
-
<?php echo esc_html( $post_tag->name ); ?>
|
160 |
-
</label>
|
161 |
-
</p>
|
162 |
-
<?php endforeach; ?>
|
163 |
-
</div>
|
164 |
-
|
165 |
-
<p>
|
166 |
-
<label for="<?php echo esc_attr( $this->get_field_id( 'taxonomy' ) ); ?>">
|
167 |
-
<?php esc_attr_e( 'Limit to Taxonomy', 'recent-posts-widget-extended' ); ?>
|
168 |
-
</label>
|
169 |
-
<input type="text" class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'taxonomy' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'taxonomy' ) ); ?>" value="<?php echo esc_attr( $instance['taxonomy'] ); ?>" />
|
170 |
-
<small>
|
171 |
-
<?php esc_attr_e( 'Ex: category=1,2,4&post_tag=6,12. ', 'rpwe' ); ?>
|
172 |
-
<?php
|
173 |
-
esc_attr_e( 'Available: ', 'rpwe' );
|
174 |
-
echo implode( ', ', get_taxonomies( array( 'public' => true ) ) );
|
175 |
-
?>
|
176 |
-
</small>
|
177 |
-
</p>
|
178 |
-
|
179 |
-
<p>
|
180 |
-
<label for="<?php echo esc_attr( $this->get_field_id( 'limit' ) ); ?>">
|
181 |
-
<?php esc_attr_e( 'Number of posts to show', 'recent-posts-widget-extended' ); ?>
|
182 |
-
</label>
|
183 |
-
<input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'limit' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'limit' ) ); ?>" type="number" step="1" min="-1" value="<?php echo (int) ( $instance['limit'] ); ?>" />
|
184 |
-
</p>
|
185 |
-
|
186 |
-
<p>
|
187 |
-
<label for="<?php echo esc_attr( $this->get_field_id( 'offset' ) ); ?>">
|
188 |
-
<?php esc_attr_e( 'Offset', 'recent-posts-widget-extended' ); ?>
|
189 |
-
</label>
|
190 |
-
<input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'offset' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'offset' ) ); ?>" type="number" step="1" min="0" value="<?php echo (int) ( $instance['offset'] ); ?>" />
|
191 |
-
<small><?php esc_attr_e( 'The number of posts to skip', 'recent-posts-widget-extended' ); ?></small>
|
192 |
-
</p>
|
193 |
-
</div>
|
194 |
-
|
195 |
-
<div id="tab3" class="rpwe-tab-content">
|
196 |
-
<?php if ( current_theme_supports( 'post-thumbnails' ) ) { ?>
|
197 |
-
|
198 |
-
<p>
|
199 |
-
<input id="<?php echo esc_attr( $this->get_field_id( 'thumb' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'thumb' ) ); ?>" type="checkbox" <?php checked( $instance['thumb'] ); ?> />
|
200 |
-
<label for="<?php echo esc_attr( $this->get_field_id( 'thumb' ) ); ?>">
|
201 |
-
<?php esc_attr_e( 'Display Thumbnail', 'recent-posts-widget-extended' ); ?>
|
202 |
-
</label>
|
203 |
-
</p>
|
204 |
-
|
205 |
-
<p>
|
206 |
-
<label class="rpwe-block" for="<?php echo esc_attr( $this->get_field_id( 'thumb_height' ) ); ?>">
|
207 |
-
<?php esc_attr_e( 'Thumbnail (height,width,align)', 'recent-posts-widget-extended' ); ?>
|
208 |
-
</label>
|
209 |
-
|
210 |
-
<input class="small-input" id="<?php echo esc_attr( $this->get_field_id( 'thumb_height' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'thumb_height' ) ); ?>" type="number" step="1" min="0" value="<?php echo (int) ( $instance['thumb_height'] ); ?>" />
|
211 |
-
|
212 |
-
<input class="small-input" id="<?php echo esc_attr( $this->get_field_id( 'thumb_width' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'thumb_width' ) ); ?>" type="number" step="1" min="0" value="<?php echo (int) ( $instance['thumb_width'] ); ?>" />
|
213 |
-
|
214 |
-
<select class="small-input" id="<?php echo esc_attr( $this->get_field_id( 'thumb_align' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'thumb_align' ) ); ?>">
|
215 |
-
<option value="rpwe-alignleft" <?php selected( $instance['thumb_align'], 'rpwe-alignleft' ); ?>><?php esc_attr_e( 'Left', 'recent-posts-widget-extended' ); ?></option>
|
216 |
-
<option value="rpwe-alignright" <?php selected( $instance['thumb_align'], 'rpwe-alignright' ); ?>><?php esc_attr_e( 'Right', 'recent-posts-widget-extended' ); ?></option>
|
217 |
-
<option value="rpwe-aligncenter" <?php selected( $instance['thumb_align'], 'rpwe-aligncenter' ); ?>><?php esc_attr_e( 'Center', 'recent-posts-widget-extended' ); ?></option>
|
218 |
-
</select>
|
219 |
-
</p>
|
220 |
-
|
221 |
-
<p>
|
222 |
-
<label for="<?php echo esc_attr( $this->get_field_id( 'thumb_default' ) ); ?>">
|
223 |
-
<?php esc_attr_e( 'Default Thumbnail', 'recent-posts-widget-extended' ); ?>
|
224 |
-
</label>
|
225 |
-
<input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'thumb_default' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'thumb_default' ) ); ?>" type="text" value="<?php echo esc_url( $instance['thumb_default'] ); ?>" />
|
226 |
-
<small><?php esc_attr_e( 'Leave it blank to disable.', 'recent-posts-widget-extended' ); ?></small>
|
227 |
-
</p>
|
228 |
-
|
229 |
-
<?php } ?>
|
230 |
-
</div>
|
231 |
-
|
232 |
-
<div id="tab4" class="rpwe-tab-content">
|
233 |
-
<p>
|
234 |
-
<input id="<?php echo esc_attr( $this->get_field_id( 'excerpt' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'excerpt' ) ); ?>" type="checkbox" <?php checked( $instance['excerpt'] ); ?> />
|
235 |
-
<label for="<?php echo esc_attr( $this->get_field_id( 'excerpt' ) ); ?>">
|
236 |
-
<?php esc_attr_e( 'Display Excerpt', 'recent-posts-widget-extended' ); ?>
|
237 |
-
</label>
|
238 |
-
</p>
|
239 |
-
|
240 |
-
<p>
|
241 |
-
<label for="<?php echo esc_attr( $this->get_field_id( 'length' ) ); ?>">
|
242 |
-
<?php esc_attr_e( 'Excerpt Length', 'recent-posts-widget-extended' ); ?>
|
243 |
-
</label>
|
244 |
-
<input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'length' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'length' ) ); ?>" type="number" step="1" min="0" value="<?php echo (int) ( $instance['length'] ); ?>" />
|
245 |
-
</p>
|
246 |
-
|
247 |
-
<p>
|
248 |
-
<input id="<?php echo esc_attr( $this->get_field_id( 'readmore' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'readmore' ) ); ?>" type="checkbox" <?php checked( $instance['readmore'] ); ?> />
|
249 |
-
<label for="<?php echo esc_attr( $this->get_field_id( 'readmore' ) ); ?>">
|
250 |
-
<?php esc_attr_e( 'Display Readmore', 'recent-posts-widget-extended' ); ?>
|
251 |
-
</label>
|
252 |
-
</p>
|
253 |
-
|
254 |
-
<p>
|
255 |
-
<label for="<?php echo esc_attr( $this->get_field_id( 'readmore_text' ) ); ?>">
|
256 |
-
<?php esc_attr_e( 'Readmore Text', 'recent-posts-widget-extended' ); ?>
|
257 |
-
</label>
|
258 |
-
<input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'readmore_text' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'readmore_text' ) ); ?>" type="text" value="<?php echo esc_attr( $instance['readmore_text'] ); ?>" />
|
259 |
-
</p>
|
260 |
-
</div>
|
261 |
-
|
262 |
-
<div id="tab5" class="rpwe-tab-content">
|
263 |
-
<p>
|
264 |
-
<input id="<?php echo esc_attr( $this->get_field_id( 'post_title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'post_title' ) ); ?>" type="checkbox" <?php checked( $instance['post_title'] ); ?> />
|
265 |
-
<label for="<?php echo esc_attr( $this->get_field_id( 'post_title' ) ); ?>">
|
266 |
-
<?php esc_attr_e( 'Display post title', 'recent-posts-widget-extended' ); ?>
|
267 |
-
</label>
|
268 |
-
</p>
|
269 |
-
<p>
|
270 |
-
<input id="<?php echo esc_attr( $this->get_field_id( 'comment_count' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'comment_count' ) ); ?>" type="checkbox" <?php checked( $instance['comment_count'] ); ?> />
|
271 |
-
<label for="<?php echo esc_attr( $this->get_field_id( 'comment_count' ) ); ?>">
|
272 |
-
<?php esc_attr_e( 'Display comment count', 'recent-posts-widget-extended' ); ?>
|
273 |
-
</label>
|
274 |
-
</p>
|
275 |
-
|
276 |
-
<p>
|
277 |
-
<input id="<?php echo esc_attr( $this->get_field_id( 'date' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'date' ) ); ?>" type="checkbox" <?php checked( $instance['date'] ); ?> />
|
278 |
-
<label for="<?php echo esc_attr( $this->get_field_id( 'date' ) ); ?>">
|
279 |
-
<?php esc_attr_e( 'Display date', 'recent-posts-widget-extended' ); ?>
|
280 |
-
</label>
|
281 |
-
</p>
|
282 |
-
|
283 |
-
<p>
|
284 |
-
<input id="<?php echo esc_attr( $this->get_field_id( 'date_modified' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'date_modified' ) ); ?>" type="checkbox" <?php checked( $instance['date_modified'] ); ?> />
|
285 |
-
<label for="<?php echo esc_attr( $this->get_field_id( 'date_modified' ) ); ?>">
|
286 |
-
<?php esc_attr_e( 'Use a modification date', 'recent-posts-widget-extended' ); ?>
|
287 |
-
</label>
|
288 |
-
</p>
|
289 |
-
|
290 |
-
<p>
|
291 |
-
<input id="<?php echo esc_attr( $this->get_field_id( 'date_relative' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'date_relative' ) ); ?>" type="checkbox" <?php checked( $instance['date_relative'] ); ?> />
|
292 |
-
<label for="<?php echo esc_attr( $this->get_field_id( 'date_relative' ) ); ?>">
|
293 |
-
<?php esc_attr_e( 'Use relative date. eg: 5 days ago', 'recent-posts-widget-extended' ); ?>
|
294 |
-
</label>
|
295 |
-
</p>
|
296 |
-
|
297 |
-
<p>
|
298 |
-
<input id="<?php echo esc_attr( $this->get_field_id( 'link_target' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'link_target' ) ); ?>" type="checkbox" <?php checked( $instance['link_target'] ); ?> />
|
299 |
-
<label for="<?php echo esc_attr( $this->get_field_id( 'link_target' ) ); ?>">
|
300 |
-
<?php esc_attr_e( 'Open links in new tab', 'recent-posts-widget-extended' ); ?>
|
301 |
-
</label>
|
302 |
-
</p>
|
303 |
-
</div>
|
304 |
-
|
305 |
-
<div id="tab6" class="rpwe-tab-content">
|
306 |
-
<p>
|
307 |
-
<input id="<?php echo esc_attr( $this->get_field_id( 'styles_default' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'styles_default' ) ); ?>" type="checkbox" <?php checked( $instance['styles_default'] ); ?> />
|
308 |
-
<label for="<?php echo esc_attr( $this->get_field_id( 'styles_default' ) ); ?>">
|
309 |
-
<?php esc_attr_e( 'Use Default Styles', 'recent-posts-widget-extended' ); ?>
|
310 |
-
</label>
|
311 |
-
</p>
|
312 |
-
|
313 |
-
<p>
|
314 |
-
<label for="<?php echo esc_attr( $this->get_field_id( 'css' ) ); ?>">
|
315 |
-
<?php esc_attr_e( 'Custom CSS', 'recent-posts-widget-extended' ); ?>
|
316 |
-
</label>
|
317 |
-
<textarea class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'css' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'css' ) ); ?>" style="height:180px;"><?php echo esc_attr( $instance['css'] ); ?></textarea>
|
318 |
-
<small><?php esc_attr_e( 'If you turn off the default styles, you can use these css code to customize the recent posts style.', 'recent-posts-widget-extended' ); ?></small>
|
319 |
-
</p>
|
320 |
-
</div>
|
321 |
-
|
322 |
-
</div>
|
323 |
-
</div>
|
324 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/functions.php
CHANGED
@@ -136,7 +136,7 @@ function rpwe_get_recent_posts( $args = array() ) {
|
|
136 |
/* translators: %s: current time */
|
137 |
$date = sprintf( __( '%s ago', 'recent-posts-widget-extended' ), human_time_diff( get_the_modified_date( 'U' ), strtotime( wp_date( 'Y-m-d H:i:s' ) ) ) );
|
138 |
}
|
139 |
-
$html .= '<time class="rpwe-time
|
140 |
}
|
141 |
|
142 |
if ( $args['comment_count'] ) {
|
136 |
/* translators: %s: current time */
|
137 |
$date = sprintf( __( '%s ago', 'recent-posts-widget-extended' ), human_time_diff( get_the_modified_date( 'U' ), strtotime( wp_date( 'Y-m-d H:i:s' ) ) ) );
|
138 |
}
|
139 |
+
$html .= '<time class="rpwe-time modified" datetime="' . esc_html( get_the_modified_date( 'c' ) ) . '">' . esc_html( $date ) . '</time>';
|
140 |
}
|
141 |
|
142 |
if ( $args['comment_count'] ) {
|
languages/recent-posts-widget-extended.pot
CHANGED
@@ -6,7 +6,7 @@ msgstr ""
|
|
6 |
"MIME-Version: 1.0\n"
|
7 |
"Content-Type: text/plain; charset=UTF-8\n"
|
8 |
"Content-Transfer-Encoding: 8bit\n"
|
9 |
-
"POT-Creation-Date: 2022-
|
10 |
"X-Poedit-Basepath: ..\n"
|
11 |
"X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
|
12 |
"X-Poedit-SearchPath-0: .\n"
|
@@ -22,186 +22,242 @@ msgstr ""
|
|
22 |
msgid "Recent Posts Extended"
|
23 |
msgstr ""
|
24 |
|
25 |
-
#:
|
26 |
-
msgid "Read More »"
|
27 |
-
msgstr ""
|
28 |
-
|
29 |
-
#: includes/form.php:15
|
30 |
msgid "General"
|
31 |
msgstr ""
|
32 |
|
33 |
-
#:
|
34 |
msgid "Posts"
|
35 |
msgstr ""
|
36 |
|
37 |
-
#:
|
38 |
msgid "Image"
|
39 |
msgstr ""
|
40 |
|
41 |
-
#:
|
42 |
msgid "Excerpt"
|
43 |
msgstr ""
|
44 |
|
45 |
-
#:
|
46 |
msgid "Control"
|
47 |
msgstr ""
|
48 |
|
49 |
-
#:
|
50 |
msgid "Style"
|
51 |
msgstr ""
|
52 |
|
53 |
-
#:
|
|
|
|
|
|
|
|
|
54 |
msgid "Title"
|
55 |
msgstr ""
|
56 |
|
57 |
-
#:
|
58 |
msgid "Title URL"
|
59 |
msgstr ""
|
60 |
|
61 |
-
#:
|
62 |
msgid "Container ID"
|
63 |
msgstr ""
|
64 |
|
65 |
-
#:
|
66 |
msgid "Container Class"
|
67 |
msgstr ""
|
68 |
|
69 |
-
#:
|
70 |
msgid "HTML or text before the recent posts"
|
71 |
msgstr ""
|
72 |
|
73 |
-
#:
|
74 |
msgid "HTML or text after the recent posts"
|
75 |
msgstr ""
|
76 |
|
77 |
-
#:
|
78 |
msgid "Ignore sticky posts"
|
79 |
msgstr ""
|
80 |
|
81 |
-
#:
|
82 |
msgid "Exclude current post"
|
83 |
msgstr ""
|
84 |
|
85 |
-
#:
|
86 |
msgid "Post Types"
|
87 |
msgstr ""
|
88 |
|
89 |
-
#:
|
90 |
msgid "Post Status"
|
91 |
msgstr ""
|
92 |
|
93 |
-
#:
|
94 |
msgid "Order"
|
95 |
msgstr ""
|
96 |
|
97 |
-
#:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
msgid "Orderby"
|
99 |
msgstr ""
|
100 |
|
101 |
-
#:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
msgid "Limit to Category"
|
103 |
msgstr ""
|
104 |
|
105 |
-
#:
|
106 |
msgid "Limit to Tag"
|
107 |
msgstr ""
|
108 |
|
109 |
-
#:
|
110 |
msgid "Limit to Taxonomy"
|
111 |
msgstr ""
|
112 |
|
113 |
-
#:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
msgid "Number of posts to show"
|
115 |
msgstr ""
|
116 |
|
117 |
-
#:
|
118 |
msgid "Offset"
|
119 |
msgstr ""
|
120 |
|
121 |
-
#:
|
122 |
msgid "The number of posts to skip"
|
123 |
msgstr ""
|
124 |
|
125 |
-
#:
|
126 |
msgid "Display Thumbnail"
|
127 |
msgstr ""
|
128 |
|
129 |
-
#:
|
130 |
msgid "Thumbnail (height,width,align)"
|
131 |
msgstr ""
|
132 |
|
133 |
-
#:
|
134 |
msgid "Left"
|
135 |
msgstr ""
|
136 |
|
137 |
-
#:
|
138 |
msgid "Right"
|
139 |
msgstr ""
|
140 |
|
141 |
-
#:
|
142 |
msgid "Center"
|
143 |
msgstr ""
|
144 |
|
145 |
-
#:
|
146 |
msgid "Default Thumbnail"
|
147 |
msgstr ""
|
148 |
|
149 |
-
#:
|
150 |
msgid "Leave it blank to disable."
|
151 |
msgstr ""
|
152 |
|
153 |
-
#:
|
154 |
msgid "Display Excerpt"
|
155 |
msgstr ""
|
156 |
|
157 |
-
#:
|
158 |
msgid "Excerpt Length"
|
159 |
msgstr ""
|
160 |
|
161 |
-
#:
|
162 |
msgid "Display Readmore"
|
163 |
msgstr ""
|
164 |
|
165 |
-
#:
|
166 |
msgid "Readmore Text"
|
167 |
msgstr ""
|
168 |
|
169 |
-
#:
|
170 |
msgid "Display post title"
|
171 |
msgstr ""
|
172 |
|
173 |
-
#:
|
174 |
msgid "Display comment count"
|
175 |
msgstr ""
|
176 |
|
177 |
-
#:
|
178 |
msgid "Display date"
|
179 |
msgstr ""
|
180 |
|
181 |
-
#:
|
182 |
msgid "Use a modification date"
|
183 |
msgstr ""
|
184 |
|
185 |
-
#:
|
186 |
msgid "Use relative date. eg: 5 days ago"
|
187 |
msgstr ""
|
188 |
|
189 |
-
#:
|
190 |
msgid "Open links in new tab"
|
191 |
msgstr ""
|
192 |
|
193 |
-
#:
|
194 |
msgid "Use Default Styles"
|
195 |
msgstr ""
|
196 |
|
197 |
-
#:
|
198 |
msgid "Custom CSS"
|
199 |
msgstr ""
|
200 |
|
201 |
-
#:
|
202 |
msgid "If you turn off the default styles, you can use these css code to customize the recent posts style."
|
203 |
msgstr ""
|
204 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
205 |
#. translators: %s: current time
|
206 |
#: includes/functions.php:137, includes/functions.php:130
|
207 |
msgid "%s ago"
|
6 |
"MIME-Version: 1.0\n"
|
7 |
"Content-Type: text/plain; charset=UTF-8\n"
|
8 |
"Content-Transfer-Encoding: 8bit\n"
|
9 |
+
"POT-Creation-Date: 2022-10-14 04:07+0000\n"
|
10 |
"X-Poedit-Basepath: ..\n"
|
11 |
"X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
|
12 |
"X-Poedit-SearchPath-0: .\n"
|
22 |
msgid "Recent Posts Extended"
|
23 |
msgstr ""
|
24 |
|
25 |
+
#: classes/class-rpwe-widget.php:237
|
|
|
|
|
|
|
|
|
26 |
msgid "General"
|
27 |
msgstr ""
|
28 |
|
29 |
+
#: classes/class-rpwe-widget.php:238
|
30 |
msgid "Posts"
|
31 |
msgstr ""
|
32 |
|
33 |
+
#: classes/class-rpwe-widget.php:239
|
34 |
msgid "Image"
|
35 |
msgstr ""
|
36 |
|
37 |
+
#: classes/class-rpwe-widget.php:240
|
38 |
msgid "Excerpt"
|
39 |
msgstr ""
|
40 |
|
41 |
+
#: classes/class-rpwe-widget.php:241
|
42 |
msgid "Control"
|
43 |
msgstr ""
|
44 |
|
45 |
+
#: classes/class-rpwe-widget.php:242
|
46 |
msgid "Style"
|
47 |
msgstr ""
|
48 |
|
49 |
+
#: classes/class-rpwe-widget.php:243
|
50 |
+
msgid "Support"
|
51 |
+
msgstr ""
|
52 |
+
|
53 |
+
#: classes/class-rpwe-widget.php:251, classes/class-rpwe-widget.php:350
|
54 |
msgid "Title"
|
55 |
msgstr ""
|
56 |
|
57 |
+
#: classes/class-rpwe-widget.php:258
|
58 |
msgid "Title URL"
|
59 |
msgstr ""
|
60 |
|
61 |
+
#: classes/class-rpwe-widget.php:265
|
62 |
msgid "Container ID"
|
63 |
msgstr ""
|
64 |
|
65 |
+
#: classes/class-rpwe-widget.php:272
|
66 |
msgid "Container Class"
|
67 |
msgstr ""
|
68 |
|
69 |
+
#: classes/class-rpwe-widget.php:279
|
70 |
msgid "HTML or text before the recent posts"
|
71 |
msgstr ""
|
72 |
|
73 |
+
#: classes/class-rpwe-widget.php:286
|
74 |
msgid "HTML or text after the recent posts"
|
75 |
msgstr ""
|
76 |
|
77 |
+
#: classes/class-rpwe-widget.php:297
|
78 |
msgid "Ignore sticky posts"
|
79 |
msgstr ""
|
80 |
|
81 |
+
#: classes/class-rpwe-widget.php:304
|
82 |
msgid "Exclude current post"
|
83 |
msgstr ""
|
84 |
|
85 |
+
#: classes/class-rpwe-widget.php:310
|
86 |
msgid "Post Types"
|
87 |
msgstr ""
|
88 |
|
89 |
+
#: classes/class-rpwe-widget.php:324
|
90 |
msgid "Post Status"
|
91 |
msgstr ""
|
92 |
|
93 |
+
#: classes/class-rpwe-widget.php:335
|
94 |
msgid "Order"
|
95 |
msgstr ""
|
96 |
|
97 |
+
#: classes/class-rpwe-widget.php:338
|
98 |
+
msgid "Descending"
|
99 |
+
msgstr ""
|
100 |
+
|
101 |
+
#: classes/class-rpwe-widget.php:339
|
102 |
+
msgid "Ascending"
|
103 |
+
msgstr ""
|
104 |
+
|
105 |
+
#: classes/class-rpwe-widget.php:345
|
106 |
msgid "Orderby"
|
107 |
msgstr ""
|
108 |
|
109 |
+
#: classes/class-rpwe-widget.php:348
|
110 |
+
msgid "ID"
|
111 |
+
msgstr ""
|
112 |
+
|
113 |
+
#: classes/class-rpwe-widget.php:349
|
114 |
+
msgid "Author"
|
115 |
+
msgstr ""
|
116 |
+
|
117 |
+
#: classes/class-rpwe-widget.php:351
|
118 |
+
msgid "Date"
|
119 |
+
msgstr ""
|
120 |
+
|
121 |
+
#: classes/class-rpwe-widget.php:352
|
122 |
+
msgid "Modified"
|
123 |
+
msgstr ""
|
124 |
+
|
125 |
+
#: classes/class-rpwe-widget.php:353
|
126 |
+
msgid "Random"
|
127 |
+
msgstr ""
|
128 |
+
|
129 |
+
#: classes/class-rpwe-widget.php:354
|
130 |
+
msgid "Comment Count"
|
131 |
+
msgstr ""
|
132 |
+
|
133 |
+
#: classes/class-rpwe-widget.php:355
|
134 |
+
msgid "Menu Order"
|
135 |
+
msgstr ""
|
136 |
+
|
137 |
+
#: classes/class-rpwe-widget.php:361
|
138 |
msgid "Limit to Category"
|
139 |
msgstr ""
|
140 |
|
141 |
+
#: classes/class-rpwe-widget.php:376
|
142 |
msgid "Limit to Tag"
|
143 |
msgstr ""
|
144 |
|
145 |
+
#: classes/class-rpwe-widget.php:390
|
146 |
msgid "Limit to Taxonomy"
|
147 |
msgstr ""
|
148 |
|
149 |
+
#: classes/class-rpwe-widget.php:394
|
150 |
+
msgid "Ex: category=1,2,4&post_tag=6,12. "
|
151 |
+
msgstr ""
|
152 |
+
|
153 |
+
#: classes/class-rpwe-widget.php:396
|
154 |
+
msgid "Available: "
|
155 |
+
msgstr ""
|
156 |
+
|
157 |
+
#: classes/class-rpwe-widget.php:404
|
158 |
msgid "Number of posts to show"
|
159 |
msgstr ""
|
160 |
|
161 |
+
#: classes/class-rpwe-widget.php:411
|
162 |
msgid "Offset"
|
163 |
msgstr ""
|
164 |
|
165 |
+
#: classes/class-rpwe-widget.php:414
|
166 |
msgid "The number of posts to skip"
|
167 |
msgstr ""
|
168 |
|
169 |
+
#: classes/class-rpwe-widget.php:424
|
170 |
msgid "Display Thumbnail"
|
171 |
msgstr ""
|
172 |
|
173 |
+
#: classes/class-rpwe-widget.php:430
|
174 |
msgid "Thumbnail (height,width,align)"
|
175 |
msgstr ""
|
176 |
|
177 |
+
#: classes/class-rpwe-widget.php:438
|
178 |
msgid "Left"
|
179 |
msgstr ""
|
180 |
|
181 |
+
#: classes/class-rpwe-widget.php:439
|
182 |
msgid "Right"
|
183 |
msgstr ""
|
184 |
|
185 |
+
#: classes/class-rpwe-widget.php:440
|
186 |
msgid "Center"
|
187 |
msgstr ""
|
188 |
|
189 |
+
#: classes/class-rpwe-widget.php:446
|
190 |
msgid "Default Thumbnail"
|
191 |
msgstr ""
|
192 |
|
193 |
+
#: classes/class-rpwe-widget.php:449
|
194 |
msgid "Leave it blank to disable."
|
195 |
msgstr ""
|
196 |
|
197 |
+
#: classes/class-rpwe-widget.php:459
|
198 |
msgid "Display Excerpt"
|
199 |
msgstr ""
|
200 |
|
201 |
+
#: classes/class-rpwe-widget.php:465
|
202 |
msgid "Excerpt Length"
|
203 |
msgstr ""
|
204 |
|
205 |
+
#: classes/class-rpwe-widget.php:473
|
206 |
msgid "Display Readmore"
|
207 |
msgstr ""
|
208 |
|
209 |
+
#: classes/class-rpwe-widget.php:479
|
210 |
msgid "Readmore Text"
|
211 |
msgstr ""
|
212 |
|
213 |
+
#: classes/class-rpwe-widget.php:489
|
214 |
msgid "Display post title"
|
215 |
msgstr ""
|
216 |
|
217 |
+
#: classes/class-rpwe-widget.php:495
|
218 |
msgid "Display comment count"
|
219 |
msgstr ""
|
220 |
|
221 |
+
#: classes/class-rpwe-widget.php:502
|
222 |
msgid "Display date"
|
223 |
msgstr ""
|
224 |
|
225 |
+
#: classes/class-rpwe-widget.php:509
|
226 |
msgid "Use a modification date"
|
227 |
msgstr ""
|
228 |
|
229 |
+
#: classes/class-rpwe-widget.php:516
|
230 |
msgid "Use relative date. eg: 5 days ago"
|
231 |
msgstr ""
|
232 |
|
233 |
+
#: classes/class-rpwe-widget.php:523
|
234 |
msgid "Open links in new tab"
|
235 |
msgstr ""
|
236 |
|
237 |
+
#: classes/class-rpwe-widget.php:532
|
238 |
msgid "Use Default Styles"
|
239 |
msgstr ""
|
240 |
|
241 |
+
#: classes/class-rpwe-widget.php:538
|
242 |
msgid "Custom CSS"
|
243 |
msgstr ""
|
244 |
|
245 |
+
#: classes/class-rpwe-widget.php:541
|
246 |
msgid "If you turn off the default styles, you can use these css code to customize the recent posts style."
|
247 |
msgstr ""
|
248 |
|
249 |
+
#: classes/class-rpwe-widget.php:549
|
250 |
+
msgid "Donate Now"
|
251 |
+
msgstr ""
|
252 |
+
|
253 |
+
#: includes/defaults.php:16
|
254 |
+
msgid "Recent Posts"
|
255 |
+
msgstr ""
|
256 |
+
|
257 |
+
#: includes/defaults.php:42
|
258 |
+
msgid "Read More »"
|
259 |
+
msgstr ""
|
260 |
+
|
261 |
#. translators: %s: current time
|
262 |
#: includes/functions.php:137, includes/functions.php:130
|
263 |
msgid "%s ago"
|
readme.txt
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
=== Recent Posts Widget Extended ===
|
2 |
Contributors: satrya
|
3 |
-
Donate link: https://
|
4 |
Tags: recent posts, random posts, popular posts, thumbnails, widget, widgets, sidebar, excerpt, category, post tag, taxonomy, post type, post status, shortcode, multiple widgets
|
5 |
Requires at least: 5.8
|
6 |
-
Tested up to: 6.
|
7 |
Requires PHP: 7.2
|
8 |
-
Stable tag: 2.0.
|
9 |
License: GPLv3 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
@@ -13,14 +13,14 @@ Provides flexible and advanced recent posts. Display it via shortcode or widget
|
|
13 |
|
14 |
== Description ==
|
15 |
|
16 |
-
= Support this project =
|
17 |
-
|
18 |
-
If you are enjoying this plugin. I would appreciate a cup of coffee to help me keep coding and supporting the project! [Support & donate](https://paypal.me/satrya).
|
19 |
-
|
20 |
= Plugin description =
|
21 |
|
22 |
This plugin will enable a custom, flexible and advanced recent posts, you can display it via shortcode or widget. Allows you to display a list of the most recent posts with thumbnail, excerpt and post date, also you can display it from all or specific or multiple taxonomy, post type and much more!
|
23 |
|
|
|
|
|
|
|
|
|
24 |
= Features Include =
|
25 |
|
26 |
* Display by date, comment count or random.
|
@@ -83,6 +83,11 @@ Display 10 recent posts
|
|
83 |
[rpwe limit="10"]
|
84 |
`
|
85 |
|
|
|
|
|
|
|
|
|
|
|
86 |
Display 10 recent posts without thumbnail
|
87 |
`
|
88 |
[rpwe limit="10" thumb="false"]
|
@@ -145,9 +150,6 @@ function your_custom_function( $args ) {
|
|
145 |
}
|
146 |
`
|
147 |
|
148 |
-
= How to filter the post excerpt? =
|
149 |
-
Post excerpt now comes with filter to easily dev to change/customize it. `apply_filters( 'rpwe_excerpt', get_the_excerpt() )`
|
150 |
-
|
151 |
= Ordering not working! =
|
152 |
Did you installed any Post or Post Type Order? Please try to deactivate it and try again the ordering. [(related question)](http://wordpress.org/support/topic/ordering-set-to-descending-not-working)
|
153 |
|
@@ -252,6 +254,22 @@ rpwe_default_query_arguments
|
|
252 |
|
253 |
== Changelog ==
|
254 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
255 |
**2.0.1**
|
256 |
*Release Date: Sept 28, 2022*
|
257 |
|
1 |
=== Recent Posts Widget Extended ===
|
2 |
Contributors: satrya
|
3 |
+
Donate link: https://github.com/sponsors/gasatrya
|
4 |
Tags: recent posts, random posts, popular posts, thumbnails, widget, widgets, sidebar, excerpt, category, post tag, taxonomy, post type, post status, shortcode, multiple widgets
|
5 |
Requires at least: 5.8
|
6 |
+
Tested up to: 6.1
|
7 |
Requires PHP: 7.2
|
8 |
+
Stable tag: 2.0.2
|
9 |
License: GPLv3 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
13 |
|
14 |
== Description ==
|
15 |
|
|
|
|
|
|
|
|
|
16 |
= Plugin description =
|
17 |
|
18 |
This plugin will enable a custom, flexible and advanced recent posts, you can display it via shortcode or widget. Allows you to display a list of the most recent posts with thumbnail, excerpt and post date, also you can display it from all or specific or multiple taxonomy, post type and much more!
|
19 |
|
20 |
+
= Support this project =
|
21 |
+
|
22 |
+
If you are enjoying this plugin. I would appreciate a cup of coffee to help me keep coding and supporting the project! [Support & donate](https://github.com/sponsors/gasatrya).
|
23 |
+
|
24 |
= Features Include =
|
25 |
|
26 |
* Display by date, comment count or random.
|
83 |
[rpwe limit="10"]
|
84 |
`
|
85 |
|
86 |
+
Display 5 random posts
|
87 |
+
`
|
88 |
+
[rpwe limit="5" orderby="rand"]
|
89 |
+
`
|
90 |
+
|
91 |
Display 10 recent posts without thumbnail
|
92 |
`
|
93 |
[rpwe limit="10" thumb="false"]
|
150 |
}
|
151 |
`
|
152 |
|
|
|
|
|
|
|
153 |
= Ordering not working! =
|
154 |
Did you installed any Post or Post Type Order? Please try to deactivate it and try again the ordering. [(related question)](http://wordpress.org/support/topic/ordering-set-to-descending-not-working)
|
155 |
|
254 |
|
255 |
== Changelog ==
|
256 |
|
257 |
+
**2.0.2**
|
258 |
+
*Release Date: Oct 05, 2022*
|
259 |
+
|
260 |
+
**Bug fixes:**
|
261 |
+
|
262 |
+
- Prevent double slash when loading the php file.
|
263 |
+
- Use `display: block` for the list, `inline-block` causing issue for some websites.
|
264 |
+
|
265 |
+
**Enhancements:**
|
266 |
+
|
267 |
+
- Minor issue with the auto generate thumbnail function.
|
268 |
+
- Fix translation issue. Thanks [Alex Lion](https://github.com/alexclassroom).
|
269 |
+
- CSS tweak.
|
270 |
+
|
271 |
+
---
|
272 |
+
|
273 |
**2.0.1**
|
274 |
*Release Date: Sept 28, 2022*
|
275 |
|
rpwe.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Recent Posts Widget Extended
|
4 |
* Plugin URI: https://github.com/gasatrya/recent-posts-widget-extended
|
5 |
* Description: Enables advanced widget & shortcode that gives you total control over the output of your site’s most recent Posts.
|
6 |
-
* Version: 2.0.
|
7 |
* Requires at least: 5.8
|
8 |
* Requires PHP: 7.2
|
9 |
* Author: Ga Satrya
|
@@ -21,19 +21,18 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
21 |
exit;
|
22 |
}
|
23 |
|
24 |
-
define( 'RPWE_VERSION', '2.0.
|
25 |
-
define( '
|
26 |
-
define( '
|
27 |
-
define( 'RPWE_ASSETS', plugin_dir_url( __FILE__ ) . 'assets' );
|
28 |
|
29 |
// Loads plugin files.
|
30 |
-
|
31 |
-
|
32 |
-
require_once
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
require_once
|
37 |
|
38 |
/**
|
39 |
* Language
|
@@ -47,7 +46,7 @@ add_action( 'plugins_loaded', 'rpwe_i18n' );
|
|
47 |
* Widget register.
|
48 |
*/
|
49 |
function rpwe_widget_register() {
|
50 |
-
require_once
|
51 |
register_widget( 'RPWE_Widget' );
|
52 |
}
|
53 |
add_action( 'widgets_init', 'rpwe_widget_register' );
|
@@ -56,7 +55,7 @@ add_action( 'widgets_init', 'rpwe_widget_register' );
|
|
56 |
* Custom admin scripts.
|
57 |
*/
|
58 |
function rpwe_admin_scripts() {
|
59 |
-
wp_enqueue_style( 'rpwe-admin-style',
|
60 |
}
|
61 |
add_action( 'admin_enqueue_scripts', 'rpwe_admin_scripts' );
|
62 |
|
@@ -64,7 +63,7 @@ add_action( 'admin_enqueue_scripts', 'rpwe_admin_scripts' );
|
|
64 |
* Enqueue frontend stylesheet
|
65 |
*/
|
66 |
function rpwe_frontend_style() {
|
67 |
-
wp_register_style( 'rpwe-style',
|
68 |
}
|
69 |
add_action( 'wp_enqueue_scripts', 'rpwe_frontend_style' );
|
70 |
|
3 |
* Plugin Name: Recent Posts Widget Extended
|
4 |
* Plugin URI: https://github.com/gasatrya/recent-posts-widget-extended
|
5 |
* Description: Enables advanced widget & shortcode that gives you total control over the output of your site’s most recent Posts.
|
6 |
+
* Version: 2.0.2
|
7 |
* Requires at least: 5.8
|
8 |
* Requires PHP: 7.2
|
9 |
* Author: Ga Satrya
|
21 |
exit;
|
22 |
}
|
23 |
|
24 |
+
define( 'RPWE_VERSION', '2.0.2' );
|
25 |
+
define( 'RPWE_PATH', plugin_dir_path( __FILE__ ) );
|
26 |
+
define( 'RPWE_URL', plugin_dir_url( __FILE__ ) );
|
|
|
27 |
|
28 |
// Loads plugin files.
|
29 |
+
$rpwe_includes = RPWE_PATH . 'includes/*.php';
|
30 |
+
foreach ( glob( $rpwe_includes ) as $file ) {
|
31 |
+
require_once $file;
|
32 |
+
}
|
33 |
+
|
34 |
+
// Loads plugin classes.
|
35 |
+
require_once RPWE_PATH . 'classes/class-image-resizer.php';
|
36 |
|
37 |
/**
|
38 |
* Language
|
46 |
* Widget register.
|
47 |
*/
|
48 |
function rpwe_widget_register() {
|
49 |
+
require_once RPWE_PATH . 'classes/class-rpwe-widget.php';
|
50 |
register_widget( 'RPWE_Widget' );
|
51 |
}
|
52 |
add_action( 'widgets_init', 'rpwe_widget_register' );
|
55 |
* Custom admin scripts.
|
56 |
*/
|
57 |
function rpwe_admin_scripts() {
|
58 |
+
wp_enqueue_style( 'rpwe-admin-style', RPWE_URL . 'assets/css/rpwe-admin.css', null, RPWE_VERSION );
|
59 |
}
|
60 |
add_action( 'admin_enqueue_scripts', 'rpwe_admin_scripts' );
|
61 |
|
63 |
* Enqueue frontend stylesheet
|
64 |
*/
|
65 |
function rpwe_frontend_style() {
|
66 |
+
wp_register_style( 'rpwe-style', RPWE_URL . 'assets/css/rpwe-frontend.css', array(), RPWE_VERSION );
|
67 |
}
|
68 |
add_action( 'wp_enqueue_scripts', 'rpwe_frontend_style' );
|
69 |
|