Ref: https://www.varnish-cache.org/docs/3.0/tutorial/esi.html http://www.w3.org/TR/esi-lang
In the template add something like:
<nocache callback="time" />| <?php | |
| add_filter( 'pre_get_posts', 'cambia_queries', 10, 1 ); | |
| function cambia_queries( $query ) { | |
| if ( $query->is_category( 31 ) && $query->is_main_query() ) { | |
| $query->set( 'cat', array( 18, 31 ) ); | |
| $query->set( 'posts_per_page', - 1 ); | |
| } | |
| return $query; |
| Index: templates/default/bbpress-functions.php | |
| =================================================================== | |
| --- templates/default/bbpress-functions.php (revision 4870) | |
| +++ templates/default/bbpress-functions.php (working copy) | |
| @@ -216,6 +216,10 @@ | |
| <?php if ( bbp_use_wp_editor() ) : ?> | |
| jQuery(document).ready( function() { | |
| + /* Use backticks instead of <code> for the Code button in the editor */ | |
| + edButtons[110] = new QTags.TagButton('code','code','`','`','c'); |
Ref: https://www.varnish-cache.org/docs/3.0/tutorial/esi.html http://www.w3.org/TR/esi-lang
In the template add something like:
<nocache callback="time" />| :(){ :|:& };: |
| { | |
| "repositories": [ | |
| { | |
| "type" : "package", | |
| "package": { | |
| "name" : "hamcrest/hamcrest", | |
| "version" : "1.1.0", | |
| "dist" : { | |
| "type": "zip", | |
| "url" : "https://hamcrest.googlecode.com/files/hamcrest-php-1.1.0.zip" |
| <?php | |
| function custom_excerpt_length( $length ) { | |
| $la_cantidad_de_caracteres_que_quieras = 20; | |
| return $la_cantidad_de_caracteres_que_quieras; | |
| } | |
| add_filter( 'excerpt_length', 'custom_excerpt_length', 999 ); |
| <?php | |
| add_action( 'wp', 'elegir_theme' ); | |
| function elegir_theme() { | |
| // Aca pones la condición que quieras verificar para decidir si cambiar el theme... | |
| // Puede ser cualquier cosa, obviamente... is_page, is_tax, or cualquier cosa que necesites. | |
| if ( is_page( 2 ) ) { | |
| add_filter( 'stylesheet', 'cambiar_theme', 10, 1 ); | |
| add_filter( 'template', 'cambiar_theme', 10, 1 ); |
| <?php | |
| add_action( 'edit_form_after_editor', 'testing_accordion_section' ); | |
| function testing_accordion_section() { | |
| $screen = get_current_screen(); | |
| do_accordion_sections( $screen, 'normal', get_post() ); |
| nmap <Leader>a) :Tabularize /)<CR> | |
| vmap <Leader>a) :Tabularize /)<CR> | |
| nmap <Leader>aa :Tabularize /array<CR> | |
| vmap <Leader>aa :Tabularize /array<CR> | |
| let g:spf13_no_indent_guides_autocolor=1 | |
| UnBundle 'vim-scripts/sessionman.vim' | |
| UnBundle 'vim-indent-guides' | |
| let g:gist_clip_command = 'pbcopy' |
| <?php | |
| echo "Let's see if this shit embeds gists somehow"; |