Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
makura-2025
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Raj Shah
makura-2025
Commits
bb3750af
Commit
bb3750af
authored
May 30, 2025
by
rajshah
Committed by
Arjun Jhukal
May 30, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
done main content single case study
parent
9e7219d0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
70 additions
and
1 deletions
+70
-1
case-study-content.php
blocks/case-study/case-study-content.php
+52
-0
blocks.php
includes/gutenberg/blocks.php
+18
-1
No files found.
blocks/case-study/case-study-content.php
0 → 100644
View file @
bb3750af
<!-- Case Study Content -->
<?php
$case_study_content
=
get_field
(
'case_study_content'
)
?:
[];
if
(
!
empty
(
$case_study_content
)
&&
isset
(
$case_study_content
)
&&
is_array
(
$case_study_content
))
:
?>
<section
class=
"case-study-general makura-new"
>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"col-lg-4 col-xl-3"
>
<aside
class=
"case-study-general-aside toc"
>
<div
class=
"toc-title d-lg-none"
>
<h6>
Table of Content
</h6>
</div>
<div
class=
"category-list"
>
<ul>
<?php
foreach
(
$case_study_content
as
$i
=>
$casestudy
)
:
$case_study_content_title
=
$casestudy
[
'case_study_content_title'
]
??
''
;
$case_study_content_desc
=
$casestudy
[
'case_study_content_desc'
]
??
''
;
$case_study_content_title_id
=
str_replace
(
' '
,
'-'
,
strtolower
(
$case_study_content_title
));
if
(
!
empty
(
$case_study_content_title
))
:
?>
<li
class=
"
<?php
echo
esc_attr
(
$i
===
0
)
?
'active'
:
''
;
?>
"
>
<a
href=
"#"
data-target=
"
<?php
echo
esc_attr
(
$case_study_content_title_id
);
?>
"
>
<?php
echo
esc_html
(
$case_study_content_title
);
?>
</a>
</li>
<?php
endif
;
endforeach
;
?>
</ul>
</div>
</aside>
</div>
<div
class=
"col-lg-8 col-xl-9"
>
<div
class=
"case-study-general-content"
>
<?php
foreach
(
$case_study_content
as
$i
=>
$casestudy
)
:
$case_study_content_title
=
$casestudy
[
'case_study_content_title'
]
??
''
;
$case_study_content_desc
=
$casestudy
[
'case_study_content_desc'
]
??
''
;
$case_study_content_title_id
=
str_replace
(
' '
,
'-'
,
strtolower
(
$case_study_content_title
));
if
(
!
empty
(
$case_study_content_title
))
:
?>
<h2
id=
"
<?php
echo
esc_attr
(
$case_study_content_title_id
);
?>
"
>
<?php
echo
esc_html
(
$case_study_content_title
);
?>
</h2>
<?php
endif
;
if
(
!
empty
(
$case_study_content_desc
))
:
echo
esc_html
(
$case_study_content_desc
);
endif
;
?>
<?php
endforeach
;
?>
</div>
</div>
</div>
</div>
</section>
<?php
endif
;
?>
<!-- !Case Study Content -->
\ No newline at end of file
includes/gutenberg/blocks.php
View file @
bb3750af
...
@@ -775,7 +775,7 @@ function my_acf_init_block_types()
...
@@ -775,7 +775,7 @@ function my_acf_init_block_types()
acf_register_block_type
(
array
(
acf_register_block_type
(
array
(
'name'
=>
'Case Study Banner Block'
,
'name'
=>
'Case Study Banner Block'
,
'title'
=>
__
(
'Case Study Banner Block'
),
'title'
=>
__
(
'Case Study Banner Block'
),
'description'
=>
__
(
'Case Study - Banner Block for
SEO Page
s'
),
'description'
=>
__
(
'Case Study - Banner Block for
Makura Project
s'
),
'render_template'
=>
'blocks/case-study/case-study-banner.php'
,
'render_template'
=>
'blocks/case-study/case-study-banner.php'
,
'category'
=>
'formatting'
,
'category'
=>
'formatting'
,
'icon'
=>
file_get_contents
(
get_template_directory
()
.
'/assets/img/makura.svg'
),
'icon'
=>
file_get_contents
(
get_template_directory
()
.
'/assets/img/makura.svg'
),
...
@@ -787,5 +787,21 @@ function my_acf_init_block_types()
...
@@ -787,5 +787,21 @@ function my_acf_init_block_types()
],
],
],
],
));
));
// Case Study - Content Block
acf_register_block_type
(
array
(
'name'
=>
'Case Study Content Block'
,
'title'
=>
__
(
'Case Study Content Block'
),
'description'
=>
__
(
'Case Study - Content Block for Makura Projects'
),
'render_template'
=>
'blocks/case-study/case-study-content.php'
,
'category'
=>
'formatting'
,
'icon'
=>
file_get_contents
(
get_template_directory
()
.
'/assets/img/makura.svg'
),
'keywords'
=>
array
(
'Case Study - Content Block'
,
'case study'
,
'content'
,
'makura'
),
'example'
=>
[
'attributes'
=>
[
'mode'
=>
'preview'
,
'data'
=>
[],
],
],
));
}
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment