<?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>Planeta WordPress &#187; php</title>
	<atom:link href="http://planetawordpress.org/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://planetawordpress.org</link>
	<description></description>
	<lastBuildDate>Thu, 09 Feb 2012 23:04:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://weblog.mx/?v=3.3.1</generator>
		<item>
		<title>Hotfix, parcheando WordPress con estilo</title>
		<link>http://ayudawordpress.com/hotfix-parcheando-wordpress-con-estilo/</link>
		<comments>http://ayudawordpress.com/hotfix-parcheando-wordpress-con-estilo/#comments</comments>
		<pubDate>Sat, 31 Dec 2011 11:13:36 +0000</pubDate>
		<dc:creator>planetawordpress</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Actualizaciones]]></category>
		<category><![CDATA[Experto]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[seguridad]]></category>
		<category><![CDATA[taxonomía]]></category>
		<category><![CDATA[Wordpress.org]]></category>

		<guid isPermaLink="false">http://ayudawordpress.com/?p=11262</guid>
		<description><![CDATA[A ninguno se nos escapa que WordPress es un CMS que se actualiza a cada necesidad o vulnerabilidad descubierta. Mediante las actualizaciones de seguridad &#8211; a pesar de que a algunos les moleste andar actualizando cada dos por tres &#8211; mantenemos WordPress seguro y al día. Pero hay veces en que algunos fallos tardan en acometerse por parte del equipo de desarrollo, y es aquí donde entra Hotfix. Este plugin es una especie de parcheador de fallos, que mantiene tu WordPress seguro y al día hasta que salga la próxima versión estable de WordPress o actualización que solucione el fallo &#8230;</p> <a href="http://ayudawordpress.com/hotfix-parcheando-wordpress-con-estilo/">Sigue leyendo que hay m&#225;s <span>&#8594;</span></a><p>]]></description>
			<content:encoded><![CDATA[<p><img src="http://ayudawordpress.com/wp-content/uploads/2011/12/hotfix.png" alt="" title="hotfix" width="466" height="246" class="aligncenter size-full wp-image-11263" /></p>
<p>A ninguno se nos escapa que <strong>WordPress es un CMS que se actualiza a cada necesidad o vulnerabilidad descubierta</strong>. Mediante las actualizaciones de seguridad &#8211; a pesar de que a algunos les moleste andar actualizando cada dos por tres &#8211; mantenemos WordPress seguro y al día.</p>
<p>Pero hay veces en que <strong>algunos fallos tardan en acometerse</strong> por parte del equipo de desarrollo, y es aquí donde entra <a target="_blank" href="http://wordpress.org/extend/plugins/hotfix/" >Hotfix</a>.</p>
<p><span id="more-11262"></span></p>
<p>Este plugin es una especie de <strong>parcheador de fallos</strong>, que mantiene tu WordPress seguro y al día hasta que salga la próxima versión estable de WordPress o actualización que solucione el fallo en cuestión.</p>
<p>Su uso es sencillo: lo instalas, lo activas y funciona solo, aplicando los parches necesarios para mantener tu WordPress a tono.</p>
<p>Si lo instalas ahora, y dependiendo de tu versión de WordPress instalada, lo que soluciona es lo siguiente:</p>
<ul>
<li><strong>WordPress 3.3</strong>
<ul>
<li>Evita que los estilos de plugins y temas se infiltren en el Escritorio</li>
<li>Soluciona un fallo para servidores sin soporte preinstalado de JSON</li>
</ul>
</li>
<li><strong>WordPress 3.2</strong>
<ul>
<li>Incluye soporte de JSON para configuraciones PHP extrañas</li>
</ul>
</li>
<li><strong>WordPress 3.1.3</strong>
<ul>
<li>Soluciona un fallo que hace que post_status funcione mal si se pasa un array</li>
</ul>
</li>
<li><strong>WordPress 3.1</strong>
<ul>
<li>Soluciona un fallo que provoca algunas manipulaciones en queries de taxonomías  (como al excluir categorías), y que hace que no funcionen como deberían.</li>
</ul>
</li>
<li><strong>WordPress 3.0.5</strong>
<ul>
<li>Evita que KSES muestre imágenes recortadas y fallos HTML en los comentarios del Administrador/Editor.</li>
</ul>
</li>
</ul>
<p>Creo que no hace falta decir que si no estás seguro de necesitarlo mejor no lo instales.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/AyudaWordpress?a=p3ty2f6nVWA:2jNSu70VA90:Dsqc8YHEA1Y"><img src="http://feeds.feedburner.com/~ff/AyudaWordpress?i=p3ty2f6nVWA:2jNSu70VA90:Dsqc8YHEA1Y" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://ayudawordpress.com/hotfix-parcheando-wordpress-con-estilo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Formulario de acceso donde quieras</title>
		<link>http://ayudawordpress.com/formulario-de-acceso-donde-quieras/</link>
		<comments>http://ayudawordpress.com/formulario-de-acceso-donde-quieras/#comments</comments>
		<pubDate>Sun, 18 Dec 2011 22:43:40 +0000</pubDate>
		<dc:creator>planetawordpress</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[código]]></category>
		<category><![CDATA[formulario]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programación]]></category>
		<category><![CDATA[shortcode]]></category>
		<category><![CDATA[Tutoriales / Trucos]]></category>
		<category><![CDATA[Wordpress.org]]></category>

		<guid isPermaLink="false">http://ayudawordpress.com/?p=11104</guid>
		<description><![CDATA[Si quieres ofrecer un formulario de acceso a tu sitio WordPress, pero no te gusta usar el widget Meta, o tu tema no trae una plantilla de página al efecto, puedes preparar tu propio shortcode que, insertado en entradas o páginas, permitirá acceder a tu sitio de un modo totalmente integrado en tu tema. Para ello solo tienes que añadir un pequeño código … Solo son 2 pasos: Abres el fichero functions.php de tu tema activo y añades lo siguiente: Guardas los cambios. Añades el nuevo shortcode en cualquier parte de una entrada o página: Y ya lo tienes. ¡Que &#8230;</p> <a href="http://ayudawordpress.com/formulario-de-acceso-donde-quieras/">Sigue leyendo que hay m&#225;s <span>&#8594;</span></a><p>]]></description>
			<content:encoded><![CDATA[<p><img src="http://ayudawordpress.com/wp-content/uploads/2011/12/login.jpg" alt="" title="login" width="423" height="284" class="aligncenter size-full wp-image-11105" /></p>
<p>Si quieres ofrecer un <strong>formulario de acceso</strong> a tu sitio WordPress, pero no te gusta usar el widget Meta, o tu tema no trae una plantilla de página al efecto, puedes preparar tu propio <code>shortcode</code> que, insertado en entradas o páginas, permitirá acceder a tu sitio de un modo totalmente integrado en tu tema.</p>
<p>Para ello solo tienes que añadir un pequeño código …</p>
<p><span id="more-11104"></span></p>
<p>Solo son 2 pasos:</p>
<ol>
<li>Abres el fichero <code>functions.php</code> de tu tema activo y añades lo siguiente:
<pre class="brush: php; title: ; notranslate">
//Shortcode para login donde quieras
function ayudawp_formulario_login_shortcode() {
	if ( is_user_logged_in() )
		return '';

	return wp_login_form( array( 'echo' =&gt; false ) );
}

function ayudawp_add_shortcodes() {
	add_shortcode( 'ayudawp_formulario_login', 'ayudawp_formulario_login_shortcode' );
}

add_action( 'init', 'ayudawp_add_shortcodes' );
</pre>
<p>Guardas los cambios.</li>
<li>Añades el nuevo <code>shortcode</code> en cualquier parte de una entrada o página:
<pre class="brush: php; title: ; notranslate">[ayudawp-formulario-login]</pre>
</li>
</ol>
<p>Y ya lo tienes. ¡Que lo disfrutes!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/AyudaWordpress?a=TQG139u13lQ:DilHjZy13-s:Dsqc8YHEA1Y"><img src="http://feeds.feedburner.com/~ff/AyudaWordpress?i=TQG139u13lQ:DilHjZy13-s:Dsqc8YHEA1Y" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://ayudawordpress.com/formulario-de-acceso-donde-quieras/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Añadir extensiones (.html o .php) a páginas WordPress</title>
		<link>http://ayudawordpress.com/anadir-extensiones-html-o-php-a-paginas-wordpress/</link>
		<comments>http://ayudawordpress.com/anadir-extensiones-html-o-php-a-paginas-wordpress/#comments</comments>
		<pubDate>Fri, 16 Dec 2011 23:03:42 +0000</pubDate>
		<dc:creator>planetawordpress</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Páginas]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[Tutoriales / Trucos]]></category>
		<category><![CDATA[Wordpress.org]]></category>

		<guid isPermaLink="false">http://ayudawordpress.com/?p=11095</guid>
		<description><![CDATA[Añadir una extensión a la URL de las entradas en WordPress, aunque supongo que ya lo sabes, es tan simple como ir a &#8216;Ajustes -&#62; Enlaces permanentes&#8216;, ahí eliges la opción de &#8216;Estructura personalizada&#8216; y pones /%postname%.html o /%postname%.php, lo que más te guste. Ahora bien, esta configuración no afecta a las páginas, que quedarán del tipo /%postname%, más feúchas si lo quieres así. Pero bueno, ya sabes que todo tiene solución sencilla … Para ello nos valdremos, para no liarnos, de un par de plugins a elegir: Extensión .html en páginas Extensión .php en páginas Y no hay nada &#8230;</p> <a href="http://ayudawordpress.com/anadir-extensiones-html-o-php-a-paginas-wordpress/">Sigue leyendo que hay m&#225;s <span>&#8594;</span></a><p>]]></description>
			<content:encoded><![CDATA[<p><img src="http://ayudawordpress.com/wp-content/uploads/2011/12/html.jpg" alt="html" title="html" width="315" height="380" class="aligncenter size-full wp-image-11096" /></p>
<p>Añadir una <strong>extensión a la URL de las entradas en WordPress</strong>, aunque supongo que ya lo sabes, es tan simple como ir a &#8216;<em>Ajustes -> Enlaces permanentes</em>&#8216;, ahí eliges la opción de &#8216;<em>Estructura personalizada</em>&#8216; y pones <code>/%postname%.html</code> o <code>/%postname%.php</code>, lo que más te guste.</p>
<p>Ahora bien, <strong>esta configuración no afecta a las páginas</strong>, que quedarán del tipo <code>/%postname%</code>, más feúchas si lo quieres así.</p>
<p>Pero bueno, ya sabes que todo tiene solución sencilla …</p>
<p><span id="more-11095"></span></p>
<p>Para ello nos valdremos, para no liarnos, de un par de plugins a elegir:</p>
<ul>
<li><a target="_blank" href="http://wordpress.org/extend/plugins/html-on-pages/" >Extensión .html en páginas</a></li>
<li><a target="_blank" href="http://wordpress.org/extend/plugins/dot-php-pages/" >Extensión .php en páginas</a></li>
</ul>
<p>Y no hay nada que hacer, instalas el que necesites, lo activas y ya lo tienes. Creo que huelga decirlo pero por si acaso solo comentar que no funcionan bien si instalas ambos al mismo tiempo.</p>
<p>Simple y efectivo.</p>
<p>Ha sido un placer <img src='http://ayudawordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/AyudaWordpress?a=aFSzN9uOt0w:avmExw7KrmM:Dsqc8YHEA1Y"><img src="http://feeds.feedburner.com/~ff/AyudaWordpress?i=aFSzN9uOt0w:avmExw7KrmM:Dsqc8YHEA1Y" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://ayudawordpress.com/anadir-extensiones-html-o-php-a-paginas-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Instala WordPress sin instalarlo</title>
		<link>http://ayudawordpress.com/instala-wordpress-sin-instalarlo/</link>
		<comments>http://ayudawordpress.com/instala-wordpress-sin-instalarlo/#comments</comments>
		<pubDate>Thu, 17 Nov 2011 15:53:01 +0000</pubDate>
		<dc:creator>planetawordpress</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[Instalación]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Tutoriales / Trucos]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Wordpress.org]]></category>

		<guid isPermaLink="false">http://ayudawordpress.com/?p=10838</guid>
		<description><![CDATA[Vale que es un poco raro el titular pero es que más o menos eso es lo que ofrece Instant WordPress, una aplicación para Windows que permite una instalación de WordPress autoejecutable, o algo así. Y si ayer veíamos como instalar WordPress sin MySQL hoy damos un paso adelante ¿no? Lo que hace es, a través de un sencillo proceso de instalación (vale, si, hay que instalar algo, pero no WordPress), poner a tu disposición un WordPress listo para usar de manera local, sin que tengas que hacer instalaciones en tu ordenador de PHP, MySQL o incluso Apache (en realidad &#8230;</p> <a href="http://ayudawordpress.com/instala-wordpress-sin-instalarlo/">Sigue leyendo que hay m&#225;s <span>&#8594;</span></a><p>]]></description>
			<content:encoded><![CDATA[<p>Vale que es un poco raro el titular pero es que más o menos eso es lo que ofrece <a target="_blank" href="http://www.instantwp.com/" >Instant WordPress</a>, una <strong>aplicación para Windows que permite una instalación de WordPress autoejecutable</strong>, o algo así.</p>
<p>Y si ayer veíamos como <a href="http://ayudawordpress.com/instala-wordpress-sin-usar-mysql/" title="Instala WordPress sin usar MySQL" >instalar WordPress sin MySQL</a> hoy damos un paso adelante ¿no?</p>
<p><span id="more-10838"></span></p>
<p>Lo que hace es, a través de un <a target="_blank" href="http://www.instantwp.com/installation/" >sencillo proceso de instalación</a> (vale, si, hay que instalar algo, pero no WordPress), poner a tu disposición <strong>un WordPress listo para usar de manera local</strong>, sin que tengas que hacer instalaciones en tu ordenador de PHP, MySQL o incluso Apache (en realidad si los instala pero al estilo &#8220;mobile&#8221;). De hecho puedes instalar el WordPress en cualquier carpeta y, si me apuras, incluso en un pendrive.</p>

<a href='http://ayudawordpress.com/wp-content/uploads/2011/11/mysql.png' rel='shadowbox[sbalbum-10838];player=img;' title='mysql'><img width="150" height="150" src="http://ayudawordpress.com/wp-content/uploads/2011/11/mysql-150x150.png" class="attachment-thumbnail" alt="mysql" title="mysql" /></a>
<a href='http://ayudawordpress.com/wp-content/uploads/2011/11/admin.png' rel='shadowbox[sbalbum-10838];player=img;' title='admin'><img width="150" height="150" src="http://ayudawordpress.com/wp-content/uploads/2011/11/admin-150x150.png" class="attachment-thumbnail" alt="admin" title="admin" /></a>
<a href='http://ayudawordpress.com/wp-content/uploads/2011/11/wp.png' rel='shadowbox[sbalbum-10838];player=img;' title='wp'><img width="150" height="150" src="http://ayudawordpress.com/wp-content/uploads/2011/11/wp-150x150.png" class="attachment-thumbnail" alt="wp" title="wp" /></a>
<a href='http://ayudawordpress.com/wp-content/uploads/2011/11/cp.png' rel='shadowbox[sbalbum-10838];player=img;' title='cp'><img width="150" height="150" src="http://ayudawordpress.com/wp-content/uploads/2011/11/cp-150x150.png" class="attachment-thumbnail" alt="cp" title="cp" /></a>

<p>Una vez instalado se me ocurre que puede estar muy bien para llevarlo en un disco externo, o un pendrive, y hacer pruebas o muestras a clientes, instalando plantillas, plugins, haciendo pruebas de desarrollo, lo que quieras.</p>
<p>Lo que no sirve es para instalar tu web, pero seguro que encuentras mil y una utilidades para Instant WordPress</p>
<p>Visto <a target="_blank" href="http://wwwhatsnew.com/2011/11/10/instant-wordpress-ejecuta-wordpress-en-tu-windows-sin-necesidad-de-instalarlo/?utm_source=feedburner&#038;utm_medium=feed&%23038;utm_campaign=Feed:+WwwhatsNew+(Wwwhat's+new?+-+Aplicaciones+Web+gratuitas)" >en Wwwhatsnew</a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/AyudaWordpress?a=8e0DgH0omo8:fE42zw-r78w:Dsqc8YHEA1Y"><img src="http://feeds.feedburner.com/~ff/AyudaWordpress?i=8e0DgH0omo8:fE42zw-r78w:Dsqc8YHEA1Y" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://ayudawordpress.com/instala-wordpress-sin-instalarlo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cómo redimensionar la imagen featured si utilizas CDN</title>
		<link>http://www.blogpocket.com/2011/11/01/como-redimensionar-la-imagen-featured-si-utilizas-cdn/</link>
		<comments>http://www.blogpocket.com/2011/11/01/como-redimensionar-la-imagen-featured-si-utilizas-cdn/#comments</comments>
		<pubDate>Tue, 01 Nov 2011 19:57:40 +0000</pubDate>
		<dc:creator>planetawordpress</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[CDN]]></category>
		<category><![CDATA[Herramientas]]></category>
		<category><![CDATA[Imagen featured]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[Thumbnail]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[W3 Total Cache]]></category>

		<guid isPermaLink="false">http://www.blogpocket.com/?p=11790</guid>
		<description><![CDATA[Un par de líneas de código PHP para evitar utilizar funciones cuya misión es redimensionar imágenes.]]></description>
			<content:encoded><![CDATA[<p><img class="left" src="http://static.blogpocket.com/wp-content/uploads/plugins-para-wordpress.jpg" alt="WordPress enchufado" /><a href="http://www.blogpocket.com/2011/10/25/configurando-w3-total-cache-para-el-cdn-de-amazon/">Si utilizas un CDN como el de Amazon</a><a href="http://www.blogpocket.com/2011/10/25/configurando-w3-total-cache-para-el-cdn-de-amazon/"><img style='border:0;' src='http://www.blogpocket.com/wp-content/plugins/tensai-rss/external.png'/></a> para almacenar tus imágenes, y así optimizar el tiempo de carga de tu blog, tal vez tengas problemas con tu theme si en éste se emplean ciertas funciones que crean archivos en local. Ese es el caso de algunas plantillas que utilizan la función <a href="http://bredebs.net/2010/12/23/probablemente-la-mejor-funcion-para-redimensionar-imagenes-en-wordpress/">vt_resize</a><a href="http://bredebs.net/2010/12/23/probablemente-la-mejor-funcion-para-redimensionar-imagenes-en-wordpress/"><img style='border:0;' src='http://www.blogpocket.com/wp-content/plugins/tensai-rss/external.png'/></a> para crear una imagene redimensionada de la <strong>imagen featured</strong> de los posts. </p>
<p>Recordemos que la <strong>imagen featured</strong> (o <strong>thumbnail</strong>) se define cuando se publica un post, por lo que el plugin <strong>W3 Total Cache</strong> se habrá llevado al <strong>CDN</strong> todas las imágenes asociadas al post en el momento de la publicación y no tendrá cualquier otra que se cree posteriormente (como puede pasar con vt_resize).</p>
<p>Una posible solución es utilizar la función  <a href="http://codex.wordpress.org/Function_Reference/wp_get_attachment_image_src">wp_get_attachment_image_src</a><a href="http://codex.wordpress.org/Function_Reference/wp_get_attachment_image_src"><img style='border:0;' src='http://www.blogpocket.com/wp-content/plugins/tensai-rss/external.png'/></a> que devuelve un array con la URL, el ancho y la altura de una imagen adjuntada a un post. Si se quiere el src de la imagen se puede obtener con el primer elemento del array devuelto por la funcion.</p>
<p>Recordemos también que una imagen adjuntada a un post es la que se sube a la instalación de <a href="http://wordpress.org"><strong>WordPress</strong></a> en el momento de publicar el post o con la opción &#8220;Add new&#8221; del apartado &#8220;Media&#8221;. </p>
<p>De esa forma, podemos utilizar el siguiente código <strong>PHP</strong> para redimensionar una imagen a 280&#215;257 por ejemplo:</p>
<blockquote><p>&lt;?php<br />
$thumb = get_post_thumbnail_id();<br />
$image = wp_get_attachment_image_src($thumb, &#8216;full&#8217;);<br />
?><br />
&lt;img src=&#8221;" width=&#8221;280&#8243; height=&#8221;257&#8243; alt=&#8221;image&#8221;/></p></blockquote>
<p>Donde $image[0] es el primer elemento del array devuelto por <em>wp_get_attachment_image_src</em></p>
<p>Con <a href="http://codex.wordpress.org/Function_Reference/get_post_thumbnail_id">get_post_thumbnail_id</a><a href="http://codex.wordpress.org/Function_Reference/get_post_thumbnail_id"><img style='border:0;' src='http://www.blogpocket.com/wp-content/plugins/tensai-rss/external.png'/></a> se obtiene el ID de la <strong>imagen featured</strong> (o <strong>thumbnail</strong>) adjuntada al post. Si no se adjuntó ningún thumbnail, la función devuelve un valor vacio. Para que un theme pueda utilizar <strong>imágenes featured</strong>, hay que incluir la siguiente sentencia en el archivo <em>functions.php</em> del theme activo (ver <a href="http://codex.wordpress.org/Post_Thumbnails">Post Thumbnails</a><a href="http://codex.wordpress.org/Post_Thumbnails"><img style='border:0;' src='http://www.blogpocket.com/wp-content/plugins/tensai-rss/external.png'/></a>) o estar activado en una <a href="http://multi">instalación multisite</a><a href="http://multi"><img style='border:0;' src='http://www.blogpocket.com/wp-content/plugins/tensai-rss/external.png'/></a>. </p>
<blockquote><p>add_theme_support( &#8216;post-thumbnails&#8217; );</p></blockquote>
<p>[Fuente de la imagen: <a href="http://google.tecnoad.com/page/2">google.tecnoad.com</a><a href="http://google.tecnoad.com/page/2"><img style='border:0;' src='http://www.blogpocket.com/wp-content/plugins/tensai-rss/external.png'/></a>]</p>
<div><hr />
Este blog  pertenece a la red <a href="http://multisite.blogpocket.com">Blogpocket Multisite</a>, donde puedes encontrar tambi&eacute;n: <a href="http://mariposasenlamaleta.blogpocket.com">Mariposas en la maleta</a>, <a href="http://acordes.blogpocket.com">Acordes Modernos</a> y <a href="http://cicutaenlasangre.blogpocket.com">Cicuta en la sangre</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.blogpocket.com/2011/11/01/como-redimensionar-la-imagen-featured-si-utilizas-cdn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Listado de posts con imágenes en miniatura</title>
		<link>http://www.blogpocket.com/2011/09/14/listado-de-posts-con-imagenes-en-miniatura/</link>
		<comments>http://www.blogpocket.com/2011/09/14/listado-de-posts-con-imagenes-en-miniatura/#comments</comments>
		<pubDate>Wed, 14 Sep 2011 18:38:53 +0000</pubDate>
		<dc:creator>planetawordpress</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Blogging]]></category>
		<category><![CDATA[blogpocket links]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[shortcode]]></category>
		<category><![CDATA[Thumbnail]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.blogpocket.com/?p=10213</guid>
		<description><![CDATA[Con un plugin de WordPress y la función de imágenes en miniatura podemos implementar de forma muy fácil una galería con las imagenes de los últimos posts de una determinada categoría.]]></description>
			<content:encoded><![CDATA[<p><strong>Actualizado 17-9-2011</strong></p>
<p><img class="left" src="http://static.blogpocket.com/wp-content/uploads/wp_logoazul.jpg" alt="Logo de WP" />El viernes que viene inauguraremos en <strong>Blogpocket</strong> la sección &#8220;<strong>La semana en imágenes</strong>&#8221; que será un resumen gráfico de los más significativo que hemos publicado en los últimos 7 días. </p>
<p>Hoy, dedico esta entrada a explicar cómo lo he implementado. </p>
<p>Para poder mostrar un listado de imágenes (una por cada post), evidentemente lo primero que hay que tener en cuenta es que cada entrada debe llevar asociada una. Para ello, utilizaremos las <a href="http://codex.wordpress.org/Post_Thumbnails">imágenes en miniatura</a><a href="http://codex.wordpress.org/Post_Thumbnails"><img style='border:0;' src='http://www.blogpocket.com/wp-content/plugins/tensai-rss/external.png'/></a> (thumbnails) que, desde la versión 2.9, es capaz de gestionar <a href="http://www.wordpress.org">WordPress</a><a href="http://www.wordpress.org"><img style='border:0;' src='http://www.blogpocket.com/wp-content/plugins/tensai-rss/external.png'/></a>. </p>
<p>Si tienes una instalación &#8220;<em>multisite</em>&#8221; no te debes preocupar porque tienes la función incluida en el editor de posts (un widget en la columna lateral con el que puedes añadir una &#8220;<em>Featured image</em>&#8221; o &#8220;imagen destacada&#8221;). Sin embargo, en una instalación normal tienes que añadir la siguiente instrucción en el archivo <em>functions.php</em> para activarla:</p>
<blockquote><p>add_theme_support( &#8216;post-thumbnails&#8217; );</p></blockquote>
<p>Una vez que tenemos definida una imagen en miniatura (mediante el <em>widget</em> &#8220;<em>featured image</em>&#8221; del editor de posts) solo hay que saber extraerla con el correspondiente código <strong>PHP</strong>. En el blog <strong>Aurea</strong> encontrarás una buena explicación acerca de cómo programarlo: <a href="http://aurea.es/2010/02/24/post-thumbnail-en-wordpress/">Thumbnail en WordPress; Mostrar 5 últimos posts con thumbnails</a><a href="http://aurea.es/2010/02/24/post-thumbnail-en-wordpress/"><img style='border:0;' src='http://www.blogpocket.com/wp-content/plugins/tensai-rss/external.png'/></a>.</p>
<p>Yo he utilizado el plugin <a href="http://wordpress.org/extend/plugins/categoy-thumbnail-list/installation/">Category Thumbnail List</a><a href="http://wordpress.org/extend/plugins/categoy-thumbnail-list/installation/"><img style='border:0;' src='http://www.blogpocket.com/wp-content/plugins/tensai-rss/external.png'/></a> para no tener que gastar ninguna neurona. Para mostrar la tabla con las imágenes solo hay que añadir el <a href="http://kebrantin.com/blog/2011/09/13/que-son-los-shortcodes-y-como-se-crean/" title="¿Qué es un shortcode y cómo se crean?">shortcode</a><a href="http://kebrantin.com/blog/2011/09/13/que-son-los-shortcodes-y-como-se-crean/" title="¿Qué es un shortcode y cómo se crean?"><img style='border:0;' src='http://www.blogpocket.com/wp-content/plugins/tensai-rss/external.png'/></a> siguiente, en cualquier lugar del post:</p>
<p>&#91;categorythumbnaillist September, 10 2011]</p>
<p>Siendo &#8220;September, 10 2011&#8243; la fecha a partir de la cual queremos mostrar posts. El plugin originalmente lleva el número ID correspondiente a la categoría de los posts que se quieren mostrar, en lugar de esa fecha. Ese identificativo se obtiene en la página de categorías poniendo el cursor encima de la categoría concreta que se va a utilizar. Esto quiere decir, además, que cuando edites una entrada, cuyo thumbnail va a salir en la galería, tienes que asignarle la categoría con ID &#8220;n&#8221;. Acuérdate también de poner el nombre del post como título de la imagen, ya que el plugin utiliza el nombre de la imagen para mostrar como descripción cuando se sitúa el cursor encima de ella. </p>
<p>Para configurar el tamaño de las imágenes en miniatura, el plugin añade una página de opciones en la columna de &#8220;Settings&#8221; del escritorio (yo he escogido 170&#215;170), pero hay que asegurarse de elegir el tamaño miniatura al definir la &#8220;<em>featured image</em>&#8220;. </p>
<p><strong>WordPress</strong> posee una opción de &#8220;<em>Media</em>&#8221; (galería de elementos multimedia) con la que, una vez definida la &#8220;<em>featured image</em>&#8221; para cada post, siempre puedes modificar sus características a posteriori (nombre, tamaño, etc.).</p>
<p>El <strong>plugin</strong> <strong>Category Thumbnail List</strong> tiene una hoja de estilos <strong>CSS</strong> con la que puedes adornar la lista totalmente a tu gusto. </p>
<p>Por último, el <strong>plugin</strong> muestra, debajo de cada imagen, el título del post. Si te parece mejor que la imagen aparezca sola, hay que quitar la siguiente instrucción:</p>
<blockquote><p>$output .= &#8216;&lt;a href=&#8221;&#8216; .$link . &#8216;&#8221; title=&#8221;&#8216; .$title . &#8216;&#8221;>&#8217; .$title . &#8216;&lt;/a>&lt;br/>&#8217;;</p></blockquote>
<p>Y para mostrar las imágenes que tengan la categoría &#8220;n&#8221;, hay que cambiar la instrucción:</p>
<blockquote><p>$myposts = get_posts(&#8216;numberposts=-1&#038;&#038;category=&#8217;.$listCatId[1].&#8217;&#038;&#038;orderby=&#8217;.$categoryThumbnailList_OrderType.&#8217;&#038;&#038;order=&#8217;.$categoryThumbnailList_Order);
</p></blockquote>
<p>por:</p>
<blockquote><p>$myposts = get_posts(&#8216;numberposts=-1&#038;&#038;category=n&#038;&#038;orderby=&#8217;.$categoryThumbnailList_OrderType.&#8217;&#038;&#038;order=&#8217;.$categoryThumbnailList_Order);</p></blockquote>
<p>Si se quieren visualizar solo 9 imágenes, por ejemplo, hay que hacer que el bucle solo se ejecute 9 veces. Para ello, se utiliza la variable $i. </p>
<p>Nótese que para que las imágenes se muestren según el parámetro de fecha del shortcode hay que comparar la fecha del post con la fecha en la que se muestran las imágenes. La del parámetro del shortcode se calcula con la instrucción: </p>
<blockquote><p>$fecha_lim = $listCatId[1]; </p></blockquote>
<p>Y solo se muestran imágenes si se cumple la condición </p>
<blockquote><p>($fecha <= $fecha_lim) and ($i<10)</p></blockquote>
<p>Es decir, cuando la fecha del post es menor que la que lleva el shortcode y todavía no se  han visualizado 9 imágenes. La fecha del post es $fecha y se obtiene extrayéndola del post con la sentencia. </p>
<blockquote><p>$fecha = get_the_date();</p></blockquote>
<p>Si actualizas alguna vez este plugin, acuérdate de volver a realizar estas dos modificaciones y los posibles cambios en el CSS.</p>
<p>A continuación, puedes descargar el plugin modificado: <a href="http://www.blogpocket.com/wp-content/plugins/categoy-thumbnail-list/categoy-thumbnail-list.txt">download</a><a href="http://www.blogpocket.com/wp-content/plugins/categoy-thumbnail-list/categoy-thumbnail-list.txt"><img style='border:0;' src='http://www.blogpocket.com/wp-content/plugins/tensai-rss/external.png'/></a>.</p>
<div><hr />
Este blog  pertenece a la red <a href="http://multisite.blogpocket.com">Blogpocket Multisite</a>, donde puedes encontrar tambi&eacute;n: <a href="http://mariposasenlamaleta.blogpocket.com">Mariposas en la maleta</a>, <a href="http://acordes.blogpocket.com">Acordes Modernos</a> y <a href="http://cicutaenlasangre.blogpocket.com">Cicuta en la sangre</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.blogpocket.com/2011/09/14/listado-de-posts-con-imagenes-en-miniatura/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Distinto color según el estado de las entradas</title>
		<link>http://ayudawordpress.com/distinto-color-segun-el-estado-de-las-entradas/</link>
		<comments>http://ayudawordpress.com/distinto-color-segun-el-estado-de-las-entradas/#comments</comments>
		<pubDate>Mon, 15 Aug 2011 22:15:17 +0000</pubDate>
		<dc:creator>planetawordpress</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Avanzado]]></category>
		<category><![CDATA[código]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programación]]></category>
		<category><![CDATA[Tutoriales / Trucos]]></category>
		<category><![CDATA[Wordpress.org]]></category>

		<guid isPermaLink="false">http://ayudawordpress.com/?p=10077</guid>
		<description><![CDATA[Si tienes muchas entradas en tu sitio, especialmente si hay varios usuarios y te toca la labor de aprobar entradas pendientes de revisión, no siempre es suficiente con el texto que así te lo indica. Un modo genial, además de chulo, de distinguir las entradas por su estado sería que se mostraran en distinto color en la ventana del listado de entradas ¿no?. Pues conseguirlo es muy sencillo, solo tienes que añadir este código al fichero functions.php de tu tema activo y ya lo tienes: Clic para ver Texto Plano PHP: function posts_status_color&#040;&#041; &#123; ?&#062; &#160; &#060;style&#062; &#160; .status-draft &#123; &#8230;</p> <a href="http://ayudawordpress.com/distinto-color-segun-el-estado-de-las-entradas/">Sigue leyendo que hay m&#225;s <span>&#8594;</span></a><p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://ayudawordpress.com/wp-content/uploads/2011/08/colores-estado-entradas-wordpress.png" rel="shadowbox[post-10077];player=img;" title="colores estado entradas wordpress"><img src="http://ayudawordpress.com/wp-content/uploads/2011/08/colores-estado-entradas-wordpress-500x295.png" alt="" title="colores estado entradas wordpress" width="500" height="295" class="aligncenter size-medium wp-image-10078" /></a></p>
<p>Si tienes muchas entradas en tu sitio, especialmente si hay varios usuarios y te toca la labor de aprobar entradas pendientes de revisión, no siempre es suficiente con el texto que así te lo indica.</p>
<p>Un modo genial, además de chulo, de distinguir las entradas por su estado sería que se mostraran en distinto color en la ventana del listado de entradas ¿no?.</p>
<p><span id="more-10077"></span></p>
<p>Pues conseguirlo es muy sencillo, solo tienes que añadir este código al fichero <code>functions.php</code> de tu tema activo y ya lo tienes:</p>
<div class="igBar"><span id="lphp-8"><a href="http://ayudawordpress.com/distinto-color-segun-el-estado-de-las-entradas/" onclick="javascript:showCodeTxt('php-8'); return false;">Clic para ver Texto Plano</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-8">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">function</span> posts_status_color<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">?&gt;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &lt;style&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; .status-draft <span style="color:#006600; font-weight:bold;">&#123;</span> background: <span style="color:#008000; font-style:italic;">#FCE3F2 !important; }</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; .status-pending <span style="color:#006600; font-weight:bold;">&#123;</span> background: <span style="color:#008000; font-style:italic;">#87C5D6 !important; }</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; .status-publish <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#008000;">/* por defecto */</span> <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; .status-future <span style="color:#006600; font-weight:bold;">&#123;</span> background: <span style="color:#008000; font-style:italic;">#C6EBF5 !important; }</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; .status-private <span style="color:#006600; font-weight:bold;">&#123;</span> background: <span style="color:#008000; font-style:italic;">#F2D46F; }</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &lt;/style&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">&lt;?php</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">add_action<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'admin_footer'</span>,<span style="color:#FF0000;">'posts_status_color'</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Los colores elegidos son de muestra, pero los puedes cambiar por tu hexadecimal preferido como es natural.</p>
<div class="googlePlusOneButton"><g:plusone href="http://ayudawordpress.com/distinto-color-segun-el-estado-de-las-entradas/"  size="tall"   ></g:plusone></div><p class='fb-like'><iframe src='http://www.facebook.com/plugins/like.php?href=http://ayudawordpress.com/distinto-color-segun-el-estado-de-las-entradas/&amp;layout=button_count&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=23&amp;font=lucida+grande' scrolling='no' frameborder='0' allowTransparency='true' style='border:none; overflow:hidden; width:450px; height:23px'></iframe></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/AyudaWordpress?a=lenHu7k714I:aFnRl9SMNZ4:Dsqc8YHEA1Y"><img src="http://feeds.feedburner.com/~ff/AyudaWordpress?i=lenHu7k714I:aFnRl9SMNZ4:Dsqc8YHEA1Y" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://ayudawordpress.com/distinto-color-segun-el-estado-de-las-entradas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress con Timthumb hackeado hacen black hat SEO en Google Images</title>
		<link>http://ayudawordpress.com/wordpress-con-timthumb-hackeado-hacen-black-hat-seo-en-google-images/</link>
		<comments>http://ayudawordpress.com/wordpress-con-timthumb-hackeado-hacen-black-hat-seo-en-google-images/#comments</comments>
		<pubDate>Thu, 11 Aug 2011 00:15:26 +0000</pubDate>
		<dc:creator>planetawordpress</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[302]]></category>
		<category><![CDATA[404]]></category>
		<category><![CDATA[Antivirus]]></category>
		<category><![CDATA[código]]></category>
		<category><![CDATA[Experto]]></category>
		<category><![CDATA[Exploit]]></category>
		<category><![CDATA[Kubrick]]></category>
		<category><![CDATA[malware]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programación]]></category>
		<category><![CDATA[rewrite]]></category>
		<category><![CDATA[seguridad]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[TimThumb]]></category>
		<category><![CDATA[Tutoriales / Trucos]]></category>
		<category><![CDATA[Wordpress.org]]></category>

		<guid isPermaLink="false">http://ayudawordpress.com/?p=10038</guid>
		<description><![CDATA[Según el blog de Unmask Parasites, más de 4.000 sitios WordPress hackeados estarían inundando de imágenes utilizadas para posicionar sitios de falsos antivirus. Lo que hacen estos indeseables del Black Hat SEO, usando el exploit en Timthumb del que avisé, es lo siguiente … Con el siguiente patrón de URL: hxxp:///?[a-f]{3}= , donde [a-f]{3} es una combinación de tres letras desde la "a" a la "f" y las son combinaciones de palabras clave separadas por guiones que contienen o imágenes de palabras o imágenes normales, por ejemplo: hxxp://ejemplo.com/?fef=imágenes-de-mitzi-mueller-wrestling hxxp://ejemplo.net/?cda=imagen-frutas-tropicales-index Para ello usan páginas con puerta trasera que introducen en plantillas &#8230;</p> <a href="http://ayudawordpress.com/wordpress-con-timthumb-hackeado-hacen-black-hat-seo-en-google-images/">Sigue leyendo que hay m&#225;s <span>&#8594;</span></a><p>]]></description>
			<content:encoded><![CDATA[<p><img src="http://ayudawordpress.com/wp-content/uploads/2011/08/imagenes-envenenadas-google.jpg" alt="" title="imagenes envenenadas google" width="411" height="519" class="aligncenter size-full wp-image-10039" /></p>
<p>Según el <a href="http://blog.unmaskparasites.com/2011/08/05/hacked-wordpress-blogs-poison-google-images/" >blog de Unmask Parasites</a>, <strong>más de 4.000 sitios WordPress hackeados</strong> estarían inundando de imágenes utilizadas para posicionar sitios de falsos antivirus.</p>
<p>Lo que hacen estos indeseables del <strong>Black Hat SEO</strong>, usando el <a href="http://ayudawordpress.com/problema-grave-de-seguridad-en-timthumb/" title="Problema grave de seguridad en Timthumb" >exploit en Timthumb</a> del que avisé, es lo siguiente …</p>
<p><span id="more-10038"></span></p>
<p>Con el siguiente patrón de URL: hxxp://<blog-hackeado.com>/?[a-f]{3}=<keywords> , donde [a-f]{3} es una combinación de tres letras desde la "a" a la "f" y las <keywords> son combinaciones de palabras clave separadas por guiones que contienen o imágenes de palabras o imágenes normales, por ejemplo:</p>
<blockquote><p>hxxp://ejemplo.com/?fef=imágenes-de-mitzi-mueller-wrestling<br />
hxxp://ejemplo.net/?cda=imagen-frutas-tropicales-index</p></blockquote>
<p>Para ello usan páginas con puerta trasera que introducen en plantillas normales de sitios WordPress, donde <strong>el contenido original se reemplaza con unas veinte miniaturas y pequeños bloques de texto relativos a las palabras clave a posicionar</strong>.</p>
<p>Las imágenes no están enlazadas desde sitios externos sino que enlazan a imágenes a "tamaño completo" con URLs como estas:</p>
<div class="igBar"><span id="lphp-9"><a href="http://ayudawordpress.com/wordpress-con-timthumb-hackeado-hacen-black-hat-seo-en-google-images/" onclick="javascript:showCodeTxt('php-9'); return false;">Clic para ver Texto Plano</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-9">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">/?<span style="color:#006600; font-weight:bold;">&#91;</span>a-f<span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#CC66CC;color:#800000;">3</span><span style="color:#006600; font-weight:bold;">&#125;</span>=&lt;keywords&gt;&lt;encrypted-key&gt;&lt;short-name&gt;.jpg </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Por ejemplo:</p>
<div class="igBar"><span id="lphp-10"><a href="http://ayudawordpress.com/wordpress-con-timthumb-hackeado-hacen-black-hat-seo-en-google-images/" onclick="javascript:showCodeTxt('php-10'); return false;">Clic para ver Texto Plano</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-10">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">/?fec=imágenes-de-blagojovich-arrestado-Eun8671l43WGQNUa7rKWUdG/5d60kf6AQ4VM4KfPdbfaMro2PNRMVlYmniC50Kh6SJdwMkeSz7s19kggH0WT4j_AYuW36OEWyfkABshi/Tk5R16sYiKUfS8OJGDZ_K7p/WoYUNZZ_Q==uek.jpg </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>En la parte superior de las imágenes se muestra una inscripción - el nombre de dominio del sitio hacheado. De este modo los indeseables estos hacen parecer que las imágenes pertenecen al sitio que han hackeado, como si fuera contenido propio, no imágenes insertadas o robadas. Al mismo tiempo, de este modo, es más fácil identificar la imagen envenenada en los resultados de búsqueda.</p>
<p><img src="http://ayudawordpress.com/wp-content/uploads/2011/08/seal-at-the-top-of-the-images.jpg" alt="" title="nombre de dominio en las imagenes" width="296" height="394" class="aligncenter size-full wp-image-10040" /></p>
<p>Los archivos de imágen contienen la siguiente cadena en su interior: <code>< CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), quality = 100</code>. Esto significa que se crearon usando la biblioteca gráfica GD.</p>
<p>Parece ser que <strong>los hackers usan un script PHP para coger imágenes bien posicionadas</strong> (en los resultados de búsqueda de Google Imágenes), las redimensionan a tamaño de miniatura (un ancho de entre 200 y 300 pixels) y a tamaño completo (algunas a tamaño aleatorio, en algunos casos incluso a tamaños mayores que la original, para posicionarlas mejor al ser más grandes en pixels) y finalmente añaden el sello del nombre del dominio hackeado. </p>
<h3>Marcas temporales</h3>
<p>Al fondo del código HTML de las páginas puerta trasera puedes ver comentarios como estos:</p>
<div class="igBar"><span id="lphp-11"><a href="http://ayudawordpress.com/wordpress-con-timthumb-hackeado-hacen-black-hat-seo-en-google-images/" onclick="javascript:showCodeTxt('php-11'); return false;">Clic para ver Texto Plano</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-11">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;!-- <span style="color:#CC66CC;color:#800000;">7</span>/<span style="color:#CC66CC;color:#800000;">24</span>/<span style="color:#CC66CC;color:#800000;">2011</span> <span style="color:#CC66CC;color:#800000;">4</span>:<span style="color:#CC66CC;color:#800000;">30</span>:<span style="color:#CC66CC;color:#800000;">03</span> PM --&gt;&lt;!-- <span style="color:#000000; font-weight:bold;">new</span> england railroad pictures --&gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>La marca temporal y las palabras clave. De este modo puedes fácilmente ver cuando se creó la puerta trasera.</p>
<h3>Redirecciones</h3>
<p>Las páginas puerta trasera tienen buenas posiciones en algunas palabras clave tanto en la búsqueda web de Google como en la de Imágenes (especialmente cuando buscas la frase exacta). Sin embargo, <strong>las redirecciones maliciosas ocurren solamente cuando haces clic en el resultado de búsqueda en Google Imágenes</strong>, lo que prueba que la meta final es inundar Google Imágenes de estas imágenes, o sea, <strong>una campaña pura y dura de black-hat SEO</strong>.</p>
<p><strong>La redirección tiene dos etapas</strong>. En la primera la redirección va a  un servidor intermedio (TDS) que, a continuación, redirige a unas páginas web que lanzan una herramienta antivirus falsa (hay dos variaciones diferentes).</p>
<p>Esta es una cadena real de redirección:</p>
<div class="igBar"><span id="lphp-12"><a href="http://ayudawordpress.com/wordpress-con-timthumb-hackeado-hacen-black-hat-seo-en-google-images/" onclick="javascript:showCodeTxt('php-12'); return false;">Clic para ver Texto Plano</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-12">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC66CC;color:#800000;">302</span>-&gt;<span style="color:#006600;">hxxp</span>:<span style="color:#FF9933; font-style:italic;">//video.bywhy .com/?k=girdles+pictures&amp;s=google&amp;r=http%3A%2F%2Fwww.google.com%2Fimgres%3Fimgurl%3Dhttp%3A%2F%2Fbcsmusic.me%2F%253Fbdd%253Dgirdles-pictures-Vyhynx%2FbFO_9rUEvfK72isOTIVpmnmzLxnzp51gHqzVXi5I5jE2lyrsssMFcfbwOFoXk3VR8TwxTQeexe%2FonLd6RPIG_M6hkLQMh6ACctX4kzsuwbN5w_6YOYxZYj1AJQl1OBCXNjPYQoA%253D%253Dxy5.jpg%26imgrefurl%3Dhttp%3A%2F%2Fbcsmusic.me%2F%253Fbdd%253Dgirdles-pictures%26usg%3D__6ho2Rtl5S4GcwInf2xzUhPN4vkI%3D%26h%3D439%26w%3D262%26sz%3D98%26hl%3Den%26start%3D19%26zoom%3D1%26um%3D1%26itbs%3D1%26tbnid%3DoHNHWFmQjxIwqM%3A%26tbnh%3D127%26tbnw%3D76%26prev%3D%2Fsearch%253Fq%253Dsite%3Abcsmusic.me%2526um%253D1%2526hl%253Den%2526sa%253DN%2526channel%253Dfs%2526biw%253D1222%2526bih%253D260%2526tbm%253Disch%26ei%3DnU80TtGDG4mE-wa5vPH9DA&amp;d=http%3A%2F%2Fbcsmusic.me%2F%3Fbdd%3Dgirdles-pictures</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC66CC;color:#800000;">302</span>-&gt;<span style="color:#006600;">hxxp</span>:<span style="color:#FF9933; font-style:italic;">//update34.svernick .in/index.php?Q0rhQ9S3be5GTHpOM5RNjiUpBaa7CmPerSb+VBBE57iCXCC1iDs+XgOe4qXsg1ggs5uk7Ck1GcwyRZ2vqM7MPVofO5WM3eBmP5tRpBeBu/kPphowRYvnTq2+4BmHNg== </span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Como puedes ver, el servidor TDS recibe información acerca de las palabras clave, la fuente, y de la URL de referencia.</p>
<p>El dominio intermedio cambia cada día. En realidad pertenecen a otros sitios hackeados (en su mayoría creados con WordPress)</p>
<p>Aquí tienes unos cuantos dominios del TDS intermedio usados en este ataque:</p>
<blockquote><p>video.bywhy .com<br />
ppopo2.bget .ru<br />
awalstudios .com<br />
demo.hireindians .net<br />
www.privatepilot .hu<br />
footballgirdles .tk
</p></blockquote>
<p>El nombre de dominio de la página web del falso antivirus consiste en un dominio .in que cambia cada día, y unos cuantos subdminios "updateNN" o "scanNN", por ejemplo, "update82.yourscan.in" o "scan73.moomles.in.</p>
<p>Aquí tienes unos cuantos dominios .in de los falsos sitios antivirus usados en este ataque:</p>
<blockquote><p>spelleit .in<br />
svernick .in<br />
senerino .in<br />
moomles .in<br />
klopster .in<br />
bastandro .in<br />
waspeeds .in<br />
yourscan .in<br />
x-scan .in</p></blockquote>
<p>La mayoría de los sitios .in apuntan a la dirección IP <code>193.105.154.31</code> (Reino unido, con información de contacto de Lituania).</p>
<h3>Rango de detección</h3>
<p><strong>Los falsos sitios antivirus lanzan ejecutables .exe "scareware"</strong> con nombres como <code>InstallSecurityScanner_NNN.exe</code>, o<br />
<code>InstallSecurityScanner_225.exe</code>. Estos archivos se vuelven a re-empaquetar cada día y su rango de detección (según VirusTotal) es bastante bajo. El rango típico de detección para ficheros servidos actualmente es de 8/43 (18,6%). Esto suele mejorar en tanto en cuanto el fichero malicioso no se use y se sirva un nuevo fichero con bajo rango de detección desde el servidor del antivirus.</p>
<p>Como he comentado arriba, y por concretar más, <strong>se han detectado 4.358 sitios comprometidos</strong>. Actualmente Google ha detectado menos del 5% de los mismos. Si usas la página de diagnóstico de navegación segura de Google te dice algo así:</p>
<blockquote><p>El software malicioso está alojado en 2 dominio(s), incluyendo bastandro .in/, senerino .in/.</p>
<p>Parece que 3 dominio(s) están funcionando como intermediarios para distribuir malware a los visitantes de este sitio, incluyendo hireindians .net/, awalstudios .com/, bywhy .com/.</p></blockquote>
<h3>Timthumb</h3>
<p>Como ya avisé hace unos días, hay que <a href="http://ayudawordpress.com/problema-grave-de-seguridad-en-timthumb/" title="Problema grave de seguridad en Timthumb" >poner al día Timthumb</a> si lo usa tu tema, no hay excusas, más visto lo visto de los resultados ¿no te parece?</p>
<h3>.htaccess</h3>
<p>Pero <strong>no solo Timthumb es el culpable</strong>, también se han detectado sitios en los que <strong>hackers han creado un .htaccess con reglas de rewrite</strong> superiores al directorio raíz del sitio. <strong>Las reglas de rewrite mapean las URLs puerta trasera a algún script PHP</strong>. Ahí es nada.</p>
<h3>Cache</h3>
<p><strong>Todas las páginas puerta trasera están cacheadas</strong> en alguna parte del servidor. Al contrario que otros ataques de envenamiento SEO estos no se hacen en vivo. Si especificas algunas palabras clave diferentes en la URL obtendrás  un error 404. Dicho sea de paso, estas páginas de error 404 son distintas a las normales que tenga el sitio hackeado.</p>
<p>Otra prueba de que el contenido spam está cacheado y de que no se inyecta en la ejecución de páginas activas de WordPress son las marcas temporales en el fondo del código HTML y de las entradas antiguas de la sección de "Entradas recientes". En algunos sitios, en vez de una plantilla real del sitio, usan una plantilla prefabricada de Kubrick con una marca final que no cambia de sitio a sitio sino que es siempre la misma (WordPress 2.3.1, 22 queries, 0.912 seconds).</p>
<h2>¿Que hago?</h2>
<p>Hay varias comprobaciones y/o acciones que podemos realizar:</p>
<ol>
<li>Pues lo primero repasar tu fichero <code>.htaccess</code> y elimina cualquier regla de rewrite que no sepas que hace. Ante la duda bórralo y vuelve a guardar la estructura de enlaces permanentes en los Ajustes de WordPress para que se vuelva a crear uno limpio.</li>
<li>Actualiza TimThumb a la versión segura. Ya te he puesto los enlaces a las maneras de hacerlo más arriba, <a href="http://ayudawordpress.com/problema-grave-de-seguridad-en-timthumb/" title="Eliminar exploit timthumb" >en la entrada que escribí el otro día tienes los distintos modos de hacerlo</a></li>
<li>Ve a las Herramientas para Webmasters de Google y revisa si tu sitio tiene software malicioso</li>
<li>Instala algún plugin detector de exploits y ejecútalo. Hay varios y buenos "en el repositorio oficial", haz una búsqueda por "exploit"</li>
</ol>
<p>Que no sea nada <img src='http://ayudawordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p><small>Gracias a <a href="http://www.subinet.es/internet-seguridad/google-imagenes-envenenado-por-blogs-de-wordpress-hackeados/" >Juan</a> por el aviso</small></p>
<p class='fb-like'><iframe src='http://www.facebook.com/plugins/like.php?href=http://ayudawordpress.com/wordpress-con-timthumb-hackeado-hacen-black-hat-seo-en-google-images/&amp;layout=button_count&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=23&amp;font=lucida+grande' scrolling='no' frameborder='0' allowTransparency='true' style='border:none; overflow:hidden; width:450px; height:23px'></iframe></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/AyudaWordpress?a=bgMtsaR3k2Y:UxQqkB_0AB4:Dsqc8YHEA1Y"><img src="http://feeds.feedburner.com/~ff/AyudaWordpress?i=bgMtsaR3k2Y:UxQqkB_0AB4:Dsqc8YHEA1Y" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://ayudawordpress.com/wordpress-con-timthumb-hackeado-hacen-black-hat-seo-en-google-images/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>M-shots en WordPress alojado</title>
		<link>http://ayudawordpress.com/m-shots-en-wordpress-alojado/</link>
		<comments>http://ayudawordpress.com/m-shots-en-wordpress-alojado/#comments</comments>
		<pubDate>Sun, 07 Aug 2011 15:34:16 +0000</pubDate>
		<dc:creator>planetawordpress</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[código]]></category>
		<category><![CDATA[Experto]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[programación]]></category>
		<category><![CDATA[shortcode]]></category>
		<category><![CDATA[Snap shots]]></category>
		<category><![CDATA[Tutoriales / Trucos]]></category>
		<category><![CDATA[Wordpress.com]]></category>
		<category><![CDATA[Wordpress.org]]></category>

		<guid isPermaLink="false">http://ayudawordpress.com/?p=9984</guid>
		<description><![CDATA[Hace mucho tiempo, te guste o no, existe en WordPress.com el servicio conocido como Snap Shots, facilitado por 'mshots', mediante el cual, si está activo, puedes ver una captura emergente de una web sobre su enlace ¿a que te suena?. Pues bien, puedes usar este servicio también en tu WordPress alojado de dos maneras, mediante un código que aprovecha el 'mshots' alojado en WordPress.com, para que no tengas que instalarlo tu mismo y, si lo prefieres, mediante un sencillo plugin. Vamos a ver las dos maneras de hacerlo … 1. Plugin Bien sencillo, solo tienes que instalar el plugin Snap &#8230;</p> <a href="http://ayudawordpress.com/m-shots-en-wordpress-alojado/">Sigue leyendo que hay m&#225;s <span>&#8594;</span></a><p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://ayudawordpress.com/wp-content/uploads/2011/08/captura-snap-aw.png" rel="shadowbox[post-9984];player=img;" title="captura snap aw"><img src="http://ayudawordpress.com/wp-content/uploads/2011/08/captura-snap-aw-500x283.png" alt="" title="captura snap aw" width="500" height="283" class="aligncenter size-medium wp-image-9985" /></a></p>
<p>Hace mucho tiempo, te guste o no, existe en WordPress.com el servicio conocido como <strong>Snap Shots</strong>, facilitado por 'mshots', mediante el cual, si está activo, puedes ver una captura emergente de una web sobre su enlace ¿a que te suena?.</p>
<p>Pues bien, <strong>puedes usar este servicio también en tu WordPress alojado de dos maneras</strong>, mediante un código que aprovecha el 'mshots' alojado en WordPress.com, para que no tengas que instalarlo tu mismo y, si lo prefieres, mediante un sencillo plugin.</p>
<p>Vamos a ver las dos maneras de hacerlo …</p>
<p><span id="more-9984"></span></p>
<h3>1. Plugin</h3>
<p>Bien sencillo, solo tienes que instalar el <a href="http://wordpress.org/extend/plugins/snap-shots-for-wordpressorg/" >plugin Snap Shots para WordPress.org</a>, activarlo y ya podrán ver tus visitantes capturas emergentes de las URLs enlazadas en tus entradas. El resultado es fácil e inmediato.</p>
<p>Solo hay un paso previo, registrarte y obtener un código en <a href="http://www.snap.com/about/shots.php" >la web de Snap Shots</a></p>
<h3>2. Código</h3>
<p>El otro modo, más personalizable por supuesto, pasa por <a href="http://www.geekeries.fr/snippet/creer-automatiquement-miniatures-sites-wordpress/" >añadir un código</a> al fichero <code>functions.php</code> de tu tema activo y luego activar - a voluntad - las capturas (o no) de las URLs que enlaces en tus entradas. Como puedes ya vislumbrar aquí tienes mucho más control sobre el contenido que en la opción de plugin.</p>
<p>Lo primero es añadir este código al fichero <code>functions.php</code>:</p>
<div class="igBar"><span id="lphp-24"><a href="http://ayudawordpress.com/m-shots-en-wordpress-alojado/" onclick="javascript:showCodeTxt('php-24'); return false;">Clic para ver Texto Plano</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-24">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">function</span> aw_snap<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$atts</span>, <span style="color:#0000FF;">$content</span> = <span style="color:#000000; font-weight:bold;">null</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/extract"><span style="color:#000066;">extract</span></a><span style="color:#006600; font-weight:bold;">&#40;</span>shortcode_atts<span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.php.net/array"><span style="color:#000066;">array</span></a><span style="color:#006600; font-weight:bold;">&#40;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#FF0000;">"captura"</span> =&gt; <span style="color:#FF0000;">'http://s.wordpress.com/mshots/v1/'</span>, <span style="color:#FF9933; font-style:italic;">//usamos el servicio ya instalado en wordpress.com</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#FF0000;">"url"</span> =&gt; <span style="color:#FF0000;">'http://ayudawordpress.com'</span>, <span style="color:#FF9933; font-style:italic;">//url por defecto de las capturas si no modificamos el shortcode</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#FF0000;">"alt"</span> =&gt; <span style="color:#FF0000;">'Mi sitio'</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#FF0000;">"w"</span> =&gt; <span style="color:#FF0000;">'400'</span>, <span style="color:#FF9933; font-style:italic;">// ancho</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#FF0000;">"h"</span> =&gt; <span style="color:#FF0000;">'300'</span> <span style="color:#FF9933; font-style:italic;">// alto</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#41;</span>, <span style="color:#0000FF;">$atts</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$img</span> = <span style="color:#FF0000;">'&lt;img src=&quot;'</span> . <span style="color:#0000FF;">$snap</span> . <span style="color:#FF0000;">''</span> . <a href="http://www.php.net/urlencode"><span style="color:#000066;">urlencode</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$url</span><span style="color:#006600; font-weight:bold;">&#41;</span> . <span style="color:#FF0000;">'?w='</span> . <span style="color:#0000FF;">$w</span> . <span style="color:#FF0000;">'&amp;h='</span> . <span style="color:#0000FF;">$h</span> . <span style="color:#FF0000;">'&quot; alt=&quot;'</span> . <span style="color:#0000FF;">$alt</span> . <span style="color:#FF0000;">'&quot;/&gt;'</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">return</span> <span style="color:#0000FF;">$img</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">add_shortcode<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"snap"</span>, <span style="color:#FF0000;">"aw_snap"</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Con esta función creamos el '<code>shortcode</code>' que podrás usar en tus entradas y, en caso contrario, hará capturas por defecto de tu propia URL, en este caso a <em>ayudawordpress.com</em>. También definimos una altura y ancho de la captura por defecto, que podemos modificar en cada shortcode si lo deseamos.</p>
<p>Por ejemplo, si en una entrada introducimos esto … </p>
<p><code>[captura url="http://ayudawordpress.com/servicios/" alt="Servicios Ayuda WordPress" w="300" h="200"]</code></p>
<p>Lo que hacemos es introducir una captura de la página de servicios de Ayuda WordPress con un ancho de 300px y un alto de 200px, con lo que modificamos los parámetros por defecto.</p>
<p>Fácil ¿no?</p>
<p>Bueno, pues tu eliges el método, si es que te gusta esto de los "snap shots", a mi personalmente me horroriza.</p>
<p class='fb-like'><iframe src='http://www.facebook.com/plugins/like.php?href=http://ayudawordpress.com/m-shots-en-wordpress-alojado/&amp;layout=button_count&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=23&amp;font=lucida+grande' scrolling='no' frameborder='0' allowTransparency='true' style='border:none; overflow:hidden; width:450px; height:23px'></iframe></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/AyudaWordpress?a=taSwaZDBxG4:ogz99co2Ec8:Dsqc8YHEA1Y"><img src="http://feeds.feedburner.com/~ff/AyudaWordpress?i=taSwaZDBxG4:ogz99co2Ec8:Dsqc8YHEA1Y" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://ayudawordpress.com/m-shots-en-wordpress-alojado/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Miniatura enlazada al permalink</title>
		<link>http://ayudawordpress.com/miniatura-enlazada-al-permalink/</link>
		<comments>http://ayudawordpress.com/miniatura-enlazada-al-permalink/#comments</comments>
		<pubDate>Tue, 21 Jun 2011 14:45:39 +0000</pubDate>
		<dc:creator>planetawordpress</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Avanzado]]></category>
		<category><![CDATA[Codex]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[Miniaturas]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programación]]></category>
		<category><![CDATA[Thumbnail]]></category>
		<category><![CDATA[Tutoriales / Trucos]]></category>
		<category><![CDATA[WordPress 2.9]]></category>
		<category><![CDATA[Wordpress.org]]></category>

		<guid isPermaLink="false">http://ayudawordpress.com/?p=9778</guid>
		<description><![CDATA[WordPress nos permite incluir miniaturas en la portada de nuestro sitio de manera sencilla, pero por defecto esa miniatura no enlaza al enlace permanente. Si quieres que las miniaturas, o imágenes destacadas si así prefieres llamarlas, tengan un enlace al permalink de la entrada solo tienes que añadir el siguiente código en el fichero functions.php de tu tema activo: Clic para ver Texto Plano PHP: add_filter&#040; 'post_thumbnail_html', 'wps_post_thumbnail', 10, 3 &#041;; function wps_post_thumbnail&#040; $html, $post_id, $post_image_id &#041; &#123; &#160; $html = '&#060;a href=&#034;' . get_permalink&#040; $post_id &#041; . '&#034; title=&#034;' . esc_attr&#040; get_post_field&#040; 'post_title', $post_id &#041; &#041; . '&#034;&#062;' . &#8230;</p> <a href="http://ayudawordpress.com/miniatura-enlazada-al-permalink/">Sigue leyendo que hay m&#225;s <span>&#8594;</span></a><p>]]></description>
			<content:encoded><![CDATA[<p><img src="http://ayudawordpress.com/wp-content/uploads/2009/10/miniatura-post1.png" alt="" title="miniatura post1" width="299" height="314" class="aligncenter size-full wp-image-6340" />WordPress nos permite <a title="Miniatura de post en WordPress 2.9" href="http://ayudawordpress.com/miniatura-de-post-en-wordpress-2-9/">incluir miniaturas en la portada</a> de nuestro sitio de manera sencilla, pero por defecto esa miniatura no enlaza al enlace permanente.</p>
<p>Si quieres que las miniaturas, o imágenes destacadas si así prefieres llamarlas, tengan un enlace al permalink de la entrada solo tienes que añadir el siguiente código en el fichero <code>functions.php</code> de tu tema activo:</p>
<p><span id="more-9778"></span></p>
<div class="igBar"><span id="lphp-9"><a href="http://ayudawordpress.com/miniatura-enlazada-al-permalink/" onclick="javascript:showCodeTxt('php-9'); return false;">Clic para ver Texto Plano</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-9">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">add_filter<span style="color:#006600; font-weight:bold;">&#40;</span> <span style="color:#FF0000;">'post_thumbnail_html'</span>, <span style="color:#FF0000;">'wps_post_thumbnail'</span>, <span style="color:#CC66CC;color:#800000;">10</span>, <span style="color:#CC66CC;color:#800000;">3</span> <span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">function</span> wps_post_thumbnail<span style="color:#006600; font-weight:bold;">&#40;</span> <span style="color:#0000FF;">$html</span>, <span style="color:#0000FF;">$post_id</span>, <span style="color:#0000FF;">$post_image_id</span> <span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#0000FF;">$html</span> = <span style="color:#FF0000;">'&lt;a href=&quot;'</span> . get_permalink<span style="color:#006600; font-weight:bold;">&#40;</span> <span style="color:#0000FF;">$post_id</span> <span style="color:#006600; font-weight:bold;">&#41;</span> . <span style="color:#FF0000;">'&quot; title=&quot;'</span> . esc_attr<span style="color:#006600; font-weight:bold;">&#40;</span> get_post_field<span style="color:#006600; font-weight:bold;">&#40;</span> <span style="color:#FF0000;">'post_title'</span>, <span style="color:#0000FF;">$post_id</span> <span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#41;</span> . <span style="color:#FF0000;">'&quot;&gt;'</span> . <span style="color:#0000FF;">$html</span> . <span style="color:#FF0000;">'&lt;/a&gt;'</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#616100;">return</span> <span style="color:#0000FF;">$html</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Luego, sería conveniente hacer un ajuste en el <code>loop</code> de modo que si no hay miniaturas no se trate de enlazar al permalink de cualquier manera, este:</p>
<div class="igBar"><span id="lphp-10"><a href="http://ayudawordpress.com/miniatura-enlazada-al-permalink/" onclick="javascript:showCodeTxt('php-10'); return false;">Clic para ver Texto Plano</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-10">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">&lt;?php</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span> has_post_thumbnail<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">'&lt;a href=&quot;'</span> . get_permalink<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$post</span>-&gt;<span style="color:#006600;">ID</span><span style="color:#006600; font-weight:bold;">&#41;</span> . <span style="color:#FF0000;">'&quot;&gt;'</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; the_post_thumbnail<span style="color:#006600; font-weight:bold;">&#40;</span> <span style="color:#FF0000;">'title-image'</span>, <a href="http://www.php.net/array"><span style="color:#000066;">array</span></a><span style="color:#006600; font-weight:bold;">&#40;</span> <span style="color:#FF0000;">'class'</span> =&gt; <span style="color:#FF0000;">'title-image'</span>, <span style="color:#FF0000;">'alt'</span> =&gt; <span style="color:#FF0000;">'Title Icon'</span> <span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">'&lt;/a&gt;'</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">?&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p><small>Estupendo truco de <a  href="http://wparena.com/how-to/how-to-link-post-thumbnail-to-the-post-permalink/">WordPress Arena</a>  que mejora las <a  href="http://codex.wordpress.org/Function_Reference/the_post_thumbnail#Post_Thumbnail_Linking_to_the_Post_Permalink">indicaciones del Codex</a>.</small></p>
<p class='fb-like'><iframe src='http://www.facebook.com/plugins/like.php?href=http://ayudawordpress.com/miniatura-enlazada-al-permalink/&amp;layout=button_count&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=23&amp;font=lucida+grande' scrolling='no' frameborder='0' allowTransparency='true' style='border:none; overflow:hidden; width:450px; height:23px'></iframe></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/AyudaWordpress?a=IUqKJWthS8E:CtH7hMQhb4g:Dsqc8YHEA1Y"><img src="http://feeds.feedburner.com/~ff/AyudaWordpress?i=IUqKJWthS8E:CtH7hMQhb4g:Dsqc8YHEA1Y" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://ayudawordpress.com/miniatura-enlazada-al-permalink/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

