Support » Plugin: Better WordPress Syntax Highlighter » Feature Request to Add Source File Reference

  • Hi,

    Recently WP-Syntax had an update and the src shortcode attribute was added. It adds the reference of the source file name at the top. It is a small thing but I found it very nice.

    I also find your plugin very nice especially the clean HTML styling while WP-Syntax had a problem with Twenty Eleven. It seems it was fixed in the last update though. Your plugin has nice intelligible option pages as well. So I like yours very much.

    This is just a suggestion. So don’t hear me if you don’t feel like it.


Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Khang Minh


    Look like a very nice feature, and would not be hard to implement To-do list updated :).

    Great to hear it is in your to-do list.

    I tried customizing it myself and found this working. The styling might need to be improved but I would like to leave it for you or other experts.

    In class-bwp-syntax.php around the line #540 in the extract() function, inserting the following will add the src attribute.

    'src' => '',

    Around the line #730, the src value needs to be inserted into the variable $output. So adding this works.

    $output .= empty($atts['src']) ? '' : '<div style="height:2em;"><span style="font-weight:bold;">' . $atts['src'] . '</span></div>';

    That’s it.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Feature Request to Add Source File Reference’ is closed to new replies.