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 +anthonyhortin is my openname (Bitcoin username). https://onename.com/anthonyhortin |
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 | |
/* | |
* mytheme_form_submit_button | |
* | |
* Filter the Gravity Forms button type to change it to a proper button | |
*/ | |
function mytheme_form_submit_button( $button, $form ) { | |
$button = str_replace( "input", "button", $button ); | |
$button = str_replace( "/", "", $button ); | |
$button .= "{$form['button']['text']}</button>"; |
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 mytheme_scripts_styles() { | |
// Enqueue the parent theme stylesheet | |
wp_enqueue_style( 'parent-style', trailingslashit( get_template_directory_uri() ) . 'style.css' ); | |
// Ensure the default WordPress stylesheet is enqueued after the parent stylesheet | |
wp_enqueue_style( 'style', get_stylesheet_uri(), array( 'parent-style' ) ); | |
} | |
add_action( 'wp_enqueue_scripts', 'mytheme_scripts_styles' ); |
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 | |
/* | |
* Remove the annoying Yoast SEO nag for all Admin Users. Tested with v3.4.2 | |
*/ | |
class ahRemoveYoastNag_Remove_Yoast_SEO_Nag { | |
private $yoastPluginFile; | |
public function __construct() { | |
$this->yoastPluginFile = "wordpress-seo/wp-seo.php"; | |
register_activation_hook( $this->yoastPluginFile, array( $this, 'ryn_remove_yoast_nag_on_activation' ) ); |
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 | |
// Copies woocommerce orders and users over from source to target. | |
// I use this on my local machine - loading both db's up there side by side | |
// could easily adjust the connect strings to connect elsewhere if needed. | |
// will change order ids | |
// My use case for this is when I've got a staging/test version of a site with new posts/products/pages etc, that needs | |
// to go live without the loss of any orders placed on the site site since we copied it to the staging site. |
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 | |
/* | |
* Only allow Admin users to view WP REST API JSON Endpoints | |
*/ | |
function mytheme_only_allow_logged_in_rest_access( $access ) { | |
if( ! is_user_logged_in() || ! current_user_can( 'manage_options' ) ) { | |
return new WP_Error( 'rest_cannot_access', __( 'Only authenticated users can access the REST API.', 'disable-json-api' ), array( 'status' => rest_authorization_required_code() ) ); | |
} | |
return $access; | |
} |
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 | |
/* | |
* Remove the WP REST API JSON Endpoints for logged out users | |
*/ | |
function mytheme_only_allow_logged_in_rest_access( $access ) { | |
if( ! is_user_logged_in() ) { | |
return new WP_Error( 'rest_cannot_access', __( 'Only authenticated users can access the REST API.', 'disable-json-api' ), array( 'status' => rest_authorization_required_code() ) ); | |
} | |
return $access; | |
} |
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 | |
/* | |
* Remove the annoying Wordfence Notifications. Tested with Wordfence v6.3.2 | |
*/ | |
class ahRWN_Remove_Wordfence_Notification { | |
private $wordfencePluginFile; | |
public function __construct() { | |
$this->wordfencePluginFile = "wordfence/wordfence.php"; | |
register_activation_hook( $this->wordfencePluginFile, array( $this, 'rwn_remove_wordfence_notifications_on_activation' ) ); |
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
/** | |
* Toggle the class on the accordion so that they're all closesd on page load | |
*/ | |
jQuery( document ).ready( function( $ ) { | |
$(function() { | |
$(".et_pb_accordion .et_pb_toggle_open").addClass("et_pb_toggle_close").removeClass("et_pb_toggle_open"); | |
$(".et_pb_accordion .et_pb_toggle").click(function() { | |
$this = $(this); | |
setTimeout(function() { |
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
/* | |
Theme Name: Ephemeris | |
Description: Used to style the Block Editor (Gutenberg) | |
*/ | |
/* Custom Colours */ | |
/* Eclipse */ | |
.edit-post-visual-editor .has-eclipse-background-color { | |
background-color: #3a3a3a; | |
} |
OlderNewer