RCCWP_Post::SaveCustomFields PHP Method

SaveCustomFields() public static method

This function is called when a post is saves
public static SaveCustomFields ( $postId )
    public static function SaveCustomFields($postId)
    {
        global $flag;
        if ($flag == 0) {
            //with this  the save_post action don't will be execute twice
            $flag = 1;
            //security
            if (!wp_verify_nonce(@$_REQUEST['rc-custom-write-panel-verify-key'], 'rc-custom-write-panel')) {
                return $postId;
            }
            //the user  can edit posts?
            if (!(current_user_can('edit_posts', $postId) || current_user_can('edit_published_pages', $postId))) {
                return $postId;
            }
            RCCWP_Post::SetCustomWritePanel($postId);
            RCCWP_Post::PrepareFieldsValues($postId);
            RCCWP_Post::SetMetaValues($postId);
            return $postId;
        }
    }