wordpress/wp-content/plugins/kt-tinymce-color-grid/index.php
/**
         * Export settings and trigger a file download
         * @since 1.13
         * @return string
         */
Export settings and trigger a file download
@since 1.13
@return string
Export settings and trigger a file download @since 1 . 13 @return string
protected function download_export() {
            $id = $this->get_request('kt_export_format');
            if (!isset($this->export_formats[$id])) {
                return 'format';
            }
            $fn = $this->export_formats[$id]['export'];
            $payload = call_user_func(array($this, "export_$fn"));
            if (!$payload) {
                return 'empty';
            }
            if (is_wp_error($payload)) {
                return $payload->get_error_code();
            }
            $filename = $this->get_export_filename($id);
            header('Content-Type: plain/text');
            header('Content-Disposition: attachment; filename="' . $filename . '"');
            print $payload;
            exit;
        }
protected function download_export ( ) { $ id = $ this -> get_request ( 'kt_export_format' ) ; if ( ! isset ( $ this -> export_formats [ $ id ] ) ) { return 'format' ; } $ fn = $ this -> export_formats [ $ id ] [ 'export' ] ; $ payload = call_user_func ( array ( $ this , " export_ $ fn " ) ) ; if ( ! $ payload ) { return 'empty' ; } if ( is_wp_error ( $ payload ) ) { return $ payload -> get_error_code ( ) ; } $ filename = $ this -> get_export_filename ( $ id ) ; header ( 'Content-Type: plain/text' ) ; header ( 'Content-Disposition: attachment; filename="' . $ filename . '"' ) ; print $ payload ; exit ; }
Export settings and trigger a file download
 @since 1.13
 @return string
Export settings and trigger a file download @since 1 . 13 @return string