Advertisement
Digitalraindrops

wp-vipergp shortcode

May 11th, 2012
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.78 KB | None | 0 0
  1. /* Shortcode for Guestbook */
  2. function my_guestbook( $args ) {
  3.    
  4.     $defaults = array(
  5.         'entriesPerPg' => 10,       //Number of entries to show per page
  6.         'reverseOrder' => false,    //Show newest entries first
  7.         'allowUploads' => true,     //Allow users to upload images
  8.         'maxImgSizKb'  => 50,       //Max uploadable image size
  9.         'showBrowsers' => true,     //Show visitor browser/OS icons  
  10.         'showFlags'    => true   //Show visitor flags (Requires Ozh IP2Nation)
  11.     );
  12.    
  13.     $r = wp_parse_args( $args, $defaults );
  14.     extract( $r, EXTR_SKIP );
  15.  
  16.     if ( function_exists('vgb_GetGuestbook') ) {
  17.         return vgb_GetGuestbook( $r );
  18.     } else {
  19.         return 'The Guestbook is currently deactivated.';
  20.     }
  21. }  
  22. add_shortcode('guestbook', 'my_guestbook');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement