Posted By

mindshare on 03/10/11


Tagged

hack plugin wordpress wp-geo wpgeo


Versions (?)

Remove CSS, JS and/or Dashboard Widget from WP Geo WordPress plugin


 / Published in: PHP
 

URL: http://wordpress.org/extend/plugins/wp-geo/

Here are a couple of snippets for removing the CSS, JS, and Dashboard widget created by the WP Geo plugin. I love this plugin but often only use it as a simple way to embed geo data on posts and don't actually need it to generate maps.

  1. // remove WP Geo Dashboard widget
  2. remove_filter( 'wp_dashboard_widgets', array( $wpgeo_dashboard, 'add_widget' ) );
  3.  
  4. // remove WP Geo JS/CSS from head if not looking at WP admin
  5. if (!is_admin()) {
  6. remove_action( 'wp_print_scripts', array( $wpgeo, 'includeGoogleMapsJavaScriptAPI' ) );
  7. remove_action( 'wp_head', array( $wpgeo, 'wp_head' ) );
  8. remove_action( 'wp_footer', array( $wpgeo, 'wp_footer' ) );
  9. }

Report this snippet  

You need to login to post a comment.