Español
Con la aparición de la nueva versión de WordPress, el hack que te permitía controlar tus miniaturas ha dejado de funcionar, principalmente por que han modificado radicalmente el fichero y no solo se nota en la apariencia, han añadido funciones nuevas y armado funciones que antes estaban un poco «cojas».
He conseguido migrar el hack y ahora es posible disfrutar de él en la nueva versión de WordPress. Aunque continúa con alguna limitación, al parecer ahora comprueba el tamaño máximo (3 * 1024 * 1024) y si la imagen es mayor omite la minuatura.
Instalación
- Descargar el fichero
- Hacer una copia de seguridad de los fichero (
upload-functions.php
,admin-functions.php
) del directoriowp-admin
. - Descomprimir el zip y subir a la carpeta
wp-admin
, sobreescribiendo los ya existentes. - Disfrutarlo 😀
Ficheros afectados
wp-admin/ upload-functions.php ---> Para que aparezcan las opciones en el formulario Añadimos en la línea 174:<?php _e('Miniatura:'); ?> <input type="checkbox" name="thumb" value="Y" checked="checked"/> <?php _e('Tamaño de la miniatura:'); ?> <input type="text" name="sizeThumb" value="350" size="3"/>
admin-functions.php ---> Para modificar la función que redimensiona la imagen. Reemplazamos la línea 2119if ($_POST["thumb"]) { $thumb = wp_create_thumbnail($file, $_POST['sizeThumb']);} else { $thumb = $file; }
Descargar
Descargar fichero .zip. Contiene los dos ficheros modificados
English
With the appearance of the new versión of WordPress, the hack that you allow to controlling your miniatures has stopped working, principally for that they have modified radically the file and not only it is obvious in the appearance, there are to add functions new and armed functions that before were a bit «lame».
I have managed to migrate the hack and now it is possible to enjoy in the new versión WordPress. Though continue with some limitation, apparently now the size verifies the max size (3 * 1024 * 1024) and if the image is major it omits the thubnail
Instalation
- To unload the file
- To do a safety copy of the fichero (
upload-functions.php
,admin-functions.php
) of the directory(board of directors)wp-admin
. - Unzip and to rise to the folder
wp-admin
, the already existing ones. - To enjoy it
Affected files
Wp-admin/upload-functions.php---> In order that the options appear in the form To add in the line 174:admin-functions.php —> To modify the resize function. Replace the line 2119
if ($_POST["thumb"]) { $thumb = wp_create_thumbnail($file, $_POST['sizeThumb']);} else { $thumb = $file; }
Download
Download .zip file. It contains the files modificated.
22 comentarios, 9 referencias
+
#