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
it "displays create account and sign in links, and doesn't display sing out link to non-logged in users" do | |
render | |
rendered.should have_selector( '.sign-in' ) do |account_menu| | |
account_menu.should contain 'Create Account' | |
account_menu.should contain 'Sign In' | |
account_menu.should_not contain 'Sign Out' | |
end | |
end | |
it "displays sign out link, and doesn't display create account and sign in links to logged in users" do |
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 do_something() { | |
do_it(); | |
do_something_else(); | |
} | |
function do_something_else() | |
{ | |
do_it(); | |
} |
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
git submodule add git://github.com/markjaquith/WordPress.git core | |
cd core | |
git checkout 3.2.1 | |
cd .. | |
git add . -A | |
git commit -m 'Checked out core at 3.2.1' |
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
it should blah blah | |
$someshit = new Shit(); | |
$someshit.shit.should be_new | |
end |
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
/** | |
* Retrieve a list of pages. | |
* | |
* The defaults that can be overridden are the following: 'child_of', | |
* 'sort_order', 'sort_column', 'post_title', 'hierarchical', 'exclude', | |
* 'include', 'meta_key', 'meta_value','authors', 'number', and 'offset'. | |
* | |
* @since 1.5.0 | |
* @uses $wpdb |
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
add_action( 'after_switch_theme', 'dbfds_disable_comments' ); | |
function dbfds_disable_comments( $theme_name ) { | |
update_option( 'default_comment_status', 'closed' ); | |
update_option( 'default_ping_status', 'closed' ); | |
update_option( 'timezone_string', 'America/Winnipeg' ); | |
} |
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
// button to load the content | |
<a class="button showloadme"><span class="finger">☞</span> Who’s this guy?</a> | |
// css to momentarily display loader image | |
.ajaxloader { width: 32px; height: 32px; background: url(ajax-loader.gif) no-repeat; margin: auto; } |
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
// .content contains content | |
<div class="content"></div> | |
<script> | |
$(document).ready(function() { | |
// ajax to fetch the slider data. | |
$.ajax({ | |
type: 'POST', | |
url: '<?php echo admin_url("admin-ajax.php"); ?>', | |
data: { action: "front_page_slider" }, |
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 | |
class TestDouble { | |
private $stubs; | |
public function stub( $method_name, $return_value ) { | |
$this->stubs[ $method_name ] = $return_value; | |
} | |
public function __call( $method_name, $args ) { |
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 | |
// SHORTEST VERSION | |
if ( in_array( $_SERVER[ 'REMOTE_ADDR' ], array( '127.0.0.1', ) ) ) { | |
toughp_backup_site( $_GET[ 'home_url' ], $_GET[ 'key' ] ); | |
} | |
OlderNewer