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 | |
| return [ | |
| /* | |
| |-------------------------------------------------------------------------- | |
| | Register theme color palette | |
| |-------------------------------------------------------------------------- | |
| | | |
| | Colors defined in this array will be registered with the |
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 | |
| /** | |
| * Plugin Name: Remove EXIF data | |
| * Plugin URI: https://gist.github.com/joshuafredrickson/cd5ab346992f533ecbe976d365fa36dd | |
| * Version: 1.0.0 | |
| * Description: Remove EXIF data from .jpg when uploaded. | |
| * Author: Joshua Fredrickson | |
| * Author URI: https://joshuafredrickson.com | |
| * License: GNU General Public License v2 | |
| * License URI: http://www.gnu.org/licenses/gpl-2.0.html |
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 | |
| /** | |
| * Image sizes | |
| * Finds the width for each column size based on a max container width (1600) and column count. | |
| */ | |
| collect([3, 6, 9, 12])->map(function($column) { | |
| return add_image_size($column . '/12', $column / 12 * 1600); | |
| }); |
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 | |
| /** | |
| * @2x image sizes | |
| */ | |
| function make_it_retina($file, $width, $height, $crop = false) { | |
| if ($width || $height) { | |
| $resized_file = wp_get_image_editor($file); | |
| if (!is_wp_error($resized_file)) { | |
| $resized_file->resize($width * 2, $height * 2, $crop); |
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_action('plugins_loaded', function() { | |
| $action = is_user_admin() ? 'user_admin_notices' : 'admin_notices'; | |
| add_action($action, function () { | |
| ob_start(); | |
| }); | |
| add_action('all_admin_notices', function () { | |
| $log = strip_tags(trim(ob_get_clean())); |
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
| <!doctype html> | |
| <html> | |
| <head> | |
| <title>Site Maintenance</title> | |
| <style> | |
| body { text-align: center; padding: 150px; } | |
| h1 { font-size: 50px; } | |
| body { font: 20px Helvetica, sans-serif; color: #333; } | |
| article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
| a { color: #dc8100; text-decoration: none; } |
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
| $dialog.dialog({ | |
| draggable: false, | |
| modal: true, | |
| resizable: false, | |
| maxWidth: 600, | |
| width: 500, | |
| fluid: true, // Enables fluidDialog() | |
| }); | |
| function fluidDialog() { |
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
| // Fixes duplicate items showing up if the same menu_order is shared between two items across a page break. | |
| // Replace update_menu_order() with the code below. | |
| function update_menu_order() | |
| { | |
| global $wpdb; | |
| parse_str( $_POST['order'], $data ); | |
| if ( !is_array( $data ) ) return false; |
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
| // Remove edit link | |
| add_filter ( 'genesis_edit_post_link' , '__return_false' ); |
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
| // Disable XML-RPC | |
| add_filter( 'xmlrpc_enabled', '__return_false' ); |