Skip to content

Instantly share code, notes, and snippets.

@rosshanney
Created June 9, 2012 17:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rosshanney/2901812 to your computer and use it in GitHub Desktop.
Save rosshanney/2901812 to your computer and use it in GitHub Desktop.
Plugin to add text / HTML to bottom of GCE widget
<?php
/*
Plugin name: Add text to GCE widget
*/
function gce_after_widget_stuff( $params ) {
if ( ! is_admin() ) {
if ( 'Google Calendar Events' == $params[0]['widget_name'] ) {
$params[0]['after_widget'] = '<a href="http://your-url-here">LINK TEXT</a>' . $params[0]['after_widget'];
}
}
return $params;
}
add_filter( 'dynamic_sidebar_params', 'gce_after_widget_stuff' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment