Plugin Directory

Changeset 2819173


Ignore:
Timestamp:
11/16/2022 03:58:19 PM (3 years ago)
Author:
willybahuaud
Message:

try to publish code exemples in readme

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pastacode/trunk/readme.txt

    r2819165 r2819173  
    6262
    6363You can use it to display a directory structure. Use pipes, backticks and hyphens like this:
    64 ```
     64
     65<code>
    6566root_folder/
    6667|-- a first folder/
    6768|   |-- holidays.mov
    6869|   |-- javascript-file.js
    69 |   `-- some_picture.jpg
     70|   &#96;-- some_picture.jpg
    7071|-- documents/
    7172|   |-- spreadsheet.xls
    7273|   |-- manual.pdf
    7374|   |-- document.docx
    74 |   `-- presentation.ppt
    75 |       `-- test
    76 `-- README.md
    77 ```
     75|   &#96;-- presentation.ppt
     76|       &#96;-- test
     77&#96;-- README.md
     78</code>
    7879
    7980= How to setup a custom cache expiration ? =
    8081
    8182Paste these lines into your functions.php theme file:
    82 ```
     83<code>
    8384add_filter( 'option_pastacode_cache_duration', 'my_pastacode_cache_duration' );
    8485function my_pastacode_cache_duration( $duration ) {
     
    8687    return $duration;
    8788}
    88 ```
     89</code>
    8990
    9091= How to change the color scheme ? =
     
    9596
    9697Paste these lines into your functions.php theme file:
    97 ```
     98<code>
    9899add_action( 'wp_enqueue_scripts', 'custom_enqueue_script', 11 );
    99100function custom_enqueue_script() {
     
    102103    wp_register_style( 'prismcss', $urlofmynewscheme, false, '1', 'all' );
    103104}
    104 ```
     105</code>
    105106
    106107Get inspired of [the default scheme](https://raw.githubusercontent.com/willybahuaud/pastacode-samples/master/default-style.css) to build your schemes
     
    109110
    110111Paste these lines into your functions.php theme file:
    111 ```
     112<code>
    112113//If you just want php, html, css and javascript support
    113114add_filter( 'pastacode_langs', '_pastacode_langs' );
     
    120121    return $langs;
    121122}
    122 ```
     123</code>
    123124
    124125= Ajax compatibility =
     
    133134
    134135Paste these lines into your functions.php theme file:
    135 ```
     136<code>
    136137//Take WordPress SVN, for example
    137138//register a provider
     
    175176    return $source;
    176177}
    177 ```
     178</code>
    178179
    179180Do not add you root website!! A contributor can add the shortcode to point your "wp-config.php" to read it!!
Note: See TracChangeset for help on using the changeset viewer.