Skip to content

Instantly share code, notes, and snippets.

@martijngastkemper
Last active August 29, 2015 13:58
Show Gist options
  • Save martijngastkemper/9951343 to your computer and use it in GitHub Desktop.
Save martijngastkemper/9951343 to your computer and use it in GitHub Desktop.
Make the [Tell a friend] (http://www.gopiplus.com/work/2012/05/21/wordpress-plugin-wp-tell-a-friend-popup-form) plugin for WordPress work with an changed WordPress source directory. Useful for WordPress in Git repositories
# Not working
wp_enqueue_style( 'tell-a-friend', get_option('siteurl').'/wp-content/plugins/wp-tell-a-friend-popup-form/tell-a-friend.css');
wp_enqueue_script( 'tell-a-friend-form', get_option('siteurl').'/wp-content/plugins/wp-tell-a-friend-popup-form/tell-a-friend-form.js');
wp_enqueue_script( 'tell-a-friend-popup', get_option('siteurl').'/wp-content/plugins/wp-tell-a-friend-popup-form/tell-a-friend-popup.js');
# Working
wp_enqueue_style( 'tell-a-friend', plugins_url( 'tell-a-friend.css', __FILE__ ) );
wp_enqueue_script( 'tell-a-friend-form', plugins_url( 'tell-a-friend-form.js', __FILE__ ) );
wp_enqueue_script( 'tell-a-friend-popup', plugins_url( 'tell-a-friend-popup.js', __FILE__ ) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment