This is a list of the SublimeText 2 addons I use for my development environment.
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 | |
/** | |
* The issue is in lib/tribe-view-helpers.class.php and exists in the getMonthOptions function. | |
* The date that is passed in by default "2012-04-01-01" has an extra '-01' appended to it. | |
* I am unsure where this is getting added to the date, but adding str_replace( '01-01', '01', $date ) | |
* to remove those extra characters fixes the output. | |
*/ | |
/** |
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 | |
/* | |
* | |
* Extends the WP_Widget_Factory class by overloading the register method to allow for passing params | |
* | |
*/ | |
Class Extend_WP_Widget_Factory extends WP_Widget_Factory { |
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 get_all_posts_cpt( $request ) { | |
if( $request['post_type'] == 'distribution') | |
$request['posts_per_page'] = -1; | |
return $request; | |
} | |
add_filter( 'request', 'get_all_posts_cpt' ); |
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 | |
/** | |
* Save the custom user taxonomies when saving a users profile | |
* | |
* @param Integer $user_id - The ID of the user to update | |
*/ | |
public function save_profile($user_id) { | |
foreach(self::$taxonomies as $key => $taxonomy) { | |
// Check the current user can edit this user and assign terms for this taxonomy |
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 | |
// Notify admin user of a manual override of the default UTC timezone setting in WordPress. | |
// more details: http://goo.gl/7iqVY | |
if( date_default_timezone_get() != 'UTC' ) { | |
add_action('admin_notices', 'notice_date_default_timezone_override'); | |
} | |
function notice_date_default_timezone_override(){ | |
echo '<div class="error"><p>You have a manual override of the default <b>UTC</b> timezone to <b>' . date_default_timezone_get() . '</b> enabled on your install, this will potentially cause conflicts with plugins relying on the default WordPress configuration.</p></div>'; | |
} |
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 | |
// This code is being introduced in TEC PRO v2.0.9 | |
// events-premium/events-calendar-pro.php | |
/** | |
* helper function for displaying the saved venue dropdown | |
* | |
* @since 2.0 | |
* @param mixed $current the current saved venue | |
* @param string $name the name value for the 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
/** | |
* Google Maps popup overlay conflicts with Bootstrap CSS and other reset CSS | |
* that resets max-width on certain dom tags. The issue relies on how the overlay | |
* is built via multiple divs and img tags | |
*/ | |
#map_canvas img{ | |
max-width: none; | |
} |
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 | |
/** | |
* use in WordPress editor to determine if is in new|edit mode | |
* | |
* @return bool | |
*/ | |
function admin_is_new(){ | |
global $post; | |
return (get_post_status($post->ID) == 'auto-draft'); |
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 | |
// used for Tri.be The Events Calendar | |
// disable author, excerpt and custom fields meta boxes in the event editor | |
function tribe_disable_default_meta() { | |
remove_post_type_support( TribeEvents::POSTTYPE, 'author' ); | |
remove_post_type_support( TribeEvents::POSTTYPE, 'custom-fields' ); | |
remove_post_type_support( TribeEvents::POSTTYPE, 'excerpt' ); | |
} | |
add_action('init', 'tribe_disable_default_meta'); |
OlderNewer