sbrajesh

Brajesh Singh

Nov 24th, 2010
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.50 KB | None | 0 0
  1. /*
  2. Modified to use a more generic handle name for prettyPhoto to avoid multiple loading and collision with other plugins using PrettyPhoto
  3. */
  4. function buddystream_style()
  5. {
  6.     wp_register_style(
  7.        'buddystream_css',
  8.        WP_PLUGIN_URL . '/buddystream/css/buddystream.css'
  9.    );
  10.    wp_enqueue_style('buddystream_css');
  11.  
  12.     wp_register_style(
  13.        'buddystream_twitter_css',
  14.        WP_PLUGIN_URL . '/buddystream/css/twitter.css'
  15.    );
  16.    wp_enqueue_style('buddystream_twitter_css');
  17.  
  18.    wp_register_style(
  19.        'buddystream_facebook_css',
  20.        WP_PLUGIN_URL . '/buddystream/css/facebook.css'
  21.    );
  22.    wp_enqueue_style('buddystream_facebook_css');
  23.  
  24.  
  25.       wp_register_style(
  26.        'buddystream_youtube_css',
  27.        WP_PLUGIN_URL . '/buddystream/css/youtube.css'
  28.    );
  29.    wp_enqueue_style('buddystream_youtube_css');
  30.  
  31.   /*register as prettyphoto_css to allow other plugins use it, without collision*/
  32.    wp_register_style(
  33.        'prettyphoto_css',
  34.        WP_PLUGIN_URL . '/buddystream/js/prettyphoto/css/prettyPhoto.css'
  35.    );
  36.  
  37.    wp_enqueue_style('prettyphoto_css');
  38.    
  39.    wp_enqueue_script('buddystream', WP_PLUGIN_URL . '/buddystream/js/main.js');
  40.  
  41.    if (!get_site_option("buddystream_server_cron")) {
  42.        wp_enqueue_script('buddystream_import', WP_PLUGIN_URL . '/buddystream/js/import.js');
  43.    }
  44.  
  45. //use a generic handle for PrettyPhoto to avoid collision
  46.    wp_enqueue_script('prettyphoto', WP_PLUGIN_URL . '/buddystream/js/prettyphoto/jquery.prettyPhoto.js');
  47.  
  48. }
Add Comment
Please, Sign In to add comment