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 | |
$adress = 'sample@examples.com'; | |
echo get_masked_mailadress( $adress, 10 ) . "\n"; | |
echo get_masked_mailadress( $adress, 95 ) . "\n"; | |
echo get_masked_mailadress( $adress, 30 ) . "\n"; | |
echo get_masked_mailadress( $adress, 5 ) . "\n"; | |
# Return masked eMail adress | |
# Strip x% from the string length at both parts from a email adress |
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
/** | |
* 1. Goto Preferences -> Editor -> Live Template -> PHP | |
* 2. Klick in the right + | |
* 3. chose Live Template | |
* 4. Give a abbreviation like "pdebug" | |
* 5. Copie the Template into Template Text | |
* 6. in your code Type "pdeb.." use auto compleate ;) | |
* | |
* You get a Debug like this. | |
* |
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: Instrument Hooks for WordPress | |
Plugin URI: http://bueltge.de/ | |
Description: Instruments Hooks for a Page. Outputs during the Shutdown Hook after add get-params <code>?instrument=hooks</code>. | |
Version: 0.0.1 | |
Author: Frank Bültge | |
Author URI: http://bueltge.de/ | |
*/ |
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
[ -r /etc/bashrc ] && source /etc/bashrc | |
[ -r /etc/bash_completion ] && source /etc/bash_completion | |
[ -r ~/.git-completion.bash ] && source ~/.git-completion.bash | |
[ -r ~/.git-prompt.sh ] && source ~/.git-prompt.sh | |
[ -r /usr/local/rvm/scripts/rvm ] && source /usr/local/rvm/scripts/rvm | |
__has_parent_dir () { | |
# Utility function so we can test for things like .git/.hg without firing up a | |
# separate process | |
test -d "$1" && return 0; |
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 | |
/** | |
* Uku functions and definitions | |
* | |
* Change note: | |
* @see line 31 - 40 remove register nav_menu, this is merge into inc/nav-menu.php | |
* @see line 987 - 990 require nav-menu.php | |
* | |
* @package Uku | |
* @since Uku 1.0 |
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 | |
/** | |
* Load template or assets | |
* | |
* @param $tpl | |
* @param $type | |
*/ | |
function load_plugin_assets( $tpl, $type = 'php' ){ | |
$default_tpl = $tpl . '.’ . $type; |
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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
# add a trailing slash to /wp-admin | |
RewriteRule ^(?:([_0-9a-zA-Z-]+)/?){0,2}wp-admin$ $1/wp-admin/ [R=302,L] | |
RewriteCond %{REQUEST_FILENAME} -f [OR] | |
RewriteCond %{REQUEST_FILENAME} -d |
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 # -*- coding: utf-8 -*- | |
namespace [PLUGIN]\Addons; | |
class Loader { | |
/** | |
* @var array | |
*/ | |
const ADDONSPATH = '/../Addons/'; |