public function get_post_types( $source_id = null ) { $post_types = WPRSS_FTP_Settings::get_post_types(); if ( is_null($source_id) ) { return $post_types; } $assigned_type = self::get_instance()->get_meta( $source_id, 'post_type' ); if( $assigned_type && !isset($post_types[$assigned_type]) ) { $post_types[$assigned_type] = sprintf( '%1$s (%2$s)', $assigned_type, __( 'Not Registered', WPRSS_TEXT_DOMAIN ) ); } return $post_types; }