@retep 12/27/18
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 a 'Add rel="nofollow" to link' checkbox to the WordPress link editor | |
* | |
* @see https://danielbachhuber.com/tip/rel-nofollow-link-modal/ | |
*/ | |
add_action( 'after_wp_tiny_mce', function(){ | |
?> | |
<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 | |
function my_acf_admin_footer() { | |
?> | |
<script> | |
( function( $) { | |
acf.add_filter( 'wysiwyg_tinymce_settings', function( mceInit, id ) { | |
if ( id === 'special-wysiwyg-field' ) { | |
mceInit.body_class += ' magical-field-class'; | |
} | |
return mceInit; |
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( 'acf/fields/relationship/query/key=field_59006ee8b9a7b', 'bea_acf_relationship', 10, 3 ); | |
add_filter( 'acf/load_value/name=featured_event', 'bea_acf_relationship', 10, 3 ); | |
/** | |
* | |
* Display all events in Relationship field ( future, past ) | |
* | |
* @param $args | |
* @param $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
/* Gmail style scrollbar */ | |
::-webkit-scrollbar { | |
width: 12px | |
} | |
::-webkit-scrollbar-thumb { | |
border-width: 1px 1px 1px 2px | |
} | |
::-webkit-scrollbar-track { | |
border-width: 0 | |
} |
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 | |
function sass_darken($hex, $percent) { | |
preg_match('/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i', $hex, $primary_colors); | |
str_replace('%', '', $percent); | |
$color = "#"; | |
for($i = 1; $i <= 3; $i++) { | |
$primary_colors[$i] = hexdec($primary_colors[$i]); | |
$primary_colors[$i] = round($primary_colors[$i] * (100-($percent*2))/100); | |
$color .= str_pad(dechex($primary_colors[$i]), 2, '0', STR_PAD_LEFT); | |
} |
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
image: node:latest | |
cache: | |
paths: | |
- node_modules/ | |
before_script: | |
- npm install | |
stages: |
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 | |
$content_types = node_get_types(); | |
$header = array( | |
'Source content type', | |
'Source content type machine name', | |
'Source field name', | |
'Source field machine name', | |
); | |
$sql_field_type_collector = " |
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 | |
/*-----------------------------------------------------------------------------------*/ | |
/* Conditional Logic to Detect Various Event Related Views/Pages | |
/*-----------------------------------------------------------------------------------*/ | |
if( tribe_is_month() && !is_tax() ) { // Month View Page | |
echo 'were on the month view page'; | |
} elseif( tribe_is_month() && is_tax() ) { // Month View Category Page |