Plugin Directory

Changeset 1954548


Ignore:
Timestamp:
10/10/2018 12:44:55 PM (7 years ago)
Author:
PeterBooker
Message:

fixed php error on activation error and improved readme

Location:
kebo-code
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • kebo-code/tags/1.0.1/includes/class-kebo-code.php

    r1953588 r1954548  
    7171        public static function activation() {
    7272
     73            if ( ! function_exists( 'register_block_type' ) ) {
     74                self::block_activation( __( 'Kebo Code requires the Gutenberg Plugin or WordPress 5.0 to function properly. Please install either before activating Kebo Code.', 'kebo-code' ) );
     75            }
     76
    7377            $min_php_version = '5.6';
    74             $min_wp_version  = '4.2';
     78            $min_wp_version  = '4.9.8';
    7579
    7680            if ( version_compare( $GLOBALS['wp_version'], $min_wp_version, '<' ) ) {
     
    96100         */
    97101        public static function block_activation( $message = '' ) {
    98             echo '<div class="error"><p>';
    99             echo esc_html( $message );
    100             echo '</p></div>';
    101102            deactivate_plugins( array( 'kebo-code/kebo-code.php' ) );
     103            wp_die( '<div class="error"><p>' . esc_html( $message ) . '</p></div>' );
    102104        }
    103105    }
  • kebo-code/tags/1.0.1/readme.txt

    r1954176 r1954548  
    11=== Kebo Code ===
    22Contributors: PeterBooker
    3 Tags: code syntax highlighter
    4 Requires at least: 4.9
     3Tags: code highlighter, syntax highlighter, code, syntax
     4Requires at least: 4.9.8
    55Tested up to: 5.0
    66Stable tag: 1.0.1
     
    88License URI: https://www.gnu.org/licenses/gpl-2.0.html
    99
    10 Lightweight syntax/code highlighting which outputs plain HTML, no bloat or JavaScript.
     10Lightweight syntax / code highlighter which outputs plain HTML, no bloat or JavaScript.
    1111
    1212== Description ==
    1313
    14 ** Gutenberg Editor Required **
     14**(note: Gutenberg Editor Required)**
    1515
    16 This plugin contains a code/syntax highlighting Gutenberg block. It uses CodeMirror and supports the full range of [scripts and languages](https://codemirror.net/mode/). The highlighting is performed in the editor using CodeMirrors `runMode`, storing the resulting HTML to be used on the frontend.
     16A syntax / code highlighter Gutenberg block. Paste your code into the block, set the language and see your code highlighted exactly like it will display on the frontend.
     17
     18= Features =
     19
     20* Syntax highlighting block for the Gutenberg Editor
     21* Switch between editor and preview, see exactly what will appear on the frontend.
     22* Supports 121 languages, listed [here](https://codemirror.net/mode/).
     23* 2 Themes, VSCode Dark+ and Github, see the screenshots below. *(more coming soon)*
     24* Static HTML output, no frontend scripts or user tracking.
    1725
    1826== Frequently Asked Questions ==
     
    2129
    2230The way the plugin highlights the text, as it is being edited, requires the Gutenberg editor/environment, which means the plugin would do nothing without it.
     31
     32Specifically, it uses CodeMirror's [runMode](https://codemirror.net/demo/runmode.html) function to process highlighting in real-time.
    2333
    2434= Which scipts and languages does it support? =
  • kebo-code/trunk/includes/class-kebo-code.php

    r1953588 r1954548  
    7171        public static function activation() {
    7272
     73            if ( ! function_exists( 'register_block_type' ) ) {
     74                self::block_activation( __( 'Kebo Code requires the Gutenberg Plugin or WordPress 5.0 to function properly. Please install either before activating Kebo Code.', 'kebo-code' ) );
     75            }
     76
    7377            $min_php_version = '5.6';
    74             $min_wp_version  = '4.2';
     78            $min_wp_version  = '4.9.8';
    7579
    7680            if ( version_compare( $GLOBALS['wp_version'], $min_wp_version, '<' ) ) {
     
    96100         */
    97101        public static function block_activation( $message = '' ) {
    98             echo '<div class="error"><p>';
    99             echo esc_html( $message );
    100             echo '</p></div>';
    101102            deactivate_plugins( array( 'kebo-code/kebo-code.php' ) );
     103            wp_die( '<div class="error"><p>' . esc_html( $message ) . '</p></div>' );
    102104        }
    103105    }
  • kebo-code/trunk/readme.txt

    r1954172 r1954548  
    11=== Kebo Code ===
    22Contributors: PeterBooker
    3 Tags: code syntax highlighter
    4 Requires at least: 4.9
     3Tags: code highlighter, syntax highlighter, code, syntax
     4Requires at least: 4.9.8
    55Tested up to: 5.0
    66Stable tag: 1.0.1
     
    88License URI: https://www.gnu.org/licenses/gpl-2.0.html
    99
    10 Lightweight syntax/code highlighting which outputs plain HTML, no bloat or JavaScript.
     10Lightweight syntax / code highlighter which outputs plain HTML, no bloat or JavaScript.
    1111
    1212== Description ==
    1313
    14 ** Gutenberg Editor Required **
     14**(note: Gutenberg Editor Required)**
    1515
    16 This plugin contains a code/syntax highlighting Gutenberg block. It uses CodeMirror and supports the full range of [scripts and languages](https://codemirror.net/mode/). The highlighting is performed in the editor using CodeMirrors `runMode`, storing the resulting HTML to be used on the frontend.
     16A syntax / code highlighter Gutenberg block. Paste your code into the block, set the language and see your code highlighted exactly like it will display on the frontend.
     17
     18= Features =
     19
     20* Syntax highlighting block for the Gutenberg Editor
     21* Switch between editor and preview, see exactly what will appear on the frontend.
     22* Supports 121 languages, listed [here](https://codemirror.net/mode/).
     23* 2 Themes, VSCode Dark+ and Github, see the screenshots below. *(more coming soon)*
     24* Static HTML output, no frontend scripts or user tracking.
    1725
    1826== Frequently Asked Questions ==
     
    2129
    2230The way the plugin highlights the text, as it is being edited, requires the Gutenberg editor/environment, which means the plugin would do nothing without it.
     31
     32Specifically, it uses CodeMirror's [runMode](https://codemirror.net/demo/runmode.html) function to process highlighting in real-time.
    2333
    2434= Which scipts and languages does it support? =
Note: See TracChangeset for help on using the changeset viewer.