Skip to content

Instantly share code, notes, and snippets.

@deckerweb
Created May 4, 2012 19:30
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 deckerweb/2597190 to your computer and use it in GitHub Desktop.
Save deckerweb/2597190 to your computer and use it in GitHub Desktop.
Genesis Dashboard News plugin v1.0.0+ -- filters for customizing and branding
<?php
// since plugin version v1.0.0:
// Filters:
/** RSS cache lifetime */
add_filter( 'wp_feed_cache_transient_lifetime', create_function( '$a', 'return 300;' ) );
// since plugin version v1.5.0+:
// Filters:
add_filter( 'gdbn_filter_capability_all', 'gdbn_custom_capability' );
/** Genesis Dashboard News: Custom Dashboard Widget Capability */
function gdbn_custom_capability() {
return 'edit_posts';
}
add_filter( 'gdbn_filter_widget_title', 'gdbn_custom_widget_title' );
/** Genesis Dashboard News: Custom Widget Title */
function gdbn_custom_widget_title() {
return __( 'Custom Widget Title', 'your-textdomain' );
}
add_filter( 'gdbn_filter_feed_source_url', 'gdbn_custom_source_feed_url' );
/** Genesis Dashboard News: Custom Source Feed URL */
function gdbn_custom_source_feed_url() {
return 'http://your-source-url.com/feed-whatever/';
}
/** Genesis Dashboard News: Remove Widget Footer Info */
add_filter( 'gdbn_filter_widget_footer_info', '__return_null' );
add_filter( 'gdbn_filter_widget_footer_info', 'gdbn_custom_footer_widget_info' );
/** Genesis Dashboard News: Custom Widget Footer Info */
function gdbn_custom_footer_widget_info() {
return __( 'Your custom widget footer info here...', 'your-textdomain' );
}
add_filter( 'gdbn_filter_help_tab_title', 'gdbn_custom_help_tab_title' );
/** Genesis Dashboard News: Custom Help Tab Title */
function gdbn_custom_help_tab_title() {
return __( 'Custom Help Tab Title', 'your-textdomain' );
}
/**
* Filter: gdbn_filter_help_tab_content
* For this one see the other filters above - same principle/scheme
*/
@deckerweb
Copy link
Author

Note: The above codes work with plugin version 1.0 // 1.5 or higher!

Extended explanation can be found at the plugin's page "FAQ" section at the bottom:
http://wordpress.org/extend/plugins/genesis-dashboard-news/faq/

Download "Genesis Dashboard News" plugin at wordpress.org:
http://wordpress.org/extend/plugins/genesis-dashboard-news/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment