page_save

Triggered after saving of an info page.

Blog

Input (passed by reference)

$params['page'] array Associative array of the page being saved, from the database table blog_page.
$params['old'] array|null Page properties registered before the saving. Or NULL if a new page has just been saved.
… your plugin code …

Output

Blog

Plugin code example

PHP

public function pageSave($params)
{
    if (!strlen(trim($params['page']['content'])) && strlen(trim(ifset($params, 'old', 'content', '')))) {
        waLog::log(
            sprintf(
                _wp('Contents of page #%d deleted during saving.'),
                $params['page']['id']
            ),
            'myplugin.log'
        );
    }
}