• Resolved Jenny Beaumont

    (@jennybeaumont)


    Hi guys!

    Nice plugin! Finally took it for a test spin and so far am liking it a lot.

    The first thing I did was create my own stylesheet ?? basically just using the Coy skin and changing the color to match my site. Would be an awesome feature to allow people to upload their own skins without having to modify the plugin’s code.

    The only downside so far is the editing screen. I’m only using manual snippets for now, and although pasting the initial code is easy enough, if I need to go back and edit it’s not very easy. 1) the dialogue box is very small, 2) many characters are converted to html, despite the coding language being specified. Here’s a screen grab.

    cheers!
    -jennyb

    https://www.ads-software.com/plugins/pastacode/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Jenny Beaumont

    (@jennybeaumont)

    I actually now see in the plugin description that you say, “and you can build yours.” But I don’t see anywhere in the settings to do that. I manually went into the plugin code and added my color scheme to the list. Am I missing something?

    thnx!
    -jennyb

    Plugin Author Willy Bahuaud

    (@willybahuaud)

    Hello Jenny,

    Can you try this new version, please, and tell me if it solves your bugs ? ??
    https://wabeo.fr/pastacode-1.3.1-beta.zip

    To add a new color scheme, you have to add your custom scheme into the pastacode css folder (I’ll change this…) and use this filter : pre_option_pastacode_style to return your file name (without ‘.css’).

    For exemple :

    add_filter( 'pre_option_pastacode_style', 'my_pastastyle' );
    function my_pastastyle() {
            return 'prism-okaida-willy';
    }

    If you want to load a style conditionnaly, you can use the òption_pastacode_style`filter hook.

    add_filter( 'option_pastacode_style', 'my_pastastyle' );
    function my_pastastyle( $s ) {
            if ( is_user_logged_in() ) {
                    $s = 'prism-okaida-willy';
            }
            return $s;
    }

    Thread Starter Jenny Beaumont

    (@jennybeaumont)

    Hey Willy,

    Just uploaded the new version – works great! My stylesheet is easily picked up via your filter without having to alter any plugin code, and the editor is no longer converting characters to html. Perfect!

    ??

    best,
    -jennyb

    Plugin Author Willy Bahuaud

    (@willybahuaud)

    Thanks ??

    I’ll mark this topic as resolved.

    ++

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Suggestions and kudos’ is closed to new replies.