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 | |
/* | |
* 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 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 | |
// 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 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
ID | Type | SKU | Name | Published | Is featured? | Visibility in catalog | Short Description | Description | Date sale price starts | Date sale price ends | Tax Status | Tax Class | In stock? | Backorders allowed? | Sold individually? | Weight (unit) | Length (unit) | Width (unit) | Height (unit) | Allow customer reviews? | Purchase Note | Price | Regular Price | Stock | Categories | Tags | Shipping Class | Attribute 1 Name | Attribute 1 Value(s) | Attribute 1 Default | Attribute 1 Visible | Images | Download 1 Name | Download 1 URL | Download Limit | Download Expiry Days | Parent | Upsells | Cross-sells | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id | type | sku | name | status | featured | catalog_visibility | short_description | description | date_on_sale_from | date_on_sale_to | tax_status | tax_class | stock_status | backorders | sold_individually | weight | length | width | height | reviews_allowed | purchase_note | price | regular_price | manage_stock / stock_quantity | category_ids | tag_ids | shipping_class_id | attributes | attributes | default_attributes | attributes | image_id / gallery_image_ids | downloads | downloads | download_limit | download_expiry | parent_id | upsell_ids | cross_sell_ |
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 NEW ADMIN USER TO WORDPRESS | |
// ---------------------------------- | |
// Put this file in your Wordpress root directory and run it from your browser. | |
// Delete it when you're done. | |
// Original script by Joshua Winn - https://joshuawinn.com/create-a-new-wordpress-admin-user-from-php | |
require_once('wp-blog-header.php'); | |
require_once('wp-includes/registration.php'); |
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
/* | |
* Add our Custom Fields to simple products | |
*/ | |
function mytheme_woo_add_custom_fields() { | |
global $woocommerce, $post; | |
echo '<div class="options_group">'; | |
// Text Field |
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 | |
/* | |
* Change the Collation of all tables in a WordPress Database | |
* | |
* WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! | |
* Take a backup first, and carefully test the results of this code. | |
* USE OF THIS SCRIPT IS ENTIRELY AT YOUR OWN RISK. I/We accept no liability from its use. | |
* | |
* USE: | |
* Simply place this script in the root of your WordPress site and run it from your browser. |
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
/* | |
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; | |
} |
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 an action when WP Admin initialises to register our Custom Post Type | |
*/ | |
function mdsgns_create_custom_post_types() { | |
$types = array( | |
// Where the magic happens | |
array( | |
'the_type' => 'store', |
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 | |
/** | |
* Hide the progress count on the Site Health screen | |
*/ | |
function mytheme_load_custom_wp_admin_style() { | |
$current_screen = get_current_screen(); | |
if ( strpos( $current_screen->base, 'site-health' ) === false ) { | |
return; | |
} else { |
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 | |
/** | |
* Filter our social icons to add an email icon on the end | |
*/ | |
function ephemeris_add_email_to_social_icons( $social_list ) { | |
$social_list[] = sprintf( '<li class="%1$s"><a href="%2$s" title="%3$s"><i class="%4$s"></i><span class="assistive-text">%3$s</span></a></li>', | |
'email', | |
esc_url( home_url( '/contact' ) ), | |
__( 'Get in touch', 'ephemeris' ), | |
'far fa-envelope' |