@@ -231,8 +231,9 @@ |
||
231 | 231 | if ( false /** Do not use for now. See issue #848 */ && function_exists( 'gravityview' ) && $post = get_post( $post_id ) ) { |
232 | 232 | $views = \GV\View_Collection::from_post( $post ); |
233 | 233 | $views = $views->all(); |
234 | - if ( ! empty( $views ) ) |
|
235 | - $this->view_id = $views[0]->ID; |
|
234 | + if ( ! empty( $views ) ) { |
|
235 | + $this->view_id = $views[0]->ID; |
|
236 | + } |
|
236 | 237 | } else { |
237 | 238 | /** Deprecated. */ |
238 | 239 | $this->view_id = GravityView_View_Data::getInstance()->maybe_get_view_id( $post_id ); |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | /** Deprecated, see \GV\View_Collection::from_post */ |
82 | 82 | if( ( get_post_type( $post ) === 'gravityview' ) ) { |
83 | 83 | $ids[] = $post->ID; |
84 | - } else{ |
|
84 | + } else { |
|
85 | 85 | // Parse the Post Content |
86 | 86 | $id = $this->parse_post_content( $post->post_content ); |
87 | 87 | if( $id ) { |
@@ -105,8 +105,9 @@ discard block |
||
105 | 105 | if ( false /** Do not use for now. See issue #848 */ && function_exists( 'gravityview' ) ) { |
106 | 106 | $shortcodes = \GV\Shortcode::parse( $passed_post ); |
107 | 107 | foreach ( $shortcodes as $shortcode ) { |
108 | - if ( $shortcode->name == 'gravityview' && !empty( $shortcode->atts['id'] ) ) |
|
109 | - $ids []= $shortcode->atts['id']; |
|
108 | + if ( $shortcode->name == 'gravityview' && !empty( $shortcode->atts['id'] ) ) { |
|
109 | + $ids []= $shortcode->atts['id']; |
|
110 | + } |
|
110 | 111 | } |
111 | 112 | } else { |
112 | 113 | /** Deprecated, use \GV\Shortcode::parse. */ |
@@ -507,7 +508,7 @@ discard block |
||
507 | 508 | } |
508 | 509 | |
509 | 510 | if( ! $message ) { |
510 | - if ( false /** Do not use for now. See issue #848 */ && function_exists( 'gravityview' ) && $post = get_post( $post_id ) ) { |
|
511 | + if ( false /** Do not use for now. See issue #848 */ && function_exists( 'gravityview' ) && $post = get_post( $post_id ) ) { |
|
511 | 512 | $views = GV\View_Collection::from_post( $post ); |
512 | 513 | $view_ids_in_post = array_map( function( $view ) { return $view->ID; }, $views->all() ); |
513 | 514 | } else { |