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
asdf |
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 | |
if [[ -z $3 ]]; then | |
echo "usage $0 | |
type (plugin or theme) | |
message | |
directory" | |
exit; | |
fi | |
if [[ $1 != 'plugin' && $1 != 'theme' ]]; then | |
echo "Type is not plugin or theme! Goodbye!" |
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 | |
/** | |
* Help Scout REST controller class. | |
* | |
* @license GPL-2.0+ | |
* @link http://developer.helpscout.net/custom-apps/dynamic/ | |
*/ | |
class HelpScout_REST_Controller { | |
/** | |
* Secret key. |
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
function td_debug_log($sMsg = NULL) { | |
if (!is_string($sMsg)) $sMsg = print_r($sMsg, true); | |
$sFile = dirname(__FILE__) . '/~log.txt'; | |
$fh = fopen($sFile, 'a+'); | |
if ($fh !== FALSE) | |
{ | |
if ($sMsg === NULL) | |
fwrite($fh, date("\r\nY-m-d H:I:s:\r\n")); | |
else | |
fwrite($fh, date('Y-m-d H:i:s - ') . $sMsg . "\r\n"); |
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
for plugin in `/usr/local/bin/wp plugin list --update=available --field=name`; do | |
/usr/local/bin/wp plugin update $plugin | |
git add . | |
git add -u . | |
git commit -m "Updating plugin $plugin" | |
done |
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( 'gfasana_task_details', 'my_custom_asana_logic', 10, 5 ); | |
function my_custom_asana_logic( $asana_task, $user_index, $project_index, $entry, $form ) { | |
/* $asana_task array format: */ | |
/* | |
Array | |
( | |
[workspace] => 1234567890123 // don't change this almost ever | |
[name] => New Task - overridden // string of text for task name | |
[notes] => long description here // string of texgt |
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_action( 'pre_get_posts', array( $this, 'hide_children_posts' ) ); | |
function hide_children_posts( $query ) { | |
if ( !is_post_type_archive( 'hotspot' ) || !is_admin() ) return; | |
$query->set( 'post_parent', 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
add_action( 'pre_get_posts', array( $this, 'fix_hierarchy_performance_issue' ) ); | |
function fix_hierarchy_performance_issue( $query ) { | |
if ( $query->query['post_type']=='hotspot' && $query->query['orderby']=='menu_order title' ) { | |
$query->set( 'orderby', 'menu_order title post_name' ); | |
} | |
} |
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( 'soliloquy_output_slide', 'tgm_soliloquy_custom_html', 10, 4 ); | |
function tgm_soliloquy_custom_html( $html, $id, $image, $data ) { | |
// If the ID doesn't match the one we want to modify, return the default HTML output. Change 324 to your slider ID. | |
$slider_id = $data['id']; | |
if ( '1937' != $slider_id ) return $html; | |
ob_start(); ?> | |
<span class="social-m"> | |
<?php $summary = get_field('short_description');?> |
NewerOlder