| Server IP : 209.209.40.120 / Your IP : 216.73.217.112 Web Server : Microsoft-IIS/10.0 System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586 User : NEWWWW$ ( 0) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /HostingSpaces/admin/tickwaves.co.uk/wwwroot/wp-content/themes/blocksy/inc/components/ |
Upload File : |
<?php
namespace Blocksy;
class ThemePatterns {
private $patterns = [
'pattern-1',
'pattern-2',
'pattern-3',
'pattern-4',
'pattern-5',
'pattern-6',
'pattern-7',
'pattern-8',
'pattern-9',
'pattern-10',
'pattern-11',
'pattern-12',
];
public function __construct() {
add_action('init', [$this, 'register_patterns']);
}
public function register_patterns() {
if (! function_exists('register_block_pattern')) {
return;
}
register_block_pattern_category('blocksy', [
'label' => _x('Blocksy', 'Block pattern category', 'blocksy'),
'description' => __('Patterns that contain buttons and call to actions.', 'blocksy'),
]);
foreach ($this->patterns as $pattern) {
register_block_pattern(
'blocksy/' . $pattern,
require __DIR__ . '/patterns/' . $pattern . '.php'
);
}
}
}