PrepareFieldsValues() public method

@param integer postId
public PrepareFieldsValues ( $postId )
Exemplo n.º 1
0
 function SaveCustomFields($postId)
 {
     if (!wp_verify_nonce($_REQUEST['rc-custom-write-panel-verify-key'], 'rc-custom-write-panel')) {
         return $postId;
     }
     if (!current_user_can('edit_post', $postId)) {
         return $postId;
     }
     RCCWP_Post::SetCustomWritePanel($postId);
     RCCWP_Post::PrepareFieldsValues($postId);
     RCCWP_Post::SetMetaValues($postId);
     return $postId;
 }
Exemplo n.º 2
0
 /**
  *  This function is called when  a post is saves
  */
 function SaveCustomFields($postId)
 {
     global $flag;
     if ($flag == 0) {
         //for this save_post action doesn't 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_post', $postId)) {
             return $postId;
         }
         RCCWP_Post::SetCustomWritePanel($postId);
         RCCWP_Post::PrepareFieldsValues($postId);
         RCCWP_Post::SetMetaValues($postId);
         return $postId;
     }
 }
Exemplo n.º 3
0
 /**
  *  This function is called when  a post is saves
  */
 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;
     }
 }