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
if (has_block("gallery", get_the_content())) | |
{ | |
$post_blocks = parse_blocks(get_the_content()); | |
foreach ($post_blocks as $post_block) | |
{ | |
if ("core/gallery" == $post_block["blockName"]) | |
{ | |
$ids = $post_block["attrs"]["ids"]; | |
} | |
} |
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
$valid_states = WC()->countries->get_states( $country ); | |
$for_country = isset( $args['country'] ) ? $args['country'] : WC()->checkout->get_value( 'billing_state' === $key ? 'billing_country' : 'shipping_country' ); | |
$states = WC()->countries->get_states( $for_country ); |
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 | |
register_block_pattern( | |
'starter/custom-button-pattern', | |
array( | |
'title' => __( 'Custom buttons', 'starter' ), | |
'description' => _x( 'Two horizontal buttons, the left button is filled in, and the right button is outlined.', 'Block pattern description', 'starter' ), | |
'categories' => array( 'buttons' ), | |
'content' => '<!-- wp:buttons --> | |
<div class="wp-block-buttons"><!-- wp:button {"backgroundColor":"vivid-green-cyan"} --> |
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 global $woocommerce; | |
$items = $woocommerce->cart->get_cart(); | |
foreach($items as $item => $values) { | |
$_product = wc_get_product( $values['data']->get_id()); | |
echo "<b>".$_product->get_title().'</b> <br> Quantity: '.$values['quantity'].'<br>'; | |
$price = get_post_meta($values['product_id'] , '_price', true); | |
echo " Price: ".$price."<br>"; | |
} |
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
<div class="multi-image-container"> | |
<div class="multi-image"> | |
<?php if ($data['multis']) : | |
foreach ($data['multis'] as $singleimg) : | |
$image = wp_get_attachment_image_url($singleimg['multi_image']['id'], $data['thumbnail_size']); | |
if (!$image) { |
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 | |
/** | |
* @author none | |
* @since 1.0 | |
* @version 1.0 | |
*/ | |
namespace WPC\Widgets; |
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
//elementor includes | |
include get_template_directory() . '/includes/elements/elementor-extensions.php'; | |
<?php | |
namespace WPC; | |
class Widget_Loader | |
{ |
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 | |
include("simple_html_dom.php"); | |
$html = file_get_html('https://www.laundrycare.biz/locations/'); | |
echo $html ->find('.container .location-state-list-container',0)->innertext; |
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 | |
/** | |
* Class Email Notification | |
* | |
* @package TUTOR | |
* | |
* @since v.1.0.0 | |
*/ |