Current File : /home/kelaby89/muzza.fit/wp-content/themes/deadlift/inc/customizer/mods/layout.php |
<?php
/**
* Deadlift layout
*
* @package WordPress
* @subpackage Deadlift
* @version 1.8.2
*/
defined( 'ABSPATH' ) || exit;
/**
* Site layout mods
*
* @param array $mods Array of mods.
* @return array
*/
function deadlift_set_layout_mods( $mods ) {
$mods['layout'] = array(
'id' => 'layout',
'title' => esc_html__( 'Layout', 'deadlift' ),
'icon' => 'layout',
'options' => array(
'site_layout' => array(
'id' => 'site_layout',
'label' => esc_html__( 'General', 'deadlift' ),
'type' => 'radio_images',
'default' => 'wide',
'choices' => array(
array(
'key' => 'wide',
'image' => get_parent_theme_file_uri( 'assets/img/customizer/site-layout/wide.png' ),
'text' => esc_html__( 'Wide', 'deadlift' ),
),
array(
'key' => 'boxed',
'image' => get_parent_theme_file_uri( 'assets/img/customizer/site-layout/boxed.png' ),
'text' => esc_html__( 'Boxed', 'deadlift' ),
),
array(
'key' => 'frame',
'image' => get_parent_theme_file_uri( 'assets/img/customizer/site-layout/frame.png' ),
'text' => esc_html__( 'Frame', 'deadlift' ),
),
),
'transport' => 'postMessage',
),
'button_style' => array(
'id' => 'button_style',
'label' => esc_html__( 'Button Shape', 'deadlift' ),
'type' => 'select',
'choices' => array(
'standard' => esc_html__( 'Standard', 'deadlift' ),
'square' => esc_html__( 'Square', 'deadlift' ),
'round' => esc_html__( 'Round', 'deadlift' ),
),
'transport' => 'postMessage',
),
),
);
if ( class_exists( 'Wolf_Vc_Content_Block' ) || class_exists( 'Wolf_Core' ) ) {
$content_block_post_slug = ( class_exists( 'Wolf_Core' ) ) ? 'wolf_content_block' : 'wvc_content_block';
$content_block_posts = get_posts( 'post_type="' . $content_block_post_slug . '"&numberposts=-1' );
$content_blocks = array( '' => esc_html__( 'None', 'deadlift' ) );
if ( $content_block_posts ) {
foreach ( $content_block_posts as $content_block_options ) {
$content_blocks[ $content_block_options->ID ] = $content_block_options->post_title;
}
} else {
$content_blocks[0] = esc_html__( 'No Content Block Yet', 'deadlift' );
}
/*
$mods['layout']['options']['top_bar_block_id'] = [
'label' => esc_html__( 'Top Bar Block', 'deadlift' ),
'id' => 'top_bar_block_id',
'type' => 'select',
'choices' => $content_blocks,
'description' => esc_html__( 'A block to display above the navigation.', 'deadlift' ),
);
*/
$mods['layout']['options']['after_header_block'] = array(
'label' => esc_html__( 'Post-header Block', 'deadlift' ),
'id' => 'after_header_block',
'type' => 'select',
'choices' => $content_blocks,
'description' => esc_html__( 'A block to display below to header or in replacement of the header.', 'deadlift' ),
);
$mods['layout']['options']['before_footer_block'] = array(
'label' => esc_html__( 'Pre-footer Block', 'deadlift' ),
'id' => 'before_footer_block',
'type' => 'select',
'choices' => $content_blocks,
'description' => esc_html__( 'A block to display above to footer or in replacement of the footer.', 'deadlift' ),
);
}
return $mods;
}
add_filter( 'deadlift_customizer_mods', 'deadlift_set_layout_mods' );