This file contains hidden or 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 | |
/** | |
* Loads media from a remote site when on a local dev environment. | |
* Eliminates the need to download the uploads directory from the remote site for testing purposes. | |
*/ | |
if ( 'mydomain.dev' === $_SERVER['HTTP_HOST'] ): | |
add_filter( 'upload_dir', function ( $uploads ) { | |
$uploads['baseurl'] = 'http://mydomain.com/wp-content/uploads'; |
This file contains hidden or 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 | |
wp_list_comments( apply_filters( 'stellar_comment_args', array( | |
'style' => 'div', | |
'type' => 'all', | |
'avatar_size' => 50, | |
) ) ); | |
paginate_comments_links(); |
This file contains hidden or 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( 'init', function () { | |
$username = 'admin'; | |
$password = 'password'; | |
$email_address = '[email protected]'; | |
if ( ! username_exists( $username ) ) { | |
$user_id = wp_create_user( $username, $password, $email_address ); |
This file contains hidden or 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 | |
wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | apt-key add - sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list' | |
apt-get update -y | |
apt-get install jenkins -y | |
service jenkins start |
This file contains hidden or 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
var map = jQuery('.stellar-places-map-canvas').data('map'); | |
var mapBounds = jQuery('.stellar-places-map-canvas').data('mapBounds'); |
This file contains hidden or 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 Query_Var_Alias | |
*/ | |
class Query_Var_Alias { | |
/** | |
* Query var being aliased | |
* |
This file contains hidden or 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 Query_Arg_Alias | |
*/ | |
class Query_Arg_Alias { | |
/** | |
* Query var | |
* |
This file contains hidden or 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_filter( | |
"sanitize_option_{$option_name}", | |
function ( $option_value, $option_name ) { | |
return filter_var( $option_value, FILTER_VALIDATE_BOOLEAN ); | |
}, | |
10, | |
2 | |
); |
This file contains hidden or 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
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"> | |
<?php the_title(); ?> | |
</a> |
This file contains hidden or 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 | |
if ( wp_verify_nonce( $_POST['nonce'], 'update_email' ) && is_email( $_POST['email'] ) ) { | |
update_post_meta( get_the_ID(), 'email', sanitize_email( $_POST['email'] ) ); | |
} |