WordPress.org

Plugin Directory

Changeset 489122


Ignore:
Timestamp:
01/13/12 01:41:20 (2 years ago)
Author:
wpmuguru
Message:

move gsm init to later in startup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • genesis-simple-menus/trunk/simple-menu.php

    r486231 r489122  
    4646    } 
    4747    function  __construct() { 
    48         if( function_exists( 'wp_nav_menu' ) ) 
    49             add_action( 'genesis_init', array( &$this, 'init' ), 11 ); 
     48        add_action( 'init', array( $this, 'init' ), 99 ); 
    5049 
    5150            load_plugin_textdomain( 'genesis-simple-menus', false, 'genesis-simple-menus/languages' ); 
     
    5554 */ 
    5655    function init() { 
    57         add_action( 'admin_menu', array( &$this, 'admin_menu' ) ); 
    58         add_action( 'save_post', array( &$this, 'save_post' ), 10, 2 ); 
    59         add_action( 'wp_head', array( &$this, 'wp_head' ) ); 
     56        if( !function_exists( 'genesis_get_option' ) ) 
     57            return; 
     58 
     59        add_action( 'admin_menu', array( $this, 'admin_menu' ) ); 
     60        add_action( 'save_post', array( $this, 'save_post' ), 10, 2 ); 
     61        add_action( 'wp_head', array( $this, 'wp_head' ) ); 
    6062         
    6163        $_taxonomies = get_taxonomies( array( 'show_ui' => true, 'public' => true ) ); 
    6264        $this->taxonomies = apply_filters( 'genesis_simple_menus_taxonomies', array_keys( $_taxonomies ) ); 
     65 
    6366        if( !empty( $this->taxonomies ) && is_array( $this->taxonomies ) ) { 
    6467            foreach( $this->taxonomies as $tax ) 
    65                 add_action( "{$tax}_edit_form", array( &$this, 'term_edit' ), 9, 2 ); 
     68                add_action( "{$tax}_edit_form", array( $this, 'term_edit' ), 9, 2 ); 
    6669        } 
    6770    } 
Note: See TracChangeset for help on using the changeset viewer.