• Resolved Chuckie

    (@ajtruckle)


    I use this CodeColorer plugin alot on my WordPress site:

    https://kpumuk.info/projects/wordpress-plugins/codecolorer/

    In my deascription I have input some CodeColorer code:

    <th class="cellSortHeading" id="column-1">Student</th>
    <th class="cellSortHeading" id="column-2">Last As Student</th>
    <th class="cellSortHeading" id="column-3">Last Bible Reading</th>
    <th class="cellSortHeading" id="column-4">Last As Publisher</th>
    <th class="cellSortHeading" id="column-5">Last As Talk</th>
    <th class="cellSortHeading" id="column-6">Last As Assistant</th>

    But your system is not processing my shortcode content.

    The page I need help with: [log in to see the link]

Viewing 10 replies - 16 through 25 (of 25 total)
  • Hey guys, I am the authour of Code Colorer. It looks like HTML is being stipped out, and that could be caused by the colliding of different WordPress plugins. I am going to download “Simple Download Monitor” plugin and check for the missing filters. Will keep you posted.

    Thread Starter Chuckie

    (@ajtruckle)

    Thanks. ??

    Alright, I figured out the issue. The problem is that CodeColorer generates HTML tags in the first step of the Simple Download description processing (sdm_get_item_description_output function). In order to do that I need to call my function before and after sdm_get_item_description_output, which I can’t do since there are no callbacks provided.

    If “Simple Download Monitor” is willing to make a change to switch from direct WP functions invocations to a more proper way of doing that – filters, we can fix the issue (and provide a way for other plugins to integrate).

    Here is the proposed change to Simple Download Monitor:

    In wp-content/plugins/simple-download-monitor/sdm-post-type-content-handler.php add this:

    add_filter('sdm_downloads_description', 'do_shortcode'      );
    add_filter('sdm_downloads_description', 'wptexturize'       );
    add_filter('sdm_downloads_description', 'convert_smilies'   );
    add_filter('sdm_downloads_description', 'convert_chars'     );
    add_filter('sdm_downloads_description', 'wpautop'           );
    add_filter('sdm_downloads_description', 'shortcode_unautop' );
    add_filter('sdm_downloads_description', 'prepend_attachment');
    

    In wp-content/plugins/sim
    ple-download-monitor/includes/sdm-utility-functions.php
    change sdm_get_item_description_output to:

    function sdm_get_item_description_output($id) {
        $item_description = get_post_meta($id, 'sdm_description', true);
        $isset_item_description = isset($item_description) && !empty($item_description) ? $item_description : '';
    
        return apply_filters('sdm_downloads_description', $isset_item_description);
    }
    

    The behavior of the plugin will not change, but this will allow me and other plugin authors to integrate with Simple Download Monitor, e.g. add extract processing. For example, this will allow me to fix CodeColorer by adding two filters:

    add_filter('sdm_downloads_description', array('CodeColorerLoader', 'callBeforeHighlightCodeBlock'), -1000);
    add_filter('sdm_downloads_description', array('CodeColorerLoader', 'callAfterHighlightCodeBlock'), 1000);
    

    @mbrsolution, what do you think?

    Plugin Author mra13

    (@mra13)

    Thank you so much. I have updated the plugin with the changes you suggested. The new release has those changes.

    Thread Starter Chuckie

    (@ajtruckle)

    Thank you.

    Thank you, I have updated CodeColorer with necessary changes to properly integrate with Simple Download Monitor.

    @mra13 sorry for kind of unrelated comment, but I have noticed the graphics on the plugin page for the Simple Download Monitor is a little bit blurry for Simple Download Monitor. Turns out, you only have non-retina assets in https://plugins.trac.www.ads-software.com/browser/simple-download-monitor/assets

    If you add banner-1544×500.png it will significantly improve the quality of the plugin page on retina displays ?? Same thing with the icon.

    https://developer.www.ads-software.com/plugins/wordpress-org/plugin-assets/

    Plugin Author mra13

    (@mra13)

    Thank you so much for pointing that out. I will update the graphics.

    Thread Starter Chuckie

    (@ajtruckle)

    Works well. ??

Viewing 10 replies - 16 through 25 (of 25 total)
  • The topic ‘Issue with CodeColorer plugin’ is closed to new replies.