Cambios
git-svn-id: https://192.168.0.254/svn/Proyectos.FundacionLQDVI_Web/trunk@12 77ab8c26-3d69-2c4d-86f2-786f4ba54905
161
db/lqdvi.sql
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
/*
|
||||
Plugin Name: Make Filename Lowercase
|
||||
Plugin URI: http://www.redbridgenet.com/plugins/make-filename-lowercase/
|
||||
Description: Sets uploaded media filename to lowercase.
|
||||
Version: 1.0.0
|
||||
Author: Ed Reckers (Red Bridge Internet)
|
||||
Author URI: http://www.redbridgenet.com
|
||||
License: GPL2
|
||||
*/
|
||||
|
||||
/* Copyright 2011 Ed Reckers (email : ed@redbridgenet.com)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License, version 2, as
|
||||
published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
/**
|
||||
* Filter {@see sanitize_file_name()} and return the lower case.
|
||||
*
|
||||
* @param string $filename
|
||||
* @return string
|
||||
*/
|
||||
function mfl_make_filename_lowercase($filename) {
|
||||
$info = pathinfo($filename);
|
||||
$ext = empty($info['extension']) ? '' : '.' . $info['extension'];
|
||||
$name = basename($filename, $ext);
|
||||
return strtolower($name) . $ext;
|
||||
}
|
||||
add_filter('sanitize_file_name', 'mfl_make_filename_lowercase', 10);
|
||||
|
||||
?>
|
||||
65
src/wp-content/plugins/make-filename-lowercase/readme.txt
Normal file
@ -0,0 +1,65 @@
|
||||
=== Make Filename Lowercase ===
|
||||
Contributors: ereckers
|
||||
Donate link: http://www.redbridgenet.com/make-payment/
|
||||
Tags: strtolower, lowercase, filename, media, upload, sanitize_file_name, strtolower filename, lowercase filename, strtolower media, lowercase media, strtolower upload, lowercase upload
|
||||
Requires at least: 3.0.1
|
||||
Tested up to: 3.1
|
||||
Stable tag: 1.0.0
|
||||
|
||||
Sets uploaded media filename to lowercase.
|
||||
|
||||
== Description ==
|
||||
|
||||
Sets uploaded media filename to lowercase as filter on sanitize_file_name. Based on post at Stack Overflow asking if there is a way to "Rename files during upload within Wordpress 3.0 backend".
|
||||
|
||||
Created for WordPress 3.0.1+ which saves any uploaded media filename (Image, Video, Audio) as lowercase. This effectively changes the name of the file at upload if a user were to upload a file with any uppercase characters.
|
||||
|
||||
For instance:
|
||||
|
||||
* MOVIE-FILE.MOV > movie-file.mov
|
||||
* Movie-File.wmv > movie-file.wmv
|
||||
* ImAgEfILe.gif > imagefile.gif
|
||||
* imageFile.JPG > imagefile.jpg
|
||||
* ETC > etc
|
||||
|
||||
<em>Note: WordPress sets file extension to lowercase. This plugin does a strtolower on the filename.</em>
|
||||
|
||||
<h4>More Information</h4>
|
||||
|
||||
Visit the <a href="http://www.redbridgenet.com/">Red Bridge Internet</a> site for more information about <a href="http://www.redbridgenet.com/plugins/make-filename-lowercase/">Make Filename Lowercase</a> plugin.
|
||||
|
||||
== Installation ==
|
||||
|
||||
1. Download the plugin and unzip it.
|
||||
2. Upload the folder /make-filename-lowercase to your /wp-content/plugins/ folder.
|
||||
3. Activate the plugin from your WordPress admin panel.
|
||||
4. Installation finished.
|
||||
|
||||
== Screenshots ==
|
||||
|
||||
1. Upload media filename of mixed case (in this case, the file MIXED-cAsE-filename.JPG).
|
||||
2. Filename changed to lowercase (mixed-case-filename.jpg) preserving the case for Title.
|
||||
3. An image detail view from the Media Library showing the new File name as lowercase.
|
||||
|
||||
== Frequently Asked Questions ==
|
||||
|
||||
= Why was this plugin created? =
|
||||
|
||||
This plugin evolved from a client requirement that all uploaded media filenames contain no uppercase characters.
|
||||
|
||||
= Why did you release this plugin? =
|
||||
|
||||
It was useful to me and I wanted to work through the process of releasing a WordPress plugin.
|
||||
|
||||
= Why shouldn't this just be added to a theme's functions.php file? =
|
||||
|
||||
Upgradeability, portability, backwards compatibility, and other *abilities. If for some reason this function were in need of customization due to a WordPress version upgrade, the plugin will be centrally responsible for releasing the fix as opposed to updating the theme(s).
|
||||
|
||||
== Changelog ==
|
||||
|
||||
= 1.0.0 =
|
||||
|
||||
* Initial release
|
||||
|
||||
== Upgrade Notice ==
|
||||
|
||||
BIN
src/wp-content/plugins/make-filename-lowercase/screenshot-1.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
src/wp-content/plugins/make-filename-lowercase/screenshot-2.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
src/wp-content/plugins/make-filename-lowercase/screenshot-3.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
src/wp-content/plugins/qtranslate/arrowdown.png
Normal file
|
After Width: | Height: | Size: 162 B |
BIN
src/wp-content/plugins/qtranslate/arrowup.png
Normal file
|
After Width: | Height: | Size: 164 B |
BIN
src/wp-content/plugins/qtranslate/flags/ad.alt.png
Normal file
|
After Width: | Height: | Size: 354 B |
BIN
src/wp-content/plugins/qtranslate/flags/ad.png
Normal file
|
After Width: | Height: | Size: 494 B |
BIN
src/wp-content/plugins/qtranslate/flags/ae.png
Normal file
|
After Width: | Height: | Size: 267 B |
BIN
src/wp-content/plugins/qtranslate/flags/af.png
Normal file
|
After Width: | Height: | Size: 372 B |
BIN
src/wp-content/plugins/qtranslate/flags/ag.png
Normal file
|
After Width: | Height: | Size: 518 B |
BIN
src/wp-content/plugins/qtranslate/flags/ai.alt.png
Normal file
|
After Width: | Height: | Size: 374 B |
BIN
src/wp-content/plugins/qtranslate/flags/ai.png
Normal file
|
After Width: | Height: | Size: 590 B |
BIN
src/wp-content/plugins/qtranslate/flags/al.png
Normal file
|
After Width: | Height: | Size: 477 B |
BIN
src/wp-content/plugins/qtranslate/flags/am.png
Normal file
|
After Width: | Height: | Size: 255 B |
BIN
src/wp-content/plugins/qtranslate/flags/an.png
Normal file
|
After Width: | Height: | Size: 336 B |
BIN
src/wp-content/plugins/qtranslate/flags/ao.png
Normal file
|
After Width: | Height: | Size: 389 B |
BIN
src/wp-content/plugins/qtranslate/flags/aq.png
Normal file
|
After Width: | Height: | Size: 477 B |
BIN
src/wp-content/plugins/qtranslate/flags/ar.alt.png
Normal file
|
After Width: | Height: | Size: 301 B |
BIN
src/wp-content/plugins/qtranslate/flags/ar.png
Normal file
|
After Width: | Height: | Size: 337 B |
BIN
src/wp-content/plugins/qtranslate/flags/arle.png
Normal file
|
After Width: | Height: | Size: 384 B |
BIN
src/wp-content/plugins/qtranslate/flags/as.png
Normal file
|
After Width: | Height: | Size: 551 B |
BIN
src/wp-content/plugins/qtranslate/flags/at.alt.png
Normal file
|
After Width: | Height: | Size: 427 B |
BIN
src/wp-content/plugins/qtranslate/flags/at.png
Normal file
|
After Width: | Height: | Size: 236 B |
BIN
src/wp-content/plugins/qtranslate/flags/au.png
Normal file
|
After Width: | Height: | Size: 570 B |
BIN
src/wp-content/plugins/qtranslate/flags/aw.png
Normal file
|
After Width: | Height: | Size: 365 B |
BIN
src/wp-content/plugins/qtranslate/flags/ax.png
Normal file
|
After Width: | Height: | Size: 436 B |
BIN
src/wp-content/plugins/qtranslate/flags/az.png
Normal file
|
After Width: | Height: | Size: 362 B |
BIN
src/wp-content/plugins/qtranslate/flags/ba.png
Normal file
|
After Width: | Height: | Size: 494 B |
BIN
src/wp-content/plugins/qtranslate/flags/bb.png
Normal file
|
After Width: | Height: | Size: 378 B |
BIN
src/wp-content/plugins/qtranslate/flags/bd.png
Normal file
|
After Width: | Height: | Size: 376 B |
BIN
src/wp-content/plugins/qtranslate/flags/be.png
Normal file
|
After Width: | Height: | Size: 246 B |
BIN
src/wp-content/plugins/qtranslate/flags/bf.png
Normal file
|
After Width: | Height: | Size: 293 B |
BIN
src/wp-content/plugins/qtranslate/flags/bg.png
Normal file
|
After Width: | Height: | Size: 252 B |
BIN
src/wp-content/plugins/qtranslate/flags/bh.png
Normal file
|
After Width: | Height: | Size: 340 B |
BIN
src/wp-content/plugins/qtranslate/flags/bi.alt.png
Normal file
|
After Width: | Height: | Size: 552 B |
BIN
src/wp-content/plugins/qtranslate/flags/bi.png
Normal file
|
After Width: | Height: | Size: 467 B |
BIN
src/wp-content/plugins/qtranslate/flags/bj.png
Normal file
|
After Width: | Height: | Size: 290 B |
BIN
src/wp-content/plugins/qtranslate/flags/bm.png
Normal file
|
After Width: | Height: | Size: 569 B |
BIN
src/wp-content/plugins/qtranslate/flags/bn.png
Normal file
|
After Width: | Height: | Size: 575 B |
BIN
src/wp-content/plugins/qtranslate/flags/bo.png
Normal file
|
After Width: | Height: | Size: 248 B |
BIN
src/wp-content/plugins/qtranslate/flags/br.png
Normal file
|
After Width: | Height: | Size: 560 B |
BIN
src/wp-content/plugins/qtranslate/flags/bs.png
Normal file
|
After Width: | Height: | Size: 363 B |
BIN
src/wp-content/plugins/qtranslate/flags/bt.png
Normal file
|
After Width: | Height: | Size: 527 B |
BIN
src/wp-content/plugins/qtranslate/flags/bv.png
Normal file
|
After Width: | Height: | Size: 424 B |
BIN
src/wp-content/plugins/qtranslate/flags/bw.png
Normal file
|
After Width: | Height: | Size: 311 B |
BIN
src/wp-content/plugins/qtranslate/flags/by.png
Normal file
|
After Width: | Height: | Size: 307 B |
BIN
src/wp-content/plugins/qtranslate/flags/bz.png
Normal file
|
After Width: | Height: | Size: 567 B |
BIN
src/wp-content/plugins/qtranslate/flags/ca.alt.png
Normal file
|
After Width: | Height: | Size: 220 B |
BIN
src/wp-content/plugins/qtranslate/flags/ca.png
Normal file
|
After Width: | Height: | Size: 403 B |
BIN
src/wp-content/plugins/qtranslate/flags/cc.alt.png
Normal file
|
After Width: | Height: | Size: 563 B |
BIN
src/wp-content/plugins/qtranslate/flags/cc.png
Normal file
|
After Width: | Height: | Size: 570 B |
BIN
src/wp-content/plugins/qtranslate/flags/cd.png
Normal file
|
After Width: | Height: | Size: 469 B |
BIN
src/wp-content/plugins/qtranslate/flags/cf.png
Normal file
|
After Width: | Height: | Size: 355 B |
BIN
src/wp-content/plugins/qtranslate/flags/cg.png
Normal file
|
After Width: | Height: | Size: 302 B |
BIN
src/wp-content/plugins/qtranslate/flags/ch.png
Normal file
|
After Width: | Height: | Size: 329 B |
BIN
src/wp-content/plugins/qtranslate/flags/ci.png
Normal file
|
After Width: | Height: | Size: 295 B |
BIN
src/wp-content/plugins/qtranslate/flags/ck.png
Normal file
|
After Width: | Height: | Size: 581 B |
BIN
src/wp-content/plugins/qtranslate/flags/cl.png
Normal file
|
After Width: | Height: | Size: 298 B |
BIN
src/wp-content/plugins/qtranslate/flags/cm.png
Normal file
|
After Width: | Height: | Size: 307 B |
BIN
src/wp-content/plugins/qtranslate/flags/cn.png
Normal file
|
After Width: | Height: | Size: 313 B |
BIN
src/wp-content/plugins/qtranslate/flags/co.png
Normal file
|
After Width: | Height: | Size: 266 B |
BIN
src/wp-content/plugins/qtranslate/flags/cr.alt.png
Normal file
|
After Width: | Height: | Size: 334 B |
BIN
src/wp-content/plugins/qtranslate/flags/cr.png
Normal file
|
After Width: | Height: | Size: 276 B |
BIN
src/wp-content/plugins/qtranslate/flags/cs.png
Normal file
|
After Width: | Height: | Size: 265 B |
BIN
src/wp-content/plugins/qtranslate/flags/cu.png
Normal file
|
After Width: | Height: | Size: 383 B |
BIN
src/wp-content/plugins/qtranslate/flags/cv.png
Normal file
|
After Width: | Height: | Size: 417 B |
BIN
src/wp-content/plugins/qtranslate/flags/cx.png
Normal file
|
After Width: | Height: | Size: 560 B |
BIN
src/wp-content/plugins/qtranslate/flags/cy.png
Normal file
|
After Width: | Height: | Size: 346 B |
BIN
src/wp-content/plugins/qtranslate/flags/cz.png
Normal file
|
After Width: | Height: | Size: 361 B |
BIN
src/wp-content/plugins/qtranslate/flags/de.png
Normal file
|
After Width: | Height: | Size: 250 B |
BIN
src/wp-content/plugins/qtranslate/flags/dj.png
Normal file
|
After Width: | Height: | Size: 388 B |
BIN
src/wp-content/plugins/qtranslate/flags/dk.png
Normal file
|
After Width: | Height: | Size: 304 B |
BIN
src/wp-content/plugins/qtranslate/flags/dm.png
Normal file
|
After Width: | Height: | Size: 490 B |
BIN
src/wp-content/plugins/qtranslate/flags/do.png
Normal file
|
After Width: | Height: | Size: 416 B |
BIN
src/wp-content/plugins/qtranslate/flags/dz.png
Normal file
|
After Width: | Height: | Size: 414 B |
BIN
src/wp-content/plugins/qtranslate/flags/ec.alt.png
Normal file
|
After Width: | Height: | Size: 246 B |
BIN
src/wp-content/plugins/qtranslate/flags/ec.png
Normal file
|
After Width: | Height: | Size: 349 B |
BIN
src/wp-content/plugins/qtranslate/flags/ee.png
Normal file
|
After Width: | Height: | Size: 278 B |
BIN
src/wp-content/plugins/qtranslate/flags/eg.png
Normal file
|
After Width: | Height: | Size: 259 B |
BIN
src/wp-content/plugins/qtranslate/flags/eh.alt.png
Normal file
|
After Width: | Height: | Size: 296 B |
BIN
src/wp-content/plugins/qtranslate/flags/eh.png
Normal file
|
After Width: | Height: | Size: 320 B |
BIN
src/wp-content/plugins/qtranslate/flags/er.png
Normal file
|
After Width: | Height: | Size: 469 B |
BIN
src/wp-content/plugins/qtranslate/flags/es.alt.png
Normal file
|
After Width: | Height: | Size: 232 B |
BIN
src/wp-content/plugins/qtranslate/flags/es.png
Normal file
|
After Width: | Height: | Size: 325 B |
BIN
src/wp-content/plugins/qtranslate/flags/et.alt.png
Normal file
|
After Width: | Height: | Size: 272 B |
BIN
src/wp-content/plugins/qtranslate/flags/et.png
Normal file
|
After Width: | Height: | Size: 415 B |
BIN
src/wp-content/plugins/qtranslate/flags/eu.png
Normal file
|
After Width: | Height: | Size: 322 B |
BIN
src/wp-content/plugins/qtranslate/flags/fi.png
Normal file
|
After Width: | Height: | Size: 363 B |
BIN
src/wp-content/plugins/qtranslate/flags/fj.png
Normal file
|
After Width: | Height: | Size: 548 B |
BIN
src/wp-content/plugins/qtranslate/flags/fk.png
Normal file
|
After Width: | Height: | Size: 601 B |
BIN
src/wp-content/plugins/qtranslate/flags/fm.png
Normal file
|
After Width: | Height: | Size: 400 B |
BIN
src/wp-content/plugins/qtranslate/flags/fo.png
Normal file
|
After Width: | Height: | Size: 402 B |
BIN
src/wp-content/plugins/qtranslate/flags/fr.png
Normal file
|
After Width: | Height: | Size: 268 B |
BIN
src/wp-content/plugins/qtranslate/flags/ga.png
Normal file
|
After Width: | Height: | Size: 297 B |
BIN
src/wp-content/plugins/qtranslate/flags/gb.png
Normal file
|
After Width: | Height: | Size: 600 B |
BIN
src/wp-content/plugins/qtranslate/flags/gd.png
Normal file
|
After Width: | Height: | Size: 525 B |
BIN
src/wp-content/plugins/qtranslate/flags/ge.png
Normal file
|
After Width: | Height: | Size: 447 B |