Plugin Directory

Changeset 3254140


Ignore:
Timestamp:
03/11/2025 02:40:15 PM (12 months ago)
Author:
reormadrid
Message:

readme.txt

Location:
easy-code-highlighter
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • easy-code-highlighter/tags/1.00/easy-code-highlighter.php

    r3253859 r3254140  
    3434    // Se cargan los archivos localmente.
    3535    // The files are loaded locally.
     36           wp_enqueue_script(
     37        'prism',
     38        plugin_dir_url(__FILE__) . 'js/prism.min.js',
     39        array(),
     40        filemtime(plugin_dir_path(__FILE__) . 'js/prism.min.js'),
     41        true
     42    );
     43   
    3644    wp_enqueue_style(
    3745        'prism-tomorrow',
     
    4149    );
    4250
    43     wp_enqueue_script(
    44         'prism',
    45         plugin_dir_url(__FILE__) . 'js/prism.min.js',
    46         array(),
    47         filemtime(plugin_dir_path(__FILE__) . 'js/prism.min.js'),
    48         true
    49     );
     51 
    5052
    5153    wp_register_script(
     
    111113
    112114function easy_hi_reormadrid_code_highlighter_copy_shortcode( $atts, $content = null ) {
     115    $content = shortcode_unautop( $content );
     116    $content = str_replace( array( '<p>', '</p>', '<br>', '<br/>', '<br />' ), '', $content );
     117    $content = trim( $content );
     118    $content = htmlentities($content);
    113119    $atts = shortcode_atts( array(
    114120        'language' => '',
  • easy-code-highlighter/trunk/easy-code-highlighter.php

    r3253847 r3254140  
    3434    // Se cargan los archivos localmente.
    3535    // The files are loaded locally.
     36           wp_enqueue_script(
     37        'prism',
     38        plugin_dir_url(__FILE__) . 'js/prism.min.js',
     39        array(),
     40        filemtime(plugin_dir_path(__FILE__) . 'js/prism.min.js'),
     41        true
     42    );
     43   
    3644    wp_enqueue_style(
    3745        'prism-tomorrow',
     
    4149    );
    4250
    43     wp_enqueue_script(
    44         'prism',
    45         plugin_dir_url(__FILE__) . 'js/prism.min.js',
    46         array(),
    47         filemtime(plugin_dir_path(__FILE__) . 'js/prism.min.js'),
    48         true
    49     );
     51 
    5052
    5153    wp_register_script(
     
    111113
    112114function easy_hi_reormadrid_code_highlighter_copy_shortcode( $atts, $content = null ) {
     115    $content = shortcode_unautop( $content );
     116    $content = str_replace( array( '<p>', '</p>', '<br>', '<br/>', '<br />' ), '', $content );
     117    $content = trim( $content );
     118    $content = htmlentities($content);
    113119    $atts = shortcode_atts( array(
    114120        'language' => '',
Note: See TracChangeset for help on using the changeset viewer.