<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
><channel><title>WordPress Hacks &#187; Hacks</title> <atom:link href="http://wordpress-hacks.com/cat/hacks/feed" rel="self" type="application/rss+xml" /><link>http://wordpress-hacks.com</link> <description>Tips y consejos de WordPress en español</description> <lastBuildDate>Fri, 23 Jul 2010 11:36:18 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.0.1</generator> <item><title>WordPress 3, fechas en español</title><link>http://wordpress-hacks.com/wordpress-3-fechas-en-espanol.php</link> <comments>http://wordpress-hacks.com/wordpress-3-fechas-en-espanol.php#comments</comments> <pubDate>Thu, 17 Jun 2010 23:53:16 +0000</pubDate> <dc:creator>Neri Aispuro</dc:creator> <category><![CDATA[Hacks]]></category> <category><![CDATA[WordPress 3]]></category><guid
isPermaLink="false">http://wordpress-hacks.com/?p=604</guid> <description><![CDATA[Algunos renegados usamos WordPress en inglés, yo particularmente porque me siento más cómodo, y cada uno tendrá su motivo, pero con wp en inglés las fechas también están en inglés y eso queda feo si escribimos blogs en español y nuestros visitantes son de habla hispana, por lo que, traducir y subir el locale.php es [...]]]></description> <content:encoded><![CDATA[<p><img
src="http://wordpress-hacks.com/wp-content/uploads/2010/06/Milestone-WordPress-3.png" alt="" title="Milestone WordPress 3" width="617" height="138" class="alignnone size-full wp-image-606" /></p><p>Algunos renegados usamos WordPress en inglés, yo particularmente porque me siento más cómodo, y cada uno tendrá su motivo, pero con wp en inglés las fechas también están en inglés y eso queda feo si escribimos blogs en español y nuestros visitantes son de habla hispana, por lo que, traducir y subir el locale.php es la mejor opción para poner <a
href="http://wordpress-hacks.com/pasar-wordpress-a-espanol-modificando-el-localephp.php">WordPress en español</a>, ahora como cambió el archivo (locale.php), lo he traducido de nuevo para que puedan bajarlo y subirlo en /wp-includes, si lo descargan, deben renombrar locale.txt a locale.php, o si no pueden copiarlo y crear un nuevo locale.php y pegarlo.<br
/> <span
id="more-604"></span></p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
</pre></td><td
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #009933; font-style: italic;">/**
 * Date and Time Locale object
 *
 * @package WordPress
 * @subpackage i18n
 */</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
 * Class that loads the calendar locale.
 *
 * @since 2.1.0
 */</span>
