Support » Plugins » Plugin priority?

  • Resolved KidCactus


    I have two plugins installed that automatically add things after the posts; related posts (Microkid’s Related Posts) and share buttons (Sociable for WordPress 3.0).

    At the moment they appear in the following order: post, related, share. I want them to appear in this order: post, share, related.

    What tells WP to insert them in this order when it’s done automatically, is there some priority that is easy to change?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Never mind, found how to do it. I changed the the_content prio in Sociable3.php to 1, and now I get my buttons where I want them.

    There is another way to do this.. the plugins are loaded following the sequence of the array stored in ‘active_plugins’ option.

    This function keeps my plugin in the first place to be loaded.

    function mw_load_first($plugin = '') {
    $plugs = get_option('active_plugins');
    $nplugs = array();
      foreach($plugs as $plug) {
        if(strstr($plug, 'media-window')) $mw = $plug;
        else $nplugs[] = $plug;
      if(isset($mw)) {
        array_unshift($nplugs, $mw);
        update_option('active_plugins', $nplugs);
    add_action('activated_plugin', 'mw_load_first');
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Plugin priority?’ is closed to new replies.