This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// A função abaixo demonstra o uso de uma expressão regular que identifica, de forma simples, telefones válidos no Brasil. | |
// Nenhum DDD iniciado por 0 é aceito, e nenhum número de telefone pode iniciar com 0 ou 1. | |
// Exemplos válidos: +55 (11) 98888-8888 / 9999-9999 / 21 98888-8888 / 5511988888888 | |
function phoneValidate($phone) | |
{ | |
$regex = '/^(?:(?:\+|00)?(55)\s?)?(?:\(?([1-9][0-9])\)?\s?)?(?:((?:9\d|[2-9])\d{3})\-?(\d{4}))$/'; | |
if (preg_match($regex, $phone) == false) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I use the first | |
—– BEGIN LICENSE —– | |
Michael Barnes | |
Single User License | |
EA7E-821385 | |
8A353C41 872A0D5C DF9B2950 AFF6F667 | |
C458EA6D 8EA3C286 98D1D650 131A97AB | |
AA919AEC EF20E143 B361B1E7 4C8B7F04 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* | |
* This script will backup your web site by remotely archiving all files on the root FTP directory. | |
* It will work even if your web server is memory limited buy splitting zips in several arhive files it they are too many files. | |
* All zip files will be stored in a directory called temporary which must be writable. | |
* | |
* How to use it: | |
* - Place the script at the root of your FTP. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Prevent Category Deletion | |
Plugin URI: http://wordpress.stackexchange.com/q/70758/12615 | |
Description: Prevent deletion of categories. Modify the $undeletable array to suit your setup. Use Category SLUGS. | |
Author: brasofilo | |
Version: 1.0 | |
Author URI: http://wordpress.stackexchange.com/users/12615/brasofilo | |
*/ |