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
add_filter('render_block_core/button', function ($content, $block) { | |
$dom = new \DOMDocument; | |
$dom->loadHTML($block['innerHTML']); | |
$anchor = $dom->getElementsByTagName('a'); | |
$style = [ | |
'is-style-primary' => 'rounded-md bg-skin-fill px-3.5 py-2.5 text-sm font-semibold text-skin-inverted shadow-sm hover:bg-skin-button-accent-hover focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600', | |
'is-style-link' => 'text-sm font-semibold leading-6 text-gray-900' | |
]; | |
$with = [ | |
'anchor' => $anchor[0]->nodeValue, |
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 Blacklist_Blocks | |
{ | |
public function __construct() | |
{ | |
add_action('wp_body_open', array($this, 'current_blocks')); | |
//add_action('wp_body_open', array($this, 'all_registered_blocks')); | |
add_filter('allowed_block_types_all', array($this, 'blacklist_blocks')); | |
} |
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 (window.acf) { | |
window.acf.addAction("render_block_preview", () => { | |
var linkEls = document.querySelectorAll(".acf-block-preview a"); | |
linkEls.forEach((linkEl) => { | |
linkEl.style.cursor = "default"; | |
linkEl.addEventListener("click", (e) => { | |
e.preventDefault(); | |
}); | |
}); | |
}); |
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 the status | |
* | |
* Note the status must start with wc- | |
* | |
*/ | |
function my_custom_order_status($order_statuses){ |
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="wp-list-table widefat plugin-install"> | |
<h2 class="screen-reader-text">Dashboard</h2> | |
<div id="the-list"> | |
<!-- Start Card --> | |
<div class="plugin-card"> | |
<div class="plugin-card-top"> | |
<div class="name column-name"> | |
<h3> | |
<a href="/wp-admin/admin.php?page=cmb-admin-training" class=""> | |
Training Material |