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
-- generic email addresses and new passwords for users | |
UPDATE wp_users | |
SET user_email = CONCAT(user_login, '@example.com'), | |
user_pass = MD5(CONCAT(RAND(), CAST(ID AS CHAR), user_login)); | |
-- generic email addresses for commentors | |
UPDATE wp_comments | |
SET comment_author_email = CONCAT(CAST(comment_ID AS CHAR), '@example.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
<?php | |
/** | |
Plugin Name: AntiScript deamon | |
Plugin URI: https://github.com/franz-josef-kaiser | |
Description: Removes script-links to spam sites from your post content after your site got hacked. Please go to <a href="tools.php?page=script_deamon.php">Tools → Remove Hack</a>. Thank you. Proudly brought to you by <a href="http://example.com">Franz Josef Kaiser</a>. | |
Version: 0.1 | |
Author: Franz Josef Kaiser | |
Author URI: https://github.com/franz-josef-kaiser | |
License: GPL2 | |
WP-Version: Tested in 2.7.1, 2.9.2, 3.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
function extractWord($text, $position){ | |
$words = explode(' ', $text); | |
$characters = -1; | |
foreach($words as $word){ | |
$characters += strlen($word); | |
if($characters >= $position){ | |
return $word; | |
} | |
} | |
return ''; |
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: Remove Admin Bar in WordPress 3.3 | |
* Plugin URI: http://wordpress.stackexchange.com/questions/40983/removing-admin-bar-from-wordpress-dashboard | |
* Description: Remove Admin Bar | |
* Version: 1.0.0 | |
* Author: Frank Bültge | |
* Author URI: http://bueltge.de | |
* License: GPLv3 | |
*/ |
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
<form method="post" action=""> | |
<input type="password" id="my_password" name="password" value="" autocomplete="off" /> | |
<input type="submit" value="Los" id="my_submit" disabled="disabled" onclick="document.getElementById('my_password').type = 'password'" /> | |
<br /> | |
<input type="checkbox" onchange="document.getElementById('my_password').type = this.checked ? 'text' : 'password';"> Passwort beim Tippen anzeigen | |
</form> |
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
on this source; Aptana dont view functions, vars etc. in outline window | |
if ( ! class_exists( 'Foo' ) ) { | |
class Foo { | |
static public $foo; | |
public function foo() { | |
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 height, width for responsive design | |
(function ($) { | |
$(document).ready(function($) { | |
$( 'img' ).removeAttr( 'height' ).removeAttr( 'width' ); | |
}); | |
})(jQuery); |
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
/** | |
* @package Normalize Style with goal CSS3 and html5-elements | |
* @author Hans Mustermann <info@inpsyde.com> | |
* @since 0.0.1 | |
* @version 0.0.2 | |
* | |
* Description: Normalize all browsers | |
* | |
* Normalize, inspired by http://bueltge.de/b/33 and http://bueltge.de/b/34 | |
*/ |
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
body { | |
margin: 3em; | |
} | |
.button { | |
padding: 10px 15px; | |
background: #4479BA; | |
text-decoration: none; | |
color: #FFF; | |
border-radius: 4px; | |
border: solid 1px #20538D; |
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
class Singleton { | |
private static $_instances = array(); | |
final public static function getInstance() { | |
return ! isset( self::$_instances[ get_called_class() ] ) | |
? self::$_instances[ get_called_class() ] = new static | |
: self::$_instances[ get_called_class() ]; | |
} | |