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 | |
/** | |
* Process user registration via AJAX | |
* | |
* A custom user registration process that listens for a | |
* specific type POST request that will create a new user | |
* on the blog. | |
* | |
* @action wp_ajax_nopriv_fjarrett_user_registration |
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
/* globals fjarrett */ | |
jQuery( function( $ ) { | |
$( document ).on( 'click', 'form #submit-registration', function (e) { | |
$.ajax({ | |
type: 'POST', | |
url: fjarrett.ajaxurl, | |
data: { | |
action: 'fjarrett_user_registration', | |
registration_token: $( '#registration_token' ).val(), |
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 | |
function wp_stream_scrub_notification_rule_post_meta() { | |
$post_types = get_post_types( array(), 'names' ); | |
unset( $post_types['stream_notification'] ); | |
$args = array( | |
'post_type' => $post_types, | |
'post_status' => 'any', |
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
Verifying that +fjarrett is my openname (Bitcoin username). https://onename.com/fjarrett |
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 | |
echo '<h1>Current Time</h1>'; | |
$microtime = microtime( true ); | |
printf( '<p><strong>Unix epoch microtime:</strong> %s</p>', $microtime ); | |
printf( '<p><strong>GMT/UTC timezeone:</strong> %s</p>', date( 'Y-m-d H:i:s', $microtime ) ); |
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 | |
/////////////////////////////////////////////////////////////////////////////////// | |
// Please use within a namespace, or change this helper class name. // | |
// Don't forget to properly prefix the apply_filters() calls made throughout. // | |
// // | |
// Example usage: // | |
// // | |
// new Post_Type( 'book', 'Book', 'Books' ); // | |
// new Post_Type( 'video', 'Video', 'Videos', array( 'has_archive' => false ) ); // |
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 | |
for DIR in /var/www/*/public_html; do | |
cd $DIR | |
if [ -f "wp-config.php" ]; then | |
echo "cd $DIR" |
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 | |
for DIR in /var/www/*/public_html; do | |
cd $DIR | |
if [ -f "wp-config.php" ]; then | |
echo "cd $DIR" |
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 | |
for DIR in /var/www/*/public_html; do | |
cd $DIR | |
if [ -f "wp-config.php" ]; then | |
echo "cd $DIR" |
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 | |
/** | |
* Force WP JSON REST API endpoints to always be served over HTTPS | |
* | |
* @action wp_json_server_before_serve | |
* | |
* @return void | |
*/ | |
function fjarrett_wp_json_force_ssl() { |