WordPress.org

Plugin Directory

Changeset 464495


Ignore:
Timestamp:
11/18/11 04:51:46 (2 years ago)
Author:
MarcusPope
Message:

better logic fix from previous attempt

File:
1 edited

Legend:

Unmodified
Added
Removed
  • content-molecules/trunk/emc2_content_molecules.php

    r464484 r464495  
    147147     
    148148    static function init_admin() { 
    149         $mod_actions = array('deleted_post', 'trashed_post', 'edit_post', 'publish_post', 'publish_future_post'); 
    150         foreach($mod_actions as $action) { 
    151             add_filter($action, array('EMC2_Molecule', 'reset_transient_cache'));    
    152         } 
    153          
    154149        //save custom properties on this custom post type 
    155         if (@$_GET['post_type'] == EMC2_Molecule::$props['post_type']) { 
     150        if (@$_REQUEST['post_type'] == EMC2_Molecule::$props['post_type']) { 
    156151            add_action('save_post', array('EMC2_Molecule', 'save_post_handler'), 10, 2); //pass post_obj to call back 
     152             
     153            $mod_actions = array('deleted_post', 'trashed_post', 'edit_post', 'publish_post', 'publish_future_post'); 
     154            foreach($mod_actions as $action) { 
     155                add_filter($action, array('EMC2_Molecule', 'reset_transient_cache'));    
     156            } 
    157157             
    158158            //customize columns of molecule list view 
Note: See TracChangeset for help on using the changeset viewer.