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
$header_graphic = get_field( 'header_graphic' ); | |
highlight_string("<?php\n\$header_graphic =\n" . var_export($header_graphic, true) . ";\n?>"); |
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
/* ----- ACF Block Style Reset -------------------- */ | |
body .acf-block-fields, | |
.edit-post-sidebar { | |
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif; | |
font-size: 13px; | |
line-height: 1.4em; | |
} | |
.acf-field input[type="text"], | |
.acf-field input[type="password"], |
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 | |
/** | |
* Block template for Homepage | |
* | |
* @author JC Palmes | |
*/ | |
function homepage_block_template() { | |
$current_id = isset( $_GET['post'] ) ? $_GET['post'] : ''; | |
$current_post = isset( $_GET['post'] ) ? get_post($current_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
body .acf-block-fields, | |
.edit-post-sidebar { | |
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif; | |
font-size: 13px; | |
line-height: 1.4em; | |
.acf-field { | |
input[type="text"], | |
input[type="password"], |
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 | |
/** | |
* Adds a Custom Block category to the Gutenberg category list. | |
* Use in acf_register_block_type ( [ 'category' => 'custom-blocks' ] ). | |
* | |
* @param array $categories The existing categories. | |
* @param object $post The current post. | |
* @return array The updated array of categories. | |
* @author JC Palmes | |
*/ |
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 | |
/** | |
* Modify the available blocks for the Gutenberg editor | |
* | |
*/ | |
namespace Theme\Theme\Blocks; | |
use \WP_Block_Type_Registry; |
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 | |
/** | |
* Load icons dynamically into the `icon_picker` select field. | |
* | |
* @param array $field field options. | |
* @return array new field choices. | |
* | |
* @author JC Palmes | |
*/ | |
function acf_load_icon_picker_field_choices( $field ) { |
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 | |
/** | |
* Limit the content length. | |
* | |
* @author JC Palmes | |
* | |
* @param array $args Parameters include length and more. | |
* | |
* @return string The content. | |
*/ |
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 | |
/** | |
* Shortcode to display Vimeo video. | |
* | |
* @param array $args Parameters include vimeo_id and more. | |
* @author JC Palmes | |
*/ | |
function embed_vimeo_video( $args = [] ) { | |
// Set defaults. |
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 | |
/** | |
* MODULE - Wistia Player. | |
* | |
* Autoplay nuted Wistia Video in the background and remove from DOM when done. | |
*/ | |
/** | |
* Accepts 'class','wistia_id'. | |
*/ |