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
find . -type f -path *plugin_name* | grep -v ".history/" | zip plugin_name.zip -@ |
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
@echo off | |
REM Upload git changes to ftp with the help of WinSCP | |
REM USAGE: go to the project root directory and just hit upload_changes. | |
REM The root directory must have a upload.conf file with winscp_host,remote_path data. | |
REM "winscp_host" is the name of WinSCP host name. | |
REM Check WinSCP directory is set correctly | |
REM Get changes from n latest commits | |
set latest=%1 | |
REM set winscp_host="testsite.com" |
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
/** | |
* Remove actions that are assigned to a unknown Class | |
* @param string $action The action name | |
* @param string $function_name The method of the Class | |
* | |
*/ | |
public function remove_action_with_class($action,$function_name) { | |
if(!empty($GLOBALS['wp_filter'][$action])) { | |
foreach ($GLOBALS['wp_filter'][$action] as $position_key=>$position ) { | |
foreach ($position as $hook_key=>$hook_data) { |
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
set @a=null,@c=null,@b=concat("show tables where",ifnull(concat(" `Tables_in_",database(),"` like '",@c,"' and"),'')," (@a:=concat_ws(',',@a,`Tables_in_",database(),"`))"); | |
Prepare `bd` from @b; | |
EXECUTE `bd`; | |
DEALLOCATE PREPARE `bd`; | |
set @a:=concat('optimize table ',@a); | |
PREPARE `sql` FROM @a; | |
EXECUTE `sql`; | |
DEALLOCATE PREPARE `sql`; |
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
/** | |
* Protect an email address from harvesting | |
* based on http://www.maurits.vdschee.nl/php_hide_email/ | |
* | |
* @param string $email email address to protect | |
* @param string $text (optional) The text of the link. | |
* @param string $extra (optional) Any extra parameters on the <a> tag | |
* @param string $subject (optional) Subject of the email | |
* @return string the link | |
*/ |
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
#get latest changes | |
git archive -o latest.zip HEAD $(git diff --name-only HEAD HEAD^) |