Plugin Directory

Changeset 530893


Ignore:
Timestamp:
04/14/2012 05:58:56 AM (14 years ago)
Author:
MarcusPope
Message:

fixed remaining bugs - cache is reset on save by mod_actions array, and so we no longer need the save handler - besides it only ever had a depracated line of logic for cm classes which are no longer used

File:
1 edited

Legend:

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

    r530118 r530893  
    103103    }
    104104   
    105     static function save_post_handler($post_id, $post_obj) {
    106         //Custom save handler for meta properties
    107         if (EMC2_Molecule::is_save($post_id, EMC2_Molecule::$props['post_type'])) {
    108             //Save custom meta properties
    109             update_post_meta($post_id, EMC2_Molecule::$props['tag_id'], $_POST[EMC2_Molecule::$props['classes']]);
    110             EMC2_Molecule::reset_transient_cache();
    111         }
    112     }
    113    
    114105    static function manage_posts_columns_handler($cols) {
    115106        $sort = array();
     
    127118   
    128119    static function manage_posts_custom_column_handler($col_name) {
     120        global $post;
    129121        if ($col_name = "slug") echo $post->post_name;
    130122    }
     
    149141        //save custom properties on this custom post type
    150142        if (@$_REQUEST['post_type'] == EMC2_Molecule::$props['post_type']) {
    151             add_action('save_post', array('EMC2_Molecule', 'save_post_handler'), 10, 2); //pass post_obj to call back
    152143           
    153144            $mod_actions = array('deleted_post', 'trashed_post', 'edit_post', 'publish_post', 'publish_future_post');
Note: See TracChangeset for help on using the changeset viewer.