How MUST the directory for a plugin be structured?

How does WordPress determine “the main plugin file” ? It is the file in your plugin that contains the plugin header comment /** * Plugin Name: A fresh example * Plugin URI: http://example.com * Description: Foo makes a bar * Version: 2012-06-14.1426 * Author: John Doe * Author URI: http://example.com * TextDomain: your_textdomain * License: … Read more

Difference between a theme and a plugin?

Themes manage the display and layout of your blog, but can also add functionality. Plug-ins add functionality to your blog, but can also add elements to the layout. There is a lot of crossover between the two, particularly when you being to bundle certain plug-ins with themes. However, the biggest difference lies in the templates … Read more

force enqueue script to be first in order of prominence

You just need to enqueue your scripts before plugin does it. You can do it by setting priority to 0 for your hook. For example, do the following: add_filter( ‘wp_enqueue_scripts’, ‘wpse8170_enqueue_my_scripts’, 0 ); // or if you enqueue your scripts on init action // add_action( ‘init’, ‘wpse8170_enqueue_my_scripts’, 0 ); function wpse8170_enqueue_my_scripts() { wp_enqueue_script( ‘myscript’, ‘http://path/to/my/script.js’, … Read more