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
| /** | |
| * External dependencies | |
| */ | |
| import { useState, useEffect, useRef } from '@wordpress/element'; | |
| /** | |
| * Internal dependencies | |
| */ | |
| import Button from '../../ui-components/Button/Button'; |
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
| { | |
| ...existing VS Code rules, | |
| /* Require the Prettier configuration file */ | |
| "prettier.requireConfig": true, | |
| /* Turn off VSCode Formatting on Save for JS and JSX, | |
| we will do this via ESLint */ |
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 ( ! function_exists( 'woocommerce_template_loop_add_to_cart' ) ) { | |
| function woocommerce_template_loop_add_to_cart( $args = array() ) { | |
| global $product; | |
| if ( !$product->is_in_stock() ) { | |
| echo '<a href="' . get_permalink() . '" class="button">Out of Stock</a>'; | |
| } else { |
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 forminator_entry( $attributes ) { | |
| $atts = shortcode_atts( array( | |
| 'form_id' => __( 'Form ID not specified.', 'forminator-entry' ), | |
| 'entry_id' => __( 'Entry ID not specified.', 'forminator-entry' ), | |
| ), $attributes ); | |
| /* Start Object Buffer */ |
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 preload_assets() { | |
| wp_enqueue_style( 'eicons', 'https://digitalroar.org/elem/assets/lib/eicons/fonts/eicons.woff2' ); | |
| wp_enqueue_style( 'forminator-icons-font', 'https://digitalroar.org/formpro/assets/forminator-ui/fonts/forminator-icons-font.woff2' ); | |
| } | |
| add_action( 'wp_enqueue_scripts', 'preload_assets' ); | |
| function preload_option( $html, $handle ) { | |
| if ( 'eicons' === $handle || 'forminator-icons-font' === $handle ) { | |
| return str_replace( "media='all'", "media='all' rel='preload' as='font'", $html ); |
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
| (function($) { | |
| $(document).ready(function(){ | |
| $( '#nothing' ).hide(); | |
| $( '#search' ).keyup( function() { | |
| // Searched text | |
| var text = $(this).val().toLowerCase(); | |
| // Hide all content class element | |
| $( '.faq-wrapper' ).hide(); |
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 woocommerce_login_redirect() { | |
| if ( class_exists( 'WooCommerce' ) ) { | |
| if( is_woocommerce() && ! is_user_logged_in() ) { | |
| auth_redirect(); | |
| } | |
| } | |
| } | |
| add_action( 'template_redirect', 'woocommerce_login_redirect' ); |
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 ( ! function_exists( 'populate_fields_from_url' ) ) { | |
| add_action( | |
| 'forminator_after_form_render', | |
| function( $id, $form_type, $post_id, $form_fields, $form_settings ) { | |
| // Change the number 60 with your Form ID. | |
| if ( 60 === $id ) { | |
| add_action( 'wp_footer', 'populate_fields_from_url', 999 ); | |
| } |
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 remove_document_postcustom_metabox() { | |
| remove_meta_box( 'postcustom' , 'document' , 'normal' ); | |
| } | |
| add_action( 'admin_menu' , 'remove_document_postcustom_metabox' ); |
NewerOlder