<span style="color: #000000; font-weight: bold;">class</span> WP_Locale <span style="color: #009900;">&#123;</span>
	<span style="color: #009933; font-style: italic;">/**
	 * Stores the translated strings for the full weekday names.
	 *
	 * @since 2.1.0
	 * @var array
	 * @access private
	 */</span>
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$weekday</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #009933; font-style: italic;">/**
	 * Stores the translated strings for the one character weekday names.
	 *
	 * There is a hack to make sure that Martes and Jueves, as well
	 * as Domingo and Sabado don't conflict. See init() method for more.
	 *
	 * @see WP_Locale::init() for how to handle the hack.
	 *
	 * @since 2.1.0
	 * @var array
	 * @access private
	 */</span>
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$weekday_initial</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #009933; font-style: italic;">/**
	 * Stores the translated strings for the abbreviated weekday names.
	 *
	 * @since 2.1.0
	 * @var array
	 * @access private
	 */</span>
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$weekday_abbrev</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #009933; font-style: italic;">/**
	 * Stores the translated strings for the full month names.
	 *
	 * @since 2.1.0
	 * @var array
	 * @access private
	 */</span>
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$month</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #009933; font-style: italic;">/**
	 * Stores the translated strings for the abbreviated month names.
	 *
	 * @since 2.1.0
	 * @var array
	 * @access private
	 */</span>
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$month_abbrev</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #009933; font-style: italic;">/**
	 * Stores the translated strings for 'am' and 'pm'.
	 *
	 * Also the capalized versions.
	 *
	 * @since 2.1.0
	 * @var array
	 * @access private
	 */</span>
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$meridiem</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #009933; font-style: italic;">/**
	 * The text direction of the locale language.
	 *
	 * Default is left to right 'ltr'.
	 *
	 * @since 2.1.0
	 * @var string
	 * @access private
	 */</span>
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$text_direction</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'ltr'</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #009933; font-style: italic;">/**
	 * Imports the global version to the class property.
	 *
	 * @since 2.1.0
	 * @var array
	 * @access private
	 */</span>
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$locale_vars</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'text_direction'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #009933; font-style: italic;">/**
	 * Sets up the translated strings and object properties.
	 *
	 * The method creates the translatable strings for various
	 * calendar elements. Which allows for specifying locale
	 * specific calendar names and text direction.
	 *
	 * @since 2.1.0
	 * @access private
	 */</span>
	<span style="color: #000000; font-weight: bold;">function</span> init<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #666666; font-style: italic;">// The Weekdays</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">weekday</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #666666; font-style: italic;">/* translators: weekday */</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Domingo'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">weekday</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #666666; font-style: italic;">/* translators: weekday */</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Lunes'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">weekday</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #666666; font-style: italic;">/* translators: weekday */</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Martes'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">weekday</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #666666; font-style: italic;">/* translators: weekday */</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Miercoles'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">weekday</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">4</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #666666; font-style: italic;">/* translators: weekday */</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Jueves'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">weekday</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">5</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #666666; font-style: italic;">/* translators: weekday */</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Viernes'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">weekday</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">6</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #666666; font-style: italic;">/* translators: weekday */</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Sabado'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">// The first letter of each day.  The _%day%_initial suffix is a hack to make</span>
		<span style="color: #666666; font-style: italic;">// sure the day initials are unique.</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">weekday_initial</span><span style="color: #009900;">&#91;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Domingo'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span>    <span style="color: #339933;">=</span> <span style="color: #666666; font-style: italic;">/* translators: one-letter abbreviation of the weekday */</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'D_Domingo_initial'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">weekday_initial</span><span style="color: #009900;">&#91;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Lunes'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span>    <span style="color: #339933;">=</span> <span style="color: #666666; font-style: italic;">/* translators: one-letter abbreviation of the weekday */</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'L_Lunes_initial'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">weekday_initial</span><span style="color: #009900;">&#91;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Martes'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span>   <span style="color: #339933;">=</span> <span style="color: #666666; font-style: italic;">/* translators: one-letter abbreviation of the weekday */</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'M_Martes_initial'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">weekday_initial</span><span style="color: #009900;">&#91;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Miercoles'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #666666; font-style: italic;">/* translators: one-letter abbreviation of the weekday */</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'M_Miercoles_initial'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">weekday_initial</span><span style="color: #009900;">&#91;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Jueves'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span>  <span style="color: #339933;">=</span> <span style="color: #666666; font-style: italic;">/* translators: one-letter abbreviation of the weekday */</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'J_Jueves_initial'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">weekday_initial</span><span style="color: #009900;">&#91;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Viernes'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span>    <span style="color: #339933;">=</span> <span style="color: #666666; font-style: italic;">/* translators: one-letter abbreviation of the weekday */</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'V_Viernes_initial'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">weekday_initial</span><span style="color: #009900;">&#91;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Sabado'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span>  <span style="color: #339933;">=</span> <span style="color: #666666; font-style: italic;">/* translators: one-letter abbreviation of the weekday */</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'S_Sabado_initial'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">weekday_initial</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$weekday_</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$weekday_initial_</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">weekday_initial</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$weekday_</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/_.+_initial$/'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$weekday_initial_</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">// Abbreviations for each day.</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">weekday_abbrev</span><span style="color: #009900;">&#91;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Domingo'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span>    <span style="color: #339933;">=</span> <span style="color: #666666; font-style: italic;">/* translators: three-letter abbreviation of the weekday */</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Dom'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">weekday_abbrev</span><span style="color: #009900;">&#91;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Lunes'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span>    <span style="color: #339933;">=</span> <span style="color: #666666; font-style: italic;">/* translators: three-letter abbreviation of the weekday */</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Lun'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">weekday_abbrev</span><span style="color: #009900;">&#91;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Martes'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span>   <span style="color: #339933;">=</span> <span style="color: #666666; font-style: italic;">/* translators: three-letter abbreviation of the weekday */</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Mar'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">weekday_abbrev</span><span style="color: #009900;">&#91;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Miercoles'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #666666; font-style: italic;">/* translators: three-letter abbreviation of the weekday */</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Mie'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">weekday_abbrev</span><span style="color: #009900;">&#91;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Jueves'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span>  <span style="color: #339933;">=</span> <span style="color: #666666; font-style: italic;">/* translators: three-letter abbreviation of the weekday */</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Jue'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">weekday_abbrev</span><span style="color: #009900;">&#91;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Viernes'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span>    <span style="color: #339933;">=</span> <span style="color: #666666; font-style: italic;">/* translators: three-letter abbreviation of the weekday */</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Vie'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">weekday_abbrev</span><span style="color: #009900;">&#91;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Sabado'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span>  <span style="color: #339933;">=</span> <span style="color: #666666; font-style: italic;">/* translators: three-letter abbreviation of the weekday */</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Sab'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">// The Months</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">month</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'01'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #666666; font-style: italic;">/* translators: month name */</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Enero'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">month</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'02'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #666666; font-style: italic;">/* translators: month name */</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Febrero'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">month</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'03'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #666666; font-style: italic;">/* translators: month name */</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Marzo'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">month</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'04'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #666666; font-style: italic;">/* translators: month name */</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Abril'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">month</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'05'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #666666; font-style: italic;">/* translators: month name */</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Mayo'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">month</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'06'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #666666; font-style: italic;">/* translators: month name */</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Junio'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">month</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'07'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #666666; font-style: italic;">/* translators: month name */</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Julio'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">month</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'08'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #666666; font-style: italic;">/* translators: month name */</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Agosto'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">month</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'09'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #666666; font-style: italic;">/* translators: month name */</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Septiembre'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">month</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'10'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #666666; font-style: italic;">/* translators: month name */</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Octubre'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">month</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'11'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #666666; font-style: italic;">/* translators: month name */</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Noviembre'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">month</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'12'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #666666; font-style: italic;">/* translators: month name */</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Diciembre'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">// Abbreviations for each month. Uses the same hack as above to get around the</span>
		<span style="color: #666666; font-style: italic;">// 'Mayo' duplication.</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">month_abbrev</span><span style="color: #009900;">&#91;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Enero'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #666666; font-style: italic;">/* translators: three-letter abbreviation of the month */</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Ene_Enero_abbreviation'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">month_abbrev</span><span style="color: #009900;">&#91;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Febrero'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #666666; font-style: italic;">/* translators: three-letter abbreviation of the month */</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Feb_Febrero_abbreviation'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">month_abbrev</span><span style="color: #009900;">&#91;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Marzo'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #666666; font-style: italic;">/* translators: three-letter abbreviation of the month */</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Mar_Marzo_abbreviation'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">month_abbrev</span><span style="color: #009900;">&#91;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Abril'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #666666; font-style: italic;">/* translators: three-letter abbreviation of the month */</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Abr_Abril_abbreviation'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">month_abbrev</span><span style="color: #009900;">&#91;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Mayo'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #666666; font-style: italic;">/* translators: three-letter abbreviation of the month */</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'May_Mayo_abbreviation'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">month_abbrev</span><span style="color: #009900;">&#91;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Junio'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #666666; font-style: italic;">/* translators: three-letter abbreviation of the month */</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Jun_Junio_abbreviation'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">month_abbrev</span><span style="color: #009900;">&#91;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Julio'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #666666; font-style: italic;">/* translators: three-letter abbreviation of the month */</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Jul_Julio_abbreviation'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">month_abbrev</span><span style="color: #009900;">&#91;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Agosto'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #666666; font-style: italic;">/* translators: three-letter abbreviation of the month */</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Ago_Agosto_abbreviation'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">month_abbrev</span><span style="color: #009900;">&#91;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Septiembre'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #666666; font-style: italic;">/* translators: three-letter abbreviation of the month */</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Sep_Septiembre_abbreviation'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">month_abbrev</span><span style="color: #009900;">&#91;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Octubre'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #666666; font-style: italic;">/* translators: three-letter abbreviation of the month */</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Oct_Octubre_abbreviation'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">month_abbrev</span><span style="color: #009900;">&#91;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Noviembre'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #666666; font-style: italic;">/* translators: three-letter abbreviation of the month */</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Nov_Noviembre_abbreviation'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">month_abbrev</span><span style="color: #009900;">&#91;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Diciembre'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #666666; font-style: italic;">/* translators: three-letter abbreviation of the month */</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Dic_Diciembre_abbreviation'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">month_abbrev</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$month_</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$month_abbrev_</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">month_abbrev</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$month_</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/_.+_abbreviation$/'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$month_abbrev_</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">// The Meridiems</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">meridiem</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'am'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'am'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">meridiem</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'pm'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'pm'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">meridiem</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'AM'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'AM'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">meridiem</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'PM'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'PM'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">// Numbers formatting</span>
		<span style="color: #666666; font-style: italic;">// See http://php.net/number_format</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">/* translators: $thousands_sep argument for http://php.net/number_format, default is , */</span>
		<span style="color: #000088;">$trans</span> <span style="color: #339933;">=</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'number_format_thousands_sep'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">number_format</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'thousands_sep'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'number_format_thousands_sep'</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$trans</span><span style="color: #009900;">&#41;</span> ? <span style="color: #0000ff;">','</span> <span style="color: #339933;">:</span> <span style="color: #000088;">$trans</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">/* translators: $dec_point argument for http://php.net/number_format, default is . */</span>
		<span style="color: #000088;">$trans</span> <span style="color: #339933;">=</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'number_format_decimal_point'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">number_format</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'decimal_point'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'number_format_decimal_point'</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$trans</span><span style="color: #009900;">&#41;</span> ? <span style="color: #0000ff;">'.'</span> <span style="color: #339933;">:</span> <span style="color: #000088;">$trans</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">// Import global locale vars set during inclusion of $locale.php.</span>
		<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">locale_vars</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$var</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$GLOBALS</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$var</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
				<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #000088;">$var</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$GLOBALS</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$var</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #009933; font-style: italic;">/**
	 * Retrieve the full translated weekday word.
	 *
	 * Week starts on translated Domingo and can be fetched
	 * by using 0 (zero). So the week starts with 0 (zero)
	 * and ends on Sabado with is fetched by using 6 (six).
	 *
	 * @since 2.1.0
	 * @access public
	 *
	 * @param int $weekday_number 0 for Domingo through 6 Sabado
	 * @return string Full translated weekday
	 */</span>
	<span style="color: #000000; font-weight: bold;">function</span> get_weekday<span style="color: #009900;">&#40;</span><span style="color: #000088;">$weekday_number</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">weekday</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$weekday_number</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #009933; font-style: italic;">/**
	 * Retrieve the translated weekday initial.
	 *
	 * The weekday initial is retrieved by the translated
	 * full weekday word. When translating the weekday initial
	 * pay attention to make sure that the starting letter does
	 * not conflict.
	 *
	 * @since 2.1.0
	 * @access public
	 *
	 * @param string $weekday_name
	 * @return string
	 */</span>
	<span style="color: #000000; font-weight: bold;">function</span> get_weekday_initial<span style="color: #009900;">&#40;</span><span style="color: #000088;">$weekday_name</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">weekday_initial</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$weekday_name</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #009933; font-style: italic;">/**
	 * Retrieve the translated weekday abbreviation.
	 *
	 * The weekday abbreviation is retrieved by the translated
	 * full weekday word.
	 *
	 * @since 2.1.0
	 * @access public
	 *
	 * @param string $weekday_name Full translated weekday word
	 * @return string Translated weekday abbreviation
	 */</span>
	<span style="color: #000000; font-weight: bold;">function</span> get_weekday_abbrev<span style="color: #009900;">&#40;</span><span style="color: #000088;">$weekday_name</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">weekday_abbrev</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$weekday_name</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #009933; font-style: italic;">/**
	 * Retrieve the full translated month by month number.
	 *
	 * The $month_number parameter has to be a string
	 * because it must have the '0' in front of any number
	 * that is less than 10. Starts from '01' and ends at
	 * '12'.
	 *
	 * You can use an integer instead and it will add the
	 * '0' before the numbers less than 10 for you.
	 *
	 * @since 2.1.0
	 * @access public
	 *
	 * @param string|int $month_number '01' through '12'
	 * @return string Translated full month name
	 */</span>
	<span style="color: #000000; font-weight: bold;">function</span> get_month<span style="color: #009900;">&#40;</span><span style="color: #000088;">$month_number</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">month</span><span style="color: #009900;">&#91;</span>zeroise<span style="color: #009900;">&#40;</span><span style="color: #000088;">$month_number</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #009933; font-style: italic;">/**
	 * Retrieve translated version of month abbreviation string.
	 *
	 * The $month_name parameter is expected to be the translated or
	 * translatable version of the month.
	 *
	 * @since 2.1.0
	 * @access public
	 *
	 * @param string $month_name Translated month to get abbreviated version
	 * @return string Translated abbreviated month
	 */</span>
	<span style="color: #000000; font-weight: bold;">function</span> get_month_abbrev<span style="color: #009900;">&#40;</span><span style="color: #000088;">$month_name</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">month_abbrev</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$month_name</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #009933; font-style: italic;">/**
	 * Retrieve translated version of meridiem string.
	 *
	 * The $meridiem parameter is expected to not be translated.
	 *
	 * @since 2.1.0
	 * @access public
	 *
	 * @param string $meridiem Either 'am', 'pm', 'AM', or 'PM'. Not translated version.
	 * @return string Translated version
	 */</span>
	<span style="color: #000000; font-weight: bold;">function</span> get_meridiem<span style="color: #009900;">&#40;</span><span style="color: #000088;">$meridiem</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">meridiem</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$meridiem</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #009933; font-style: italic;">/**
	 * Global variables are deprecated. For backwards compatibility only.
	 *
	 * @deprecated For backwards compatibility only.
	 * @access private
	 *
	 * @since 2.1.0
	 */</span>
	<span style="color: #000000; font-weight: bold;">function</span> register_globals<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$GLOBALS</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'weekday'</span><span style="color: #009900;">&#93;</span>         <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">weekday</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$GLOBALS</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'weekday_initial'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">weekday_initial</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$GLOBALS</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'weekday_abbrev'</span><span style="color: #009900;">&#93;</span>  <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">weekday_abbrev</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$GLOBALS</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'month'</span><span style="color: #009900;">&#93;</span>           <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">month</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$GLOBALS</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'month_abbrev'</span><span style="color: #009900;">&#93;</span>    <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">month_abbrev</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #009933; font-style: italic;">/**
	 * PHP4 style constructor which calls helper methods to set up object variables
	 *
	 * @uses WP_Locale::init()
	 * @uses WP_Locale::register_globals()
	 * @since 2.1.0
	 *
	 * @return WP_Locale
	 */</span>
	<span style="color: #000000; font-weight: bold;">function</span> WP_Locale<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">init</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">register_globals</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #009933; font-style: italic;">/**
	 * Checks if current locale is RTL.
	 *
	 * @since 3.0.0
	 * @return bool Whether locale is RTL.
	 */</span>
	 <span style="color: #000000; font-weight: bold;">function</span> is_rtl<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	 	<span style="color: #b1b100;">return</span> <span style="color: #0000ff;">'rtl'</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">text_direction</span><span style="color: #339933;">;</span>
	 <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
 * Checks if current locale is RTL.
 *
 * @since 3.0.0
 * @return bool Whether locale is RTL.
 */</span>
<span style="color: #000000; font-weight: bold;">function</span> is_rtl<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$wp_locale</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #000088;">$wp_locale</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">is_rtl</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div><p><a
href="http://wordpress-hacks.com/wp-content/uploads/2010/06/locale.txt">Descargarlo</a>.</p> ]]></content:encoded> <wfw:commentRss>http://wordpress-hacks.com/wordpress-3-fechas-en-espanol.php/feed</wfw:commentRss> <slash:comments>10</slash:comments> </item> <item><title>Listar posts de la misma categoría sin plugins</title><link>http://wordpress-hacks.com/listar-posts-de-la-misma-categoria.php</link> <comments>http://wordpress-hacks.com/listar-posts-de-la-misma-categoria.php#comments</comments> <pubDate>Tue, 27 Apr 2010 22:49:46 +0000</pubDate> <dc:creator>Neri Aispuro</dc:creator> <category><![CDATA[Hacks]]></category> <category><![CDATA[listar categorias]]></category><guid
isPermaLink="false">http://wordpress-hacks.com/?p=532</guid> <description><![CDATA[Junto con Diego, el pibe que labura conmigo, estamos armando un sitio de ventas y necesitábamos listar otros posts de la misma categoría y no queríamos usar ningún plugin, a continuación el código: 1 2 3 4 5 6 7 8 &#60;?php if &#40; is_single&#40;&#41; &#41; &#123; // Si es un single post $cat = [...]]]></description> <content:encoded><![CDATA[<p>Junto con Diego, el pibe que labura conmigo, estamos armando un sitio de ventas y necesitábamos <strong>listar otros posts de la misma categoría</strong> y no queríamos usar ningún plugin, a continuación el código:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_single<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #666666; font-style: italic;">// Si es un single post</span>
	 <span style="color: #000088;">$cat</span> <span style="color: #339933;">=</span> the_category_ID<span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">FALSE</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// El id de la categoría, el (FALSE) es para que no escriba el número</span>
	 <span style="color: #000088;">$post</span> <span style="color: #339933;">=</span> get_the_ID<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// El id del current post</span>
	 <span style="color: #000088;">$args</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span> <span style="color: #666666; font-style: italic;">// La variable</span>
		<span style="color: #0000ff;">'cat'</span><span style="color: #339933;">=&gt;</span><span style="color: #000088;">$cat</span><span style="color: #339933;">,</span> <span style="color: #666666; font-style: italic;">// El id de la categoría que buscamos arriba</span>
		<span style="color: #0000ff;">'showposts'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">3</span><span style="color: #339933;">,</span> <span style="color: #666666; font-style: italic;">// El número de posts que se van a listar</span>
		<span style="color: #0000ff;">'post__not_in'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #009900;">&#41;</span> <span style="color: #666666; font-style: italic;">// Llama al id del post actual para que no sea listado</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div><p>Ahora para que se muestren los posts ponemos esto:<br
