Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecations #475

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions includes/revision.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ function _wp_post_revision_fields( $fields ) {
* Generate the data for the "cfs_postmeta" variable
* @see wp-admin/includes/ajax-actions - wp_ajax_revisions_data()
*/
function _wp_post_revision_field_postmeta( $value = '', $column = 'cfs_postmeta', $post ) {
function _wp_post_revision_field_postmeta( $value = '', $column = 'cfs_postmeta', $post = null ) {
$output = '';
$fields = CFS()->get( false, $post->ID );
$field_info = CFS()->get_field_info( false, $post->ID );
$id = !empty($post) ? $post->ID : get_the_ID();
$fields = CFS()->get( false, $id );
$field_info = CFS()->get_field_info( false, $id );

foreach ( $fields as $field_name => $field_data ) {
$output .= '[' . $field_name . "]\n";
Expand Down Expand Up @@ -67,7 +68,7 @@ function _wp_post_revision_field_postmeta( $value = '', $column = 'cfs_postmeta'
* Determine whether the data changed
* @see wp-includes/revision.php -> wp_save_post_revision()
*/
function check_for_changes( $default = true, $last_revision, $post ) {
function check_for_changes( $default, $last_revision, $post ) {
$revision_data = CFS()->get( false, $last_revision->ID );
$post_data = CFS()->get( false, $post->ID );

Expand Down