Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn.
Author: Kaspars Dambis
kaspars.net / @konstruktors
| function derweili_change_postnumber_imagegallerycat( $query ) { | |
| if ( $query->is_main_query() && $query->is_tax('bildergalerien-kategorie') ) { | |
| $query->set('posts_per_page', 50); | |
| return; | |
| } | |
| } | |
| add_action( 'pre_get_posts', 'derweili_change_postnumber_imagegallerycat' ); |
| <?php | |
| /** | |
| Overwrite WordPress Gallery with Zurb Foundation Orbit Carousel | |
| http://foundation.zurb.com/sites/docs/orbit.html | |
| */ | |
| add_filter( 'post_gallery', 'my_custom_foundation_gallery', 10, 2 ); | |
| function my_custom_foundation_gallery( $output, $attr ) { |
| d |
Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn.
Author: Kaspars Dambis
kaspars.net / @konstruktors
| /* | |
| * Wrap all ACF Blocks in Disabled block to disable all links in edit view | |
| */ | |
| const { createHigherOrderComponent } = wp.compose; | |
| const { Fragment } = wp.element; | |
| import { Disabled } from '@wordpress/components'; | |
| const withDisabledCompontent = createHigherOrderComponent( ( BlockEdit ) => { | |
| return ( props ) => { |
| /** | |
| * BLOCK: string-list-block | |
| * | |
| * Registering a basic block with Gutenberg. | |
| * Simple block, renders and saves the same content without any interactivity. | |
| */ | |
| // Import CSS. | |
| import './style.scss'; | |
| import './editor.scss'; |
| const { | |
| subscribe, | |
| select | |
| } = wp.data; | |
| /** | |
| * Add dark-mode class to block-editor based on selected page template | |
| */ | |
| wp.domReady( () => { | |
| const postType = select( 'core/editor' ).getCurrentPostType(); |
| remove_action( 'setup_theme', array( 'CDN_Enabler_Engine', 'start' ) ); | |
| add_action( 'template_redirect', array( 'CDN_Enabler_Engine', 'start' ), 20 ); |