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 | |
if (isset($block['data']['preview_image_help'])): | |
$image = get_template_directory_uri() . '/blocks/previews/' . basename(__FILE__, '.php') . '.png'; | |
echo '<img src="' . $image . '" style="width:100%; height:auto;">'; | |
else: | |
?> | |
Front End Content | |
<?php | |
endif; // preview_image_help | |
?> |
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 | |
/** | |
* TinyMCE v4 Config | |
* | |
* A custom WordPress TinyMCE v4 configuration with styles (now called "Format") drop down menu with submenus. | |
* | |
* style_formats: http://www.tinymce.com/wiki.php/Configuration:style_formats | |
* | |
*/ |
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
<div class="flex-image" style="padding-bottom: {{ 1 | divided_by: section.settings.image.aspect_ratio | times: 100 }}%;" | |
> |
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
{% assign width = product.featured_image.width | times: 1.00 %} | |
{% assign height = product.featured_image.height | times: 10000.00 %} | |
{% assign padding = height | divided_by: width | divided_by: 100 %} | |
<div class="flex-image fit --zoom" style="padding-bottom:{{padding}}%"> | |
<img class="lazy" data-src="{{ product.featured_image | img_url: '450x' }}" alt="{{ link.title }}"> | |
</div> |
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
class Burger extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = {addClass: false} | |
} | |
toggle() { | |
this.setState({addClass: !this.state.addClass}); | |
} | |
render() { | |
let burderClass = ["hamburger hamburger--collapse"]; |
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 | |
// BASED ON @ https://wordpress.stackexchange.com/questions/149826/display-posts-from-the-same-category-using-next-previous-post-link | |
$post_id = $post->ID; // current post ID | |
$cat = get_the_category(); | |
$current_cat_id = $cat[0]->cat_ID; // current category ID | |
$cat_id = get_queried_object_id(); | |
// GET CAT FROM URL | |
// this is hacky as hell. | |
$current_url = home_url( add_query_arg( array(), $wp->request ) ); |
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
#!/bin/bash | |
# | |
# | |
SITELIST=~/dbbackup/sitelist-wp-sites.sdata | |
find ~/public_html -type f -name wp-config.php -print > ${SITELIST} | |
while read LINE | |
do |
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
#!/bin/bash | |
# | |
# | |
BACKUPPATH=~/dbbackup/sql | |
SITELIST=~/dbbackup/sitelist-wp-sites.sdata | |
# | |
# Common Logging Code | |
# |
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
// FORMIDABLE NETFLIY HOOK | |
add_filter( 'frm_form_attributes', 'add_custom_form_attributes', 10, 2 ); | |
function add_custom_form_attributes( $attributes, $form ){ | |
$attributes .= 'data-netlify="true"'; | |
return $attributes; | |
} |
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 | |
// vars | |
$post_id = get_the_id(); | |
$images = get_field('gallery'); | |
$caption = get_field('caption'); | |
$content = get_the_content(); | |
// var_dump($post_id); |
NewerOlder