/> <span
id="more-532"></span></p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td
class="code"><pre class="php" style="font-family:monospace;">	&lt;h4&gt;Relacionados:&lt;/h4&gt;
	&lt;ul&gt;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000088;">$recent</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> WP_Query<span style="color: #009900;">&#40;</span><span style="color: #000088;">$args</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$recent</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">have_posts</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000088;">$recent</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">the_post</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>
        &lt;li&gt;&lt;strong&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; rel=&quot;bookmark&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endwhile</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
	&lt;/ul&gt;</pre></td></tr></table></div><p>El código completo:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
</pre></td><td
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_single<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #666666; font-style: italic;">// Si es un single post</span>
	 <span style="color: #000088;">$cat</span> <span style="color: #339933;">=</span> the_category_ID<span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">FALSE</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// El id de la categoría, el (FALSE) es para que no escriba el número</span>
	 <span style="color: #000088;">$post</span> <span style="color: #339933;">=</span> get_the_ID<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// El id del current post</span>
	 <span style="color: #000088;">$args</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span> <span style="color: #666666; font-style: italic;">// La variable</span>
		<span style="color: #0000ff;">'cat'</span><span style="color: #339933;">=&gt;</span><span style="color: #000088;">$cat</span><span style="color: #339933;">,</span> <span style="color: #666666; font-style: italic;">// El id de la categoría que buscamos arriba</span>
		<span style="color: #0000ff;">'showposts'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">3</span><span style="color: #339933;">,</span> <span style="color: #666666; font-style: italic;">// El número de posts que se van a listar</span>
		<span style="color: #0000ff;">'post__not_in'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #009900;">&#41;</span> <span style="color: #666666; font-style: italic;">// Llama al id del post actual para que no sea listado</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">?&gt;</span>
	&lt;h4&gt;Relacionados&lt;/h4&gt;
	&lt;ul&gt;
	     <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000088;">$recent</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> WP_Query<span style="color: #009900;">&#40;</span><span style="color: #000088;">$args</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$recent</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">have_posts</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000088;">$recent</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">the_post</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>				
             &lt;li&gt;&lt;strong&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; rel=&quot;bookmark&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
	     <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endwhile</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
	&lt;/ul&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div><p>Cualquier duda pregunten que vemos si la resolvemos <img
src='http://wordpress-hacks.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p> ]]></content:encoded> <wfw:commentRss>http://wordpress-hacks.com/listar-posts-de-la-misma-categoria.php/feed</wfw:commentRss> <slash:comments>5</slash:comments> </item> <item><title>Metas descripciones en tags y categorías sin plugins</title><link>http://wordpress-hacks.com/metas-descriptions-en-tags-y-categorias.php</link> <comments>http://wordpress-hacks.com/metas-descriptions-en-tags-y-categorias.php#comments</comments> <pubDate>Mon, 14 Dec 2009 19:15:38 +0000</pubDate> <dc:creator>Neri Aispuro</dc:creator> <category><![CDATA[Hacks]]></category> <category><![CDATA[Meta Tags]]></category> <category><![CDATA[Tags Descriptions]]></category><guid
isPermaLink="false">http://wordpress-hacks.com/?p=513</guid> <description><![CDATA[La meta tag description es una de las más importantes a la hora de hacer seo on page en un sitio, si tenemos categorías y tags que sean relevantes seguro podrán aprovechar este artículo. Desconozco si algún plugin para optimización seo tiene implementado las descripciones en las tags, ya que desde la versión 2.8 de [...]]]></description> <content:encoded><![CDATA[<p>La <a
href="http://www.google.com/support/webmasters/bin/answer.py?hl=es&amp;answer=79812">meta tag description</a> es una de las más importantes a la hora de hacer <a
href="http://blog.ikhuerta.com/bases-del-seo-onpage">seo on page</a> en un sitio, si tenemos categorías y tags que sean relevantes seguro podrán aprovechar este artículo.</p><div
align="center"><img
src="http://wordpress-hacks.com/wp-content/uploads/2009/12/meta_tags-300x242.jpg" alt="meta tags" title="meta tags" width="300" height="242" class="aligncenter size-medium wp-image-515" /></div><p>Desconozco si algún plugin para optimización seo tiene implementado las descripciones en las tags, ya que desde la <a
href="http://wordpress-hacks.com/tags-descriptions-en-wordpress-28.php">versión 2.8 de WordPress</a> se pueden agregar, pero probablemente si.</p><p>Ayer estuve gran parte de la tarde buscando el mejor código para hacer esto y me decidí por el siguiente:</p><p>Para llamar las descripciones en tags:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
</pre></td><td
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_tag<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
	&lt;meta name=&quot;description&quot; content=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> tag_description<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; /&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div><p>en categorías:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
</pre></td><td
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_category<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
	&lt;meta name=&quot;description&quot; content=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> category_description<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; /&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div><p>Este código obviamente va en el header antes de /head.</p><p>El problema que tenía era que me quedaban las descripciones con un &lt;p&gt; y &lt;/p&gt; , por ejemplo quedaba:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
