Skip to content

Commit 443616a

Browse files
committed
Updated code in wordpress custom theme
1 parent c5c7ba4 commit 443616a

File tree

12 files changed

+303
-213
lines changed

12 files changed

+303
-213
lines changed
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
{
22
"require": {
3-
"htmlburger/carbon-fields": "^3.3",
4-
"htmlburger/carbon-field-number": "^3.0"
5-
},
6-
"autoload": {
7-
"psr-4": {
8-
}
3+
"htmlburger/carbon-field-number": "^3.0",
4+
"htmlburger/carbon-fields": "^3.5.3"
95
}
106
}

4.php/1.wordpress/wp-content/themes/bareboneapi-v1/composer.lock

Lines changed: 10 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

4.php/1.wordpress/wp-content/themes/bareboneapi-v1/functions.php

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,10 @@
1111

1212
// Enable menu support.
1313
// https://developer.wordpress.org/reference/functions/add_theme_support/
14-
register_nav_menus(
15-
array(
16-
'primary-menu' => __( 'Primary Menu' ),
17-
'secondary-menu' => __( 'Secondary Menu' )
18-
)
19-
);
14+
register_nav_menus([
15+
'primary-menu' => __( 'Primary Menu' ),
16+
'secondary-menu' => __( 'Secondary Menu' )
17+
]);
2018

2119
// Enable post thumbnail support.
2220
// https://codex.wordpress.org/Post_Thumbnails
@@ -46,24 +44,27 @@ function crb_load () {
4644
include 'inc/metabox/carbon-fields/fields/post-attributes.php';
4745
include 'inc/metabox/carbon-fields/fields/related-posts.php';
4846
include 'inc/metabox/carbon-fields/fields/carousels.php';
47+
include 'inc/metabox/carbon-fields/fields/galleries.php';
48+
include 'inc/metabox/carbon-fields/fields/content-blocks.php';
4949

50-
/**
51-
* Include custom post types.
52-
*
53-
*/
50+
// Include custom post types.
5451
include 'inc/custom-post-type/project.php';
5552

56-
/**
57-
* Include APIs.
58-
*
59-
*/
53+
// Include APIs.
6054
include 'inc/api/commons.php';
6155
include 'inc/api/siteinfo.php';
6256
include 'inc/api/menu.php';
6357
include 'inc/api/project/post/many.php';
6458
include 'inc/api/project/get/one.php';
6559
include 'inc/api/page/get/one.php';
6660

61+
// Disable Gutenberg Completely
62+
// disable for posts
63+
add_filter('use_block_editor_for_post', '__return_false', 10);
64+
65+
// disable for post types
66+
add_filter('use_block_editor_for_post_type', '__return_false', 10);
67+
6768
// Limit the Image Upload Size.
6869
function whero_limit_image_size ($file) {
6970
// Calculate the image size in KB.
@@ -81,10 +82,3 @@ function whero_limit_image_size ($file) {
8182
return $file;
8283
}
8384
add_filter('wp_handle_upload_prefilter', 'whero_limit_image_size');
84-
85-
// Disable Gutenberg Completely
86-
// disable for posts
87-
add_filter('use_block_editor_for_post', '__return_false', 10);
88-
89-
// disable for post types
90-
add_filter('use_block_editor_for_post_type', '__return_false', 10);

0 commit comments

Comments
 (0)