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 | |
/* | |
Plugin name: Remove GCE tooltip functionality | |
*/ | |
function gce_remove_qtip() { | |
wp_dequeue_script( 'gce_jquery_qtip' ); | |
} | |
add_action( 'wp_enqueue_scripts', 'gce_remove_qtip', 99 ); |
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 | |
/* | |
Plugin name: Allow id attribute on div tags | |
*/ | |
function gce_allow_id_on_div() { | |
global $allowedposttags; | |
$allowedposttags['div']['id'] = true; | |
} |
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 | |
/* | |
Plugin name: Remove extra jQuery UI added by "TheThe Tabs and Accordions" | |
*/ | |
function gce_remove_extra_jquery_ui() { | |
wp_dequeue_script( 'jquery-ui' ); | |
} | |
add_action( 'wp_print_scripts', 'gce_remove_extra_jquery_ui', 99 ); |
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_recent_posts_shortcode( $atts ) { | |
extract( shortcode_atts( array( 'limit' => 5, 'categories' => '' ), $atts ) ); | |
$q = new WP_Query( 'posts_per_page=' . $limit . '&category_name=' . $categories ); | |
$list = '<ul class="recent-posts">'; | |
while ( $q->have_posts() ) { | |
$q->the_post(); |
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 | |
/* | |
Plugin name: Hardcode AJAX URL for Google Calendar Events | |
*/ | |
function gce_hardcode_ajax_url() { | |
if ( defined( 'GCE_GENERAL_OPTIONS_NAME' ) ) { | |
$options = get_option( GCE_GENERAL_OPTIONS_NAME ); | |
wp_localize_script( 'gce_scripts', 'GoogleCalendarEvents', array( |
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 | |
/* | |
Plugin name: Expand event details on click | |
*/ | |
function gce_expand_event_info_css() { | |
if ( defined( 'GCE_VERSION' ) ) { | |
?> | |
<style type="text/css">.gce-hidden{display:none;}.gce-event-title{cursor:pointer;}</style> | |
<?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 | |
/* | |
Plugin name: Include jQuery migrate script | |
*/ | |
function gce_include_jquery_migrate() { | |
wp_enqueue_script( 'jquery-migrate', 'http://code.jquery.com/jquery-migrate-1.2.1.js', array( 'jquery' ) ); | |
} | |
add_action( 'wp_enqueue_scripts', 'gce_include_jquery_migrate' ); |
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 | |
/* | |
Plugin name: Replace theme jQuery UI with WP version | |
*/ | |
function gce_remove_truethemes_jquery_ui() { | |
if ( ! is_admin() ) | |
wp_deregister_script( 'jquery-ui' ); | |
} |
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 | |
/* | |
Plugin name: Replace old version of jQuery UI with latest version | |
*/ | |
function gce_replace_jquery_ui() { | |
wp_deregister_script( 'jquery-ui' ); | |
wp_register_script( 'jquery-ui', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js', array( 'jquery' ) ); | |
wp_enqueue_script( 'jquery-ui' ); | |
} |
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 | |
/* | |
Plugin name: Allow qTranslate to work on GCE Ajax calls | |
*/ | |
function gce_qtranslate() { | |
if ( function_exists( 'qtrans_getLanguage' ) ) { | |
$options = get_option( GCE_GENERAL_OPTIONS_NAME ); | |
wp_localize_script( 'gce_scripts', 'GoogleCalendarEvents', array( | |
'ajaxurl' => admin_url( 'admin-ajax.php?lang=' . qtrans_getLanguage(), is_ssl() ? 'https' : 'http' ), |