我在保存时修改内容并需要访问帖子标题,到目前为止我在functions.php中拥有的内容
add_filter('content_save_pre', 'custom_content_save_pre');
function custom_content_save_pre($s) {
// need to access post title here
$postTitle = ?
// some more code here
return $s;
}
我在保存时修改内容并需要访问帖子标题,到目前为止我在functions.php中拥有的内容
add_filter('content_save_pre', 'custom_content_save_pre');
function custom_content_save_pre($s) {
// need to access post title here
$postTitle = ?
// some more code here
return $s;
}