Completed
Pull Request — master (#1022)
by Zack
54:55 queued 34:42
created
includes/extensions/entry-notes/class-gravityview-field-notes.php 1 patch
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -175,10 +175,10 @@  discard block
 block discarded – undo
175 175
 
176 176
 		if( 'gv_note_add' === $_POST['action'] ) {
177 177
 
178
-            if( ! GVCommon::has_cap( 'gravityview_add_entry_notes' ) ) {
179
-                do_action( 'gravityview_log_error', __METHOD__ . ': The user isnt allowed to add entry notes.' );
180
-                return;
181
-            }
178
+			if( ! GVCommon::has_cap( 'gravityview_add_entry_notes' ) ) {
179
+				do_action( 'gravityview_log_error', __METHOD__ . ': The user isnt allowed to add entry notes.' );
180
+				return;
181
+			}
182 182
 
183 183
 			$post = wp_unslash( $_POST );
184 184
 
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
 	 *
279 279
 	 * Verify permissions. Check expected $_POST. Parse args, then send to process_delete_notes
280 280
 	 *
281
-  	 * @since 1.17
281
+	 * @since 1.17
282 282
 	 *
283 283
 	 * @see process_delete_notes
284 284
 	 *
@@ -431,7 +431,7 @@  discard block
 block discarded – undo
431 431
 			'subject-label' => __( 'Subject', 'gravityview' ),
432 432
 			'subject' => __( 'Email subject', 'gravityview' ),
433 433
 			'default-email-subject' => __( 'New entry note', 'gravityview' ),
434
-            'email-footer' => __( 'This note was sent from {url}', 'gravityview' ),
434
+			'email-footer' => __( 'This note was sent from {url}', 'gravityview' ),
435 435
 			'also-email' => __( 'Also email this note to', 'gravityview' ),
436 436
 			'error-add-note' => __( 'There was an error adding the note.', 'gravityview' ),
437 437
 			'error-invalid' => __( 'The request was invalid. Refresh the page and try again.', 'gravityview' ),
@@ -501,11 +501,11 @@  discard block
 block discarded – undo
501 501
 
502 502
 		if ( $context instanceof \GV\Template_Context ) {
503 503
 
504
-		    ob_start();
505
-		    $context->template->get_template_part( 'note', 'detail', true );
506
-            $note_detail_html = ob_get_clean();
504
+			ob_start();
505
+			$context->template->get_template_part( 'note', 'detail', true );
506
+			$note_detail_html = ob_get_clean();
507 507
 
508
-            ob_start();
508
+			ob_start();
509 509
 			$context->template->get_template_part( 'note', $note_row_template, true );
510 510
 			$note_row = ob_get_clean();
511 511
 		} else {
@@ -761,7 +761,7 @@  discard block
 block discarded – undo
761 761
 				'gv-note-to-custom' => '',
762 762
 				'gv-note-subject' => '',
763 763
 				'gv-note-content' => '',
764
-                'current-url' => '',
764
+				'current-url' => '',
765 765
 			);
766 766
 
767 767
 			$current_user  = wp_get_current_user();
@@ -813,9 +813,9 @@  discard block
 block discarded – undo
813 813
 			$message .= $this->get_email_footer( $email_footer, $is_html, $email_data );
814 814
 
815 815
 			/**
816
-             * @filter `gravityview/field/notes/wpautop_email` Should the message content have paragraphs added automatically, if using HTML message format
816
+			 * @filter `gravityview/field/notes/wpautop_email` Should the message content have paragraphs added automatically, if using HTML message format
817 817
 			 * @since 1.18
818
-             * @param bool $wpautop_email True: Apply wpautop() to the email message if using; False: Leave as entered (Default: true)
818
+			 * @param bool $wpautop_email True: Apply wpautop() to the email message if using; False: Leave as entered (Default: true)
819 819
 			 */
820 820
 			$wpautop_email = apply_filters( 'gravityview/field/notes/wpautop_email', true );
821 821
 
@@ -835,12 +835,12 @@  discard block
 block discarded – undo
835 835
 	}
836 836
 
837 837
 	/**
838
-     * Get the footer for Entry Note emails
839
-     *
840
-     * `{url}` is replaced by the URL of the page where the note form was embedded
841
-     *
842
-     * @since 1.18
843
-     * @see GravityView_Field_Notes::strings The default value of $message_footer is set here, with the key 'email-footer'
838
+	 * Get the footer for Entry Note emails
839
+	 *
840
+	 * `{url}` is replaced by the URL of the page where the note form was embedded
841
+	 *
842
+	 * @since 1.18
843
+	 * @see GravityView_Field_Notes::strings The default value of $message_footer is set here, with the key 'email-footer'
844 844
 	 *
845 845
 	 * @param string $email_footer The message footer value
846 846
 	 * @param bool $is_html True: Email is being sent as HTML; False: sent as text
@@ -849,10 +849,10 @@  discard block
 block discarded – undo
849 849
 	 */
850 850
 	private function get_email_footer( $email_footer = '', $is_html = true, $email_data = array() ) {
851 851
 
852
-	    $output = '';
852
+		$output = '';
853 853
 
854 854
 		if( ! empty( $email_footer ) ) {
855
-		    $url = \GV\Utils::get( $email_data, 'current-url' );
855
+			$url = \GV\Utils::get( $email_data, 'current-url' );
856 856
 			$url = html_entity_decode( $url );
857 857
 			$url = site_url( $url );
858 858
 
Please login to merge, or discard this patch.