In MyBlock.php
public $supports = [
...
'color' => true
];
Or more fine tuned:
public $supports = [
...
'color' => [
'background' => true,
'text' => false,
]
]
Read More
In MyBlock.php
public $supports = [
...
'color' => true
];
Or more fine tuned:
public $supports = [
...
'color' => [
'background' => true,
'text' => false,
]
]
Read More
A package to easily make use of SVG icons in your Laravel Blade views. Originally “Blade SVG” by Adam Wathan.
Turn…
<!-- camera.svg -->
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" class="w-6 h-6">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z"/>
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 13a3 3 0 11-6 0 3 3 0 016 0z"/>
</svg>
Into…
<x-icon-camera class="w-6 h-6" />
Or into…
@svg('camera', 'w-6 h-6')
Search all 84,305 Blade Icons:
https://blade-ui-kit.com/blade-icons#search
But for a better overview you may want to go to the homepages of the icons set instead. For example:
Read MoreIn filters.php add:
// /**
// * The filter is named rest_{post_type}_collection_params. So you need to hook a new filter for each
// * of the custom post types you need to sort.
// * @link https://www.timrosswebdevelopment.com/wordpress-rest-api-post-order/
// */
// This enables the orderby=menu_order for Posts
add_filter( 'rest_post_collection_params', __NAMESPACE__ . '\\filter_add_rest_orderby_params', 10, 1 );
// And this for a custom post type called 'faq'
add_filter( 'rest_faq_collection_params', __NAMESPACE__ . '\\filter_add_rest_orderby_params', 10, 1 );
// /**
// * Add menu_order to the list of permitted orderby values
// */
function filter_add_rest_orderby_params( $params ) {
$params['orderby']['enum'][] = 'menu_order';
return $params;
}
Now you can use SITEURL/wp-json/wp/v2/faq?orderby=menu_order