Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
andriilive committed Feb 7, 2023
1 parent 28470a3 commit f7f8ca3
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 10 deletions.
Binary file modified db/db.sqlite
Binary file not shown.
47 changes: 47 additions & 0 deletions web/app/themes/theme/App/Acf/Blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,53 @@ public function __construct()
public function register_blocks()
{

// acf_register_block_type(array(
// 'name' => 'acf/hero',
// 'title' => 'Hero',
// 'active' => true,
// 'description' => 'test',
// 'category' => 'common',
// 'icon' => '',
// 'keywords' => array(
// 'test',
// ),
// 'post_types' => array('page'),
// 'mode' => 'edit',
// 'align' => '',
// 'align_text' => '',
// 'align_content' => 'top',
// 'render_template' => '',
// 'render_callback' => 'acf_block_render_callback',
// 'enqueue_style' => '',
// 'enqueue_script' => '',
// 'enqueue_assets' => '',
// 'supports' => array(
// 'anchor' => true,
// 'align' => false,
// 'align_text' => false,
// 'align_content' => false,
// 'full_height' => false,
// 'mode' => false,
// 'multiple' => false,
// 'example' => array(),
// 'jsx' => true,
// ),
// ));

}
}

function acf_block_render_callback( $block ) {

ob_start();
json_encode($block);
$block = ob_get_clean();

$myfile = fopen(get_stylesheet_directory() . 'cache/' . $block['name'] . 'json', 'w') or die('Unable to open file!');

fwrite($myfile, $$block);
fclose($myfile);

return 1;

}
8 changes: 0 additions & 8 deletions web/app/themes/theme/App/Acf/OptionPages.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,6 @@ class OptionPages
[
'slug' => 'config',
'title' => 'Config'
],
[
'slug' => 'post',
'title' => 'Posts Settings',
'args' => [
'parent_slug' => 'edit.php',
'position' => 100
]
]
];

Expand Down
2 changes: 1 addition & 1 deletion web/app/themes/theme/App/Theme/ThemeBlocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public function __construct($allowed_blocks)

$this->allowed_blocks = $allowed_blocks;

add_filter( 'allowed_block_types_all', [$this, 'allow_blocks'], 10, 2 );
// add_filter( 'allowed_block_types_all', [$this, 'allow_blocks'], 10, 2 );

}

Expand Down
2 changes: 1 addition & 1 deletion web/app/themes/theme/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ License URI: https://opensource.org/licenses/MIT
font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;
}

html :where(.editor-styles-wrapper) h1, html :where(.editor-styles-wrapper) h2, html :where(.editor-styles-wrapper) h3, html :where(.editor-styles-wrapper) h4, html :where(.editor-styles-wrapper) h5, html :where(.editor-styles-wrapper) h6, html :where(.editor-styles-wrapper) select {
html :where(.editor-styles-wrapper) h1, html :where(.editor-styles-wrapper) h2, html :where(.editor-styles-wrapper) h3, html :where(.editor-styles-wrapper) h4, html :where(.editor-styles-wrapper) h5, html :where(.editor-styles-wrapper) h6, html :where(.editor-styles-wrapper) select, html :where(.editor-styles-wrapper) p {
font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;
}

0 comments on commit f7f8ca3

Please sign in to comment.