JS Error
-
Hello folks,
Love this plugin.
Unfortunately a JS error is causing me some grief by breaking GForms backend gui.
Error is showing up here:
var tabs = $(“#post-snippets-tabs”).tabs();
Error Message in console:
“Uncaught TypeError: $(…).tabs is not a function”I had a similar error with one of my plugins and using this conditional check kept my script off the gforms entries screen:
if ( ( is_admin() ) && ( ( $this->is_edit_page( 'edit' ) ) || ( $this->is_edit_page() ) || ( $this->is_edit_page( 'new' ) ) ) ) /** * is_edit_page * function to check if the current page is a post edit page * * @param string $new_edit what page to check for accepts new - new post page ,edit - edit post page, null for either * * @return boolean */ private function is_edit_page( $new_edit = null ) { global $pagenow; if ( $new_edit == "edit" ) { return in_array( $pagenow, array( 'post.php', ) ); } elseif ( $new_edit == "new" ) //check for new post page { return in_array( $pagenow, array( 'post-new.php' ) ); } else //check for either new or edit { return in_array( $pagenow, array( 'post.php', 'post-new.php' ) ); } }
- The topic ‘JS Error’ is closed to new replies.