</pre></td><td
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>meta name<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;description&quot;</span> content<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&lt;p&gt;descripcion&lt;/p&gt;&quot;</span> <span style="color: #339933;">/&gt;</span></pre></td></tr></table></div><p>Anduve buscando por un rato y encontré algo que realmente desconocía, la <a
href="http://codex.wordpress.org/Function_Reference/wpautop">función wpautop</a>, fuí al <a
href="http://ma.tt/scripts/autop/">blog de Matt</a> y entendí un poco más.</p><p>Al rato encontré en el foro de Wp <a
href="http://wordpress.org/support/topic/137008#post-625941">la solución</a> a mi problema.</p><p>Hay que agregar la siguiente línea en el <strong>functions.php</strong> del theme en uso:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
</pre></td><td
class="code"><pre class="php" style="font-family:monospace;">remove_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'term_description'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'wpautop'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div><p>Para los desprevenidos que se pregunten donde agregar las descripciones a los tags y las categorías les respondo que se hacen entrando a la lista de tags o categorías y dándo clic en editar -no en edición rápida- y agregando en el campo descripción lo que queramos mostrar.</p><p><em>Nota:</em> si usan algún &#8220;plugin seo&#8221; chequeen que no les quede duplicada la descripción, la mayoría de los plugins seo que conozco solo agregan la meta tag description a las categorías y no a los tags, si es su caso pueden agregar solo el código para las descripciones de los tags.</p> ]]></content:encoded> <wfw:commentRss>http://wordpress-hacks.com/metas-descriptions-en-tags-y-categorias.php/feed</wfw:commentRss> <slash:comments>7</slash:comments> </item> <item><title>Poner la query de una búsqueda como título</title><link>http://wordpress-hacks.com/poner-la-query-de-una-busqueda-como-titulo.php</link> <comments>http://wordpress-hacks.com/poner-la-query-de-una-busqueda-como-titulo.php#comments</comments> <pubDate>Fri, 30 Oct 2009 23:59:09 +0000</pubDate> <dc:creator>Neri Aispuro</dc:creator> <category><![CDATA[Hacks]]></category> <category><![CDATA[get_search_query()]]></category><guid
isPermaLink="false">http://wordpress-hacks.com/?p=454</guid> <description><![CDATA[Si tenés un blog y posicionas algunas búsquedas a mi entender una buena idea de potenciar el seo es poner el título de la búsqueda en la tag &#60;title&#62; y poner en h1 o h2 también la query de búsqueda, un ejemplo del title: Para hacer esto, simplemente hay que hacer lo mismo que expliqué [...]]]></description> <content:encoded><![CDATA[<p>Si tenés un blog y posicionas algunas búsquedas a mi entender una buena idea de potenciar el seo es poner el título de la búsqueda en la tag &lt;title&gt; y poner en h1 o h2 también la query de búsqueda, un ejemplo del title:</p><p
style="text-align: center;"><img
class="size-full wp-image-455 aligncenter" title="busquedas" src="http://wordpress-hacks.com/wp-content/uploads/2009/10/busquedas.png" alt="busquedas" width="500" height="109" /></p><p>Para hacer esto, simplemente hay que hacer lo mismo que expliqué para los <a
href="http://wordpress-hacks.com/titulos-y-formas-de-configurarlos-para-un-mejor-seo.php">títulos seo</a>, en caso que tengan en el título lo del articulo antes mencionado busquen la parte que dice:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
</pre></td><td
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_search<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'name'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&amp;nbsp;|&amp;nbsp;Busqueda<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div><p>Y lo reemplazan por:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
</pre></td><td
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> is_search<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'s'</span><span style="color: #009900;">&#93;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div><p>Ahora, para poner un h1 con la búsqueda se me ocurre poner en el search.php antes que empiece el contenido esto:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
</pre></td><td
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> get_search_query<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div><p>La función <strong>get_search_query()</strong> llama a la búsqueda y la imprime, podría quedar algo así como:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
</pre></td><td
class="code"><pre class="php" style="font-family:monospace;">&lt;h1&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> get_search_query<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/h1&gt;</pre></td></tr></table></div>]]></content:encoded> <wfw:commentRss>http://wordpress-hacks.com/poner-la-query-de-una-busqueda-como-titulo.php/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Hacks wp</title><link>http://wordpress-hacks.com/hacks-wp.php</link> <comments>http://wordpress-hacks.com/hacks-wp.php#comments</comments> <pubDate>Tue, 20 Oct 2009 23:01:38 +0000</pubDate> <dc:creator>Neri Aispuro</dc:creator> <category><![CDATA[Hacks]]></category> <category><![CDATA[Nofollow a comentarios]]></category> <category><![CDATA[Nube de tags]]></category><guid
isPermaLink="false">http://wordpress-hacks.com/?p=450</guid> <description><![CDATA[Hacks wp es el nombre de un txt que tengo desde siempre en el que anoto hacks o lo que sea que luego necesite consultar y no pierda demasiado tiempo en algo insignificante, espero que sirva. Directorio del theme: 1 &#60;?php bloginfo&#40;'template_directory'&#41;; ?&#62; Nube de tags: 1 &#60;?php wp_tag_cloud&#40;&#41;; ?&#62; Nofollow a comentarios: 1 &#60;a [...]]]></description> <content:encoded><![CDATA[<p>Hacks wp es el nombre de un txt que tengo desde siempre en el que anoto hacks o lo que sea que luego necesite consultar y no pierda demasiado tiempo en algo insignificante, espero que sirva.</p><p>Directorio del theme:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
</pre></td><td
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'template_directory'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div><p>Nube de tags:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
</pre></td><td
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_tag_cloud<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div><p>Nofollow a comentarios:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
</pre></td><td
class="code"><pre class="php" style="font-family:monospace;">&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>#respond&quot; rel=&quot;nofollow&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> comments_number<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Hacer un comentario'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'1 Comentario'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'% Comentarios'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/a&gt;</pre></td></tr></table></div><p>Hora personalizada:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
</pre></td><td
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> the_time<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'j \d\e F \d\e Y'</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div><p>Url del sitio:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
</pre></td><td
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'siteurl'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div><p>Archivo ordenado por meses:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
</pre></td><td
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_get_archives<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'type=monthly'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div><p>Enlaces del blogroll:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
</pre></td><td
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> get_links<span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'&lt;li&gt;'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'&lt;/li&gt;'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">' - '</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>]]></content:encoded> <wfw:commentRss>http://wordpress-hacks.com/hacks-wp.php/feed</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Recibiendo el Permalink de los comentarios en las notificaciones</title><link>http://wordpress-hacks.com/recibiendo-el-permalink-de-los-comentarios-en-las-notificaciones.php</link> <comments>http://wordpress-hacks.com/recibiendo-el-permalink-de-los-comentarios-en-las-notificaciones.php#comments</comments> <pubDate>Wed, 02 Sep 2009 13:42:11 +0000</pubDate> <dc:creator>Neri Aispuro</dc:creator> <category><![CDATA[Hacks]]></category> <category><![CDATA[get_comment_link]]></category> <category><![CDATA[pluggable.php]]></category><guid
isPermaLink="false">http://wordpress-hacks.com/?p=438</guid> <description><![CDATA[Ayer conversando con David salió el tema este, me preguntó como se podría hacer eso, me había quedado bastante claro, pero hoy cuando lo fuí a hacer me había olvidado que era lo que david quería. Hoy al volver a preguntar y al entender puse manos a la obra. David quería recibir el permalink (enlace) [...]]]></description> <content:encoded><![CDATA[<p>Ayer conversando con <a
href="http://dondado.es">David</a> salió el tema este, me preguntó como se podría hacer eso, me había quedado bastante claro, pero hoy cuando lo fuí a hacer me había olvidado que era lo que david quería. Hoy al volver a preguntar y al entender puse manos a la obra.</p><p>David quería recibir el permalink (enlace) del comentario en cuestión cada vez que dejaban un comentario y le llegaba un e-mail de notificación.<br
/> Algo así:</p><p><img
src="http://wordpress-hacks.com/wp-content/uploads/2009/09/comentarios.png" alt="comentarios" title="comentarios" width="650" height="182" class="alignnone size-full wp-image-439" /></p><h3>Poniendo código a la obra:</h3><p>Buscamos el archivo <strong>pluggable.php</strong> que está en /includes, lo abrimos y vamos a la linea 1014 en donde dice algo así como:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
</pre></td><td
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$notify_message</span> <span style="color: #339933;">.=</span> get_permalink<span style="color: #009900;">&#40;</span><span style="color: #000088;">$comment</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">comment_post_ID</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;#comments<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span></pre></td></tr></table></div><p>Viendo las líneas 1014, 1015 y 1016 inclusive, vemos lo siguiente:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
</pre></td><td
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$notify_message</span> <span style="color: #339933;">.=</span> get_permalink<span style="color: #009900;">&#40;</span><span style="color: #000088;">$comment</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">comment_post_ID</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;#comments<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$notify_message</span> <span style="color: #339933;">.=</span> <span style="color: #990000;">sprintf</span><span style="color: #009900;">&#40;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Delete it: %s'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> admin_url<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;comment.php?action=cdc&amp;c=<span style="color: #006699; font-weight: bold;">$comment_id</span>&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$notify_message</span> <span style="color: #339933;">.=</span> <span style="color: #990000;">sprintf</span><span style="color: #009900;">&#40;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Spam it: %s'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> admin_url<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;comment.php?action=cdc&amp;dt=spam&amp;c=<span style="color: #006699; font-weight: bold;">$comment_id</span>&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span></pre></td></tr></table></div><p>Agregamos una línea abajo de la de &#8220;spam&#8221;</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
</pre></td><td
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$notify_message</span> <span style="color: #339933;">.=</span> <span style="color: #990000;">sprintf</span><span style="color: #009900;">&#40;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Comentario: %s'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> get_comment_link<span style="color: #009900;">&#40;</span><span style="color: #000088;">$comment</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">comment_ID</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span></pre></td></tr></table></div><p>Lo que quedaría:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
4
</pre></td><td
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$notify_message</span> <span style="color: #339933;">.=</span> get_permalink<span style="color: #009900;">&#40;</span><span style="color: #000088;">$comment</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">comment_post_ID</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;#comments<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$notify_message</span> <span style="color: #339933;">.=</span> <span style="color: #990000;">sprintf</span><span style="color: #009900;">&#40;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Delete it: %s'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> admin_url<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;comment.php?action=cdc&amp;c=<span style="color: #006699; font-weight: bold;">$comment_id</span>&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$notify_message</span> <span style="color: #339933;">.=</span> <span style="color: #990000;">sprintf</span><span style="color: #009900;">&#40;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Spam it: %s'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> admin_url<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;comment.php?action=cdc&amp;dt=spam&amp;c=<span style="color: #006699; font-weight: bold;">$comment_id</span>&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$notify_message</span> <span style="color: #339933;">.=</span> <span style="color: #990000;">sprintf</span><span style="color: #009900;">&#40;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Comentario: %s'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> get_comment_link<span style="color: #009900;">&#40;</span><span style="color: #000088;">$comment</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">comment_ID</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span></pre></td></tr></table></div><p>Notas:<br
/> Esto funciona para los themes que tengan integrado esto de que cada comentario tiene permalink, de lo contrario redireccionará a la url del artículo.<br
/> Tampoco esto va a funcionar para los blogs que tienen los comentarios paginados.</p><p>Creo que a esta altura está de más decir que cada uno lo puede personalizar como más le guste.</p><h2>Actualización:</h2><p>David me dice que tal vez funcione mejor con la función get_comment_link, asi que he probado y usando esa función sirve también para los comentarios paginados. Cambiar la línea:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
</pre></td><td
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$notify_message</span> <span style="color: #339933;">.=</span> <span style="color: #990000;">sprintf</span><span style="color: #009900;">&#40;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Comentario: %s'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> get_permalink<span style="color: #009900;">&#40;</span><span style="color: #000088;">$comment</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">comment_post_ID</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;#comment-<span style="color: #006699; font-weight: bold;">$comment_id</span>&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span></pre></td></tr></table></div><p>Por esta:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
</pre></td><td
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$notify_message</span> <span style="color: #339933;">.=</span> <span style="color: #990000;">sprintf</span><span style="color: #009900;">&#40;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Comentario: %s'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> get_comment_link<span style="color: #009900;">&#40;</span><span style="color: #000088;">$comment</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">comment_ID</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>]]></content:encoded> <wfw:commentRss>http://wordpress-hacks.com/recibiendo-el-permalink-de-los-comentarios-en-las-notificaciones.php/feed</wfw:commentRss> <slash:comments>6</slash:comments> </item> <item><title>Listando los últimos comentarios y personalizando el texto</title><link>http://wordpress-hacks.com/listar-ultimos-comentarios-y-personalizarlos.php</link> <comments>http://wordpress-hacks.com/listar-ultimos-comentarios-y-personalizarlos.php#comments</comments> <pubDate>Tue, 01 Sep 2009 11:48:40 +0000</pubDate> <dc:creator>Neri Aispuro</dc:creator> <category><![CDATA[Hacks]]></category> <category><![CDATA[get latest comments]]></category> <category><![CDATA[listar ultimos comentarios]]></category><guid
isPermaLink="false">http://wordpress-hacks.com/?p=434</guid> <description><![CDATA[(imagen del genio de Palomitas y Maíz) Listar los comentarios recientes es bastante molesto a veces, ya que no existe documentación precisa en el codex y todo es bastante &#8220;Extra oficial&#8221;. Hoy mirando un poco el código de wp para personalizar un poco más los comentarios, me di cuenta que lo mejor para hacer esto [...]]]></description> <content:encoded><![CDATA[<div
align="center"><img
src="http://wordpress-hacks.com/wp-content/uploads/2009/09/comentarios.jpg" alt="Comentarios! - de palomitas y maíz" title="Comentarios! - de palomitas y maíz" width="405" height="500" class="alignnone size-full wp-image-436" /><br
/> (imagen del genio de <a
href="http://palomitasymaiz.wordpress.com/2009/07/09/comentarios-2/">Palomitas y Maíz</a>)</div><p>Listar los comentarios recientes es bastante molesto a veces, ya que no existe documentación precisa en el codex y todo es bastante &#8220;Extra oficial&#8221;.</p><p>Hoy mirando un poco el código de wp para personalizar un poco más los comentarios, me di cuenta que lo mejor para hacer esto es haciéndolo con los famosos widgets.</p><p>Personalizando:</p><p>Yo quería cambiar el &#8220;on&#8221; por &#8220;en&#8221;, por ejemplo de &#8220;Marcelo on php the_time – La hora y fecha en WordPress&#8221; quería que quede &#8220;Marcelo en php the_time – La hora y fecha en WordPress&#8221;.</p><p>No costó mucho hacerlo, solo cambiar &#8220;%1$s on %2$s&#8221; en la línea 647 del archivo <strong>default-widgets.php</strong> en /includes por &#8220;%1$s en %2$s&#8221;.</p><p>También le agregué Nofollow al id del comentario, (aunque matt joda que los enlaces internos no deben llevar nofollow).</p><p>Esto también en la línea 647, en la parte que dice:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
</pre></td><td
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #0000ff;">'&lt;a href=&quot;'</span> <span style="color: #339933;">.</span> esc_url<span style="color: #009900;">&#40;</span> get_comment_link<span style="color: #009900;">&#40;</span><span style="color: #000088;">$comment</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">comment_ID</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot;&gt;'</span></pre></td></tr></table></div><p>Cambié por:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
</pre></td><td
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #0000ff;">'&lt;a rel=&quot;nofollow&quot; href=&quot;'</span> <span style="color: #339933;">.</span> esc_url<span style="color: #009900;">&#40;</span> get_comment_link<span style="color: #009900;">&#40;</span><span style="color: #000088;">$comment</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">comment_ID</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot;&gt;'</span></pre></td></tr></table></div><p>Para listar los comentarios recientes &#8220;a mano&#8221; sin widgets lo mejor que <a
href="http://wordpress.org/support/topic/272265">encontré</a> es:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000088;">$number</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">5</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Número de comentarios recientes que queremos mostrar (cambiar el 5)</span>
<span style="color: #000088;">$comments</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_results</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SELECT * FROM <span style="color: #006699; font-weight: bold;">$wpdb-&gt;comments</span> WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT <span style="color: #006699; font-weight: bold;">$number</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;ul id=&quot;recentcomments&quot;&gt;
&lt;h2&gt;Comentarios recientes&lt;/h2&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$comments</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$comments</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$comment</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span>
<span style="color: #b1b100;">echo</span>  <span style="color: #0000ff;">'&lt;li class=&quot;recentcomments&quot;&gt;'</span> <span style="color: #339933;">.</span> <span style="color: #990000;">sprintf</span><span style="color: #009900;">&#40;</span>__<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'%1$s en %2$s'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> get_comment_author_link<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'&lt;a href=&quot;'</span><span style="color: #339933;">.</span> get_comment_link<span style="color: #009900;">&#40;</span><span style="color: #000088;">$comment</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">comment_ID</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot;&gt;'</span> <span style="color: #339933;">.</span> get_the_title<span style="color: #009900;">&#40;</span><span style="color: #000088;">$comment</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">comment_post_ID</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&lt;/a&gt;'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&lt;/li&gt;'</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">endforeach</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/ul&gt;</pre></td></tr></table></div><p>Ahí por defecto llama los últimos 5 comentarios y los imprime como &#8220;Marcelo en php the_time – La hora y fecha en WordPress&#8221; pero sin nofollow, quien quiera lo agrega, eso va en cada uno.</p> ]]></content:encoded> <wfw:commentRss>http://wordpress-hacks.com/listar-ultimos-comentarios-y-personalizarlos.php/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Recibiendo un e-mail cada vez que tengamos error en la base de datos</title><link>http://wordpress-hacks.com/recibiendo-un-e-mail-cada-vez-que-tengamos-error-en-la-base-de-datos.php</link> <comments>http://wordpress-hacks.com/recibiendo-un-e-mail-cada-vez-que-tengamos-error-en-la-base-de-datos.php#comments</comments> <pubDate>Mon, 31 Aug 2009 05:10:05 +0000</pubDate> <dc:creator>Neri Aispuro</dc:creator> <category><![CDATA[Hacks]]></category><guid
isPermaLink="false">http://wordpress-hacks.com/?p=423</guid> <description><![CDATA[Post inspirado en Smf, que envía un e-mail al administrador del foro cuando hay errores de conexión en la base de datos, y en un artículo que se escribió en un blog chico (al igual que este) hace un tiempo, que, luego se reprodujo por toda la blogocosa española. El código hacía que podamos recibir [...]]]></description> <content:encoded><![CDATA[<div
align="center"><img
src="http://wordpress-hacks.com/wp-content/uploads/2009/08/wp-ojo.jpg" alt="wp ojo" title="wp ojo" width="208" height="171" class="alignnone size-full wp-image-425" /></div><p>Post inspirado en <a
href="http://www.simplemachines.org/">Smf</a>, que envía un e-mail al administrador del foro cuando hay errores de conexión en la base de datos, y en un <a
title="Be Notified When Google Crawls Your Site" href="http://www.protycoon.com/2008/02/19/php-be-notified-when-google-crawls-your-site/">artículo que se escribió</a> en un blog chico (al igual que este) hace un tiempo, que, luego se reprodujo por toda la blogocosa española.</p><p>El código hacía que podamos recibir un e-mail cada vez que googlebot visitara nuestro sitio.</p><p>Hace un rato, me llegó un correo de un foro que administro, que está desarrollado con Smf, en el cual me informaba que había un problema con la base de datos, de ahí me puse a ver como podía hacer para que WordPress haga lo mismo.</p><p>Hace un tiempo había escrito sobre el &#8220;<a
href="http://wordpress-hacks.com/error-establishing-a-database-connection.php">Error establishing a database connection</a>&#8220;, asi que si alguno lo personalizó, tendrá que pasar el código a un archivo nuevo.</p><h3>Para recibir un e-mail cada vez que tengamos un error en la base de datos:</h3><p>Wp cuando tiene un error en la base de datos llama a un archivo que no existe, para que en caso de que tengamos un error personalizado, muestre lo del archivo. El archivo en cuestión es <strong>db-error.php</strong>.</p><p>El archivo db-error.php debe estar en /wp-content/db-error.php.</p><p>Vamos a crear un archivo que se llame db-error.php y vamos a agregar lo suguiente:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
</pre></td><td
class="code"><pre class="php" style="font-family:monospace;">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'language_attributes'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> language_attributes<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
	&lt;title&gt;Database Error&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
	&lt;h1&gt;Error establishing a database connection&lt;/h1&gt;
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> 
    <span style="color: #000088;">$email</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;tu correo&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #990000;">mail</span><span style="color: #009900;">&#40;</span> 
			<span style="color: #000088;">$email</span><span style="color: #339933;">,</span> 
				<span style="color: #666666; font-style: italic;">// Asunto</span>
				<span style="color: #0000ff;">&quot;Error en la base de datos&quot;</span><span style="color: #339933;">,</span> 
				<span style="color: #666666; font-style: italic;">// Mensaje</span>
				<span style="color: #0000ff;">&quot;Parece que en el sitio x hay problemas con la base de datos.&quot;</span>
			<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/body&gt;
