Skip to content

Commit be898cb

Browse files
committed
Hide the post meta in the wp-admin
1 parent 71aca51 commit be898cb

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

lib/class-importer.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -858,26 +858,26 @@ protected function _set_namespaces( $post_id, $namespaces ) {
858858
protected function _set_since_meta( $post_id, $since_versions, $deprecated_version ) {
859859
$anything_updated = array();
860860
$introduced_version = array_shift( $since_versions );
861-
$introduced = isset( $introduced_version['content'] ) && $introduced_version['content'];
862861

862+
$introduced = isset( $introduced_version['content'] ) && $introduced_version['content'];
863863
if ( $introduced && maybe_version( $introduced_version['content'] ) ) {
864-
$anything_updated[] = update_post_meta( $post_id, 'wp_parser_introduced', $introduced_version['content'] );
864+
$anything_updated[] = update_post_meta( $post_id, '_wp-parser_introduced', $introduced_version['content'] );
865865
} else {
866-
delete_post_meta( $post_id, 'wp_parser_introduced' );
866+
delete_post_meta( $post_id, '_wp-parser_introduced' );
867867
}
868868

869869
$deprecated = isset( $deprecated_version['content'] ) && $deprecated_version['content'];
870870
if ( $deprecated && maybe_version( $deprecated_version['content'] ) ) {
871-
$anything_updated[] = update_post_meta( $post_id, 'wp_parser_deprecated', $deprecated_version['content'] );
871+
$anything_updated[] = update_post_meta( $post_id, '_wp-parser_deprecated', $deprecated_version['content'] );
872872
} else {
873-
delete_post_meta( $post_id, 'wp_parser_deprecated' );
873+
delete_post_meta( $post_id, '_wp-parser_deprecated' );
874874
}
875875

876-
$old_meta = get_post_meta( $post_id, 'wp_parser_modified' );
876+
$old_meta = get_post_meta( $post_id, '_wp-parser_modified' );
877877
$new_meta = array();
878878

879879
// Delete modified meta and check if anything was updated after adding new meta.
880-
delete_post_meta( $post_id, 'wp_parser_modified' );
880+
delete_post_meta( $post_id, '_wp-parser_modified' );
881881

882882
if ( ! empty( $since_versions ) ) {
883883
foreach ( $since_versions as $since ) {
@@ -887,7 +887,7 @@ protected function _set_since_meta( $post_id, $since_versions, $deprecated_versi
887887
}
888888

889889
$new_meta[] = $since['content'];
890-
add_post_meta( $post_id, 'wp_parser_modified', $since['content'] );
890+
add_post_meta( $post_id, '_wp-parser_modified', $since['content'] );
891891
}
892892
}
893893

lib/template.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,12 +348,12 @@ function maybe_version( $version ) {
348348
/**
349349
* Whether a version should be checked or not.
350350
*
351-
* This filter allows you to do your own version validation by returning a boolean.
351+
* Return boolean to validate the version yourself.
352352
*
353353
* @param mixed $check_version. Whether to check the version or not. Default null.
354354
* @param string $version Version string.
355355
*/
356-
$check_version = apply_filters( 'wp_parser_maybe_version', null, $version );
356+
$check_version = apply_filters( 'wp_parser_check_version', null, $version );
357357
if ( is_bool( $check_version ) ) {
358358
return $check_version;
359359
}

0 commit comments

Comments
 (0)