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 | |
| $menu_title_1 = ''; | |
| $menu_list_1 = ''; | |
| $menu_title_2 = ''; | |
| $menu_list_2 = ''; | |
| $menu_title_3 = ''; | |
| $menu_list_3 = ''; | |
| $count = 0; | |
| foreach ($menu_items_left as $menu_item) { |
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 | |
| $args = array( | |
| 'location_left' => 'top-header-left', | |
| 'location_right' => 'top-header-right', | |
| ); | |
| // Set Core Variables | |
| $theme_location_left = $args['location_left']; | |
| if ( ($theme_location_left) && ($locations = get_nav_menu_locations()) && isset($locations[$theme_location_left]) ) { |
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
| { | |
| "$schema": "https://json.schemastore.org/block.json", | |
| "apiVersion": 2, | |
| "name": "calvert/card-child-block", | |
| "title": "Card Block Child", | |
| "category": "layout", | |
| "icon": "index-card", | |
| "textdomain": "matt-calvert", | |
| "parent": [ "noon/card-block" ], | |
| "example": {}, |
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
| import { __ } from '@wordpress/i18n'; | |
| import { InnerBlocks, RichText, InspectorControls } from '@wordpress/block-editor'; | |
| import { ToggleControl, PanelBody } from '@wordpress/components' | |
| const Edit = ( props ) => { | |
| const { | |
| attributes: { | |
| cardTitle, | |
| cardExcerpt, |
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
| { | |
| "$schema": "https://json.schemastore.org/block.json", | |
| "apiVersion": 2, | |
| "name": "calvert/card-block", | |
| "title": "Card Block", | |
| "category": "layout", | |
| "icon": "layout", | |
| "textdomain": "matt-calvert", | |
| "example": {}, | |
| "editorScript": "file:./build/index.js", |
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
| import { __ } from '@wordpress/i18n'; | |
| import { InnerBlocks, RichText, InspectorControls } from '@wordpress/block-editor'; | |
| import { ToggleControl, PanelBody } from '@wordpress/components' | |
| const Edit = ( props ) => { | |
| const { | |
| attributes: { toggleCard }, | |
| setAttributes, | |
| } = props; | |
| const ALLOWED_BLOCKS = [ 'calvert/card-child-block' ] |
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
| import { __ } from '@wordpress/i18n'; | |
| import { RichText, InspectorControls, MediaUpload, __experimentalLinkControl as LinkControl } from '@wordpress/block-editor'; | |
| import { ToggleControl, PanelBody, Button, FocalPointPicker, BaseControl } from '@wordpress/components' | |
| const Edit = ( props ) => { | |
| const { | |
| attributes: { | |
| post, | |
| }, |
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
| // Given a list of integers, determine how many of them are divisible by 3. | |
| // If you encounter an integer in the list that is greater than or equal to 300, | |
| // return 0 regardless of how many numbers divisible by 3. | |
| // Not that 0 is divisible by 3. | |
| // Examples: | |
| // Input: [0, 3, 6, 9, 12] | |
| // Output: 5 |
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 disable_block_for_post_type( $use_block_editor, $post ) { | |
| if ( 'gutenbergless' === $post->post_type ) { | |
| return false; | |
| }; | |
| return $use_block_editor; | |
| } |
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_admin() ) { | |
| add_filter( 'use_block_editor_for_post', 'disable_block_for_post_type', 10, 2 ); | |
| }; |
NewerOlder