public static function load($class)
    {
        $instance = new $class;
        $taxonomy_key = $instance->getTaxonomyKey();

        if (is_admin()) {
            add_action(sprintf('created_%s', $taxonomy_key), array($instance, 'addSaveHooks'));
            add_action(sprintf('edited_%s', $taxonomy_key), array($instance, 'addSaveHooks'));
            add_action(sprintf('%s_add_form_fields', $taxonomy_key), array($instance, 'addMetaBoxes'));
            add_action(sprintf('%s_edit_form_fields', $taxonomy_key), array($instance, 'addMetaBoxes'));

            add_action(sprintf('manage_edit-%s_columns', $taxonomy_key), array($instance, 'addAdminColumns'), 10, 3);
            add_action(sprintf('manage_%s_custom_column', $taxonomy_key), array($instance, 'renderAdminColumn'), 10, 3);

            // TODO add sorting
            //add_filter(sprintf('manage_edit-%s_sortable_columns', $taxonomy_key), array($instance, 'makeAdminColumnsSortable'));
            //add_filter('request', array($instance, 'sortAdminColumns'));
        }
    }
public static function load($class)
    {
        $instance = new $class;
        $taxonomy_key = $instance->getTaxonomyKey();

        if (is_admin()) {
            add_action(sprintf('created_%s', $taxonomy_key), array($instance, 'addSaveHooks'));
            add_action(sprintf('edited_%s', $taxonomy_key), array($instance, 'addSaveHooks'));
            add_action(sprintf('%s_add_form_fields', $taxonomy_key), array($instance, 'addMetaBoxes'));
            add_action(sprintf('%s_edit_form_fields', $taxonomy_key), array($instance, 'addMetaBoxes'));

            add_action(sprintf('manage_edit-%s_columns', $taxonomy_key), array($instance, 'addAdminColumns'), 10, 3);
            add_action(sprintf('manage_%s_custom_column', $taxonomy_key), array($instance, 'renderAdminColumn'), 10, 3);

            // TODO add sorting
            //add_filter(sprintf('manage_edit-%s_sortable_columns', $taxonomy_key), array($instance, 'makeAdminColumnsSortable'));
            //add_filter('request', array($instance, 'sortAdminColumns'));
        }
    }
public static function load ( $ class ) { $ instance = new $ class ; $ taxonomy_key = $ instance -> getTaxonomyKey ( ) ; if ( is_admin ( ) ) { add_action ( sprintf ( 'created_%s' , $ taxonomy_key ) , array ( $ instance , 'addSaveHooks' ) ) ; add_action ( sprintf ( 'edited_%s' , $ taxonomy_key ) , array ( $ instance , 'addSaveHooks' ) ) ; add_action ( sprintf ( '%s_add_form_fields' , $ taxonomy_key ) , array ( $ instance , 'addMetaBoxes' ) ) ; add_action ( sprintf ( '%s_edit_form_fields' , $ taxonomy_key ) , array ( $ instance , 'addMetaBoxes' ) ) ; add_action ( sprintf ( 'manage_edit-%s_columns' , $ taxonomy_key ) , array ( $ instance , 'addAdminColumns' ) , 10 , 3 ) ; add_action ( sprintf ( 'manage_%s_custom_column' , $ taxonomy_key ) , array ( $ instance , 'renderAdminColumn' ) , 10 , 3 ) ; // TODO add sorting //add_filter(sprintf('manage_edit-%s_sortable_columns', $taxonomy_key), array($instance, 'makeAdminColumnsSortable')); //add_filter('request', array($instance, 'sortAdminColumns')); } }
Load a term
@param string $class
Load a term