Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
sections example
// Temporarily disable installation in Customizer. See #42184.
$filesystem_method
=
get_filesystem_method
(
)
;
ob_start
(
)
;
$filesystem_credentials_are_stored
=
request_filesystem_credentials
(
self_admin_url
(
)
)
;
ob_end_clean
(
)
;
if
(
'direct' !==
$filesystem_method
&& !
$filesystem_credentials_are_stored
)
{
$settings
[
'theme'
]
[
'_filesystemCredentialsNeeded'
]
= true;
}
// Prepare Customize Section objects to pass to JavaScript.
foreach
(
$this
->
sections
(
)
as
$id
=>
$section
)
{
if
(
$section
->
check_capabilities
(
)
)
{
$settings
[
'sections'
]
[
$id
]
=
$section
->
json
(
)
;
}
}
// Prepare Customize Panel objects to pass to JavaScript.
foreach
(
$this
->
panels
(
)
as
$panel_id
=>
$panel
)
{
if
(
$panel
->
check_capabilities
(
)
)
{
$settings
[
'panels'
]
[
$panel_id
]
=
$panel
->
json
(
)
;
foreach
(
$panel
->sections
as
$section_id
=>
$section
)
{
if
(
$section
->
check_capabilities
(
)
)
{