POST_OPTION
POST_OPTION
Copyright (c) Automattic. All rights reserved.
Released under the GPL license http://www.opensource.org/licenses/gpl-license.php
This is an add-on for WordPress http://wordpress.org/
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
wp_insert_post_data(array $post_data, array $postarr) : array
Magic happens here. Markdown is converted and stored on post_content. Original Markdown is stored in post_content_filtered so that we can continue editing as Markdown.
array | $post_data | The post data that will be inserted into the DB. Slashed. |
array | $postarr | All the stuff that was in $_POST. |
$post_data with post_content and post_content_filtered modified
transform(string $text, array $args) : string
Markdown conversion. Some DRYness for repetitive tasks.
string | $text | Content to be run through Markdown |
array | $args | Arguments, with keys:
|
Markdown-processed content
_wp_post_revision_fields(array $fields) : array
Shows Markdown in the Revisions screen, and ensures that post_content_filtered is maintained on revisions
array | $fields | Post fields pertinent to revisions |
Modified array to include post_content_filtered
wp_restore_post_revision(int $post_id, int $revision_id) : null
Do some song and dance to keep all post_content and post_content_filtered content in the expected place when a post revision is restored.
int | $post_id | The post ID have a restore done to it |
int | $revision_id | The revision ID being restored |