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
* { | |
font-family: Helvetica, sans-serif; | |
box-sizing: border-box; | |
} | |
body { | |
height: 100%; | |
background-color: black; | |
color: white; | |
} |
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 < 5.3.6 | |
foreach (debug_backtrace() as $trace) | |
{ | |
echo sprintf("\n%s:%s %s::%s", $trace['file'], $trace['line'], $trace['class'], $trace['function']); | |
} | |
die; | |
// PHP >= 5.3.6 | |
debug_print_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); | |
die; |
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
#!/bin/bash -e | |
clear | |
echo "============================================" | |
echo "WordPress Install Script" | |
echo "============================================" | |
echo "Database Name: " | |
read -e dbname | |
echo "Database User: " | |
read -e dbuser | |
echo "Database Password: " |
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 | |
/** | |
* Is login or register page | |
* @author umbrovskis | |
* @authorlink http://umbrovskis.com | |
*/ | |
function smc_is_login_page() { | |
return in_array($GLOBALS['pagenow'], array('wp-login.php', 'wp-register.php')); | |
} | |
// hope some day WordPress will make is_login_page() or is_register_page() or similar |
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 | |
add_action( 'registered_taxonomy', array( 'APP_Tax_Admin_Column', 'register_column' ), 10, 3 ); | |
/** | |
* Generates a column with the associated terms, | |
* for any taxonomy with 'show_admin_column' => true | |
*/ | |
class APP_Tax_Admin_Column { |
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: Auto-embeds Disabler | |
* Version: 0.1 | |
* Description: Disables the auto-embeds function in WordPress 3.5 | |
* Author: Dominik Schilling | |
* Author URI: http://wphelper.de/ | |
* Plugin URI: http://wpgrafie.de/1078/ | |
* | |
* |
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 | |
/** | |
* Wrapper around WP_Query; logs various actions. | |
* | |
* After writing it, I realized that it's better to just step through the code using Xdebug. | |
*/ | |
class WP_Query_Log { | |
private $original; |
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
/* actions fired when listing/adding/editing posts or pages */ | |
/* admin_head-(hookname) */ | |
add_action( 'admin_head-post.php', 'admin_head_post_editing' ); | |
add_action( 'admin_head-post-new.php', 'admin_head_post_new' ); | |
add_action( 'admin_head-edit.php', 'admin_head_post_listing' ); | |
function admin_head_post_editing() { | |
echo 'you are editing a post'; | |
} |
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: dna Framebreaker | |
* Plugin URI: https://gist.github.com/4045656 | |
* Description: Add a framebreaker javascript to the header. (Requires PHP 5.3) | |
* Version: 0.1 | |
* Author: David Naber | |
* Author URI: http://dnaber.de | |
* License: MIT | |
* License URI: http://opensource.org/licenses/MIT |
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
/* | |
* jGFeed 1.0 - Google Feed API abstraction plugin for jQuery | |
* | |
* Copyright (c) 2009 jQuery HowTo | |
* | |
* Licensed under the GPL license: | |
* http://www.gnu.org/licenses/gpl.html | |
* | |
* URL: | |
* http://jquery-howto.blogspot.com |