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
"workbench.colorCustomizations": { | |
// Contrast Colors - The contrast colors are typically only set for high contrast themes. If set, they add an additional border around items across the UI to increase the contrast. | |
"contrastActiveBorder": "", | |
"contrastBorder": "", | |
// Base Colors | |
"focusBorder": "", | |
"foreground": "", | |
"widget.shadow": "", | |
"selection.background": "", | |
"descriptionForeground": "", |
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
def write_to_clipboard(output): | |
import subprocess | |
process = subprocess.Popen('pbcopy', env={'LANG': 'en_US.UTF-8'}, stdin=subprocess.PIPE) | |
process.communicate(output.encode()) |
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
// Add to your theme's functions.php file. De-queues Select2 styles & scripts. Useful to keep Boostrap form control formatting | |
/** | |
* Remove Woocommerce Select2 - Pre WC 3.2.1-ish | |
*/ | |
function woo_dequeue_select2() { | |
if ( class_exists( 'woocommerce' ) ) { | |
wp_dequeue_style( 'select2' ); | |
wp_deregister_style( 'select2' ); |
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
#!/usr/local/bin/php | |
<?php | |
/* This script automatically publishes BSS exports to WordPress. | |
* Install Composer from https://getcomposer.org/ . Composer needs to be installed on your local computer where BSS is installed, NOT on the server. | |
* Use Composer to install QueryPath (also on your local computer), following the instructions at https://github.com/technosophos/querypath | |
* On the server, install the JSON Basic Authentication WordPress plugin from https://github.com/WP-API/Basic-Auth | |
* Create an ini file in the bss_exports parent directory, containing values for base_url, wp_username, wp_password. | |
* BSS automatically creates an assets folder in the export directory. This folder contains subfolders for css, images, js, etc... To automatically upload assets, provide ini values for ssh_username, ssh_host, ssh_path (file system path to your public web directory with no trailing slash) | |
* In BSS, create a meta tag for each page you want to publish. |
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
<script> | |
jQuery(document).ready(function() { | |
//from http://www.pagelinestheme.com/adding-jquery-code-dms-editor/ | |
//CHANGE the jQuery selectors using your Canvas Area's Section ID | |
jQuery('#pl_areaukh0pxs .pl-area-wrap .editor-row').addClass('row-closed'); //for when using DMS Editor non-preview mode | |
jQuery('#pl_areaukh0pxs .pl-area-wrap .row.grid-row').addClass('row-closed'); //for when not | |
}) | |
</script> |
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 | |
// From http://www.pagelinestheme.com/disable-dms-regions-per-page/ | |
//Disable Fixed, Header, and Footer on all these Page IDs | |
add_filter( 'pl_setting-region_disable_fixed', 'customize_templates_by_page' ); | |
add_filter( 'pl_setting-region_disable_header', 'customize_templates_by_page' ); | |
add_filter( 'pl_setting-region_disable_footer', 'customize_templates_by_page' ); | |
function customize_templates_by_page() { | |
//could choose to still show for Admins (e.g. copy content from footer to template) | |
//if( current_user_can('edit_theme_options') ) { return false; } | |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 | |
/** | |
* | |
* @ 28.3.2016 - Get Custom Term ID, Term name, Term description ... | |
* | |
**/ | |
global $post; | |
$terms = get_the_terms( $post->ID , 'custom-term-slug' ); |
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 | |
/** | |
* Return a custom field stored by the Advanced Custom Fields plugin | |
* | |
* @global $post | |
* @param str $key The key to look for | |
* @param mixed $id The post ID (int|str, defaults to $post->ID) | |
* @param mixed $default Value to return if get_field() returns nothing | |
* @return mixed | |
* @uses get_field() |
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_filter( 'body_class', 'hbd_add_to_body' ); | |
function hbd_add_to_body($existing_classes) { | |
$existing_classes[] = HeadwayOption::get('child-theme-backdrop-color-scheme'); | |
return $existing_classes; | |
} |
NewerOlder