@@ -78,7 +78,7 @@ |
||
| 78 | 78 | $gv_page = gravityview()->request->is_admin( '', 'single' ); |
| 79 | 79 | |
| 80 | 80 | // New View or Edit View page |
| 81 | - if( $gv_page && $pagenow === 'post-new.php' ) { |
|
| 81 | + if ( $gv_page && $pagenow === 'post-new.php' ) { |
|
| 82 | 82 | remove_meta_box( 'woothemes-settings', 'gravityview', 'normal' ); |
| 83 | 83 | } |
| 84 | 84 | } |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | |
| 68 | 68 | parent::add_hooks(); |
| 69 | 69 | |
| 70 | - if( gravityview()->request->is_admin( '', null ) ) { |
|
| 70 | + if ( gravityview()->request->is_admin( '', null ) ) { |
|
| 71 | 71 | |
| 72 | 72 | // Make Yoast metabox go down to the bottom please. |
| 73 | 73 | add_filter( 'wpseo_metabox_prio', array( $this, 'return_low' ) ); |
@@ -92,8 +92,8 @@ discard block |
||
| 92 | 92 | */ |
| 93 | 93 | public function disable_content_analysis( $options ) { |
| 94 | 94 | |
| 95 | - $options['keyword_analysis_active'] = false; |
|
| 96 | - $options['content_analysis_active'] = false; |
|
| 95 | + $options[ 'keyword_analysis_active' ] = false; |
|
| 96 | + $options[ 'content_analysis_active' ] = false; |
|
| 97 | 97 | |
| 98 | 98 | return $options; |
| 99 | 99 | } |
@@ -112,8 +112,8 @@ discard block |
||
| 112 | 112 | global $pagenow; |
| 113 | 113 | |
| 114 | 114 | // New View page |
| 115 | - if( $pagenow === 'post-new.php' ) { |
|
| 116 | - $options['hideeditbox-gravityview'] = true; |
|
| 115 | + if ( $pagenow === 'post-new.php' ) { |
|
| 116 | + $options[ 'hideeditbox-gravityview' ] = true; |
|
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | return $options; |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | */ |
| 39 | 39 | $is_page = false; |
| 40 | 40 | |
| 41 | - if( function_exists( '\get_current_screen' ) || function_exists( 'get_current_screen' ) ) { |
|
| 41 | + if ( function_exists( '\get_current_screen' ) || function_exists( 'get_current_screen' ) ) { |
|
| 42 | 42 | $current_screen = \get_current_screen(); |
| 43 | 43 | } else { |
| 44 | 44 | $current_screen = false; |
@@ -51,13 +51,13 @@ discard block |
||
| 51 | 51 | $is_page = 'single'; |
| 52 | 52 | } elseif ( $is_gv_settings = 'gravityview_page_gravityview_settings' === $current_screen->id ) { |
| 53 | 53 | $is_page = 'settings'; |
| 54 | - } elseif( $is_extensions = 'gravityview_page_gv-admin-installer' === $current_screen->id ) { |
|
| 54 | + } elseif ( $is_extensions = 'gravityview_page_gv-admin-installer' === $current_screen->id ) { |
|
| 55 | 55 | $is_page = 'downloads'; |
| 56 | - } elseif( $is_changelog = 'gravityview_page_gv-changelog' === $current_screen->id ) { |
|
| 56 | + } elseif ( $is_changelog = 'gravityview_page_gv-changelog' === $current_screen->id ) { |
|
| 57 | 57 | $is_page = 'changelog'; |
| 58 | - } elseif( $is_getting_started = 'gravityview_page_gv-getting-started' === $current_screen->id ) { |
|
| 58 | + } elseif ( $is_getting_started = 'gravityview_page_gv-getting-started' === $current_screen->id ) { |
|
| 59 | 59 | $is_page = 'getting-started'; |
| 60 | - } elseif( $is_credits = 'gravityview_page_gv-credits' === $current_screen->id ) { |
|
| 60 | + } elseif ( $is_credits = 'gravityview_page_gv-credits' === $current_screen->id ) { |
|
| 61 | 61 | $is_page = 'credits'; |
| 62 | 62 | } |
| 63 | 63 | } |
@@ -40,8 +40,7 @@ discard block |
||
| 40 | 40 | $tab = __( 'Edit Entry', 'gravityview' ); |
| 41 | 41 | $context = 'edit'; |
| 42 | 42 | break; |
| 43 | - case ( $gravityview->request->is_entry( $gravityview->view->form ? $gravityview->view->form->ID : 0 ) ): |
|
| 44 | - $tab = __( 'Single Entry', 'gravityview' ); |
|
| 43 | + case ( $gravityview->request->is_entry( $gravityview->view->form ? $gravityview->view->form->ID : 0 ) ) : $tab = __( 'Single Entry', 'gravityview' ); |
|
| 45 | 44 | $context = 'single'; |
| 46 | 45 | break; |
| 47 | 46 | default: |
@@ -61,7 +60,7 @@ discard block |
||
| 61 | 60 | $action_text = sprintf( esc_html__( 'Add fields to %s', 'gravityview' ), $tab ); |
| 62 | 61 | $message = esc_html__( 'You can only see this message because you are able to edit this View.', 'gravityview' ); |
| 63 | 62 | |
| 64 | - $image = sprintf( '<img alt="%s" src="%s" style="margin-top: 10px;" />', $tab, esc_url( plugins_url( sprintf( 'assets/images/tab-%s.png', $context ), GRAVITYVIEW_FILE ) ) ); |
|
| 63 | + $image = sprintf( '<img alt="%s" src="%s" style="margin-top: 10px;" />', $tab, esc_url( plugins_url( sprintf( 'assets/images/tab-%s.png', $context ), GRAVITYVIEW_FILE ) ) ); |
|
| 65 | 64 | $output = sprintf( '<h3>%s <strong><a href="%s">%s</a></strong></h3><p>%s</p>', $title, esc_url( $edit_link ), $action_text, $message ); |
| 66 | 65 | |
| 67 | 66 | echo \GVCommon::generate_notice( $output . $image, 'gv-error error', 'edit_gravityview', $gravityview->view->ID ); |