This file contains 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 { registerBlockType } from '@wordpress/blocks'; | |
import { InnerBlocks } from '@wordpress/block-editor'; | |
import { useBlockProps } from '@wordpress/block-editor'; | |
/** | |
* Block Name. | |
* Create an example Call to Action Block | |
* Uses InnerBlocks for editable content within. | |
*/ |
This file contains 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 | |
/** | |
* ACF Call to Action example block template. | |
* | |
* More info: https://www.advancedcustomfields.com/resources/acf_register_block_type/ | |
* | |
* @param array $block The block settings and attributes. | |
* @param string $content The block inner HTML (empty). | |
* @param bool $is_preview True during AJAX preview. | |
* @param (int|string) $post_id The post ID this block is saved to. |
This file contains 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 | |
/** | |
* ACF Call to Action example block template. | |
* | |
* More info: https://www.advancedcustomfields.com/resources/acf_register_block_type/ | |
* | |
* @param array $block The block settings and attributes. | |
* @param string $content The block inner HTML (empty). | |
* @param bool $is_preview True during AJAX preview. | |
* @param (int|string) $post_id The post ID this block is saved to. |
This file contains 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 | |
/** | |
* Template for registering an ACF powered custom block. | |
* | |
* More info: https://www.advancedcustomfields.com/resources/blocks/ | |
*/ | |
/** | |
* Register the block. | |
*/ |
This file contains 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
// use intersection observer to show and hide a scroll to top button - target the site-footer | |
const footer = document.querySelector('.site-footer'); | |
const siteWrap = document.querySelector('.site-wrap'); | |
const scrollBtnOffset = siteWrap.offsetHeight * 0.45; | |
const scrollToTopBtn = document.querySelector('.scroll-to-top-button'); | |
const rootElement = document.documentElement; |
This file contains 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: WP REST API Login Filter | |
* Plugin URI: https://skyland.dev | |
* Description: Disables the WP rest API without login. | |
* Version: 1 | |
* Author: Sky | |
* Author URI: https://skyland.dev | |
* | |
*/ |