Skip to content

Instantly share code, notes, and snippets.

Avatar

Chris Wilcoxson slushman

View GitHub Profile
@slushman
slushman / customizer-links.php
Last active Aug 30, 2021
How to link into the WordPress Customizer
View customizer-links.php
@slushman
slushman / dcc-site-launch-list.md
Last active Apr 9, 2021
DCC Website Launch Checklist
View dcc-site-launch-list.md
@slushman
slushman / jquery-datepicker-wp-admin
Last active Jan 29, 2021
How to Add the jQuery UI Datepicker to the WordPress Admin
View jquery-datepicker-wp-admin
/**
* Adds the datepicker settings to the admin footer.
* Only loads on the plugin-name settings page
*/
function admin_footer() {
$screen = get_current_screen();
if ( $screen->id == 'settings_page_plugin-name' ) {
@slushman
slushman / gist:feffd0d5b5d969239a0faadec2ef43c7
Last active Jul 11, 2020
React Native PlatformColor Names
View gist:feffd0d5b5d969239a0faadec2ef43c7
labelColor
secondaryLabelColor
tertiaryLabelColor
quaternaryLabelColor
systemFillColor
secondarySystemFillColor
tertiarySystemFillColor
quaternarySystemFillColor
@slushman
slushman / wp_auto_install.sh
Last active Dec 14, 2018 — forked from nicomollet/wp_auto_install.sh
WP-CLI auto install local development site script
View wp_auto_install.sh
#!/bin/bash
# Get the required project variables
printf "Project name: "
read PROJECT_NAME
printf "Project folder name: "
read PROJECT_FOLDER
printf "Database Name: "
@slushman
slushman / dashicons-js-array
Last active Oct 29, 2018
Javascript array of Dashicons.
View dashicons-js-array
const dashIcons = [
{ value: 'menu', label: 'Menu' },
{ value: 'dashboard', label: 'Dashboard' },
{ value: 'admin-site', label: 'Admin Site' },
{ value: 'admin-media', label: 'Admin Media' },
{ value: 'admin-page', label: 'Admin Page' },
{ value: 'admin-comments', label: 'Admin Comments' },
{ value: 'admin-appearance', label: 'Admin Appearance' },
{ value: 'admin-plugins', label: 'Admin Plugins' },
{ value: 'admin-users', label: 'Admin Users' },
View dashicon-js-array-alphabetical
export default [
{ value: 'admin-appearance', label: 'Admin Appearance' },
{ value: 'admin-collapse', label: 'Admin Collapse' },
{ value: 'admin-comments', label: 'Admin Comments' },
{ value: 'admin-generic', label: 'Admin Generic' },
{ value: 'admin-home', label: 'Admin Home' },
{ value: 'admin-links', label: 'Admin Links' },
{ value: 'admin-media', label: 'Admin Media' },
{ value: 'admin-network', label: 'Admin Network' },
{ value: 'admin-page', label: 'Admin Page' },
@slushman
slushman / sane-inline-svg
Last active Jul 26, 2018
Sane Inline SVG
View sane-inline-svg
/**
* Returns the requested SVG icon.
*
* Returns FALSE if $svg is not set.
*
* @param string $svg The name of the SVG icon
* @return mixed The SVG icon
*/
function prefix_get_svg( $svg ) {
@slushman
slushman / htaccess.txt
Last active Mar 21, 2018
htaccess for WordPress sites on SiteGround
View htaccess.txt
# # WEB PERFORMANCE
# Remove `ETags` as resources are sent with far-future expires headers.
# `FileETag None` doesn't work in all cases.
<IfModule mod_headers.c>
Header unset ETag
</IfModule>
FileETag None
@slushman
slushman / themes-security-config.md
Created May 2, 2016
iThemes Security Configuration
View themes-security-config.md

Table of Contents

  • Settings
    • [Global] (#global)
    • [404 Detection] (#404)
    • [Away Mode] (#away)
    • [Banned Users] (#banned)
    • [Brute Force Protection] (#brute)
    • [Backup DB] (#backupdb)
    • [File Change Detection] (#files)
    • [Hide Login] (#hidelogin)