WordPress.org

Ready to get started?Download WordPress

Forums

Better WordPress Syntax Highlighter
Feature Request to Add Source File Reference (3 posts)

  1. umchal
    Member
    Posted 1 year ago #

    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.

    Cheers,

    http://wordpress.org/extend/plugins/better-wordpress-syntax-based-on-geshi/

  2. Khang Minh
    Member
    Plugin Author

    Posted 1 year ago #

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

  3. umchal
    Member
    Posted 1 year ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.