| 
									
										
										
										
											2019-03-12 09:27:46 +00:00
										 |  |  | <?php | 
					
						
							| 
									
										
										
										
											2019-04-16 20:56:22 +01:00
										 |  |  | /** | 
					
						
							|  |  |  |  * Not used in core since 5.1. | 
					
						
							|  |  |  |  * This is a back-compat for plugins that may be using this method of loading directly. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-03-12 09:27:46 +00:00
										 |  |  | /** | 
					
						
							|  |  |  |  * Disable error reporting | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * Set this to error_reporting( -1 ) for debugging. | 
					
						
							|  |  |  |  */ | 
					
						
							| 
									
										
										
										
											2019-04-16 20:56:22 +01:00
										 |  |  | error_reporting( 0 ); | 
					
						
							| 
									
										
										
										
											2019-03-12 09:27:46 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-16 20:56:22 +01:00
										 |  |  | $basepath = dirname( __FILE__ ); | 
					
						
							| 
									
										
										
										
											2019-03-12 09:27:46 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-16 20:56:22 +01:00
										 |  |  | function get_file( $path ) { | 
					
						
							| 
									
										
										
										
											2019-03-12 09:27:46 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-16 20:56:22 +01:00
										 |  |  | 	if ( function_exists( 'realpath' ) ) { | 
					
						
							|  |  |  | 		$path = realpath( $path ); | 
					
						
							|  |  |  | 	} | 
					
						
							| 
									
										
										
										
											2019-03-12 09:27:46 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-16 20:56:22 +01:00
										 |  |  | 	if ( ! $path || ! @is_file( $path ) ) { | 
					
						
							| 
									
										
										
										
											2019-03-12 09:27:46 +00:00
										 |  |  | 		return false; | 
					
						
							| 
									
										
										
										
											2019-04-16 20:56:22 +01:00
										 |  |  | 	} | 
					
						
							| 
									
										
										
										
											2019-03-12 09:27:46 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-16 20:56:22 +01:00
										 |  |  | 	return @file_get_contents( $path ); | 
					
						
							| 
									
										
										
										
											2019-03-12 09:27:46 +00:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | $expires_offset = 31536000; // 1 year
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-16 20:56:22 +01:00
										 |  |  | header( 'Content-Type: application/javascript; charset=UTF-8' ); | 
					
						
							|  |  |  | header( 'Vary: Accept-Encoding' ); // Handle proxies
 | 
					
						
							|  |  |  | header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', time() + $expires_offset ) . ' GMT' ); | 
					
						
							|  |  |  | header( "Cache-Control: public, max-age=$expires_offset" ); | 
					
						
							| 
									
										
										
										
											2019-03-12 09:27:46 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-16 20:56:22 +01:00
										 |  |  | if ( isset( $_GET['c'] ) && ( $file = get_file( $basepath . '/wp-tinymce.js' ) ) ) { | 
					
						
							| 
									
										
										
										
											2019-03-12 09:27:46 +00:00
										 |  |  | 	echo $file; | 
					
						
							|  |  |  | } else { | 
					
						
							| 
									
										
										
										
											2019-04-16 20:56:22 +01:00
										 |  |  | 	// Even further back compat.
 | 
					
						
							| 
									
										
										
										
											2019-03-12 09:27:46 +00:00
										 |  |  | 	echo get_file( $basepath . '/tinymce.min.js' ); | 
					
						
							|  |  |  | 	echo get_file( $basepath . '/plugins/compat3x/plugin.min.js' ); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | exit; |