Completed
Push — master ( d0f89d...8d008b )
by Hugh
02:54
created
includes/shortcodes/class-ssp-shortcode-podcast_episode.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -23,34 +23,34 @@
 block discarded – undo
23 23
 		global $ss_podcasting;
24 24
 
25 25
 		$atts = shortcode_atts( array(
26
-	        'episode' => 0,
27
-	        'content' => 'title,player,details',
28
-	    ), $params );
26
+			'episode' => 0,
27
+			'content' => 'title,player,details',
28
+		), $params );
29 29
 
30 30
 		extract( $atts );
31 31
 
32 32
 		// If no episode ID is specified then use the current post's ID
33
-	    if ( ! $episode ) {
33
+		if ( ! $episode ) {
34 34
 
35
-	    	global $post;
36
-	    	if( isset( $post->ID ) ) {
37
-	    		$episode = intval( $post->ID );
38
-	    	}
35
+			global $post;
36
+			if( isset( $post->ID ) ) {
37
+				$episode = intval( $post->ID );
38
+			}
39 39
 
40
-	    	if ( ! $episode ) {
41
-	    		return;
42
-	    	}
40
+			if ( ! $episode ) {
41
+				return;
42
+			}
43 43
 
44
-	    }
44
+		}
45 45
 
46
-	    // Setup array of content items and trim whitespace
47
-	    $content_items = explode( ',', $content );
48
-	    $content_items = array_map( 'trim', $content_items );
46
+		// Setup array of content items and trim whitespace
47
+		$content_items = explode( ',', $content );
48
+		$content_items = array_map( 'trim', $content_items );
49 49
 
50
-	    // Get episode for display
51
-	    $html = $ss_podcasting->podcast_episode( $episode, $content_items, 'shortcode' );
50
+		// Get episode for display
51
+		$html = $ss_podcasting->podcast_episode( $episode, $content_items, 'shortcode' );
52 52
 
53
-	    return $html;
53
+		return $html;
54 54
 
55 55
 	}
56 56
 
Please login to merge, or discard this patch.
includes/class-ssp-frontend.php 1 patch
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -558,11 +558,11 @@  discard block
 block discarded – undo
558 558
 
559 559
 		if ( $size ) {
560 560
 
561
-		    $base = log ( $size ) / log( 1024 );
562
-		    $suffixes = array( '' , 'k' , 'M' , 'G' , 'T' );
563
-		    $formatted_size = round( pow( 1024 , $base - floor( $base ) ) , $precision ) . $suffixes[ floor( $base ) ];
561
+			$base = log ( $size ) / log( 1024 );
562
+			$suffixes = array( '' , 'k' , 'M' , 'G' , 'T' );
563
+			$formatted_size = round( pow( 1024 , $base - floor( $base ) ) , $precision ) . $suffixes[ floor( $base ) ];
564 564
 
565
-		    return apply_filters( 'ssp_file_size_formatted', $formatted_size, $size );
565
+			return apply_filters( 'ssp_file_size_formatted', $formatted_size, $size );
566 566
 		}
567 567
 
568 568
 		return false;
@@ -664,7 +664,7 @@  discard block
 block discarded – undo
664 664
 				wp_cache_set( $key, $mime, 'mime-type', DAY_IN_SECONDS );
665 665
 			}
666 666
 
667
-		    return $mime;
667
+			return $mime;
668 668
 		}
669 669
 
670 670
 		return false;
@@ -798,15 +798,15 @@  discard block
 block discarded – undo
798 798
 				foreach ( $terms as $term ) {
799 799
 					$query[ $term->term_id ] = new stdClass();
800 800
 					$query[ $term->term_id ]->title = $term->name;
801
-		    		$query[ $term->term_id ]->url = get_term_link( $term );
801
+					$query[ $term->term_id ]->url = get_term_link( $term );
802 802
 
803
-		    		$query_args = apply_filters( 'ssp_get_podcast_series_query_args', ssp_episodes( -1, $term->slug, true, '' ) );
803
+					$query_args = apply_filters( 'ssp_get_podcast_series_query_args', ssp_episodes( -1, $term->slug, true, '' ) );
804 804
 
805
-		    		$posts = get_posts( $query_args );
805
+					$posts = get_posts( $query_args );
806 806
 
807
-		    		$count = count( $posts );
808
-		    		$query[ $term->term_id ]->count = $count;
809
-			    }
807
+					$count = count( $posts );
808
+					$query[ $term->term_id ]->count = $count;
809
+				}
810 810
 			}
811 811
 
812 812
 		}
@@ -917,18 +917,18 @@  discard block
 block discarded – undo
917 917
 				}
918 918
 
919 919
 				// Allow other actions - functions hooked on here must not output any data
920
-			    do_action( 'ssp_file_download', $file, $episode, $referrer );
920
+				do_action( 'ssp_file_download', $file, $episode, $referrer );
921 921
 
922
-			    // Set necessary headers
922
+				// Set necessary headers
923 923
 				header( "Pragma: no-cache" );
924 924
 				header( "Expires: 0" );
925 925
 				header( "Cache-Control: must-revalidate, post-check=0, pre-check=0" );
926 926
 				header( "Robots: none" );
927 927
 
928
-		        // Check file referrer
929
-		        if( 'download' == $referrer ) {
928
+				// Check file referrer
929
+				if( 'download' == $referrer ) {
930 930
 
931
-		        	// Set size of file
931
+					// Set size of file
932 932
 					// Do we have anything in Cache/DB?
933 933
 					$size = wp_cache_get( $episode_id, 'filesize_raw' );
934 934
 
@@ -955,22 +955,22 @@  discard block
 block discarded – undo
955 955
 					}
956 956
 
957 957
 					// Send Content-Length header
958
-		        	if ( ! empty( $size ) ) {
958
+					if ( ! empty( $size ) ) {
959 959
 						header( "Content-Length: " . $size );
960 960
 					}
961 961
 
962
-		        	// Force file download
963
-		        	header( "Content-Type: application/force-download" );
962
+					// Force file download
963
+					header( "Content-Type: application/force-download" );
964 964
 
965
-			        // Set other relevant headers
966
-			        header( "Content-Description: File Transfer" );
967
-			        header( "Content-Disposition: attachment; filename=\"" . basename( $file ) . "\";" );
968
-			        header( "Content-Transfer-Encoding: binary" );
965
+					// Set other relevant headers
966
+					header( "Content-Description: File Transfer" );
967
+					header( "Content-Disposition: attachment; filename=\"" . basename( $file ) . "\";" );
968
+					header( "Content-Transfer-Encoding: binary" );
969 969
 
970
-			        // Encode spaces in file names until this is fixed in core (https://core.trac.wordpress.org/ticket/36998)
970
+					// Encode spaces in file names until this is fixed in core (https://core.trac.wordpress.org/ticket/36998)
971 971
 					$file = str_replace( ' ', '%20', $file );
972 972
 
973
-			        // Use ssp_readfile_chunked() if allowed on the server or simply access file directly
973
+					// Use ssp_readfile_chunked() if allowed on the server or simply access file directly
974 974
 					@ssp_readfile_chunked( $file ) or header( 'Location: ' . $file );
975 975
 				} else {
976 976
 
@@ -1150,7 +1150,7 @@  discard block
 block discarded – undo
1150 1150
 						if ( get_option( 'permalink_structure' ) ) {
1151 1151
 							$file = $this->get_episode_download_link( $episode_id );
1152 1152
 						}
1153
-		    			$html .= '<div class="podcast_player">' . $this->media_player( $file, $episode_id ) . '</div>' . "\n";
1153
+						$html .= '<div class="podcast_player">' . $this->media_player( $file, $episode_id ) . '</div>' . "\n";
1154 1154
 					break;
1155 1155
 
1156 1156
 					case 'details':
@@ -1165,7 +1165,7 @@  discard block
 block discarded – undo
1165 1165
 
1166 1166
 		$html .= '</div>' . "\n";
1167 1167
 
1168
-	    return $html;
1168
+		return $html;
1169 1169
 	}
1170 1170
 
1171 1171
 	/**
Please login to merge, or discard this patch.