get_post_to_edit

函式
get_post_to_edit ( $id )
引數
  • (int) $id
    Required:
返回值
  • (WP_Post)
相關
  • get_post()
定義位置
相關方法
get_user_to_editget_tags_to_editget_term_to_editget_default_post_to_editget_comment_to_edit
引入
2.0.0
棄用
3.5.0

get_post_to_edit: 這個函式檢索要編輯的文章物件。它接受一個文章ID作為其引數,並返回具有所有資料欄位的文章物件。

獲取一個現有的文章,並對其進行格式化編輯。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function get_post_to_edit( $id ) {
_deprecated_function( __FUNCTION__, '3.5.0', 'get_post()' );
return get_post( $id, OBJECT, 'edit' );
}
function get_post_to_edit( $id ) { _deprecated_function( __FUNCTION__, '3.5.0', 'get_post()' ); return get_post( $id, OBJECT, 'edit' ); }
function get_post_to_edit( $id ) {
	_deprecated_function( __FUNCTION__, '3.5.0', 'get_post()' );

	return get_post( $id, OBJECT, 'edit' );
}

常見問題

FAQs
檢視更多 >