Commit 17ff31b1 authored by Shady Sharaf's avatar Shady Sharaf Committed by GitHub

Skip query if not post was found

parent e1a2573b
......@@ -31,8 +31,12 @@ final class NF_MergeTags_Deprecated extends NF_Abstracts_MergeTags
// If in the admin, only run on Ninja Forms pages.
if( is_admin() && ( ! isset( $_GET[ 'page' ] ) || 'ninja-forms' !== $_GET[ 'page' ] ) ) return;
$this->setup_post_meta( $this->post_id() );
$post_id = $this->post_id();
if ( ! empty( $post_id ) ) {
$this->setup_post_meta( $this->post_id() );
}
}
protected function post_id()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment