Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: BPDEV-FLICKR now online with BPDEV-ADMIN-MENU and BPDEV-SIMPLEPIE

What’s nice with WP/WPMU is that you don’t need to include the most popular javascript libraries with your plugin, they are already installed (scroll down a bit and you see the list: https://codex.wordpress.org/Function_Reference/wp_enqueue_script ), and using wp_enqueue_script you avoid conflicts.

E.g.: BPDEV-FLICKR should/could do (not tested):

function init_scripts() {
global $bp;
wp_enqueue_script('prototype');
wp_enqueue_script('scriptaculous-builder');
wp_enqueue_script('scriptaculous-effects');
wp_enqueue_script('bpdev-lightbox', bloginfo('wpurl').$bp['flickr']['lightbox'] . 'js/lightbox.js' , array( 'prototype','scriptaculous-builder','scriptaculous-effects' ) );
}
add_action('init','init_scripts');

Skip to toolbar