This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <?php | |
| /** | |
| * Gutenberg Block customization for this theme. | |
| */ | |
| // gutenberg disable for posts | |
| //add_filter('use_block_editor_for_post', '__return_false', 10); | |
| // gutenberg disable for post types | |
| //add_filter('use_block_editor_for_post_type', '__return_false', 10); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <?php | |
| /* Pull apart OEmbed video link to get thumbnails out*/ | |
| function get_video_thumbnail_uri( $video_uri ) { | |
| $thumbnail_uri = ''; | |
| // determine the type of video and the video id | |
| $video = parse_video_uri( $video_uri ); | |
| // get youtube thumbnail | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | WordPress Block Development Made Easy | |
| https://webdevstudios.com/2020/06/16/wordpress-block-development/ | |
| Using Markdown and Localization in the WordPress Block Editor | |
| https://css-tricks.com/using-markdown-and-localization-in-the-wordpress-block-editor/ | |
| Gutenberg blocks: Add custom default class names | |
| https://poolghost.com/add-custom-default-class-names-to-gutenberg-blocks/ | |
| How to Create a Simple Gutenberg Block Pattern in WordPress | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <?php | |
| if ( is_singular('product') ) { | |
| global $post; | |
| // get categories | |
| $terms = wp_get_post_terms( $post->ID, 'product_cat' ); | |
| foreach ( $terms as $term ) $cats_array[] = $term->term_id; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <?php | |
| /* | |
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | |
| SOFTWARE. | |
| */ | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <?php | |
| function date_span_filter($start_date, $end_date) { | |
| if ( $start_date ) { | |
| // Dates should both be in a Y-m-d format | |
| $start_calendar_date = date('j F Y', strtotime($start_date)); | |
| if ( ! $end_date ) { | |
| // There is no range. Just return the required start date | |
| $date = $start_calendar_date; | |
| } else { | |
| if ( $start_date == $end_date ) { | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <?php | |
| add_action('woocommerce_widget_shopping_cart_before_buttons','ask_woo_mini_cart_before_buttons' ); | |
| function ask_woo_mini_cart_before_buttons(){ | |
| wp_nonce_field( 'woocommerce-cart' ); | |
| ?> | |
| <div class="submit-button"> | |
| <input type="submit" class="button" name="update_cart" value="<?php esc_attr_e('Uppdatera varukorg', 'tidymerch'); ?>"/> | |
| </div> | |
| <?php | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <?php | |
| /* | |
| ############################## | |
| ########### Search ########### | |
| ############################## | |
| Included are steps to help make this script easier for other to follow | |
| All you have to do is add custom ACF post types into Step 1 and custom taxonomies into Step 10 | |
| [list_searcheable_acf list all the custom fields we want to include in our search query] | |
| @return [array] [list of custom fields] | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <?php | |
| /* | |
| Plugin Name: WPTutsPlus Post-listing shortcode | |
| Plugin URI: http://rachelmccollin.co.uk | |
| Description: This plugin provides a shortcode to list posts, with parameters. It also registers a couple of post types and tacxonomies to work with. | |
| Version: 1.0 | |
| Author: Rachel McCollin | |
| Author URI: http://rachelmccollin.co.uk | |
| License: GPLv2 | |
| */ | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <?php | |
| function get_isotope_item( $query_args = array() ){ | |
| $defaults = array( | |
| 'post_type' => 'post', | |
| 'posts_per_page' => -1, | |
| 'post_status' => 'publish', | |
| ); | |
NewerOlder