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
| /** | |
| * Hotfix: load SkyVerge framework before Clover checkout script. | |
| * Remove after updating Clover so it enqueues this itself. | |
| */ | |
| add_action('wp_enqueue_scripts', function () { | |
| if (!function_exists('is_checkout') || !is_checkout()) return; | |
| // Absolute path to the framework file you found: | |
| $fw_path = WP_PLUGIN_DIR . '/woocommerce-gateway-firstdata/vendor/skyverge/wc-plugin-framework/woocommerce/payment-gateway/assets/dist/frontend/sv-wc-payment-gateway-pay> |
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
| /** | |
| * Menu customizations | |
| */ | |
| add_filter('wp_nav_menu_objects', 'intro_nav_menu_objects', 10, 2); | |
| function intro_nav_menu_objects( $items, $args ) { | |
| //If our menu has the id primary-menu in the wp_nav_menu in our header.php | |
| if ( $args->menu_id == 'primary-menu' ){ | |
| //var_dump( $items ); | |
| //For each item in the menu. the $item->ID is the menu item ID not the page/post ID | |
| //The post id will be the $item->object_id if it is a post/page |
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
| .is-style-fancy-quote { | |
| font-size: 3rem; | |
| font-style: italic; | |
| } | |
| /** | |
| * Used to style our customizations or add CSS animations | |
| */ | |
| .is-style-fancy-paragraph { | |
| font-size: 125%; |
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
| /** | |
| * Examples of registering custom styles for core blocks | |
| * Can be targeted in our public javascript folder to add | |
| * animation, elements, or svgs to it | |
| */ | |
| wp.blocks.registerBlockStyle( 'core/quote', { | |
| name: 'fancy-quote', | |
| label: 'Fancy Quote', | |
| } ); |
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
| /** | |
| * This is in the js folder in our plugin folder. | |
| * This looks for our custom class that is added as a style option | |
| * In this case that is .is-style-add-custom-element | |
| */ | |
| ( function() { | |
| var vectorOne = document.createElementNS("http://www.w3.org/2000/svg", "svg"); | |
| vectorOne.classList.add( 'vector-one' ); | |
| vectorOne.setAttribute("height", "100"); |
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: Core Block Customizations | |
| * This file is in your plugin folder and the folder and this file must have the same name | |
| **/ | |
| function icbc_enqueue() { | |
| wp_enqueue_script( | |
| 'icbc-script', |
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
| /** | |
| * Changes excerpt length | |
| * @param integer $length the number of characters to show | |
| * @return integer the number of characters to show | |
| */ | |
| function awd2_excerpt_length($length) { | |
| return 35; | |
| } | |
| add_filter( 'excerpt_length', 'awd2_excerpt_length' ); |
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 | |
| /** | |
| * Used for post content in archive loop | |
| * | |
| * @link https://developer.wordpress.org/themes/basics/template-hierarchy/ | |
| * | |
| * @package awd2 | |
| */ | |
| ?> |
NewerOlder