PHP 클래스 RCCWP_Post, Magic-Fields

파일 보기 프로젝트 열기: hunk/Magic-Fields 1 사용 예제들

공개 메소드들

메소드 설명
DeletePostMetaData ( integer $postId ) This Method is Executed when a post is deleted
GetCustomWritePanel ( ) : Custom Get a custom write panel by reading $_REQUEST['custom-write-panel-id'] or the To see whether $_GET['post'] has a custom write panel associated to it.
PrepareFieldsValues ( $postId ) This function prepares some custom fields before saving it. It reads $_REQUEST and: 1. Adds params to photos uploaded (Image field) 2. Formats dates (Date Field)
SaveCustomFields ( $postId ) This function is called when a post is saves
SetCustomWritePanel ( integer $postId ) Attach a custom write panel to the current post by saving the custom write panel id as a meta value for the post
SetMetaValues ( integer $postId ) : void Save all custom field values meta values for the post, this function assumes that $_POST['rc_cwp_meta_keys'] contains the names of the fields, while $_POST[{FIELD_NAME}] contains the value of the field named {FIELD_NAME}

메소드 상세

DeletePostMetaData() 공개 메소드

@param integer $postId
public DeletePostMetaData ( integer $postId )
$postId integer

GetCustomWritePanel() 공개 정적인 메소드

Get a custom write panel by reading $_REQUEST['custom-write-panel-id'] or the To see whether $_GET['post'] has a custom write panel associated to it.
public static GetCustomWritePanel ( ) : Custom
리턴 Custom Write Panel as an object, returns null if there is no write panels.

PrepareFieldsValues() 공개 메소드

@param integer postId
public PrepareFieldsValues ( $postId )

SaveCustomFields() 공개 정적인 메소드

This function is called when a post is saves
public static SaveCustomFields ( $postId )

SetCustomWritePanel() 공개 메소드

@param integer $postId
public SetCustomWritePanel ( integer $postId )
$postId integer

SetMetaValues() 공개 메소드

Save all custom field values meta values for the post, this function assumes that $_POST['rc_cwp_meta_keys'] contains the names of the fields, while $_POST[{FIELD_NAME}] contains the value of the field named {FIELD_NAME}
public SetMetaValues ( integer $postId ) : void
$postId integer
리턴 void