user_can_associate_main( $post_type ) ) { $is_new = ( $GLOBALS['post']->post_status == 'auto-draft' ); if ( ! $is_new ) { global $post; $object_id = ( ! empty($post->ID) ) ? $post->ID : $GLOBALS['scoper']->data_sources->detect('id', 'post', 0, 'post'); $stored_parent_id = ( ! empty($post->ID) ) ? $post->post_parent : get_post_field( 'post_parent', $object_id ); } if ( $is_new || $stored_parent_id ) { $mat = array(); preg_match('/[^<]*<\/option>/', $orig_options_html, $mat); if ( ! empty($mat[0]) ) return str_replace( $mat[0], '', $orig_options_html ); } } return $orig_options_html; } } ?>