Changeset 530893
- Timestamp:
- 04/14/2012 05:58:56 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
content-molecules/trunk/emc2_content_molecules.php
r530118 r530893 103 103 } 104 104 105 static function save_post_handler($post_id, $post_obj) {106 //Custom save handler for meta properties107 if (EMC2_Molecule::is_save($post_id, EMC2_Molecule::$props['post_type'])) {108 //Save custom meta properties109 update_post_meta($post_id, EMC2_Molecule::$props['tag_id'], $_POST[EMC2_Molecule::$props['classes']]);110 EMC2_Molecule::reset_transient_cache();111 }112 }113 114 105 static function manage_posts_columns_handler($cols) { 115 106 $sort = array(); … … 127 118 128 119 static function manage_posts_custom_column_handler($col_name) { 120 global $post; 129 121 if ($col_name = "slug") echo $post->post_name; 130 122 } … … 149 141 //save custom properties on this custom post type 150 142 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 back152 143 153 144 $mod_actions = array('deleted_post', 'trashed_post', 'edit_post', 'publish_post', 'publish_future_post');
Note: See TracChangeset
for help on using the changeset viewer.