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 | |
/** Add this to the bottom of your functions.php file in your theme **/ | |
require_once ABSPATH . WPINC . '/class-wp-customize-manager.php'; | |
remove_action('wp_ajax_customize_save', array($GLOBALS['wp_customize'], 'save')); | |
add_action('wp_ajax_customize_save', 'return_403_on_customizer_save'); | |
function return_403_on_customizer_save() { | |
wp_send_json(array('message' => 'Theme Editor in Read Only Mode'), 403); | |
} |
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 | |
// This works | |
if ( 0 === $model->where('status', 'pending')->count() ) { | |
} | |
// But since I don't care about the count, just that there isn't one | |
// Laravel's exists() method is cleaner. | |
if ( ! $model->where('status', 'pending')->exists() ) { | |
} |
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 | |
wp core download --version=4.5 | |
wp core config --dbname=$1 --dbuser=root --dbhost=127.0.0.1 | |
wp db create | |
wp core install --skip-email --title="$1" --admin_user="shawn" --admin_password="shawn" --admin_email=shawn@actionable.co --url=http://wcroc.dev/ | |
wp theme install simone --activate | |
wp plugin delete hello | |
wp plugin install any-ipsum; | |
wp plugin install advanced-custom-fields --version=4.4.0 --activate | |
wp plugin install tinymce-advanced --activate |
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
// ==UserScript== | |
// @name Toot | |
// @namespace https://shawnhooper.ca/ | |
// @version 1.0 | |
// @description Replace the Mastodon 4.0+ Publish button with "Toot" | |
// @author Shawn M. Hooper | |
// @match https://fosstodon.org/* | |
// @match https://mastodon.social/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=fosstodon.org | |
// @grant none |
OlderNewer