Skip to content

Instantly share code, notes, and snippets.

Birgit Pauli-Haack bph

Block or report user

Report or block bph

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@bph
bph / content-block-team-member.php
Created May 17, 2019
Example code for ACF building blocks
View content-block-team-member.php
<?php
// create id attribute for specific styling
$id = 'team-member' . $block['id'];
// create align class ("alignwide") from block setting ("wide")
$align_class = $block['align'] ? 'align' . $block['align'] : '';
// Load values and asigning defaults for the block fields.
$short_bio = get_field('short_bio') ?: 'the short bio goes here... ';
$first_name = get_field('first_name') ?: 'First Name';
@bph
bph / team member theme's functions.php
Last active May 17, 2019
Example Code for using ACF building blocks
View team member theme's functions.php
function register_acf_blocks() {
// register a team member block.
acf_register_block(array(
'name' => 'acf-team-member',
'title' => __('ACF Team Member'),
'description' => __('A custom team member block created via ACF 5.8'),
'render_template' => 'content-block-team-member.php',
'category' => 'formatting',
'icon' => 'admin-comments',
@bph
bph / block-team-member.php
Last active May 16, 2019
Block Lab: Team Member block display
View block-team-member.php
<h2>
<?php block_field( 'first-name' );?>
<?php block_field( 'last-name' );?>
</h2>
<p><img class="teamphoto" src="<?php block_field( 'picture' ); ?>"
alt="<?php block_field( 'first-name' );?>
<?php block_field( 'last-name' );?> " width="150" style="float:left;padding:4px;margin;2px;"/>
<?php block_field( 'short-bio' ); ?></p>
<p><em>You can reach <?php block_field( 'first-name' );?></em>
View Cover Image Meetup Naples Sep 20 Invitation
{
"__file": "wp_block",
"title": "Cover image invitation",
"content": "<!-- wp:paragraph {\"align\":\"center\",\"customTextColor\":\"#ffffff\",\"backgroundColor\":\"luminous-vivid-orange\",\"customFontSize\":23} -->\n<p style=\"color:#ffffff;font-size:23px;text-align:center\" class=\"has-background has-luminous-vivid-orange-background-color\">Join your local WordPress Meetup!<br/></p>\n<!-- /wp:paragraph -->\n\n<!-- wp:cover-image {\"url\":\"http://rctesting.local/wp-content/uploads/2018/09/rawpixel-678089-unsplash-web.jpg\",\"id\":39,\"hasParallax\":true} -->\n<div class=\"wp-block-cover-image has-background-dim has-parallax\" style=\"background-image:url(http://rctesting.local/wp-content/uploads/2018/09/rawpixel-678089-unsplash-web.jpg)\"><p class=\"wp-block-cover-image-text\"><strong><strong><em>September, 20th at 6 pm ET<br/></em></strong><br/>Share your favorite Plugins &amp; Reusable Blocks for Content Creators<br/><em><br/>at VentureX, Mercato, Naples. </em></strong></p></div>\n<!-- /wp:cover-ima
@bph
bph / psl-theme-test.txt
Created Jun 22, 2018
Blocks for Themes Test
View psl-theme-test.txt
<!-- wp:heading -->
<h2>Common Blocks / Formatting / Layout Elements / Widgets and Embeds</h2>
<!-- /wp:heading -->
<!-- wp:list -->
<ul>
<li><a href="#images">Images</a> (Single image, cover image, gallery </li>
<li><a href="#quotes">Pull Quote / Quote</a></li>
<li><a href="#verse">Verse</a></li>
<li><a href="#buttons">Button</a></li>
@bph
bph / psl-theme-test.txt
Created Jun 22, 2018
Blocks for Themes Test
View psl-theme-test.txt
<!-- wp:heading -->
<h2>Common Blocks / Formatting / Layout Elements / Widgets and Embeds</h2>
<!-- /wp:heading -->
<!-- wp:list -->
<ul>
<li><a href="#images">Images</a> (Single image, cover image, gallery </li>
<li><a href="#quotes">Pull Quote / Quote</a></li>
<li><a href="#verse">Verse</a></li>
<li><a href="#buttons">Button</a></li>
@bph
bph / weekly-block.css
Created Apr 17, 2018 — forked from pento/weekly-block.css
The Weekly Block
View weekly-block.css
/**
* License: GPL-3.0+
*/
.weekly-link {
/*border-left: 3px solid rgba(0,0,0,.8);*/
border-left: 3px solid rgba(255, 160, 0, 1);
padding-left: 2em;
padding-right: 2em;
margin-bottom: 2em;
}
@bph
bph / barcode4j.cfm
Created May 3, 2016 — forked from paulklinkenberg/barcode4j.cfm
barcode4j example in CFML / Lucee
View barcode4j.cfm
<cfset jarsPath = expandPath('/java/barcode4j/') />
<!--- Path where the necessary jar files are located (downloadable from https://www.dropbox.com/s/skl9fwky2n7mnjr/java-files-barcode4j.zip?dl=0) --->
<cfset libraryList = arrayToList( directoryList(jarsPath, false, 'array', '*.jar') ) />
<cfset configBuilder = createObject('java', 'org.apache.avalon.framework.configuration.DefaultConfigurationBuilder', libraryList) />
<cfset barcodeUtil = createObject('java', 'org.krysalis.barcode4j.BarcodeUtil', libraryList) />
<cfset grayImageType = createObject('java', 'java.awt.image.BufferedImage').TYPE_BYTE_GRAY />
<!--- create custom config. See http://barcode4j.sourceforge.net/2.1/symbol-ean-13.html --->
<cfset configXml = '<barcode>
You can’t perform that action at this time.