|  | @@ -1,7 +1,7 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 1 | 1 |  <?php | 
                                                                                                            
                                                            | 2 | 2 |   | 
                                                                                                            
                                                            | 3 | 3 |  // Exit if accessed directly. | 
                                                                                                            
                                                            | 4 |  | -if ( ! defined( 'ABSPATH' ) ) { | 
                                                                                                            
                                                            |  | 4 | +if ( ! defined ( 'ABSPATH' ) ) { | 
                                                                                                            
                                                            | 5 | 5 |  	exit; | 
                                                                                                            
                                                            | 6 | 6 |  } | 
                                                                                                            
                                                            | 7 | 7 |   | 
                                                                                                                                                        
                                                        |  | @@ -32,84 +32,84 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 32 | 32 |   | 
                                                                                                            
                                                            | 33 | 33 |  		$this->version = $version; | 
                                                                                                            
                                                            | 34 | 34 |   | 
                                                                                                            
                                                            | 35 |  | -		$this->dir = dirname( $file ); | 
                                                                                                            
                                                            |  | 35 | +		$this->dir = dirname ( $file ); | 
                                                                                                            
                                                            | 36 | 36 |  		$this->file = $file; | 
                                                                                                            
                                                            | 37 |  | -		$this->assets_dir = trailingslashit( $this->dir ) . 'assets'; | 
                                                                                                            
                                                            | 38 |  | -		$this->assets_url = esc_url( trailingslashit( plugins_url( '/assets/', $file ) ) ); | 
                                                                                                            
                                                            | 39 |  | -		$this->template_path = trailingslashit( $this->dir ) . 'templates/'; | 
                                                                                                            
                                                            | 40 |  | -		$this->home_url = trailingslashit( home_url() ); | 
                                                                                                            
                                                            |  | 37 | +		$this->assets_dir = trailingslashit ( $this->dir ).'assets'; | 
                                                                                                            
                                                            |  | 38 | +		$this->assets_url = esc_url ( trailingslashit ( plugins_url ( '/assets/', $file ) ) ); | 
                                                                                                            
                                                            |  | 39 | +		$this->template_path = trailingslashit ( $this->dir ).'templates/'; | 
                                                                                                            
                                                            |  | 40 | +		$this->home_url = trailingslashit ( home_url () ); | 
                                                                                                            
                                                            | 41 | 41 |  		$this->token = 'podcast'; | 
                                                                                                            
                                                            | 42 | 42 |   | 
                                                                                                            
                                                            | 43 |  | -		$this->script_suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; | 
                                                                                                            
                                                            |  | 43 | +		$this->script_suffix = defined ( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; | 
                                                                                                            
                                                            | 44 | 44 |   | 
                                                                                                            
                                                            | 45 | 45 |  		// Handle localisation | 
                                                                                                            
                                                            | 46 |  | -		$this->load_plugin_textdomain(); | 
                                                                                                            
                                                            | 47 |  | -		add_action( 'init', array( $this, 'load_localisation' ), 0 ); | 
                                                                                                            
                                                            |  | 46 | +		$this->load_plugin_textdomain (); | 
                                                                                                            
                                                            |  | 47 | +		add_action ( 'init', array( $this, 'load_localisation' ), 0 ); | 
                                                                                                            
                                                            | 48 | 48 |   | 
                                                                                                            
                                                            | 49 | 49 |  		// Regsiter podcast post type, taxonomies and meta fields | 
                                                                                                            
                                                            | 50 |  | -		add_action( 'init', array( $this, 'register_post_type' ), 1 ); | 
                                                                                                            
                                                            |  | 50 | +		add_action ( 'init', array( $this, 'register_post_type' ), 1 ); | 
                                                                                                            
                                                            | 51 | 51 |   | 
                                                                                                            
                                                            | 52 | 52 |  		// Register podcast feed | 
                                                                                                            
                                                            | 53 |  | -		add_action( 'init', array( $this, 'add_feed' ), 1 ); | 
                                                                                                            
                                                            |  | 53 | +		add_action ( 'init', array( $this, 'add_feed' ), 1 ); | 
                                                                                                            
                                                            | 54 | 54 |   | 
                                                                                                            
                                                            | 55 | 55 |  		// Hide WP SEO footer text for podcast RSS feed | 
                                                                                                            
                                                            | 56 |  | -		add_filter( 'wpseo_include_rss_footer', array( $this, 'hide_wp_seo_rss_footer' ) ); | 
                                                                                                            
                                                            |  | 56 | +		add_filter ( 'wpseo_include_rss_footer', array( $this, 'hide_wp_seo_rss_footer' ) ); | 
                                                                                                            
                                                            | 57 | 57 |   | 
                                                                                                            
                                                            | 58 | 58 |  		// Handle v1.x feed URL as well as feed URLs for default permalinks | 
                                                                                                            
                                                            | 59 |  | -		add_action( 'init', array( $this, 'redirect_old_feed' ) ); | 
                                                                                                            
                                                            |  | 59 | +		add_action ( 'init', array( $this, 'redirect_old_feed' ) ); | 
                                                                                                            
                                                            | 60 | 60 |   | 
                                                                                                            
                                                            | 61 | 61 |  		// Setup custom permalink structures | 
                                                                                                            
                                                            | 62 |  | -		add_action( 'init', array( $this, 'setup_permastruct' ), 10 ); | 
                                                                                                            
                                                            |  | 62 | +		add_action ( 'init', array( $this, 'setup_permastruct' ), 10 ); | 
                                                                                                            
                                                            | 63 | 63 |   | 
                                                                                                            
                                                            | 64 |  | -		if ( is_admin() ) { | 
                                                                                                            
                                                            |  | 64 | +		if ( is_admin () ) { | 
                                                                                                            
                                                            | 65 | 65 |   | 
                                                                                                            
                                                            | 66 |  | -			add_action( 'admin_init', array( $this, 'update_enclosures' ) ); | 
                                                                                                            
                                                            |  | 66 | +			add_action ( 'admin_init', array( $this, 'update_enclosures' ) ); | 
                                                                                                            
                                                            | 67 | 67 |   | 
                                                                                                            
                                                            | 68 | 68 |  			// Episode meta box | 
                                                                                                            
                                                            | 69 |  | -			add_action( 'admin_init', array( $this, 'register_meta_boxes' ) ); | 
                                                                                                            
                                                            | 70 |  | -			add_action( 'save_post', array( $this, 'meta_box_save' ), 10, 1 ); | 
                                                                                                            
                                                            |  | 69 | +			add_action ( 'admin_init', array( $this, 'register_meta_boxes' ) ); | 
                                                                                                            
                                                            |  | 70 | +			add_action ( 'save_post', array( $this, 'meta_box_save' ), 10, 1 ); | 
                                                                                                            
                                                            | 71 | 71 |   | 
                                                                                                            
                                                            | 72 | 72 |  			// Episode edit screen | 
                                                                                                            
                                                            | 73 |  | -			add_filter( 'enter_title_here', array( $this, 'enter_title_here' ) ); | 
                                                                                                            
                                                            | 74 |  | -			add_filter( 'post_updated_messages', array( $this, 'updated_messages' ) ); | 
                                                                                                            
                                                            |  | 73 | +			add_filter ( 'enter_title_here', array( $this, 'enter_title_here' ) ); | 
                                                                                                            
                                                            |  | 74 | +			add_filter ( 'post_updated_messages', array( $this, 'updated_messages' ) ); | 
                                                                                                            
                                                            | 75 | 75 |   | 
                                                                                                            
                                                            | 76 | 76 |  			// Admin JS & CSS | 
                                                                                                            
                                                            | 77 |  | -			add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_styles' ), 10 ); | 
                                                                                                            
                                                            | 78 |  | -			add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ), 10 ); | 
                                                                                                            
                                                            |  | 77 | +			add_action ( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_styles' ), 10 ); | 
                                                                                                            
                                                            |  | 78 | +			add_action ( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ), 10 ); | 
                                                                                                            
                                                            | 79 | 79 |   | 
                                                                                                            
                                                            | 80 | 80 |  			// Episodes list table | 
                                                                                                            
                                                            | 81 |  | -			add_filter( 'manage_edit-' . $this->token . '_columns', array( $this, 'register_custom_column_headings' ), 10, 1 ); | 
                                                                                                            
                                                            | 82 |  | -			add_action( 'manage_posts_custom_column', array( $this, 'register_custom_columns' ), 10, 2 ); | 
                                                                                                            
                                                            |  | 81 | +			add_filter ( 'manage_edit-'.$this->token.'_columns', array( $this, 'register_custom_column_headings' ), 10, 1 ); | 
                                                                                                            
                                                            |  | 82 | +			add_action ( 'manage_posts_custom_column', array( $this, 'register_custom_columns' ), 10, 2 ); | 
                                                                                                            
                                                            | 83 | 83 |   | 
                                                                                                            
                                                            | 84 | 84 |  			// Series list table | 
                                                                                                            
                                                            | 85 |  | -			add_filter( 'manage_edit-series_columns' , array( $this, 'edit_series_columns' ) ); | 
                                                                                                            
                                                            | 86 |  | -            add_filter( 'manage_series_custom_column' , array( $this, 'add_series_columns' ), 1, 3 ); | 
                                                                                                            
                                                            |  | 85 | +			add_filter ( 'manage_edit-series_columns', array( $this, 'edit_series_columns' ) ); | 
                                                                                                            
                                                            |  | 86 | +            add_filter ( 'manage_series_custom_column', array( $this, 'add_series_columns' ), 1, 3 ); | 
                                                                                                            
                                                            | 87 | 87 |   | 
                                                                                                            
                                                            | 88 | 88 |              // Dashboard widgets | 
                                                                                                            
                                                            | 89 |  | -            add_filter( 'dashboard_glance_items', array( $this, 'glance_items' ), 10, 1 ); | 
                                                                                                            
                                                            |  | 89 | +            add_filter ( 'dashboard_glance_items', array( $this, 'glance_items' ), 10, 1 ); | 
                                                                                                            
                                                            | 90 | 90 |   | 
                                                                                                            
                                                            | 91 | 91 |              // Appreciation links | 
                                                                                                            
                                                            | 92 |  | -            add_filter( 'plugin_row_meta', array( $this, 'plugin_row_meta' ), 10, 4 ); | 
                                                                                                            
                                                            |  | 92 | +            add_filter ( 'plugin_row_meta', array( $this, 'plugin_row_meta' ), 10, 4 ); | 
                                                                                                            
                                                            | 93 | 93 |   | 
                                                                                                            
                                                            | 94 | 94 |              // Add footer text to dashboard | 
                                                                                                            
                                                            | 95 |  | -            add_filter( 'admin_footer_text', array( $this, 'admin_footer_text' ), 1 ); | 
                                                                                                            
                                                            |  | 95 | +            add_filter ( 'admin_footer_text', array( $this, 'admin_footer_text' ), 1 ); | 
                                                                                                            
                                                            | 96 | 96 |   | 
                                                                                                            
                                                            | 97 | 97 |              // Clear the cache on post save. | 
                                                                                                            
                                                            | 98 |  | -            add_action( 'save_post', array( $this, 'invalidate_cache' ), 10, 2 ); | 
                                                                                                            
                                                            |  | 98 | +            add_action ( 'save_post', array( $this, 'invalidate_cache' ), 10, 2 ); | 
                                                                                                            
                                                            | 99 | 99 |   | 
                                                                                                            
                                                            | 100 | 100 |  		} | 
                                                                                                            
                                                            | 101 | 101 |   | 
                                                                                                            
                                                            | 102 | 102 |  		// Add ajax action for plugin rating | 
                                                                                                            
                                                            | 103 |  | -		add_action( 'wp_ajax_ssp_rated', array( $this, 'rated' ) ); | 
                                                                                                            
                                                            |  | 103 | +		add_action ( 'wp_ajax_ssp_rated', array( $this, 'rated' ) ); | 
                                                                                                            
                                                            | 104 | 104 |   | 
                                                                                                            
                                                            | 105 | 105 |  		// Add ajax action for customising episode embed code | 
                                                                                                            
                                                            | 106 |  | -		add_action( 'wp_ajax_update_episode_embed_code', array( $this, 'update_episode_embed_code' ) ); | 
                                                                                                            
                                                            |  | 106 | +		add_action ( 'wp_ajax_update_episode_embed_code', array( $this, 'update_episode_embed_code' ) ); | 
                                                                                                            
                                                            | 107 | 107 |   | 
                                                                                                            
                                                            | 108 | 108 |  		// Setup activation and deactivation hooks | 
                                                                                                            
                                                            | 109 |  | -		register_activation_hook( $file, array( $this, 'activate' ) ); | 
                                                                                                            
                                                            | 110 |  | -		register_deactivation_hook( $file, array( $this, 'deactivate' ) ); | 
                                                                                                            
                                                            |  | 109 | +		register_activation_hook ( $file, array( $this, 'activate' ) ); | 
                                                                                                            
                                                            |  | 110 | +		register_deactivation_hook ( $file, array( $this, 'deactivate' ) ); | 
                                                                                                            
                                                            | 111 | 111 |   | 
                                                                                                            
                                                            | 112 |  | -		add_action( 'init', array( $this, 'update' ), 11 ); | 
                                                                                                            
                                                            |  | 112 | +		add_action ( 'init', array( $this, 'update' ), 11 ); | 
                                                                                                            
                                                            | 113 | 113 |  	} | 
                                                                                                            
                                                            | 114 | 114 |   | 
                                                                                                            
                                                            | 115 | 115 |  	/** | 
                                                                                                                                                        
                                                        |  | @@ -119,17 +119,17 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 119 | 119 |  	public function setup_permastruct() { | 
                                                                                                            
                                                            | 120 | 120 |   | 
                                                                                                            
                                                            | 121 | 121 |  		// Episode download & player URLs | 
                                                                                                            
                                                            | 122 |  | -		add_rewrite_rule( '^podcast-download/([^/]*)/([^/]*)/?', 'index.php?podcast_episode=$matches[1]', 'top' ); | 
                                                                                                            
                                                            | 123 |  | -		add_rewrite_rule( '^podcast-player/([^/]*)/([^/]*)/?', 'index.php?podcast_episode=$matches[1]&podcast_ref=player', 'top' ); | 
                                                                                                            
                                                            |  | 122 | +		add_rewrite_rule ( '^podcast-download/([^/]*)/([^/]*)/?', 'index.php?podcast_episode=$matches[1]', 'top' ); | 
                                                                                                            
                                                            |  | 123 | +		add_rewrite_rule ( '^podcast-player/([^/]*)/([^/]*)/?', 'index.php?podcast_episode=$matches[1]&podcast_ref=player', 'top' ); | 
                                                                                                            
                                                            | 124 | 124 |   | 
                                                                                                            
                                                            | 125 | 125 |  		// Custom query variables | 
                                                                                                            
                                                            | 126 |  | -		add_rewrite_tag( '%podcast_episode%', '([^&]+)' ); | 
                                                                                                            
                                                            | 127 |  | -		add_rewrite_tag( '%podcast_ref%', '([^&]+)' ); | 
                                                                                                            
                                                            |  | 126 | +		add_rewrite_tag ( '%podcast_episode%', '([^&]+)' ); | 
                                                                                                            
                                                            |  | 127 | +		add_rewrite_tag ( '%podcast_ref%', '([^&]+)' ); | 
                                                                                                            
                                                            | 128 | 128 |   | 
                                                                                                            
                                                            | 129 | 129 |  		// Series feed URLs | 
                                                                                                            
                                                            | 130 |  | -		$feed_slug = apply_filters( 'ssp_feed_slug', $this->token ); | 
                                                                                                            
                                                            | 131 |  | -		add_rewrite_rule( '^feed/' . $feed_slug . '/([^/]*)/?', 'index.php?feed=podcast&podcast_series=$matches[1]', 'top' ); | 
                                                                                                            
                                                            | 132 |  | -		add_rewrite_tag( '%podcast_series%', '([^&]+)' ); | 
                                                                                                            
                                                            |  | 130 | +		$feed_slug = apply_filters ( 'ssp_feed_slug', $this->token ); | 
                                                                                                            
                                                            |  | 131 | +		add_rewrite_rule ( '^feed/'.$feed_slug.'/([^/]*)/?', 'index.php?feed=podcast&podcast_series=$matches[1]', 'top' ); | 
                                                                                                            
                                                            |  | 132 | +		add_rewrite_tag ( '%podcast_series%', '([^&]+)' ); | 
                                                                                                            
                                                            | 133 | 133 |  	} | 
                                                                                                            
                                                            | 134 | 134 |   | 
                                                                                                            
                                                            | 135 | 135 |  	/** | 
                                                                                                                                                        
                                                        |  | @@ -139,25 +139,25 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 139 | 139 |  	public function register_post_type() { | 
                                                                                                            
                                                            | 140 | 140 |   | 
                                                                                                            
                                                            | 141 | 141 |  		$labels = array( | 
                                                                                                            
                                                            | 142 |  | -			'name' => _x( 'Podcast', 'post type general name' , 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 143 |  | -			'singular_name' => _x( 'Podcast', 'post type singular name' , 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 144 |  | -			'add_new' => _x( 'Add New', 'podcast' , 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 145 |  | -			'add_new_item' => sprintf( __( 'Add New %s' , 'seriously-simple-podcasting' ), __( 'Episode' , 'seriously-simple-podcasting' ) ), | 
                                                                                                            
                                                            | 146 |  | -			'edit_item' => sprintf( __( 'Edit %s' , 'seriously-simple-podcasting' ), __( 'Episode' , 'seriously-simple-podcasting' ) ), | 
                                                                                                            
                                                            | 147 |  | -			'new_item' => sprintf( __( 'New %s' , 'seriously-simple-podcasting' ), __( 'Episode' , 'seriously-simple-podcasting' ) ), | 
                                                                                                            
                                                            | 148 |  | -			'all_items' => sprintf( __( 'All %s' , 'seriously-simple-podcasting' ), __( 'Episodes' , 'seriously-simple-podcasting' ) ), | 
                                                                                                            
                                                            | 149 |  | -			'view_item' => sprintf( __( 'View %s' , 'seriously-simple-podcasting' ), __( 'Episode' , 'seriously-simple-podcasting' ) ), | 
                                                                                                            
                                                            | 150 |  | -			'search_items' => sprintf( __( 'Search %a' , 'seriously-simple-podcasting' ), __( 'Episodes' , 'seriously-simple-podcasting' ) ), | 
                                                                                                            
                                                            | 151 |  | -			'not_found' =>  sprintf( __( 'No %s Found' , 'seriously-simple-podcasting' ), __( 'Episodes' , 'seriously-simple-podcasting' ) ), | 
                                                                                                            
                                                            | 152 |  | -			'not_found_in_trash' => sprintf( __( 'No %s Found In Trash' , 'seriously-simple-podcasting' ), __( 'Episodes' , 'seriously-simple-podcasting' ) ), | 
                                                                                                            
                                                            |  | 142 | +			'name' => _x ( 'Podcast', 'post type general name', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 143 | +			'singular_name' => _x ( 'Podcast', 'post type singular name', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 144 | +			'add_new' => _x ( 'Add New', 'podcast', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 145 | +			'add_new_item' => sprintf ( __ ( 'Add New %s', 'seriously-simple-podcasting' ), __ ( 'Episode', 'seriously-simple-podcasting' ) ), | 
                                                                                                            
                                                            |  | 146 | +			'edit_item' => sprintf ( __ ( 'Edit %s', 'seriously-simple-podcasting' ), __ ( 'Episode', 'seriously-simple-podcasting' ) ), | 
                                                                                                            
                                                            |  | 147 | +			'new_item' => sprintf ( __ ( 'New %s', 'seriously-simple-podcasting' ), __ ( 'Episode', 'seriously-simple-podcasting' ) ), | 
                                                                                                            
                                                            |  | 148 | +			'all_items' => sprintf ( __ ( 'All %s', 'seriously-simple-podcasting' ), __ ( 'Episodes', 'seriously-simple-podcasting' ) ), | 
                                                                                                            
                                                            |  | 149 | +			'view_item' => sprintf ( __ ( 'View %s', 'seriously-simple-podcasting' ), __ ( 'Episode', 'seriously-simple-podcasting' ) ), | 
                                                                                                            
                                                            |  | 150 | +			'search_items' => sprintf ( __ ( 'Search %a', 'seriously-simple-podcasting' ), __ ( 'Episodes', 'seriously-simple-podcasting' ) ), | 
                                                                                                            
                                                            |  | 151 | +			'not_found' =>  sprintf ( __ ( 'No %s Found', 'seriously-simple-podcasting' ), __ ( 'Episodes', 'seriously-simple-podcasting' ) ), | 
                                                                                                            
                                                            |  | 152 | +			'not_found_in_trash' => sprintf ( __ ( 'No %s Found In Trash', 'seriously-simple-podcasting' ), __ ( 'Episodes', 'seriously-simple-podcasting' ) ), | 
                                                                                                            
                                                            | 153 | 153 |  			'parent_item_colon' => '', | 
                                                                                                            
                                                            | 154 |  | -			'menu_name' => __( 'Podcast' , 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 155 |  | -			'filter_items_list' => sprintf( __( 'Filter %s list' , 'seriously-simple-podcasting' ), __( 'Episode' , 'seriously-simple-podcasting' ) ), | 
                                                                                                            
                                                            | 156 |  | -			'items_list_navigation' => sprintf( __( '%s list navigation' , 'seriously-simple-podcasting' ), __( 'Episode' , 'seriously-simple-podcasting' ) ), | 
                                                                                                            
                                                            | 157 |  | -			'items_list' => sprintf( __( '%s list' , 'seriously-simple-podcasting' ), __( 'Episode' , 'seriously-simple-podcasting' ) ), | 
                                                                                                            
                                                            |  | 154 | +			'menu_name' => __ ( 'Podcast', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 155 | +			'filter_items_list' => sprintf ( __ ( 'Filter %s list', 'seriously-simple-podcasting' ), __ ( 'Episode', 'seriously-simple-podcasting' ) ), | 
                                                                                                            
                                                            |  | 156 | +			'items_list_navigation' => sprintf ( __ ( '%s list navigation', 'seriously-simple-podcasting' ), __ ( 'Episode', 'seriously-simple-podcasting' ) ), | 
                                                                                                            
                                                            |  | 157 | +			'items_list' => sprintf ( __ ( '%s list', 'seriously-simple-podcasting' ), __ ( 'Episode', 'seriously-simple-podcasting' ) ), | 
                                                                                                            
                                                            | 158 | 158 |  		); | 
                                                                                                            
                                                            | 159 | 159 |   | 
                                                                                                            
                                                            | 160 |  | -		$slug = apply_filters( 'ssp_archive_slug', __( 'podcast' , 'seriously-simple-podcasting' ) ); | 
                                                                                                            
                                                            |  | 160 | +		$slug = apply_filters ( 'ssp_archive_slug', __ ( 'podcast', 'seriously-simple-podcasting' ) ); | 
                                                                                                            
                                                            | 161 | 161 |   | 
                                                                                                            
                                                            | 162 | 162 |  		$args = array( | 
                                                                                                            
                                                            | 163 | 163 |  			'labels' => $labels, | 
                                                                                                                                                        
                                                        |  | @@ -179,12 +179,12 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 179 | 179 |  			'show_in_rest' => true, | 
                                                                                                            
                                                            | 180 | 180 |  		); | 
                                                                                                            
                                                            | 181 | 181 |   | 
                                                                                                            
                                                            | 182 |  | -		$args = apply_filters( 'ssp_register_post_type_args', $args ); | 
                                                                                                            
                                                            |  | 182 | +		$args = apply_filters ( 'ssp_register_post_type_args', $args ); | 
                                                                                                            
                                                            | 183 | 183 |   | 
                                                                                                            
                                                            | 184 |  | -		register_post_type( $this->token, $args ); | 
                                                                                                            
                                                            |  | 184 | +		register_post_type ( $this->token, $args ); | 
                                                                                                            
                                                            | 185 | 185 |   | 
                                                                                                            
                                                            | 186 |  | -		$this->register_taxonomies(); | 
                                                                                                            
                                                            | 187 |  | -		$this->register_meta(); | 
                                                                                                            
                                                            |  | 186 | +		$this->register_taxonomies (); | 
                                                                                                            
                                                            |  | 187 | +		$this->register_meta (); | 
                                                                                                            
                                                            | 188 | 188 |  	} | 
                                                                                                            
                                                            | 189 | 189 |   | 
                                                                                                            
                                                            | 190 | 190 |  	/** | 
                                                                                                                                                        
                                                        |  | @@ -193,45 +193,45 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 193 | 193 |  	 */ | 
                                                                                                            
                                                            | 194 | 194 |  	private function register_taxonomies() { | 
                                                                                                            
                                                            | 195 | 195 |   | 
                                                                                                            
                                                            | 196 |  | -		$podcast_post_types = ssp_post_types( true ); | 
                                                                                                            
                                                            |  | 196 | +		$podcast_post_types = ssp_post_types ( true ); | 
                                                                                                            
                                                            | 197 | 197 |   | 
                                                                                                            
                                                            | 198 | 198 |          $series_labels = array( | 
                                                                                                            
                                                            | 199 |  | -            'name' => __( 'Podcast Series' , 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 200 |  | -            'singular_name' => __( 'Series', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 201 |  | -            'search_items' =>  __( 'Search Series' , 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 202 |  | -            'all_items' => __( 'All Series' , 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 203 |  | -            'parent_item' => __( 'Parent Series' , 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 204 |  | -            'parent_item_colon' => __( 'Parent Series:' , 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 205 |  | -            'edit_item' => __( 'Edit Series' , 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 206 |  | -            'update_item' => __( 'Update Series' , 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 207 |  | -            'add_new_item' => __( 'Add New Series' , 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 208 |  | -            'new_item_name' => __( 'New Series Name' , 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 209 |  | -            'menu_name' => __( 'Series' , 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 210 |  | -            'view_item' => __( 'View Series' , 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 211 |  | -            'popular_items' => __( 'Popular Series' , 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 212 |  | -            'separate_items_with_commas' => __( 'Separate series with commas' , 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 213 |  | -            'add_or_remove_items' => __( 'Add or remove Series' , 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 214 |  | -            'choose_from_most_used' => __( 'Choose from the most used Series' , 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 215 |  | -            'not_found' => __( 'No Series Found' , 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 216 |  | -            'items_list_navigation' => __( 'Series list navigation' , 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 217 |  | -            'items_list' => __( 'Series list' , 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 199 | +            'name' => __ ( 'Podcast Series', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 200 | +            'singular_name' => __ ( 'Series', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 201 | +            'search_items' =>  __ ( 'Search Series', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 202 | +            'all_items' => __ ( 'All Series', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 203 | +            'parent_item' => __ ( 'Parent Series', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 204 | +            'parent_item_colon' => __ ( 'Parent Series:', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 205 | +            'edit_item' => __ ( 'Edit Series', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 206 | +            'update_item' => __ ( 'Update Series', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 207 | +            'add_new_item' => __ ( 'Add New Series', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 208 | +            'new_item_name' => __ ( 'New Series Name', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 209 | +            'menu_name' => __ ( 'Series', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 210 | +            'view_item' => __ ( 'View Series', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 211 | +            'popular_items' => __ ( 'Popular Series', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 212 | +            'separate_items_with_commas' => __ ( 'Separate series with commas', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 213 | +            'add_or_remove_items' => __ ( 'Add or remove Series', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 214 | +            'choose_from_most_used' => __ ( 'Choose from the most used Series', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 215 | +            'not_found' => __ ( 'No Series Found', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 216 | +            'items_list_navigation' => __ ( 'Series list navigation', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 217 | +            'items_list' => __ ( 'Series list', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 218 | 218 |          ); | 
                                                                                                            
                                                            | 219 | 219 |   | 
                                                                                                            
                                                            | 220 | 220 |          $series_args = array( | 
                                                                                                            
                                                            | 221 | 221 |              'public' => true, | 
                                                                                                            
                                                            | 222 | 222 |              'hierarchical' => true, | 
                                                                                                            
                                                            | 223 |  | -            'rewrite' => array( 'slug' => apply_filters( 'ssp_series_slug', 'series' ) ), | 
                                                                                                            
                                                            |  | 223 | +            'rewrite' => array( 'slug' => apply_filters ( 'ssp_series_slug', 'series' ) ), | 
                                                                                                            
                                                            | 224 | 224 |              'labels' => $series_labels, | 
                                                                                                            
                                                            | 225 | 225 |              'show_in_rest' => true, | 
                                                                                                            
                                                            | 226 | 226 |          ); | 
                                                                                                            
                                                            | 227 | 227 |   | 
                                                                                                            
                                                            | 228 |  | -        $series_args = apply_filters( 'ssp_register_taxonomy_args', $series_args, 'series' ); | 
                                                                                                            
                                                            |  | 228 | +        $series_args = apply_filters ( 'ssp_register_taxonomy_args', $series_args, 'series' ); | 
                                                                                                            
                                                            | 229 | 229 |   | 
                                                                                                            
                                                            | 230 |  | -        register_taxonomy( 'series', $podcast_post_types, $series_args ); | 
                                                                                                            
                                                            |  | 230 | +        register_taxonomy ( 'series', $podcast_post_types, $series_args ); | 
                                                                                                            
                                                            | 231 | 231 |   | 
                                                                                                            
                                                            | 232 | 232 |          // Add Tags to podcast post type | 
                                                                                                            
                                                            | 233 |  | -        if ( apply_filters( 'ssp_use_post_tags', true ) ) { | 
                                                                                                            
                                                            | 234 |  | -        	register_taxonomy_for_object_type( 'post_tag', $this->token ); | 
                                                                                                            
                                                            |  | 233 | +        if ( apply_filters ( 'ssp_use_post_tags', true ) ) { | 
                                                                                                            
                                                            |  | 234 | +        	register_taxonomy_for_object_type ( 'post_tag', $this->token ); | 
                                                                                                            
                                                            | 235 | 235 |          } | 
                                                                                                            
                                                            | 236 | 236 |      } | 
                                                                                                            
                                                            | 237 | 237 |   | 
                                                                                                                                                        
                                                        |  | @@ -239,28 +239,28 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 239 | 239 |      	global $wp_version; | 
                                                                                                            
                                                            | 240 | 240 |   | 
                                                                                                            
                                                            | 241 | 241 |      	// The enhanced register_meta function is only available for WordPress 4.6+ | 
                                                                                                            
                                                            | 242 |  | -    	if( version_compare( $wp_version, '4.6', '<' ) ) { | 
                                                                                                            
                                                            |  | 242 | +    	if ( version_compare ( $wp_version, '4.6', '<' ) ) { | 
                                                                                                            
                                                            | 243 | 243 |      		return; | 
                                                                                                            
                                                            | 244 | 244 |      	} | 
                                                                                                            
                                                            | 245 | 245 |   | 
                                                                                                            
                                                            | 246 | 246 |      	// Get all displayed custom fields | 
                                                                                                            
                                                            | 247 |  | -    	$fields = $this->custom_fields(); | 
                                                                                                            
                                                            |  | 247 | +    	$fields = $this->custom_fields (); | 
                                                                                                            
                                                            | 248 | 248 |   | 
                                                                                                            
                                                            | 249 | 249 |      	// Add 'filesize_raw' as this is not included in the displayed field options | 
                                                                                                            
                                                            | 250 |  | -    	$fields['filesize_raw'] = array( | 
                                                                                                            
                                                            | 251 |  | -    		'meta_description' => __( 'The raw file size of the podcast episode media file in bytes.', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 250 | +    	$fields[ 'filesize_raw' ] = array( | 
                                                                                                            
                                                            |  | 251 | +    		'meta_description' => __ ( 'The raw file size of the podcast episode media file in bytes.', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 252 | 252 |  		); | 
                                                                                                            
                                                            | 253 | 253 |   | 
                                                                                                            
                                                            | 254 |  | -    	foreach( $fields as $key => $data ) { | 
                                                                                                            
                                                            |  | 254 | +    	foreach ( $fields as $key => $data ) { | 
                                                                                                            
                                                            | 255 | 255 |   | 
                                                                                                            
                                                            | 256 | 256 |      		$args = array( | 
                                                                                                            
                                                            | 257 | 257 |  				'type' => 'string', | 
                                                                                                            
                                                            | 258 |  | -				'description' => $data['meta_description'], | 
                                                                                                            
                                                            |  | 258 | +				'description' => $data[ 'meta_description' ], | 
                                                                                                            
                                                            | 259 | 259 |  				'single' => true, | 
                                                                                                            
                                                            | 260 | 260 |  				'show_in_rest' => true, | 
                                                                                                            
                                                            | 261 | 261 |  			); | 
                                                                                                            
                                                            | 262 | 262 |   | 
                                                                                                            
                                                            | 263 |  | -    		register_meta( 'post', $key, $args ); | 
                                                                                                            
                                                            |  | 263 | +    		register_meta ( 'post', $key, $args ); | 
                                                                                                            
                                                            | 264 | 264 |      	} | 
                                                                                                            
                                                            | 265 | 265 |   | 
                                                                                                            
                                                            | 266 | 266 |      } | 
                                                                                                                                                        
                                                        |  | @@ -271,13 +271,13 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 271 | 271 |  	 * @return array           Modified columns | 
                                                                                                            
                                                            | 272 | 272 |  	 */ | 
                                                                                                            
                                                            | 273 | 273 |  	public function register_custom_column_headings( $defaults ) { | 
                                                                                                            
                                                            | 274 |  | -		$new_columns = apply_filters( 'ssp_admin_columns_episodes', array( 'series' => __( 'Series' , 'seriously-simple-podcasting' ) , 'image' => __( 'Image' , 'seriously-simple-podcasting' ) ) ); | 
                                                                                                            
                                                            |  | 274 | +		$new_columns = apply_filters ( 'ssp_admin_columns_episodes', array( 'series' => __ ( 'Series', 'seriously-simple-podcasting' ), 'image' => __ ( 'Image', 'seriously-simple-podcasting' ) ) ); | 
                                                                                                            
                                                            | 275 | 275 |   | 
                                                                                                            
                                                            | 276 | 276 |  		// remove date column | 
                                                                                                            
                                                            | 277 |  | -		unset( $defaults['date'] ); | 
                                                                                                            
                                                            |  | 277 | +		unset( $defaults[ 'date' ] ); | 
                                                                                                            
                                                            | 278 | 278 |   | 
                                                                                                            
                                                            | 279 | 279 |  		// add new columns before last default one | 
                                                                                                            
                                                            | 280 |  | -		$columns = array_slice( $defaults, 0, -1 ) + $new_columns + array_slice( $defaults, -1 ); | 
                                                                                                            
                                                            |  | 280 | +		$columns = array_slice ( $defaults, 0, -1 ) + $new_columns + array_slice ( $defaults, -1 ); | 
                                                                                                            
                                                            | 281 | 281 |   | 
                                                                                                            
                                                            | 282 | 282 |  		return $columns; | 
                                                                                                            
                                                            | 283 | 283 |  	} | 
                                                                                                                                                        
                                                        |  | @@ -294,13 +294,13 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 294 | 294 |  		switch ( $column_name ) { | 
                                                                                                            
                                                            | 295 | 295 |   | 
                                                                                                            
                                                            | 296 | 296 |  			case 'series': | 
                                                                                                            
                                                            | 297 |  | -				$terms = wp_get_post_terms( $id , 'series' ); | 
                                                                                                            
                                                            | 298 |  | -				$term_names = wp_list_pluck( $terms, 'name' ); | 
                                                                                                            
                                                            | 299 |  | -				echo join( ', ', $term_names ); | 
                                                                                                            
                                                            |  | 297 | +				$terms = wp_get_post_terms ( $id, 'series' ); | 
                                                                                                            
                                                            |  | 298 | +				$term_names = wp_list_pluck ( $terms, 'name' ); | 
                                                                                                            
                                                            |  | 299 | +				echo join ( ', ', $term_names ); | 
                                                                                                            
                                                            | 300 | 300 |  			break; | 
                                                                                                            
                                                            | 301 | 301 |   | 
                                                                                                            
                                                            | 302 | 302 |  			case 'image': | 
                                                                                                            
                                                            | 303 |  | -				$value = $ss_podcasting->get_image( $id, 40 ); | 
                                                                                                            
                                                            |  | 303 | +				$value = $ss_podcasting->get_image ( $id, 40 ); | 
                                                                                                            
                                                            | 304 | 304 |  				echo $value; | 
                                                                                                            
                                                            | 305 | 305 |  			break; | 
                                                                                                            
                                                            | 306 | 306 |   | 
                                                                                                                                                        
                                                        |  | @@ -317,13 +317,13 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 317 | 317 |  	 */ | 
                                                                                                            
                                                            | 318 | 318 |  	public function edit_series_columns( $columns ) { | 
                                                                                                            
                                                            | 319 | 319 |   | 
                                                                                                            
                                                            | 320 |  | -        unset( $columns['description'] ); | 
                                                                                                            
                                                            | 321 |  | -        unset( $columns['posts'] ); | 
                                                                                                            
                                                            |  | 320 | +        unset( $columns[ 'description' ] ); | 
                                                                                                            
                                                            |  | 321 | +        unset( $columns[ 'posts' ] ); | 
                                                                                                            
                                                            | 322 | 322 |   | 
                                                                                                            
                                                            | 323 |  | -        $columns['series_feed_url'] = __( 'Series feed URL' , 'seriously-simple-podcasting' ); | 
                                                                                                            
                                                            | 324 |  | -        $columns['posts'] = __( 'Episodes' , 'seriously-simple-podcasting' ); | 
                                                                                                            
                                                            |  | 323 | +        $columns[ 'series_feed_url' ] = __ ( 'Series feed URL', 'seriously-simple-podcasting' ); | 
                                                                                                            
                                                            |  | 324 | +        $columns[ 'posts' ] = __ ( 'Episodes', 'seriously-simple-podcasting' ); | 
                                                                                                            
                                                            | 325 | 325 |   | 
                                                                                                            
                                                            | 326 |  | -        $columns = apply_filters( 'ssp_admin_columns_series', $columns ); | 
                                                                                                            
                                                            |  | 326 | +        $columns = apply_filters ( 'ssp_admin_columns_series', $columns ); | 
                                                                                                            
                                                            | 327 | 327 |   | 
                                                                                                            
                                                            | 328 | 328 |          return $columns; | 
                                                                                                            
                                                            | 329 | 329 |      } | 
                                                                                                                                                        
                                                        |  | @@ -337,18 +337,18 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 337 | 337 |       * | 
                                                                                                            
                                                            | 338 | 338 |       * @return string | 
                                                                                                            
                                                            | 339 | 339 |       */ | 
                                                                                                            
                                                            | 340 |  | -    public function add_series_columns( $column_data , $column_name , $term_id ) { | 
                                                                                                            
                                                            |  | 340 | +    public function add_series_columns( $column_data, $column_name, $term_id ) { | 
                                                                                                            
                                                            | 341 | 341 |   | 
                                                                                                            
                                                            | 342 | 342 |          switch ( $column_name ) { | 
                                                                                                            
                                                            | 343 | 343 |              case 'series_feed_url': | 
                                                                                                            
                                                            | 344 |  | -            	$series = get_term( $term_id, 'series' ); | 
                                                                                                            
                                                            |  | 344 | +            	$series = get_term ( $term_id, 'series' ); | 
                                                                                                            
                                                            | 345 | 345 |              	$series_slug = $series->slug; | 
                                                                                                            
                                                            | 346 | 346 |   | 
                                                                                                            
                                                            | 347 |  | -            	if ( get_option( 'permalink_structure' ) ) { | 
                                                                                                            
                                                            | 348 |  | -					$feed_slug = apply_filters( 'ssp_feed_slug', $this->token ); | 
                                                                                                            
                                                            | 349 |  | -					$feed_url = $this->home_url . 'feed/' . $feed_slug . '/' . $series_slug; | 
                                                                                                            
                                                            |  | 347 | +            	if ( get_option ( 'permalink_structure' ) ) { | 
                                                                                                            
                                                            |  | 348 | +					$feed_slug = apply_filters ( 'ssp_feed_slug', $this->token ); | 
                                                                                                            
                                                            |  | 349 | +					$feed_url = $this->home_url.'feed/'.$feed_slug.'/'.$series_slug; | 
                                                                                                            
                                                            | 350 | 350 |  				} else { | 
                                                                                                            
                                                            | 351 |  | -					$feed_url = add_query_arg( | 
                                                                                                            
                                                            |  | 351 | +					$feed_url = add_query_arg ( | 
                                                                                                            
                                                            | 352 | 352 |  						array( | 
                                                                                                            
                                                            | 353 | 353 |  							'feed' => $this->token, | 
                                                                                                            
                                                            | 354 | 354 |  							'podcast_series' => $series_slug | 
                                                                                                                                                        
                                                        |  | @@ -357,7 +357,7 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 357 | 357 |  					); | 
                                                                                                            
                                                            | 358 | 358 |  				} | 
                                                                                                            
                                                            | 359 | 359 |   | 
                                                                                                            
                                                            | 360 |  | -                $column_data = '<a href="' . esc_attr( $feed_url ) . '" target="_blank">' . esc_html( $feed_url ) . '</a>'; | 
                                                                                                            
                                                            |  | 360 | +                $column_data = '<a href="'.esc_attr ( $feed_url ).'" target="_blank">'.esc_html ( $feed_url ).'</a>'; | 
                                                                                                            
                                                            | 361 | 361 |              break; | 
                                                                                                            
                                                            | 362 | 362 |          } | 
                                                                                                            
                                                            | 363 | 363 |   | 
                                                                                                                                                        
                                                        |  | @@ -374,16 +374,16 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 374 | 374 |   | 
                                                                                                            
                                                            | 375 | 375 |  	  $messages[ $this->token ] = array( | 
                                                                                                            
                                                            | 376 | 376 |  	    0 => '', | 
                                                                                                            
                                                            | 377 |  | -	    1 => sprintf( __( 'Episode updated. %sView episode%s.' , 'seriously-simple-podcasting' ), '<a href="' . esc_url( get_permalink( $post_ID ) ) . '">', '</a>' ), | 
                                                                                                            
                                                            | 378 |  | -	    2 => __( 'Custom field updated.' , 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 379 |  | -	    3 => __( 'Custom field deleted.' , 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 380 |  | -	    4 => __( 'Episode updated.' , 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 381 |  | -	    5 => isset($_GET['revision']) ? sprintf( __( 'Episode restored to revision from %s.' , 'seriously-simple-podcasting' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false, | 
                                                                                                            
                                                            | 382 |  | -	    6 => sprintf( __( 'Episode published. %sView episode%s.' , 'seriously-simple-podcasting' ), '<a href="' . esc_url( get_permalink( $post_ID ) ) . '">', '</a>' ), | 
                                                                                                            
                                                            | 383 |  | -	    7 => __( 'Episode saved.' , 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 384 |  | -	    8 => sprintf( __( 'Episode submitted. %sPreview episode%s.' , 'seriously-simple-podcasting' ), '<a target="_blank" href="' . esc_url( add_query_arg( 'preview', 'true', get_permalink( $post_ID ) ) ) . '">', '</a>' ), | 
                                                                                                            
                                                            | 385 |  | -	    9 => sprintf( __( 'Episode scheduled for: %1$s. %2$sPreview episode%3$s.' , 'seriously-simple-podcasting' ), '<strong>' . date_i18n( __( 'M j, Y @ G:i' , 'seriously-simple-podcasting' ), strtotime( $post->post_date ) ) . '</strong>', '<a target="_blank" href="' . esc_url( get_permalink( $post_ID ) ) . '">', '</a>' ), | 
                                                                                                            
                                                            | 386 |  | -	    10 => sprintf( __( 'Episode draft updated. %sPreview episode%s.' , 'seriously-simple-podcasting' ), '<a target="_blank" href="' . esc_url( add_query_arg( 'preview', 'true', get_permalink( $post_ID ) ) ) . '">', '</a>' ), | 
                                                                                                            
                                                            |  | 377 | +	    1 => sprintf ( __ ( 'Episode updated. %sView episode%s.', 'seriously-simple-podcasting' ), '<a href="'.esc_url ( get_permalink ( $post_ID ) ).'">', '</a>' ), | 
                                                                                                            
                                                            |  | 378 | +	    2 => __ ( 'Custom field updated.', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 379 | +	    3 => __ ( 'Custom field deleted.', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 380 | +	    4 => __ ( 'Episode updated.', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 381 | +	    5 => isset( $_GET[ 'revision' ] ) ? sprintf ( __ ( 'Episode restored to revision from %s.', 'seriously-simple-podcasting' ), wp_post_revision_title ( (int) $_GET[ 'revision' ], false ) ) : false, | 
                                                                                                            
                                                            |  | 382 | +	    6 => sprintf ( __ ( 'Episode published. %sView episode%s.', 'seriously-simple-podcasting' ), '<a href="'.esc_url ( get_permalink ( $post_ID ) ).'">', '</a>' ), | 
                                                                                                            
                                                            |  | 383 | +	    7 => __ ( 'Episode saved.', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 384 | +	    8 => sprintf ( __ ( 'Episode submitted. %sPreview episode%s.', 'seriously-simple-podcasting' ), '<a target="_blank" href="'.esc_url ( add_query_arg ( 'preview', 'true', get_permalink ( $post_ID ) ) ).'">', '</a>' ), | 
                                                                                                            
                                                            |  | 385 | +	    9 => sprintf ( __ ( 'Episode scheduled for: %1$s. %2$sPreview episode%3$s.', 'seriously-simple-podcasting' ), '<strong>'.date_i18n ( __ ( 'M j, Y @ G:i', 'seriously-simple-podcasting' ), strtotime ( $post->post_date ) ).'</strong>', '<a target="_blank" href="'.esc_url ( get_permalink ( $post_ID ) ).'">', '</a>' ), | 
                                                                                                            
                                                            |  | 386 | +	    10 => sprintf ( __ ( 'Episode draft updated. %sPreview episode%s.', 'seriously-simple-podcasting' ), '<a target="_blank" href="'.esc_url ( add_query_arg ( 'preview', 'true', get_permalink ( $post_ID ) ) ).'">', '</a>' ), | 
                                                                                                            
                                                            | 387 | 387 |  	  ); | 
                                                                                                            
                                                            | 388 | 388 |   | 
                                                                                                            
                                                            | 389 | 389 |  	  return $messages; | 
                                                                                                                                                        
                                                        |  | @@ -393,14 +393,14 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 393 | 393 |  	 * Register podcast episode details meta boxes | 
                                                                                                            
                                                            | 394 | 394 |  	 * @return void | 
                                                                                                            
                                                            | 395 | 395 |  	 */ | 
                                                                                                            
                                                            | 396 |  | -	public function register_meta_boxes () { | 
                                                                                                            
                                                            |  | 396 | +	public function register_meta_boxes() { | 
                                                                                                            
                                                            | 397 | 397 |   | 
                                                                                                            
                                                            | 398 | 398 |  		// Get all podcast post types | 
                                                                                                            
                                                            | 399 |  | -		$podcast_post_types = ssp_post_types( true ); | 
                                                                                                            
                                                            |  | 399 | +		$podcast_post_types = ssp_post_types ( true ); | 
                                                                                                            
                                                            | 400 | 400 |   | 
                                                                                                            
                                                            | 401 | 401 |  		// Add meta box to each post type | 
                                                                                                            
                                                            | 402 | 402 |  		foreach ( (array) $podcast_post_types as $post_type ) { | 
                                                                                                            
                                                            | 403 |  | -			add_action( 'add_meta_boxes_' . $post_type, array( $this, 'meta_box_setup' ), 10, 1 ); | 
                                                                                                            
                                                            |  | 403 | +			add_action ( 'add_meta_boxes_'.$post_type, array( $this, 'meta_box_setup' ), 10, 1 ); | 
                                                                                                            
                                                            | 404 | 404 |  		} | 
                                                                                                            
                                                            | 405 | 405 |  	} | 
                                                                                                            
                                                            | 406 | 406 |   | 
                                                                                                                                                        
                                                        |  | @@ -408,17 +408,17 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 408 | 408 |  	 * Create meta box on episode edit screen | 
                                                                                                            
                                                            | 409 | 409 |  	 * @return void | 
                                                                                                            
                                                            | 410 | 410 |  	 */ | 
                                                                                                            
                                                            | 411 |  | -	public function meta_box_setup ( $post ) { | 
                                                                                                            
                                                            |  | 411 | +	public function meta_box_setup( $post ) { | 
                                                                                                            
                                                            | 412 | 412 |  		global $pagenow; | 
                                                                                                            
                                                            | 413 | 413 |   | 
                                                                                                            
                                                            | 414 |  | -		add_meta_box( 'podcast-episode-data', __( 'Podcast Episode Details' , 'seriously-simple-podcasting' ), array( $this, 'meta_box_content' ), $post->post_type, 'normal', 'high' ); | 
                                                                                                            
                                                            |  | 414 | +		add_meta_box ( 'podcast-episode-data', __ ( 'Podcast Episode Details', 'seriously-simple-podcasting' ), array( $this, 'meta_box_content' ), $post->post_type, 'normal', 'high' ); | 
                                                                                                            
                                                            | 415 | 415 |   | 
                                                                                                            
                                                            | 416 |  | -		if( 'post.php' == $pagenow && 'publish' == $post->post_status && function_exists( 'get_post_embed_html' ) ) { | 
                                                                                                            
                                                            | 417 |  | -			add_meta_box( 'episode-embed-code', __( 'Episode Embed Code' , 'seriously-simple-podcasting' ), array( $this, 'embed_code_meta_box_content' ), $post->post_type, 'side', 'low' ); | 
                                                                                                            
                                                            |  | 416 | +		if ( 'post.php' == $pagenow && 'publish' == $post->post_status && function_exists ( 'get_post_embed_html' ) ) { | 
                                                                                                            
                                                            |  | 417 | +			add_meta_box ( 'episode-embed-code', __ ( 'Episode Embed Code', 'seriously-simple-podcasting' ), array( $this, 'embed_code_meta_box_content' ), $post->post_type, 'side', 'low' ); | 
                                                                                                            
                                                            | 418 | 418 |  		} | 
                                                                                                            
                                                            | 419 | 419 |   | 
                                                                                                            
                                                            | 420 | 420 |  		// Allow more metaboxes to be added | 
                                                                                                            
                                                            | 421 |  | -		do_action( 'ssp_meta_boxes', $post ); | 
                                                                                                            
                                                            |  | 421 | +		do_action ( 'ssp_meta_boxes', $post ); | 
                                                                                                            
                                                            | 422 | 422 |   | 
                                                                                                            
                                                            | 423 | 423 |  	} | 
                                                                                                            
                                                            | 424 | 424 |   | 
                                                                                                                                                        
                                                        |  | @@ -427,15 +427,15 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 427 | 427 |  	 * @param  object $post Current post object | 
                                                                                                            
                                                            | 428 | 428 |  	 * @return void | 
                                                                                                            
                                                            | 429 | 429 |  	 */ | 
                                                                                                            
                                                            | 430 |  | -	public function embed_code_meta_box_content ( $post ) { | 
                                                                                                            
                                                            |  | 430 | +	public function embed_code_meta_box_content( $post ) { | 
                                                                                                            
                                                            | 431 | 431 |   | 
                                                                                                            
                                                            | 432 | 432 |  		// Get post embed code | 
                                                                                                            
                                                            | 433 |  | -		$embed_code = get_post_embed_html( 500, 350, $post ); | 
                                                                                                            
                                                            |  | 433 | +		$embed_code = get_post_embed_html ( 500, 350, $post ); | 
                                                                                                            
                                                            | 434 | 434 |   | 
                                                                                                            
                                                            | 435 | 435 |  		// Generate markup for meta box | 
                                                                                                            
                                                            | 436 |  | -		$html = '<p><em>' . __( 'Customise the size of your episode embed below, then copy the HTML to your clipboard.', 'seriously-simple-podcasting' ) . '</em></p>'; | 
                                                                                                            
                                                            | 437 |  | -		$html .= '<p><label for="episode_embed_code_width">' . __( 'Width:', 'seriously-simple-podcasting' ) . '</label> <input id="episode_embed_code_width" class="episode_embed_code_size_option" type="number" value="500" length="3" min="0" step="1" />     <label for="episode_embed_code_height">' . __( 'Height:', 'seriously-simple-podcasting' ) . '</label> <input id="episode_embed_code_height" class="episode_embed_code_size_option" type="number" value="350" length="3" min="0" step="1" /></p>'; | 
                                                                                                            
                                                            | 438 |  | -		$html .= '<p><textarea readonly id="episode_embed_code">' . esc_textarea( $embed_code ) . '</textarea></p>'; | 
                                                                                                            
                                                            |  | 436 | +		$html = '<p><em>'.__ ( 'Customise the size of your episode embed below, then copy the HTML to your clipboard.', 'seriously-simple-podcasting' ).'</em></p>'; | 
                                                                                                            
                                                            |  | 437 | +		$html .= '<p><label for="episode_embed_code_width">'.__ ( 'Width:', 'seriously-simple-podcasting' ).'</label> <input id="episode_embed_code_width" class="episode_embed_code_size_option" type="number" value="500" length="3" min="0" step="1" />     <label for="episode_embed_code_height">'.__ ( 'Height:', 'seriously-simple-podcasting' ).'</label> <input id="episode_embed_code_height" class="episode_embed_code_size_option" type="number" value="350" length="3" min="0" step="1" /></p>'; | 
                                                                                                            
                                                            |  | 438 | +		$html .= '<p><textarea readonly id="episode_embed_code">'.esc_textarea ( $embed_code ).'</textarea></p>'; | 
                                                                                                            
                                                            | 439 | 439 |   | 
                                                                                                            
                                                            | 440 | 440 |  		echo $html; | 
                                                                                                            
                                                            | 441 | 441 |  	} | 
                                                                                                                                                        
                                                        |  | @@ -444,20 +444,20 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 444 | 444 |  	 * Update the epiaode embed code via ajax | 
                                                                                                            
                                                            | 445 | 445 |  	 * @return void | 
                                                                                                            
                                                            | 446 | 446 |  	 */ | 
                                                                                                            
                                                            | 447 |  | -	public function update_episode_embed_code () { | 
                                                                                                            
                                                            |  | 447 | +	public function update_episode_embed_code() { | 
                                                                                                            
                                                            | 448 | 448 |   | 
                                                                                                            
                                                            | 449 | 449 |  		// Make sure we have a valid post ID | 
                                                                                                            
                                                            | 450 |  | -		if( empty( $_POST['post_id'] ) ) { | 
                                                                                                            
                                                            |  | 450 | +		if ( empty( $_POST[ 'post_id' ] ) ) { | 
                                                                                                            
                                                            | 451 | 451 |  			return; | 
                                                                                                            
                                                            | 452 | 452 |  		} | 
                                                                                                            
                                                            | 453 | 453 |   | 
                                                                                                            
                                                            | 454 | 454 |  		// Get info for embed code | 
                                                                                                            
                                                            | 455 |  | -		$post_id = (int) $_POST['post_id']; | 
                                                                                                            
                                                            | 456 |  | -		$width = (int) $_POST['width']; | 
                                                                                                            
                                                            | 457 |  | -		$height = (int) $_POST['height']; | 
                                                                                                            
                                                            |  | 455 | +		$post_id = (int) $_POST[ 'post_id' ]; | 
                                                                                                            
                                                            |  | 456 | +		$width = (int) $_POST[ 'width' ]; | 
                                                                                                            
                                                            |  | 457 | +		$height = (int) $_POST[ 'height' ]; | 
                                                                                                            
                                                            | 458 | 458 |   | 
                                                                                                            
                                                            | 459 | 459 |  		// Generate embed code | 
                                                                                                            
                                                            | 460 |  | -		echo get_post_embed_html( $width, $height, $post_id ); | 
                                                                                                            
                                                            |  | 460 | +		echo get_post_embed_html ( $width, $height, $post_id ); | 
                                                                                                            
                                                            | 461 | 461 |   | 
                                                                                                            
                                                            | 462 | 462 |  		// Exit after ajax request | 
                                                                                                            
                                                            | 463 | 463 |  		exit; | 
                                                                                                                                                        
                                                        |  | @@ -470,82 +470,82 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 470 | 470 |  	public function meta_box_content() { | 
                                                                                                            
                                                            | 471 | 471 |  		global $post_id; | 
                                                                                                            
                                                            | 472 | 472 |   | 
                                                                                                            
                                                            | 473 |  | -		$field_data = $this->custom_fields(); | 
                                                                                                            
                                                            |  | 473 | +		$field_data = $this->custom_fields (); | 
                                                                                                            
                                                            | 474 | 474 |   | 
                                                                                                            
                                                            | 475 | 475 |  		$html = ''; | 
                                                                                                            
                                                            | 476 | 476 |   | 
                                                                                                            
                                                            | 477 |  | -		$html .= '<input type="hidden" name="seriouslysimple_' . $this->token . '_nonce" id="seriouslysimple_' . $this->token . '_nonce" value="' . wp_create_nonce( plugin_basename( $this->dir ) ) . '" />'; | 
                                                                                                            
                                                            |  | 477 | +		$html .= '<input type="hidden" name="seriouslysimple_'.$this->token.'_nonce" id="seriouslysimple_'.$this->token.'_nonce" value="'.wp_create_nonce ( plugin_basename ( $this->dir ) ).'" />'; | 
                                                                                                            
                                                            | 478 | 478 |   | 
                                                                                                            
                                                            | 479 |  | -		if ( 0 < count( $field_data ) ) { | 
                                                                                                            
                                                            |  | 479 | +		if ( 0 < count ( $field_data ) ) { | 
                                                                                                            
                                                            | 480 | 480 |   | 
                                                                                                            
                                                            | 481 |  | -			$html .= '<input id="seriouslysimple_post_id" type="hidden" value="'. $post_id . '" />'; | 
                                                                                                            
                                                            |  | 481 | +			$html .= '<input id="seriouslysimple_post_id" type="hidden" value="'.$post_id.'" />'; | 
                                                                                                            
                                                            | 482 | 482 |   | 
                                                                                                            
                                                            | 483 | 483 |  			foreach ( $field_data as $k => $v ) { | 
                                                                                                            
                                                            | 484 |  | -				$data = $v['default']; | 
                                                                                                            
                                                            | 485 |  | -				$saved = get_post_meta( $post_id, $k, true ); | 
                                                                                                            
                                                            |  | 484 | +				$data = $v[ 'default' ]; | 
                                                                                                            
                                                            |  | 485 | +				$saved = get_post_meta ( $post_id, $k, true ); | 
                                                                                                            
                                                            | 486 | 486 |  				if ( $saved ) { | 
                                                                                                            
                                                            | 487 | 487 |  					$data = $saved; | 
                                                                                                            
                                                            | 488 | 488 |  				} | 
                                                                                                            
                                                            | 489 | 489 |   | 
                                                                                                            
                                                            | 490 | 490 |  				$class = ''; | 
                                                                                                            
                                                            | 491 |  | -				if ( isset( $v['class'] ) ) { | 
                                                                                                            
                                                            | 492 |  | -					$class = $v['class']; | 
                                                                                                            
                                                            |  | 491 | +				if ( isset( $v[ 'class' ] ) ) { | 
                                                                                                            
                                                            |  | 492 | +					$class = $v[ 'class' ]; | 
                                                                                                            
                                                            | 493 | 493 |  				} | 
                                                                                                            
                                                            | 494 | 494 |   | 
                                                                                                            
                                                            | 495 | 495 |  				$disabled = false; | 
                                                                                                            
                                                            | 496 |  | -				if ( isset( $v['disabled'] ) && $v['disabled'] ) { | 
                                                                                                            
                                                            |  | 496 | +				if ( isset( $v[ 'disabled' ] ) && $v[ 'disabled' ] ) { | 
                                                                                                            
                                                            | 497 | 497 |  					$disabled = true; | 
                                                                                                            
                                                            | 498 | 498 |  				} | 
                                                                                                            
                                                            | 499 | 499 |   | 
                                                                                                            
                                                            | 500 |  | -				switch( $v['type'] ) { | 
                                                                                                            
                                                            |  | 500 | +				switch ( $v[ 'type' ] ) { | 
                                                                                                            
                                                            | 501 | 501 |  					case 'file': | 
                                                                                                            
                                                            | 502 | 502 |  						$html .= '<p> | 
                                                                                                            
                                                            | 503 |  | -									<label class="ssp-episode-details-label" for="' . esc_attr( $k ) . '">' . $v['name'] . '</label> | 
                                                                                                            
                                                            |  | 503 | +									<label class="ssp-episode-details-label" for="' . esc_attr ( $k ).'">'.$v[ 'name' ].'</label> | 
                                                                                                            
                                                            | 504 | 504 |  									<br/> | 
                                                                                                            
                                                            | 505 |  | -									<input name="' . esc_attr( $k ) . '" type="text" id="upload_' . esc_attr( $k ) . '" value="' . esc_attr( $data ) . '" /> | 
                                                                                                            
                                                            | 506 |  | -									<input type="button" class="button" id="upload_' . esc_attr( $k ) . '_button" value="' . __( 'Upload File' , 'seriously-simple-podcasting' ) . '" data-uploader_title="' . __( 'Choose a file', 'seriously-simple-podcasting' ) . '" data-uploader_button_text="' . __( 'Insert podcast file', 'seriously-simple-podcasting' ) . '" /> | 
                                                                                                            
                                                            |  | 505 | +									<input name="' . esc_attr ( $k ).'" type="text" id="upload_'.esc_attr ( $k ).'" value="'.esc_attr ( $data ).'" /> | 
                                                                                                            
                                                            |  | 506 | +									<input type="button" class="button" id="upload_' . esc_attr ( $k ).'_button" value="'.__ ( 'Upload File', 'seriously-simple-podcasting' ).'" data-uploader_title="'.__ ( 'Choose a file', 'seriously-simple-podcasting' ).'" data-uploader_button_text="'.__ ( 'Insert podcast file', 'seriously-simple-podcasting' ).'" /> | 
                                                                                                            
                                                            | 507 | 507 |  									<br/> | 
                                                                                                            
                                                            | 508 |  | -									<span class="description">' . $v['description'] . '</span> | 
                                                                                                            
                                                            |  | 508 | +									<span class="description">' . $v[ 'description' ].'</span> | 
                                                                                                            
                                                            | 509 | 509 |  								</p>' . "\n"; | 
                                                                                                            
                                                            | 510 | 510 |  					break; | 
                                                                                                            
                                                            | 511 | 511 |   | 
                                                                                                            
                                                            | 512 | 512 |  					case 'checkbox': | 
                                                                                                            
                                                            | 513 |  | -						$html .= '<p><input name="' . esc_attr( $k ) . '" type="checkbox" class="' . esc_attr( $class ) . '" id="' . esc_attr( $k ) . '" ' . checked( 'on' , $data , false ) . ' /> <label for="' . esc_attr( $k ) . '"><span>' . $v['description'] . '</span></label></p>' . "\n"; | 
                                                                                                            
                                                            |  | 513 | +						$html .= '<p><input name="'.esc_attr ( $k ).'" type="checkbox" class="'.esc_attr ( $class ).'" id="'.esc_attr ( $k ).'" '.checked ( 'on', $data, false ).' /> <label for="'.esc_attr ( $k ).'"><span>'.$v[ 'description' ].'</span></label></p>'."\n"; | 
                                                                                                            
                                                            | 514 | 514 |  					break; | 
                                                                                                            
                                                            | 515 | 515 |   | 
                                                                                                            
                                                            | 516 | 516 |  					case 'radio': | 
                                                                                                            
                                                            | 517 | 517 |  						$html .= '<p> | 
                                                                                                            
                                                            | 518 |  | -									<span class="ssp-episode-details-label">' . $v['name'] . '</span><br/>'; | 
                                                                                                            
                                                            | 519 |  | -										foreach( $v['options'] as $option => $label ) { | 
                                                                                                            
                                                            | 520 |  | -											$html .= '<input style="vertical-align: bottom;" name="' . esc_attr( $k ) . '" type="radio" class="' . esc_attr( $class ) . '" id="' . esc_attr( $k ) . '_' . esc_attr( $option ) . '" ' . checked( $option , $data , false ) . ' value="' . esc_attr( $option ) . '" /> | 
                                                                                                            
                                                            | 521 |  | -											<label style="margin-right:10px;" for="' . esc_attr( $k ) . '_' . esc_attr( $option ) . '">' . esc_html( $label ) . '</label>' . "\n"; | 
                                                                                                            
                                                            |  | 518 | +									<span class="ssp-episode-details-label">' . $v[ 'name' ].'</span><br/>'; | 
                                                                                                            
                                                            |  | 519 | +										foreach ( $v[ 'options' ] as $option => $label ) { | 
                                                                                                            
                                                            |  | 520 | +											$html .= '<input style="vertical-align: bottom;" name="'.esc_attr ( $k ).'" type="radio" class="'.esc_attr ( $class ).'" id="'.esc_attr ( $k ).'_'.esc_attr ( $option ).'" '.checked ( $option, $data, false ).' value="'.esc_attr ( $option ).'" /> | 
                                                                                                            
                                                            |  | 521 | +											<label style="margin-right:10px;" for="' . esc_attr ( $k ).'_'.esc_attr ( $option ).'">'.esc_html ( $label ).'</label>'."\n"; | 
                                                                                                            
                                                            | 522 | 522 |  										} | 
                                                                                                            
                                                            | 523 |  | -						$html .= '<span class="description">' . $v['description'] . '</span> | 
                                                                                                            
                                                            |  | 523 | +						$html .= '<span class="description">'.$v[ 'description' ].'</span> | 
                                                                                                            
                                                            | 524 | 524 |  								</p>' . "\n"; | 
                                                                                                            
                                                            | 525 | 525 |  					break; | 
                                                                                                            
                                                            | 526 | 526 |   | 
                                                                                                            
                                                            | 527 | 527 |  					case 'datepicker': | 
                                                                                                            
                                                            | 528 | 528 |  						$display_date = ''; | 
                                                                                                            
                                                            | 529 |  | -						if( $data ) { | 
                                                                                                            
                                                            | 530 |  | -							$display_date = date( 'j F, Y', strtotime( $data ) ); | 
                                                                                                            
                                                            |  | 529 | +						if ( $data ) { | 
                                                                                                            
                                                            |  | 530 | +							$display_date = date ( 'j F, Y', strtotime ( $data ) ); | 
                                                                                                            
                                                            | 531 | 531 |  						} | 
                                                                                                            
                                                            | 532 | 532 |  						$html .= '<p class="hasDatepicker"> | 
                                                                                                            
                                                            | 533 |  | -									<label class="ssp-episode-details-label" for="' . esc_attr( $k ) . '_display">' . $v['name'] . '</label> | 
                                                                                                            
                                                            |  | 533 | +									<label class="ssp-episode-details-label" for="' . esc_attr ( $k ).'_display">'.$v[ 'name' ].'</label> | 
                                                                                                            
                                                            | 534 | 534 |  									<br/> | 
                                                                                                            
                                                            | 535 |  | -									<input type="text" id="' . esc_attr( $k ) . '_display" class="ssp-datepicker ' . esc_attr( $class ) . '" value="' . esc_attr( $display_date ) . '" /> | 
                                                                                                            
                                                            | 536 |  | -									<input name="' . esc_attr( $k ) . '" id="' . esc_attr( $k ) . '" type="hidden" value="' . esc_attr( $data ) . '" /> | 
                                                                                                            
                                                            |  | 535 | +									<input type="text" id="' . esc_attr ( $k ).'_display" class="ssp-datepicker '.esc_attr ( $class ).'" value="'.esc_attr ( $display_date ).'" /> | 
                                                                                                            
                                                            |  | 536 | +									<input name="' . esc_attr ( $k ).'" id="'.esc_attr ( $k ).'" type="hidden" value="'.esc_attr ( $data ).'" /> | 
                                                                                                            
                                                            | 537 | 537 |  									<br/> | 
                                                                                                            
                                                            | 538 |  | -									<span class="description">' . $v['description'] . '</span> | 
                                                                                                            
                                                            |  | 538 | +									<span class="description">' . $v[ 'description' ].'</span> | 
                                                                                                            
                                                            | 539 | 539 |  								</p>' . "\n"; | 
                                                                                                            
                                                            | 540 | 540 |  					break; | 
                                                                                                            
                                                            | 541 | 541 |   | 
                                                                                                            
                                                            | 542 | 542 |  					default: | 
                                                                                                            
                                                            | 543 | 543 |  						$html .= '<p> | 
                                                                                                            
                                                            | 544 |  | -									<label class="ssp-episode-details-label" for="' . esc_attr( $k ) . '">' . $v['name'] . '</label> | 
                                                                                                            
                                                            |  | 544 | +									<label class="ssp-episode-details-label" for="' . esc_attr ( $k ).'">'.$v[ 'name' ].'</label> | 
                                                                                                            
                                                            | 545 | 545 |  									<br/> | 
                                                                                                            
                                                            | 546 |  | -									<input name="' . esc_attr( $k ) . '" type="text" id="' . esc_attr( $k ) . '" class="' . esc_attr( $class ) . '" value="' . esc_attr( $data ) . '" /> | 
                                                                                                            
                                                            |  | 546 | +									<input name="' . esc_attr ( $k ).'" type="text" id="'.esc_attr ( $k ).'" class="'.esc_attr ( $class ).'" value="'.esc_attr ( $data ).'" /> | 
                                                                                                            
                                                            | 547 | 547 |  									<br/> | 
                                                                                                            
                                                            | 548 |  | -									<span class="description">' . $v['description'] . '</span> | 
                                                                                                            
                                                            |  | 548 | +									<span class="description">' . $v[ 'description' ].'</span> | 
                                                                                                            
                                                            | 549 | 549 |  								</p>' . "\n"; | 
                                                                                                            
                                                            | 550 | 550 |  					break; | 
                                                                                                            
                                                            | 551 | 551 |  				} | 
                                                                                                                                                        
                                                        |  | @@ -564,78 +564,78 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 564 | 564 |  	public function meta_box_save( $post_id ) { | 
                                                                                                            
                                                            | 565 | 565 |  		global $ss_podcasting; | 
                                                                                                            
                                                            | 566 | 566 |   | 
                                                                                                            
                                                            | 567 |  | -		$podcast_post_types = ssp_post_types( true ); | 
                                                                                                            
                                                            |  | 567 | +		$podcast_post_types = ssp_post_types ( true ); | 
                                                                                                            
                                                            | 568 | 568 |   | 
                                                                                                            
                                                            | 569 | 569 |  		// Post type check | 
                                                                                                            
                                                            | 570 |  | -		if ( ! in_array( get_post_type(), $podcast_post_types ) ) { | 
                                                                                                            
                                                            |  | 570 | +		if ( ! in_array ( get_post_type (), $podcast_post_types ) ) { | 
                                                                                                            
                                                            | 571 | 571 |  			return false; | 
                                                                                                            
                                                            | 572 | 572 |  		} | 
                                                                                                            
                                                            | 573 | 573 |   | 
                                                                                                            
                                                            | 574 | 574 |  		// Security check | 
                                                                                                            
                                                            | 575 |  | -		if ( ! isset( $_POST['seriouslysimple_' . $this->token . '_nonce'] ) || ! ( isset( $_POST['seriouslysimple_' . $this->token . '_nonce'] ) && wp_verify_nonce( $_POST['seriouslysimple_' . $this->token . '_nonce'], plugin_basename( $this->dir ) ) ) ) { | 
                                                                                                            
                                                            |  | 575 | +		if ( ! isset( $_POST[ 'seriouslysimple_'.$this->token.'_nonce' ] ) || ! ( isset( $_POST[ 'seriouslysimple_'.$this->token.'_nonce' ] ) && wp_verify_nonce ( $_POST[ 'seriouslysimple_'.$this->token.'_nonce' ], plugin_basename ( $this->dir ) ) ) ) { | 
                                                                                                            
                                                            | 576 | 576 |  			return $post_id; | 
                                                                                                            
                                                            | 577 | 577 |  		} | 
                                                                                                            
                                                            | 578 | 578 |   | 
                                                                                                            
                                                            | 579 | 579 |  		// User capability check | 
                                                                                                            
                                                            | 580 |  | -		if ( 'page' == $_POST['post_type'] ) { | 
                                                                                                            
                                                            | 581 |  | -			if ( ! current_user_can( 'edit_page', $post_id ) ) { | 
                                                                                                            
                                                            |  | 580 | +		if ( 'page' == $_POST[ 'post_type' ] ) { | 
                                                                                                            
                                                            |  | 581 | +			if ( ! current_user_can ( 'edit_page', $post_id ) ) { | 
                                                                                                            
                                                            | 582 | 582 |  				return $post_id; | 
                                                                                                            
                                                            | 583 | 583 |  			} | 
                                                                                                            
                                                            | 584 | 584 |  		} else { | 
                                                                                                            
                                                            | 585 |  | -			if ( ! current_user_can( 'edit_post', $post_id ) ) { | 
                                                                                                            
                                                            |  | 585 | +			if ( ! current_user_can ( 'edit_post', $post_id ) ) { | 
                                                                                                            
                                                            | 586 | 586 |  				return $post_id; | 
                                                                                                            
                                                            | 587 | 587 |  			} | 
                                                                                                            
                                                            | 588 | 588 |  		} | 
                                                                                                            
                                                            | 589 | 589 |   | 
                                                                                                            
                                                            | 590 |  | -		$field_data = $this->custom_fields(); | 
                                                                                                            
                                                            |  | 590 | +		$field_data = $this->custom_fields (); | 
                                                                                                            
                                                            | 591 | 591 |  		$enclosure = ''; | 
                                                                                                            
                                                            | 592 | 592 |   | 
                                                                                                            
                                                            | 593 | 593 |  		foreach ( $field_data as $k => $field ) { | 
                                                                                                            
                                                            | 594 | 594 |   | 
                                                                                                            
                                                            | 595 |  | -			if( 'embed_code' == $k ) { | 
                                                                                                            
                                                            |  | 595 | +			if ( 'embed_code' == $k ) { | 
                                                                                                            
                                                            | 596 | 596 |  				continue; | 
                                                                                                            
                                                            | 597 | 597 |  			} | 
                                                                                                            
                                                            | 598 | 598 |   | 
                                                                                                            
                                                            | 599 | 599 |  			$val = ''; | 
                                                                                                            
                                                            | 600 | 600 |  			if ( isset( $_POST[ $k ] ) ) { | 
                                                                                                            
                                                            | 601 |  | -				$val = strip_tags( trim( $_POST[ $k ] ) ); | 
                                                                                                            
                                                            |  | 601 | +				$val = strip_tags ( trim ( $_POST[ $k ] ) ); | 
                                                                                                            
                                                            | 602 | 602 |  			} | 
                                                                                                            
                                                            | 603 | 603 |   | 
                                                                                                            
                                                            | 604 | 604 |  			if ( $k == 'audio_file' ) { | 
                                                                                                            
                                                            | 605 | 605 |  				$enclosure = $val; | 
                                                                                                            
                                                            | 606 | 606 |  			} | 
                                                                                                            
                                                            | 607 | 607 |   | 
                                                                                                            
                                                            | 608 |  | -			update_post_meta( $post_id, $k, $val ); | 
                                                                                                            
                                                            |  | 608 | +			update_post_meta ( $post_id, $k, $val ); | 
                                                                                                            
                                                            | 609 | 609 |  		} | 
                                                                                                            
                                                            | 610 | 610 |   | 
                                                                                                            
                                                            | 611 | 611 |  		if ( $enclosure ) { | 
                                                                                                            
                                                            | 612 | 612 |   | 
                                                                                                            
                                                            | 613 | 613 |  			// Get file duration | 
                                                                                                            
                                                            | 614 |  | -			if ( get_post_meta( $post_id, 'duration', true ) == '' ) { | 
                                                                                                            
                                                            | 615 |  | -				$duration = $ss_podcasting->get_file_duration( $enclosure ); | 
                                                                                                            
                                                            |  | 614 | +			if ( get_post_meta ( $post_id, 'duration', true ) == '' ) { | 
                                                                                                            
                                                            |  | 615 | +				$duration = $ss_podcasting->get_file_duration ( $enclosure ); | 
                                                                                                            
                                                            | 616 | 616 |  				if ( $duration ) { | 
                                                                                                            
                                                            | 617 |  | -					update_post_meta( $post_id , 'duration' , $duration ); | 
                                                                                                            
                                                            |  | 617 | +					update_post_meta ( $post_id, 'duration', $duration ); | 
                                                                                                            
                                                            | 618 | 618 |  				} | 
                                                                                                            
                                                            | 619 | 619 |  			} | 
                                                                                                            
                                                            | 620 | 620 |   | 
                                                                                                            
                                                            | 621 | 621 |  			// Get file size | 
                                                                                                            
                                                            | 622 |  | -			if ( get_post_meta( $post_id, 'filesize', true ) == '' ) { | 
                                                                                                            
                                                            | 623 |  | -				$filesize = $ss_podcasting->get_file_size( $enclosure ); | 
                                                                                                            
                                                            |  | 622 | +			if ( get_post_meta ( $post_id, 'filesize', true ) == '' ) { | 
                                                                                                            
                                                            |  | 623 | +				$filesize = $ss_podcasting->get_file_size ( $enclosure ); | 
                                                                                                            
                                                            | 624 | 624 |  				if ( $filesize ) { | 
                                                                                                            
                                                            | 625 | 625 |   | 
                                                                                                            
                                                            | 626 |  | -					if ( isset( $filesize['formatted'] ) ) { | 
                                                                                                            
                                                            | 627 |  | -						update_post_meta( $post_id, 'filesize', $filesize['formatted'] ); | 
                                                                                                            
                                                            |  | 626 | +					if ( isset( $filesize[ 'formatted' ] ) ) { | 
                                                                                                            
                                                            |  | 627 | +						update_post_meta ( $post_id, 'filesize', $filesize[ 'formatted' ] ); | 
                                                                                                            
                                                            | 628 | 628 |  					} | 
                                                                                                            
                                                            | 629 | 629 |   | 
                                                                                                            
                                                            | 630 |  | -					if ( isset( $filesize['raw'] ) ) { | 
                                                                                                            
                                                            | 631 |  | -						update_post_meta( $post_id, 'filesize_raw', $filesize['raw'] ); | 
                                                                                                            
                                                            |  | 630 | +					if ( isset( $filesize[ 'raw' ] ) ) { | 
                                                                                                            
                                                            |  | 631 | +						update_post_meta ( $post_id, 'filesize_raw', $filesize[ 'raw' ] ); | 
                                                                                                            
                                                            | 632 | 632 |  					} | 
                                                                                                            
                                                            | 633 | 633 |   | 
                                                                                                            
                                                            | 634 | 634 |  				} | 
                                                                                                            
                                                            | 635 | 635 |  			} | 
                                                                                                            
                                                            | 636 | 636 |   | 
                                                                                                            
                                                            | 637 | 637 |  			// Save podcast file to 'enclosure' meta field for standards-sake | 
                                                                                                            
                                                            | 638 |  | -			update_post_meta( $post_id, 'enclosure', $enclosure ); | 
                                                                                                            
                                                            |  | 638 | +			update_post_meta ( $post_id, 'enclosure', $enclosure ); | 
                                                                                                            
                                                            | 639 | 639 |   | 
                                                                                                            
                                                            | 640 | 640 |  		} | 
                                                                                                            
                                                            | 641 | 641 |   | 
                                                                                                                                                        
                                                        |  | @@ -649,72 +649,72 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 649 | 649 |  		global $pagenow; | 
                                                                                                            
                                                            | 650 | 650 |  		$fields = array(); | 
                                                                                                            
                                                            | 651 | 651 |   | 
                                                                                                            
                                                            | 652 |  | -		$fields['episode_type'] = array( | 
                                                                                                            
                                                            | 653 |  | -			'name' => __( 'Episode type:' , 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 652 | +		$fields[ 'episode_type' ] = array( | 
                                                                                                            
                                                            |  | 653 | +			'name' => __ ( 'Episode type:', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 654 | 654 |  		    'description' => '', | 
                                                                                                            
                                                            | 655 | 655 |  		    'type' => 'radio', | 
                                                                                                            
                                                            | 656 | 656 |  		    'default' => 'audio', | 
                                                                                                            
                                                            | 657 |  | -		    'options' => array( 'audio' => __( 'Audio', 'seriously-simple-podcasting' ), 'video' => __( 'Video', 'seriously-simple-podcasting' ) ), | 
                                                                                                            
                                                            |  | 657 | +		    'options' => array( 'audio' => __ ( 'Audio', 'seriously-simple-podcasting' ), 'video' => __ ( 'Video', 'seriously-simple-podcasting' ) ), | 
                                                                                                            
                                                            | 658 | 658 |  		    'section' => 'info', | 
                                                                                                            
                                                            | 659 |  | -		    'meta_description' => __( 'The type of podcast episode - either Audio or Video', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 659 | +		    'meta_description' => __ ( 'The type of podcast episode - either Audio or Video', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 660 | 660 |  		); | 
                                                                                                            
                                                            | 661 | 661 |   | 
                                                                                                            
                                                            | 662 | 662 |  		// In v1.14+ the `audio_file` field can actually be either audio or video, but we're keeping the field name here for backwards compatibility | 
                                                                                                            
                                                            | 663 |  | -		$fields['audio_file'] = array( | 
                                                                                                            
                                                            | 664 |  | -		    'name' => __( 'Podcast file:' , 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 665 |  | -		    'description' => __( 'Upload the primary podcast file or paste the file URL here.' , 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 663 | +		$fields[ 'audio_file' ] = array( | 
                                                                                                            
                                                            |  | 664 | +		    'name' => __ ( 'Podcast file:', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 665 | +		    'description' => __ ( 'Upload the primary podcast file or paste the file URL here.', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 666 | 666 |  		    'type' => 'file', | 
                                                                                                            
                                                            | 667 | 667 |  		    'default' => '', | 
                                                                                                            
                                                            | 668 | 668 |  		    'section' => 'info', | 
                                                                                                            
                                                            | 669 |  | -		    'meta_description' => __( 'The full URL for the podcast episode media file.', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 669 | +		    'meta_description' => __ ( 'The full URL for the podcast episode media file.', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 670 | 670 |  		); | 
                                                                                                            
                                                            | 671 | 671 |   | 
                                                                                                            
                                                            | 672 |  | -		$fields['duration'] = array( | 
                                                                                                            
                                                            | 673 |  | -		    'name' => __( 'Duration:' , 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 674 |  | -		    'description' => __( 'Duration of podcast file for display (calculated automatically if possible).' , 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 672 | +		$fields[ 'duration' ] = array( | 
                                                                                                            
                                                            |  | 673 | +		    'name' => __ ( 'Duration:', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 674 | +		    'description' => __ ( 'Duration of podcast file for display (calculated automatically if possible).', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 675 | 675 |  		    'type' => 'text', | 
                                                                                                            
                                                            | 676 | 676 |  		    'default' => '', | 
                                                                                                            
                                                            | 677 | 677 |  		    'section' => 'info', | 
                                                                                                            
                                                            | 678 |  | -		    'meta_description' => __( 'The duration of the file for display purposes.', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 678 | +		    'meta_description' => __ ( 'The duration of the file for display purposes.', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 679 | 679 |  		); | 
                                                                                                            
                                                            | 680 | 680 |   | 
                                                                                                            
                                                            | 681 |  | -		$fields['filesize'] = array( | 
                                                                                                            
                                                            | 682 |  | -		    'name' => __( 'File size:' , 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 683 |  | -		    'description' => __( 'Size of the podcast file for display (calculated automatically if possible).' , 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 681 | +		$fields[ 'filesize' ] = array( | 
                                                                                                            
                                                            |  | 682 | +		    'name' => __ ( 'File size:', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 683 | +		    'description' => __ ( 'Size of the podcast file for display (calculated automatically if possible).', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 684 | 684 |  		    'type' => 'text', | 
                                                                                                            
                                                            | 685 | 685 |  		    'default' => '', | 
                                                                                                            
                                                            | 686 | 686 |  		    'section' => 'info', | 
                                                                                                            
                                                            | 687 |  | -		    'meta_description' => __( 'The size of the podcast episode for display purposes.', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 687 | +		    'meta_description' => __ ( 'The size of the podcast episode for display purposes.', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 688 | 688 |  		); | 
                                                                                                            
                                                            | 689 | 689 |   | 
                                                                                                            
                                                            | 690 |  | -		$fields['date_recorded'] = array( | 
                                                                                                            
                                                            | 691 |  | -		    'name' => __( 'Date recorded:' , 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 692 |  | -		    'description' => __( 'The date on which this episode was recorded.' , 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 690 | +		$fields[ 'date_recorded' ] = array( | 
                                                                                                            
                                                            |  | 691 | +		    'name' => __ ( 'Date recorded:', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 692 | +		    'description' => __ ( 'The date on which this episode was recorded.', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 693 | 693 |  		    'type' => 'datepicker', | 
                                                                                                            
                                                            | 694 | 694 |  		    'default' => '', | 
                                                                                                            
                                                            | 695 | 695 |  		    'section' => 'info', | 
                                                                                                            
                                                            | 696 |  | -		    'meta_description' => __( 'The date on which the podcast episode was recorded.', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 696 | +		    'meta_description' => __ ( 'The date on which the podcast episode was recorded.', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 697 | 697 |  		); | 
                                                                                                            
                                                            | 698 | 698 |   | 
                                                                                                            
                                                            | 699 |  | -		$fields['explicit'] = array( | 
                                                                                                            
                                                            | 700 |  | -		    'name' => __( 'Explicit:' , 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 701 |  | -		    'description' => __( 'Mark this episode as explicit.' , 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 699 | +		$fields[ 'explicit' ] = array( | 
                                                                                                            
                                                            |  | 700 | +		    'name' => __ ( 'Explicit:', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 701 | +		    'description' => __ ( 'Mark this episode as explicit.', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 702 | 702 |  		    'type' => 'checkbox', | 
                                                                                                            
                                                            | 703 | 703 |  		    'default' => '', | 
                                                                                                            
                                                            | 704 | 704 |  		    'section' => 'info', | 
                                                                                                            
                                                            | 705 |  | -		    'meta_description' => __( 'Indicates whether the episode is explicit or not.', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 705 | +		    'meta_description' => __ ( 'Indicates whether the episode is explicit or not.', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 706 | 706 |  		); | 
                                                                                                            
                                                            | 707 | 707 |   | 
                                                                                                            
                                                            | 708 |  | -		$fields['block'] = array( | 
                                                                                                            
                                                            | 709 |  | -		    'name' => __( 'Block:' , 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 710 |  | -		    'description' => __( 'Block this episode from appearing in the iTunes & Google Play podcast libraries.' , 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 708 | +		$fields[ 'block' ] = array( | 
                                                                                                            
                                                            |  | 709 | +		    'name' => __ ( 'Block:', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 710 | +		    'description' => __ ( 'Block this episode from appearing in the iTunes & Google Play podcast libraries.', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 711 | 711 |  		    'type' => 'checkbox', | 
                                                                                                            
                                                            | 712 | 712 |  		    'default' => '', | 
                                                                                                            
                                                            | 713 | 713 |  		    'section' => 'info', | 
                                                                                                            
                                                            | 714 |  | -		    'meta_description' => __( 'Indicates whether this specific episode should be blocked from the iTunes and Google Play Podcast libraries.', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            |  | 714 | +		    'meta_description' => __ ( 'Indicates whether this specific episode should be blocked from the iTunes and Google Play Podcast libraries.', 'seriously-simple-podcasting' ), | 
                                                                                                            
                                                            | 715 | 715 |  		); | 
                                                                                                            
                                                            | 716 | 716 |   | 
                                                                                                            
                                                            | 717 |  | -		return apply_filters( 'ssp_episode_fields', $fields ); | 
                                                                                                            
                                                            |  | 717 | +		return apply_filters ( 'ssp_episode_fields', $fields ); | 
                                                                                                            
                                                            | 718 | 718 |  	} | 
                                                                                                            
                                                            | 719 | 719 |   | 
                                                                                                            
                                                            | 720 | 720 |  	/** | 
                                                                                                                                                        
                                                        |  | @@ -724,17 +724,17 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 724 | 724 |  	 */ | 
                                                                                                            
                                                            | 725 | 725 |  	public function glance_items( $items = array() ) { | 
                                                                                                            
                                                            | 726 | 726 |   | 
                                                                                                            
                                                            | 727 |  | -		$num_posts = count( ssp_episodes( -1, '', false, 'glance' ) ); | 
                                                                                                            
                                                            |  | 727 | +		$num_posts = count ( ssp_episodes ( -1, '', false, 'glance' ) ); | 
                                                                                                            
                                                            | 728 | 728 |   | 
                                                                                                            
                                                            | 729 |  | -		$post_type_object = get_post_type_object( $this->token ); | 
                                                                                                            
                                                            |  | 729 | +		$post_type_object = get_post_type_object ( $this->token ); | 
                                                                                                            
                                                            | 730 | 730 |   | 
                                                                                                            
                                                            | 731 |  | -		$text = _n( '%s Episode', '%s Episodes', $num_posts, 'seriously-simple-podcasting' ); | 
                                                                                                            
                                                            | 732 |  | -		$text = sprintf( $text, number_format_i18n( $num_posts ) ); | 
                                                                                                            
                                                            |  | 731 | +		$text = _n ( '%s Episode', '%s Episodes', $num_posts, 'seriously-simple-podcasting' ); | 
                                                                                                            
                                                            |  | 732 | +		$text = sprintf ( $text, number_format_i18n ( $num_posts ) ); | 
                                                                                                            
                                                            | 733 | 733 |   | 
                                                                                                            
                                                            | 734 |  | -		if ( $post_type_object && current_user_can( $post_type_object->cap->edit_posts ) ) { | 
                                                                                                            
                                                            | 735 |  | -			$items[] = sprintf( '<a class="%1$s-count" href="edit.php?post_type=%1$s">%2$s</a>', $this->token, $text ) . "\n"; | 
                                                                                                            
                                                            |  | 734 | +		if ( $post_type_object && current_user_can ( $post_type_object->cap->edit_posts ) ) { | 
                                                                                                            
                                                            |  | 735 | +			$items[ ] = sprintf ( '<a class="%1$s-count" href="edit.php?post_type=%1$s">%2$s</a>', $this->token, $text )."\n"; | 
                                                                                                            
                                                            | 736 | 736 |  		} else { | 
                                                                                                            
                                                            | 737 |  | -			$items[] = sprintf( '<span class="%1$s-count">%2$s</span>', $this->token, $text ) . "\n"; | 
                                                                                                            
                                                            |  | 737 | +			$items[ ] = sprintf ( '<span class="%1$s-count">%2$s</span>', $this->token, $text )."\n"; | 
                                                                                                            
                                                            | 738 | 738 |  		} | 
                                                                                                            
                                                            | 739 | 739 |   | 
                                                                                                            
                                                            | 740 | 740 |  		return $items; | 
                                                                                                                                                        
                                                        |  | @@ -748,15 +748,15 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 748 | 748 |  	 * @param  string $status      Plugin status | 
                                                                                                            
                                                            | 749 | 749 |  	 * @return array               Modified plugin meta links | 
                                                                                                            
                                                            | 750 | 750 |  	 */ | 
                                                                                                            
                                                            | 751 |  | -	public function plugin_row_meta ( $plugin_meta = array(), $plugin_file = '', $plugin_data = array(), $status = '' ) { | 
                                                                                                            
                                                            |  | 751 | +	public function plugin_row_meta( $plugin_meta = array(), $plugin_file = '', $plugin_data = array(), $status = '' ) { | 
                                                                                                            
                                                            | 752 | 752 |   | 
                                                                                                            
                                                            | 753 |  | -		if ( ! isset( $plugin_data['slug'] ) || 'seriously-simple-podcasting' != $plugin_data['slug'] ) { | 
                                                                                                            
                                                            |  | 753 | +		if ( ! isset( $plugin_data[ 'slug' ] ) || 'seriously-simple-podcasting' != $plugin_data[ 'slug' ] ) { | 
                                                                                                            
                                                            | 754 | 754 |  			return $plugin_meta; | 
                                                                                                            
                                                            | 755 | 755 |  		} | 
                                                                                                            
                                                            | 756 | 756 |   | 
                                                                                                            
                                                            | 757 |  | -		$plugin_meta['docs'] = '<a href="http://www.seriouslysimplepodcasting.com/documentation/" target="_blank">' . __( 'Documentation', 'seriously-simple-podcasting' ) . '</a>'; | 
                                                                                                            
                                                            | 758 |  | -		$plugin_meta['addons'] = '<a href="http://www.seriouslysimplepodcasting.com/add-ons/" target="_blank">' . __( 'Add-ons', 'seriously-simple-podcasting' ) . '</a>'; | 
                                                                                                            
                                                            | 759 |  | -		$plugin_meta['review'] = '<a href="https://wordpress.org/support/view/plugin-reviews/' . $plugin_data['slug'] . '?rate=5#postform" target="_blank">' . __( 'Write a review', 'seriously-simple-podcasting' ) . '</a>'; | 
                                                                                                            
                                                            |  | 757 | +		$plugin_meta[ 'docs' ] = '<a href="http://www.seriouslysimplepodcasting.com/documentation/" target="_blank">'.__ ( 'Documentation', 'seriously-simple-podcasting' ).'</a>'; | 
                                                                                                            
                                                            |  | 758 | +		$plugin_meta[ 'addons' ] = '<a href="http://www.seriouslysimplepodcasting.com/add-ons/" target="_blank">'.__ ( 'Add-ons', 'seriously-simple-podcasting' ).'</a>'; | 
                                                                                                            
                                                            |  | 759 | +		$plugin_meta[ 'review' ] = '<a href="https://wordpress.org/support/view/plugin-reviews/'.$plugin_data[ 'slug' ].'?rate=5#postform" target="_blank">'.__ ( 'Write a review', 'seriously-simple-podcasting' ).'</a>'; | 
                                                                                                            
                                                            | 760 | 760 |   | 
                                                                                                            
                                                            | 761 | 761 |  		return $plugin_meta; | 
                                                                                                            
                                                            | 762 | 762 |  	} | 
                                                                                                                                                        
                                                        |  | @@ -767,8 +767,8 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 767 | 767 |  	 * @return string        Modified text | 
                                                                                                            
                                                            | 768 | 768 |  	 */ | 
                                                                                                            
                                                            | 769 | 769 |  	public function enter_title_here( $title ) { | 
                                                                                                            
                                                            | 770 |  | -		if ( get_post_type() == $this->token ) { | 
                                                                                                            
                                                            | 771 |  | -			$title = __( 'Enter episode title here', 'seriously-simple-podcasting' ); | 
                                                                                                            
                                                            |  | 770 | +		if ( get_post_type () == $this->token ) { | 
                                                                                                            
                                                            |  | 771 | +			$title = __ ( 'Enter episode title here', 'seriously-simple-podcasting' ); | 
                                                                                                            
                                                            | 772 | 772 |  		} | 
                                                                                                            
                                                            | 773 | 773 |  		return $title; | 
                                                                                                            
                                                            | 774 | 774 |  	} | 
                                                                                                                                                        
                                                        |  | @@ -778,11 +778,11 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 778 | 778 |  	 * @return void | 
                                                                                                            
                                                            | 779 | 779 |  	 */ | 
                                                                                                            
                                                            | 780 | 780 |  	public function enqueue_admin_styles() { | 
                                                                                                            
                                                            | 781 |  | -		wp_register_style( 'ssp-admin', esc_url( $this->assets_url . 'css/admin.css' ), array(), $this->version ); | 
                                                                                                            
                                                            | 782 |  | -		wp_enqueue_style( 'ssp-admin' ); | 
                                                                                                            
                                                            |  | 781 | +		wp_register_style ( 'ssp-admin', esc_url ( $this->assets_url.'css/admin.css' ), array(), $this->version ); | 
                                                                                                            
                                                            |  | 782 | +		wp_enqueue_style ( 'ssp-admin' ); | 
                                                                                                            
                                                            | 783 | 783 |   | 
                                                                                                            
                                                            | 784 | 784 |  		// Datepicker | 
                                                                                                            
                                                            | 785 |  | -		wp_enqueue_style( 'jquery-ui-datepicker', '//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css' ); | 
                                                                                                            
                                                            |  | 785 | +		wp_enqueue_style ( 'jquery-ui-datepicker', '//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css' ); | 
                                                                                                            
                                                            | 786 | 786 |  	} | 
                                                                                                            
                                                            | 787 | 787 |   | 
                                                                                                            
                                                            | 788 | 788 |  	/** | 
                                                                                                                                                        
                                                        |  | @@ -790,8 +790,8 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 790 | 790 |  	 * @return void | 
                                                                                                            
                                                            | 791 | 791 |  	 */ | 
                                                                                                            
                                                            | 792 | 792 |  	public function enqueue_admin_scripts() { | 
                                                                                                            
                                                            | 793 |  | -		wp_register_script( 'ssp-admin', esc_url( $this->assets_url . 'js/admin' . $this->script_suffix . '.js' ), array( 'jquery', 'jquery-ui-core', 'jquery-ui-datepicker' ), $this->version ); | 
                                                                                                            
                                                            | 794 |  | -		wp_enqueue_script( 'ssp-admin' ); | 
                                                                                                            
                                                            |  | 793 | +		wp_register_script ( 'ssp-admin', esc_url ( $this->assets_url.'js/admin'.$this->script_suffix.'.js' ), array( 'jquery', 'jquery-ui-core', 'jquery-ui-datepicker' ), $this->version ); | 
                                                                                                            
                                                            |  | 794 | +		wp_enqueue_script ( 'ssp-admin' ); | 
                                                                                                            
                                                            | 795 | 795 |  	} | 
                                                                                                            
                                                            | 796 | 796 |   | 
                                                                                                            
                                                            | 797 | 797 |  	/** | 
                                                                                                                                                        
                                                        |  | @@ -799,8 +799,8 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 799 | 799 |  	 * @return void | 
                                                                                                            
                                                            | 800 | 800 |  	 */ | 
                                                                                                            
                                                            | 801 | 801 |  	public function ensure_post_thumbnails_support() { | 
                                                                                                            
                                                            | 802 |  | -		if ( ! current_theme_supports( 'post-thumbnails' ) ) { | 
                                                                                                            
                                                            | 803 |  | -			add_theme_support( 'post-thumbnails' ); | 
                                                                                                            
                                                            |  | 802 | +		if ( ! current_theme_supports ( 'post-thumbnails' ) ) { | 
                                                                                                            
                                                            |  | 803 | +			add_theme_support ( 'post-thumbnails' ); | 
                                                                                                            
                                                            | 804 | 804 |  		} | 
                                                                                                            
                                                            | 805 | 805 |  	} | 
                                                                                                            
                                                            | 806 | 806 |   | 
                                                                                                                                                        
                                                        |  | @@ -809,7 +809,7 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 809 | 809 |  	 * @return void | 
                                                                                                            
                                                            | 810 | 810 |  	 */ | 
                                                                                                            
                                                            | 811 | 811 |  	public function load_localisation() { | 
                                                                                                            
                                                            | 812 |  | -		load_plugin_textdomain( 'seriously-simple-podcasting', false, dirname( plugin_basename( $this->file ) ) . '/lang/' ); | 
                                                                                                            
                                                            |  | 812 | +		load_plugin_textdomain ( 'seriously-simple-podcasting', false, dirname ( plugin_basename ( $this->file ) ).'/lang/' ); | 
                                                                                                            
                                                            | 813 | 813 |  	} | 
                                                                                                            
                                                            | 814 | 814 |   | 
                                                                                                            
                                                            | 815 | 815 |  	/** | 
                                                                                                                                                        
                                                        |  | @@ -819,10 +819,10 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 819 | 819 |  	public function load_plugin_textdomain() { | 
                                                                                                            
                                                            | 820 | 820 |  	    $domain = 'seriously-simple-podcasting'; | 
                                                                                                            
                                                            | 821 | 821 |  	    // The "plugin_locale" filter is also used in load_plugin_textdomain() | 
                                                                                                            
                                                            | 822 |  | -	    $locale = apply_filters( 'plugin_locale', get_locale(), $domain ); | 
                                                                                                            
                                                            |  | 822 | +	    $locale = apply_filters ( 'plugin_locale', get_locale (), $domain ); | 
                                                                                                            
                                                            | 823 | 823 |   | 
                                                                                                            
                                                            | 824 |  | -	    load_textdomain( $domain, WP_LANG_DIR . '/' . $domain . '/' . $domain . '-' . $locale . '.mo' ); | 
                                                                                                            
                                                            | 825 |  | -	    load_plugin_textdomain( $domain, false, dirname( plugin_basename( $this->file ) ) . '/lang/' ); | 
                                                                                                            
                                                            |  | 824 | +	    load_textdomain ( $domain, WP_LANG_DIR.'/'.$domain.'/'.$domain.'-'.$locale.'.mo' ); | 
                                                                                                            
                                                            |  | 825 | +	    load_plugin_textdomain ( $domain, false, dirname ( plugin_basename ( $this->file ) ).'/lang/' ); | 
                                                                                                            
                                                            | 826 | 826 |  	} | 
                                                                                                            
                                                            | 827 | 827 |   | 
                                                                                                            
                                                            | 828 | 828 |      /** | 
                                                                                                                                                        
                                                        |  | @@ -830,8 +830,8 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 830 | 830 |       * @return void | 
                                                                                                            
                                                            | 831 | 831 |       */ | 
                                                                                                            
                                                            | 832 | 832 |      public function add_feed() { | 
                                                                                                            
                                                            | 833 |  | -    	$feed_slug = apply_filters( 'ssp_feed_slug', $this->token ); | 
                                                                                                            
                                                            | 834 |  | -		add_feed( $feed_slug, array( $this, 'feed_template' ) ); | 
                                                                                                            
                                                            |  | 833 | +    	$feed_slug = apply_filters ( 'ssp_feed_slug', $this->token ); | 
                                                                                                            
                                                            |  | 834 | +		add_feed ( $feed_slug, array( $this, 'feed_template' ) ); | 
                                                                                                            
                                                            | 835 | 835 |  	} | 
                                                                                                            
                                                            | 836 | 836 |   | 
                                                                                                            
                                                            | 837 | 837 |  	/** | 
                                                                                                                                                        
                                                        |  | @@ -839,9 +839,9 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 839 | 839 |  	 * @param  boolean $include_footer Default inclusion value | 
                                                                                                            
                                                            | 840 | 840 |  	 * @return boolean                 Modified inclusion value | 
                                                                                                            
                                                            | 841 | 841 |  	 */ | 
                                                                                                            
                                                            | 842 |  | -	public function hide_wp_seo_rss_footer ( $include_footer = true ) { | 
                                                                                                            
                                                            |  | 842 | +	public function hide_wp_seo_rss_footer( $include_footer = true ) { | 
                                                                                                            
                                                            | 843 | 843 |   | 
                                                                                                            
                                                            | 844 |  | -		if ( is_feed( 'podcast' ) ) { | 
                                                                                                            
                                                            |  | 844 | +		if ( is_feed ( 'podcast' ) ) { | 
                                                                                                            
                                                            | 845 | 845 |  			$include_footer = false; | 
                                                                                                            
                                                            | 846 | 846 |  		} | 
                                                                                                            
                                                            | 847 | 847 |   | 
                                                                                                                                                        
                                                        |  | @@ -857,24 +857,24 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 857 | 857 |   | 
                                                                                                            
                                                            | 858 | 858 |      	// Prevent 404 on feed | 
                                                                                                            
                                                            | 859 | 859 |      	$wp_query->is_404 = false; | 
                                                                                                            
                                                            | 860 |  | -    	status_header( 200 ); | 
                                                                                                            
                                                            |  | 860 | +    	status_header ( 200 ); | 
                                                                                                            
                                                            | 861 | 861 |   | 
                                                                                                            
                                                            | 862 | 862 |      	$file_name = 'feed-podcast.php'; | 
                                                                                                            
                                                            | 863 | 863 |   | 
                                                                                                            
                                                            | 864 |  | -    	$user_template_file = apply_filters( 'ssp_feed_template_file', trailingslashit( get_stylesheet_directory() ) . $file_name ); | 
                                                                                                            
                                                            |  | 864 | +    	$user_template_file = apply_filters ( 'ssp_feed_template_file', trailingslashit ( get_stylesheet_directory () ).$file_name ); | 
                                                                                                            
                                                            | 865 | 865 |   | 
                                                                                                            
                                                            | 866 | 866 |  		// Any functions hooked in here must NOT output any data or else feed will break | 
                                                                                                            
                                                            | 867 |  | -		do_action( 'ssp_before_feed' ); | 
                                                                                                            
                                                            |  | 867 | +		do_action ( 'ssp_before_feed' ); | 
                                                                                                            
                                                            | 868 | 868 |   | 
                                                                                                            
                                                            | 869 | 869 |      	// Load user feed template if it exists, otherwise use plugin template | 
                                                                                                            
                                                            | 870 |  | -    	if ( file_exists( $user_template_file ) ) { | 
                                                                                                            
                                                            |  | 870 | +    	if ( file_exists ( $user_template_file ) ) { | 
                                                                                                            
                                                            | 871 | 871 |      		require( $user_template_file ); | 
                                                                                                            
                                                            | 872 | 872 |      	} else { | 
                                                                                                            
                                                            | 873 |  | -    		require( $this->template_path . $file_name ); | 
                                                                                                            
                                                            |  | 873 | +    		require( $this->template_path.$file_name ); | 
                                                                                                            
                                                            | 874 | 874 |      	} | 
                                                                                                            
                                                            | 875 | 875 |   | 
                                                                                                            
                                                            | 876 | 876 |      	// Any functions hooked in here must NOT output any data or else feed will break | 
                                                                                                            
                                                            | 877 |  | -    	do_action( 'ssp_after_feed' ); | 
                                                                                                            
                                                            |  | 877 | +    	do_action ( 'ssp_after_feed' ); | 
                                                                                                            
                                                            | 878 | 878 |   | 
                                                                                                            
                                                            | 879 | 879 |      	exit; | 
                                                                                                            
                                                            | 880 | 880 |  	} | 
                                                                                                                                                        
                                                        |  | @@ -884,8 +884,8 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 884 | 884 |  	 * @return void | 
                                                                                                            
                                                            | 885 | 885 |  	 */ | 
                                                                                                            
                                                            | 886 | 886 |  	public function redirect_old_feed() { | 
                                                                                                            
                                                            | 887 |  | -		if ( isset( $_GET['feed'] ) && in_array( $_GET['feed'], array( 'podcast', 'itunes' ) ) ) { | 
                                                                                                            
                                                            | 888 |  | -			$this->feed_template(); | 
                                                                                                            
                                                            |  | 887 | +		if ( isset( $_GET[ 'feed' ] ) && in_array ( $_GET[ 'feed' ], array( 'podcast', 'itunes' ) ) ) { | 
                                                                                                            
                                                            |  | 888 | +			$this->feed_template (); | 
                                                                                                            
                                                            | 889 | 889 |  			exit; | 
                                                                                                            
                                                            | 890 | 890 |  		} | 
                                                                                                            
                                                            | 891 | 891 |  	} | 
                                                                                                                                                        
                                                        |  | @@ -897,12 +897,12 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 897 | 897 |  	public function activate() { | 
                                                                                                            
                                                            | 898 | 898 |   | 
                                                                                                            
                                                            | 899 | 899 |  		// Setup all custom URL rules | 
                                                                                                            
                                                            | 900 |  | -		$this->register_post_type(); | 
                                                                                                            
                                                            | 901 |  | -		$this->add_feed(); | 
                                                                                                            
                                                            | 902 |  | -		$this->setup_permastruct(); | 
                                                                                                            
                                                            |  | 900 | +		$this->register_post_type (); | 
                                                                                                            
                                                            |  | 901 | +		$this->add_feed (); | 
                                                                                                            
                                                            |  | 902 | +		$this->setup_permastruct (); | 
                                                                                                            
                                                            | 903 | 903 |   | 
                                                                                                            
                                                            | 904 | 904 |  		// Flush permalinks | 
                                                                                                            
                                                            | 905 |  | -		flush_rewrite_rules( true ); | 
                                                                                                            
                                                            |  | 905 | +		flush_rewrite_rules ( true ); | 
                                                                                                            
                                                            | 906 | 906 |  	} | 
                                                                                                            
                                                            | 907 | 907 |   | 
                                                                                                            
                                                            | 908 | 908 |  	/** | 
                                                                                                                                                        
                                                        |  | @@ -910,37 +910,37 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 910 | 910 |  	 * @return void | 
                                                                                                            
                                                            | 911 | 911 |  	 */ | 
                                                                                                            
                                                            | 912 | 912 |  	public function deactivate() { | 
                                                                                                            
                                                            | 913 |  | -		flush_rewrite_rules(); | 
                                                                                                            
                                                            |  | 913 | +		flush_rewrite_rules (); | 
                                                                                                            
                                                            | 914 | 914 |  	} | 
                                                                                                            
                                                            | 915 | 915 |   | 
                                                                                                            
                                                            | 916 | 916 |  	/** | 
                                                                                                            
                                                            | 917 | 917 |  	 * Run functions on plugin update/activation | 
                                                                                                            
                                                            | 918 | 918 |  	 * @return void | 
                                                                                                            
                                                            | 919 | 919 |  	 */ | 
                                                                                                            
                                                            | 920 |  | -	public function update () { | 
                                                                                                            
                                                            |  | 920 | +	public function update() { | 
                                                                                                            
                                                            | 921 | 921 |   | 
                                                                                                            
                                                            | 922 |  | -		$previous_version = get_option( 'ssp_version', '1.0' ); | 
                                                                                                            
                                                            |  | 922 | +		$previous_version = get_option ( 'ssp_version', '1.0' ); | 
                                                                                                            
                                                            | 923 | 923 |   | 
                                                                                                            
                                                            | 924 |  | -		if ( version_compare( $previous_version, '1.13.1', '<' ) ) { | 
                                                                                                            
                                                            | 925 |  | -			flush_rewrite_rules(); | 
                                                                                                            
                                                            |  | 924 | +		if ( version_compare ( $previous_version, '1.13.1', '<' ) ) { | 
                                                                                                            
                                                            |  | 925 | +			flush_rewrite_rules (); | 
                                                                                                            
                                                            | 926 | 926 |  		} | 
                                                                                                            
                                                            | 927 | 927 |   | 
                                                                                                            
                                                            | 928 |  | -		update_option( 'ssp_version', $this->version ); | 
                                                                                                            
                                                            |  | 928 | +		update_option ( 'ssp_version', $this->version ); | 
                                                                                                            
                                                            | 929 | 929 |  	} | 
                                                                                                            
                                                            | 930 | 930 |   | 
                                                                                                            
                                                            | 931 | 931 |  	/** | 
                                                                                                            
                                                            | 932 | 932 |  	 * Update 'enclosure' meta field to 'audio_file' meta field | 
                                                                                                            
                                                            | 933 | 933 |  	 * @return void | 
                                                                                                            
                                                            | 934 | 934 |  	 */ | 
                                                                                                            
                                                            | 935 |  | -	public function update_enclosures () { | 
                                                                                                            
                                                            |  | 935 | +	public function update_enclosures() { | 
                                                                                                            
                                                            | 936 | 936 |   | 
                                                                                                            
                                                            | 937 | 937 |  		// Allow forced re-run of update if necessary | 
                                                                                                            
                                                            | 938 |  | -		if ( isset( $_GET['ssp_update_enclosures'] ) ) { | 
                                                                                                            
                                                            | 939 |  | -			delete_option( 'ssp_update_enclosures' ); | 
                                                                                                            
                                                            |  | 938 | +		if ( isset( $_GET[ 'ssp_update_enclosures' ] ) ) { | 
                                                                                                            
                                                            |  | 939 | +			delete_option ( 'ssp_update_enclosures' ); | 
                                                                                                            
                                                            | 940 | 940 |  		} | 
                                                                                                            
                                                            | 941 | 941 |   | 
                                                                                                            
                                                            | 942 | 942 |  		// Check if update has been run | 
                                                                                                            
                                                            | 943 |  | -		$update_run = get_option( 'ssp_update_enclosures', false ); | 
                                                                                                            
                                                            |  | 943 | +		$update_run = get_option ( 'ssp_update_enclosures', false ); | 
                                                                                                            
                                                            | 944 | 944 |   | 
                                                                                                            
                                                            | 945 | 945 |  		if ( $update_run ) { | 
                                                                                                            
                                                            | 946 | 946 |  			return; | 
                                                                                                                                                        
                                                        |  | @@ -961,9 +961,9 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 961 | 961 |  			'fields' => 'ids', | 
                                                                                                            
                                                            | 962 | 962 |  		); | 
                                                                                                            
                                                            | 963 | 963 |   | 
                                                                                                            
                                                            | 964 |  | -		$posts_with_enclosures = get_posts( $args ); | 
                                                                                                            
                                                            |  | 964 | +		$posts_with_enclosures = get_posts ( $args ); | 
                                                                                                            
                                                            | 965 | 965 |   | 
                                                                                                            
                                                            | 966 |  | -		if ( 0 == count( $posts_with_enclosures ) ) { | 
                                                                                                            
                                                            |  | 966 | +		if ( 0 == count ( $posts_with_enclosures ) ) { | 
                                                                                                            
                                                            | 967 | 967 |  			return; | 
                                                                                                            
                                                            | 968 | 968 |  		} | 
                                                                                                            
                                                            | 969 | 969 |   | 
                                                                                                                                                        
                                                        |  | @@ -971,17 +971,17 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 971 | 971 |  		foreach ( (array) $posts_with_enclosures as $post_id ) { | 
                                                                                                            
                                                            | 972 | 972 |   | 
                                                                                                            
                                                            | 973 | 973 |  			// Get existing enclosure | 
                                                                                                            
                                                            | 974 |  | -			$enclosure = get_post_meta( $post_id, 'enclosure', true ); | 
                                                                                                            
                                                            |  | 974 | +			$enclosure = get_post_meta ( $post_id, 'enclosure', true ); | 
                                                                                                            
                                                            | 975 | 975 |   | 
                                                                                                            
                                                            | 976 | 976 |  			// Add audio_file field | 
                                                                                                            
                                                            | 977 | 977 |  			if ( $enclosure ) { | 
                                                                                                            
                                                            | 978 |  | -				update_post_meta( $post_id, 'audio_file', $enclosure ); | 
                                                                                                            
                                                            |  | 978 | +				update_post_meta ( $post_id, 'audio_file', $enclosure ); | 
                                                                                                            
                                                            | 979 | 979 |  			} | 
                                                                                                            
                                                            | 980 | 980 |   | 
                                                                                                            
                                                            | 981 | 981 |  		} | 
                                                                                                            
                                                            | 982 | 982 |   | 
                                                                                                            
                                                            | 983 | 983 |  		// Mark update as having been run | 
                                                                                                            
                                                            | 984 |  | -		update_option( 'ssp_update_enclosures', 'run' ); | 
                                                                                                            
                                                            |  | 984 | +		update_option ( 'ssp_update_enclosures', 'run' ); | 
                                                                                                            
                                                            | 985 | 985 |  	} | 
                                                                                                            
                                                            | 986 | 986 |   | 
                                                                                                            
                                                            | 987 | 987 |  	/** | 
                                                                                                                                                        
                                                        |  | @@ -992,19 +992,19 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 992 | 992 |  	public function admin_footer_text( $footer_text ) { | 
                                                                                                            
                                                            | 993 | 993 |   | 
                                                                                                            
                                                            | 994 | 994 |  		// Check to make sure we're on a SSP settings page | 
                                                                                                            
                                                            | 995 |  | -		if ( ( isset( $_GET['page'] ) && 'podcast_settings' == esc_attr( $_GET['page'] ) ) && apply_filters( 'ssp_display_admin_footer_text', true ) ) { | 
                                                                                                            
                                                            |  | 995 | +		if ( ( isset( $_GET[ 'page' ] ) && 'podcast_settings' == esc_attr ( $_GET[ 'page' ] ) ) && apply_filters ( 'ssp_display_admin_footer_text', true ) ) { | 
                                                                                                            
                                                            | 996 | 996 |   | 
                                                                                                            
                                                            | 997 | 997 |  			// Change the footer text | 
                                                                                                            
                                                            | 998 |  | -			if ( ! get_option( 'ssp_admin_footer_text_rated' ) ) { | 
                                                                                                            
                                                            | 999 |  | -				$footer_text = sprintf( __( 'If you like %1$sSeriously Simple Podcasting%2$s please leave a %3$s★★★★★%4$s rating. A huge thank you in advance!', 'seriously-simple-podcasting' ), '<strong>', '</strong>', '<a href="https://wordpress.org/support/view/plugin-reviews/seriously-simple-podcasting?filter=5#postform" target="_blank" class="ssp-rating-link" data-rated="' . __( 'Thanks!', 'seriously-simple-podcasting' ) . '">', '</a>' ); | 
                                                                                                            
                                                            |  | 998 | +			if ( ! get_option ( 'ssp_admin_footer_text_rated' ) ) { | 
                                                                                                            
                                                            |  | 999 | +				$footer_text = sprintf ( __ ( 'If you like %1$sSeriously Simple Podcasting%2$s please leave a %3$s★★★★★%4$s rating. A huge thank you in advance!', 'seriously-simple-podcasting' ), '<strong>', '</strong>', '<a href="https://wordpress.org/support/view/plugin-reviews/seriously-simple-podcasting?filter=5#postform" target="_blank" class="ssp-rating-link" data-rated="'.__ ( 'Thanks!', 'seriously-simple-podcasting' ).'">', '</a>' ); | 
                                                                                                            
                                                            | 1000 | 1000 |  				$footer_text .= "<script type='text/javascript'> | 
                                                                                                            
                                                            | 1001 | 1001 |  					jQuery('a.ssp-rating-link').click(function() { | 
                                                                                                            
                                                            | 1002 |  | -						jQuery.post( '" . admin_url( 'admin-ajax.php' ) . "', { action: 'ssp_rated' } ); | 
                                                                                                            
                                                            |  | 1002 | +						jQuery.post( '" . admin_url ( 'admin-ajax.php' )."', { action: 'ssp_rated' } ); | 
                                                                                                            
                                                            | 1003 | 1003 |  						jQuery(this).parent().text( jQuery(this).data( 'rated' ) ); | 
                                                                                                            
                                                            | 1004 | 1004 |  					}); | 
                                                                                                            
                                                            | 1005 | 1005 |  				</script>"; | 
                                                                                                            
                                                            | 1006 | 1006 |  			} else { | 
                                                                                                            
                                                            | 1007 |  | -				$footer_text = sprintf( __( '%1$sThank you for publishing with %2$sSeriously Simple Podcasting%3$s.%4$s', 'seriously-simple-podcasting' ), '<span id="footer-thankyou">', '<a href="http://www.seriouslysimplepodcasting.com/" target="_blank">', '</a>', '</span>' ); | 
                                                                                                            
                                                            |  | 1007 | +				$footer_text = sprintf ( __ ( '%1$sThank you for publishing with %2$sSeriously Simple Podcasting%3$s.%4$s', 'seriously-simple-podcasting' ), '<span id="footer-thankyou">', '<a href="http://www.seriouslysimplepodcasting.com/" target="_blank">', '</a>', '</span>' ); | 
                                                                                                            
                                                            | 1008 | 1008 |  			} | 
                                                                                                            
                                                            | 1009 | 1009 |   | 
                                                                                                            
                                                            | 1010 | 1010 |  		} | 
                                                                                                                                                        
                                                        |  | @@ -1017,7 +1017,7 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 1017 | 1017 |  	 * @return void | 
                                                                                                            
                                                            | 1018 | 1018 |  	 */ | 
                                                                                                            
                                                            | 1019 | 1019 |  	public function rated() { | 
                                                                                                            
                                                            | 1020 |  | -		update_option( 'ssp_admin_footer_text_rated', 1 ); | 
                                                                                                            
                                                            |  | 1020 | +		update_option ( 'ssp_admin_footer_text_rated', 1 ); | 
                                                                                                            
                                                            | 1021 | 1021 |  		die(); | 
                                                                                                            
                                                            | 1022 | 1022 |  	} | 
                                                                                                            
                                                            | 1023 | 1023 |   | 
                                                                                                                                                        
                                                        |  | @@ -1027,11 +1027,11 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 1027 | 1027 |  	 * @param  object $post WordPress Post Object | 
                                                                                                            
                                                            | 1028 | 1028 |  	 * @return void | 
                                                                                                            
                                                            | 1029 | 1029 |  	 */ | 
                                                                                                            
                                                            | 1030 |  | -	public function invalidate_cache( $id, $post ){ | 
                                                                                                            
                                                            |  | 1030 | +	public function invalidate_cache( $id, $post ) { | 
                                                                                                            
                                                            | 1031 | 1031 |   | 
                                                                                                            
                                                            | 1032 |  | -		if ( in_array( $post->post_type, ssp_post_types( true ) ) ){ | 
                                                                                                            
                                                            | 1033 |  | -			wp_cache_delete( 'episodes',    'ssp' ); | 
                                                                                                            
                                                            | 1034 |  | -			wp_cache_delete( 'episode_ids', 'ssp' ); | 
                                                                                                            
                                                            |  | 1032 | +		if ( in_array ( $post->post_type, ssp_post_types ( true ) ) ) { | 
                                                                                                            
                                                            |  | 1033 | +			wp_cache_delete ( 'episodes', 'ssp' ); | 
                                                                                                            
                                                            |  | 1034 | +			wp_cache_delete ( 'episode_ids', 'ssp' ); | 
                                                                                                            
                                                            | 1035 | 1035 |  		} | 
                                                                                                            
                                                            | 1036 | 1036 |   | 
                                                                                                            
                                                            | 1037 | 1037 |  	} |