&lt;/html&gt;</pre></td></tr></table></div><p>Obviamente que en donde dice &#8220;tu correo&#8221; va tu correo, el asunto y el mensaje lo pueden cambiar a gusto, y por supuesto pueden personalizar el mensaje de error, o al menos traducirlo.</p> ]]></content:encoded> <wfw:commentRss>http://wordpress-hacks.com/recibiendo-un-e-mail-cada-vez-que-tengamos-error-en-la-base-de-datos.php/feed</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Mostrar posts recientes de una categoría o tag</title><link>http://wordpress-hacks.com/mostrar-posts-recientes-de-una-categoria-o-tag.php</link> <comments>http://wordpress-hacks.com/mostrar-posts-recientes-de-una-categoria-o-tag.php#comments</comments> <pubDate>Sun, 09 Aug 2009 03:07:01 +0000</pubDate> <dc:creator>Esteban Rojas</dc:creator> <category><![CDATA[Hacks]]></category> <category><![CDATA[php]]></category> <category><![CDATA[query posts]]></category><guid
isPermaLink="false">http://wordpress-hacks.com/?p=382</guid> <description><![CDATA[Este artículo es una colaboración de Esteban Rojas (en su perfil no ha configurado url ni twitter) En nuestro blog seguramente hablaremos de muchos temas, por ende tal vez tengamos muchas categorías, sin embargo siempre hay unas 2 o 3 que tocamos más a menudo o que tal vez queramos resaltar de las demás, por [...]]]></description> <content:encoded><![CDATA[<blockquote><p>Este artículo es una colaboración de Esteban Rojas (en su perfil no ha configurado url ni twitter)</p></blockquote><p>En nuestro blog seguramente hablaremos de muchos temas, por ende tal vez tengamos muchas categorías, sin embargo siempre hay unas 2 o 3 que tocamos más a menudo o que tal vez queramos resaltar de las demás, por lo que a continuación compartiré un código que ayuda a hacer precisamente eso, <strong>listar los posts recientes que esten archivados en una categoría o tag especifica</strong>.</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> query_posts<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'cat=1&amp;showposts=5'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;ul&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span>have_posts<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> the_post<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;li&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> rel=&quot;bookmark&quot; title=&quot;Leer <span style="color: #000000; font-weight: bold;">&lt;?php</span> the_title_attribute<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/a&gt;&lt;/li&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endwhile</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/ul&gt;</pre></td></tr></table></div><p>Esto usa la función query_posts mas la ID de la categoría de la que queramos tomé los posts, el <strong>cat=1</strong>, además de poder definir cuantos artículos queremos mostrar con el <strong>parámetro showposts</strong>, . Para una etiqueta sería de esta forma:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td
class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> query_posts<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'tag=wordpress-hacks&amp;showposts=3'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;ul&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span>have_posts<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> the_post<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;li&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; rel=&quot;bookmark&quot; title=&quot;Leer <span style="color: #000000; font-weight: bold;">&lt;?php</span> the_title_attribute<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/a&gt;&lt;/li&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endwhile</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/ul&gt;</pre></td></tr></table></div><p>Modificando <strong>tag=wordpress</strong> por el nombre de la etiqueta de la que ustedes quieren tomé las entradas.</p><blockquote><p>Muchas gracias Esteban!</p></blockquote> ]]></content:encoded> <wfw:commentRss>http://wordpress-hacks.com/mostrar-posts-recientes-de-una-categoria-o-tag.php/feed</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Error establishing a database connection</title><link>http://wordpress-hacks.com/error-establishing-a-database-connection.php</link> <comments>http://wordpress-hacks.com/error-establishing-a-database-connection.php#comments</comments> <pubDate>Mon, 22 Jun 2009 10:09:43 +0000</pubDate> <dc:creator>Neri Aispuro</dc:creator> <category><![CDATA[Hacks]]></category><guid
isPermaLink="false">http://wordpress-hacks.com/?p=377</guid> <description><![CDATA[Error establishing a database connection es una de las frases que más me preocupan ver en un sitio, como indica la misma, se debe a un error en el intento a la conexión de la base de datos. ¿Por qué? Puede ser por muchos motivos, podría ser por que anduvimos tocando el wp-config.php, el servidor [...]]]></description> <content:encoded><![CDATA[<p><strong>Error establishing a database connection</strong> es una de las frases que más me preocupan ver en un sitio, como indica la misma, se debe a un error en el intento a la conexión de la base de datos.</p><p>¿Por qué?<br
/> Puede ser por muchos motivos, podría ser por que anduvimos tocando el wp-config.php, el servidor esta sobrecargado y no puede responder a la petición, etc.</p><p>Hoy justamente, en un par de sitios mios he visto ese error, y me puse a pensar que, tal vez, sería bueno <strong>personalizar</strong> un poco más la página que se encarga de mostrarlo, incluyendo un e-mail por ejemplo, para que si nos encontramos con un navegante con ganas de ayudar, nos pueda escribir.</p><p>Personalizando el &#8220;Error establishing a database connection&#8221;.<br
/> En WordPress 2.8, tenemos que ir al archivo functions.php, que lo encontramos en /wp-includes.<br
/> Nos llegamos hasta la línea 2810, donde empieza lo siguiente:</p><div
class="wp_syntax"><table><tr><td
class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td
class="code"><pre class="php" style="font-family:monospace;">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'language_attributes'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> language_attributes<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
	&lt;title&gt;Database Error&lt;/title&gt;
&nbsp;
&lt;/head&gt;
&lt;body&gt;
	&lt;h1&gt;Error establishing a database connection&lt;/h1&gt;
&lt;/body&gt;
&lt;/html&gt;</pre></td></tr></table></div><p>En donde empieza el h1 hasta donde termina, podríamos agregar una frase personalizada, a demás como dije antes, nuestro e-mail, o un formulario de contacto.</p> ]]></content:encoded> <wfw:commentRss>http://wordpress-hacks.com/error-establishing-a-database-connection.php/feed</wfw:commentRss> <slash:comments>7</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (user agent is rejected)
Database Caching 5/13 queries in 0.040 seconds using disk

Served from: wordpress-hacks.com @ 2010-07-31 22:25:11 -->