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
<!-- WordPress Farbtastic Color Picker for Multiple Instances --> | |
<div style="position:relative;"> | |
<input type="text" name="my-theme-options[color]" id="color" /> | |
<input type="button" class="pickcolor button-secondary" value="<?php _e('Select Color') ?>"> | |
<div class="colorpicker" style="z-index:100; position:absolute; display:none;"></div> | |
</div> | |
<script> | |
// Include this script in your JS related file | |
$('.pickcolor').click(function(e) { |
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 | |
# activate logs | |
LOGERROR="/Users/activeuser/Desktop/bash_error.txt" | |
LOGEXEC="/Users/activeuser/Desktop/bash_exec.txt" | |
# print errors to logs | |
exec 1> $LOGEXEC | |
exec 2> $LOGERROR |
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_action('wp_dashboard_setup', 'prefix_custom_dashboard_widgets'); | |
/** remove unwanted dashboard items */ | |
function prefix_custom_dashboard_widgets() | |
{ | |
global $wp_meta_boxes; | |
// QuickPress | |
unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']); | |
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 | |
/** | |
* WordPress query_posts with custom posts_per_page and pagination | |
*/ | |
if( get_query_var('paged') ) $paged = get_query_var('paged'); | |
elseif( get_query_var('page') ) $paged = get_query_var('page'); | |
else $paged = 1; | |
if( !is_paged() ) $offset = ''; | |
elseif( $paged == 2 ) $offset = '&offset=11'; |
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 | |
# activate logs | |
LOGERROR="/Users/activeuser/Desktop/project-error_log.txt" | |
LOGEXEC="/Users/activeuser/Desktop/project-exec_log.txt" | |
# print errors to logs | |
exec 1> $LOGEXEC | |
exec 2> $LOGERROR |
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
find -maxdepth 1 -type d -exec bash -c 'echo mv $0 ${0/changethis/forthis}' {} \; |
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_action('init', 'types_tml_fix'); | |
/** Types + TML frontend profile fix */ | |
function types_tml_fix() | |
{ | |
if( !is_admin() ) require WPCF_EMBEDDED_ABSPATH .'/admin.php'; | |
} | |
?> |
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 | |
// disable strict standards and deprecated notices | |
if( WP_DEBUG && WP_DEBUG_DISPLAY ) ini_set('error_reporting', E_ALL & ~E_STRICT & ~E_DEPRECATED); | |
?> |
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 | |
$posts = get_posts(); | |
foreach( $posts as $post ): | |
// filter post_category array | |
if( is_array($post->post_category) ) | |
foreach( $post->post_category as $k => $v ) | |
$post->post_category = $v; | |
endforeach; |
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
$ alias wow="git init" | |
$ alias much=git | |
$ alias very=git | |
$ alias so=git | |
$ wow | |
$ so add . | |
$ very commit | |
$ much push |
OlderNewer