Your IP : 216.73.216.162


Current Path : /home/x/b/o/xbodynamge/namtation/wp-content/
Upload File :
Current File : /home/x/b/o/xbodynamge/namtation/wp-content/section-features.php.tar

home/xbodynamge/lebauwcentre/wp-content/themes/onepress/section-parts/section-features.php000064400000007636151144327270026340 0ustar00<?php
$id       = get_theme_mod( 'onepress_features_id', esc_html__('features', 'onepress') );
$disable  = get_theme_mod( 'onepress_features_disable' ) == 1 ? true : false;
$title    = get_theme_mod( 'onepress_features_title', esc_html__('Features', 'onepress' ));
$subtitle = get_theme_mod( 'onepress_features_subtitle', esc_html__('Why choose Us', 'onepress' ));
if ( onepress_is_selective_refresh() ) {
    $disable = false;
}
$data  = onepress_get_features_data();
if ( !$disable && !empty( $data ) ) {
    $desc = get_theme_mod( 'onepress_features_desc' );
?>
<?php if ( ! onepress_is_selective_refresh() ){ ?>
<section id="<?php if ( $id != '') { echo esc_attr( $id ); } ?>" <?php do_action('onepress_section_atts', 'features'); ?>
         class="<?php echo esc_attr(apply_filters('onepress_section_class', 'section-features section-padding section-meta onepage-section', 'features')); ?>">
<?php } ?>
    <?php do_action('onepress_section_before_inner', 'features'); ?>
    <div class="<?php echo esc_attr( apply_filters( 'onepress_section_container_class', 'container', 'features' ) ); ?>">
        <?php if ( $title ||  $subtitle || $desc ){ ?>
        <div class="section-title-area">
            <?php if ($subtitle != '') echo '<h5 class="section-subtitle">' . esc_html($subtitle) . '</h5>'; ?>
            <?php if ($title != '') echo '<h2 class="section-title">' . esc_html($title) . '</h2>'; ?>
            <?php if ( $desc ) {
                echo '<div class="section-desc">' . apply_filters( 'onepress_the_content', wp_kses_post( $desc ) ) . '</div>';
            } ?>
        </div>
        <?php } ?>
        <div class="section-content">
            <div class="row">
            <?php
            $layout = intval( get_theme_mod( 'onepress_features_layout', 3 ) );
            foreach ( $data as $k => $f ) {
                $media = '';
                $f =  wp_parse_args( $f, array(
                    'icon_type' => 'icon',
                    'icon' => 'gg',
                    'image' => '',
                    'link' => '',
                    'title' => '',
                    'desc' => '',
                ) );
                if ( $f['icon_type'] == 'image' && $f['image'] ){
                    $url = onepress_get_media_url( $f['image'] );
	                $image_alt = get_post_meta( $f['image']['id'], '_wp_attachment_image_alt', true);
                    if ( $url ) {
                        $media = '<span class="icon-image"><img src="'.esc_url( $url ).'" alt="'. $image_alt .'"></span>';
                    }
                } else if ( $f['icon'] ) {
                    $f['icon'] = trim( $f['icon'] );
                    $media = '<span class="fa-stack fa-5x"><i class="fa fa-circle fa-stack-2x icon-background-default"></i> <i class="feature-icon fa '.esc_attr( $f['icon'] ).' fa-stack-1x"></i></span>';
                }

                ?>
                <div class="feature-item col-lg-<?php echo esc_attr( $layout ); ?> col-sm-6 wow slideInUp">
                    <div class="feature-media">
                        <?php if ( $f['link'] ) { ?><a title="<?php echo esc_attr( $f['title'] ) ?>" href="<?php echo esc_url( $f['link']  ); ?>"><?php } ?>
                        <?php echo $media; ?>
                        <?php if ( $f['link'] )  { ?></a><?php } ?>
                    </div>
                    <h4><?php if ( $f['link'] ) { ?><a title="<?php echo esc_attr( $f['title'] ) ?>" href="<?php echo esc_url( $f['link']  ); ?>"><?php } ?><?php echo esc_html( $f['title'] ); ?><?php if ( $f['link'] )  { ?></a><?php } ?></h4>
                    <div class="feature-item-content"><?php echo apply_filters( 'the_content', $f['desc'] ); ?></div>
                </div>
            <?php
            }// end loop featues

            ?>
            </div>
        </div>
    </div>
    <?php do_action('onepress_section_after_inner', 'features'); ?>

<?php if ( ! onepress_is_selective_refresh() ){ ?>
</section>
<?php } ?>
<?php } ?>
home/xbodynamge/lebauwcentre/wp-content/themes/onepress/inc/customize-configs/section-features.php000064400000013655151145456230027764 0ustar00<?php
/**
 * Section: Features
 */
$wp_customize->add_panel( 'onepress_features' ,
	array(
		'priority'        => 150,
		'title'           => esc_html__( 'Section: Features', 'onepress' ),
		'description'     => '',
		'active_callback' => 'onepress_showon_frontpage'
	)
);

$wp_customize->add_section( 'onepress_features_settings' ,
	array(
		'priority'    => 3,
		'title'       => esc_html__( 'Section Settings', 'onepress' ),
		'description' => '',
		'panel'       => 'onepress_features',
	)
);

// Show Content
$wp_customize->add_setting( 'onepress_features_disable',
	array(
		'sanitize_callback' => 'onepress_sanitize_checkbox',
		'default'           => '',
	)
);
$wp_customize->add_control( 'onepress_features_disable',
	array(
		'type'        => 'checkbox',
		'label'       => esc_html__('Hide this section?', 'onepress'),
		'section'     => 'onepress_features_settings',
		'description' => esc_html__('Check this box to hide this section.', 'onepress'),
	)
);

// Section ID
$wp_customize->add_setting( 'onepress_features_id',
	array(
		'sanitize_callback' => 'onepress_sanitize_text',
		'default'           => esc_html__('features', 'onepress'),
	)
);
$wp_customize->add_control( 'onepress_features_id',
	array(
		'label' 		=> esc_html__('Section ID:', 'onepress'),
		'section' 		=> 'onepress_features_settings',
		'description'   => esc_html__( 'The section ID should be English character, lowercase and no space.', 'onepress' )
	)
);

// Title
$wp_customize->add_setting( 'onepress_features_title',
	array(
		'sanitize_callback' => 'sanitize_text_field',
		'default'           => esc_html__('Features', 'onepress'),
	)
);
$wp_customize->add_control( 'onepress_features_title',
	array(
		'label' 		=> esc_html__('Section Title', 'onepress'),
		'section' 		=> 'onepress_features_settings',
		'description'   => '',
	)
);

// Sub Title
$wp_customize->add_setting( 'onepress_features_subtitle',
	array(
		'sanitize_callback' => 'sanitize_text_field',
		'default'           => esc_html__('Section subtitle', 'onepress'),
	)
);
$wp_customize->add_control( 'onepress_features_subtitle',
	array(
		'label' 		=> esc_html__('Section Subtitle', 'onepress'),
		'section' 		=> 'onepress_features_settings',
		'description'   => '',
	)
);

// Description
$wp_customize->add_setting( 'onepress_features_desc',
	array(
		'sanitize_callback' => 'onepress_sanitize_text',
		'default'           => '',
	)
);
$wp_customize->add_control( new OnePress_Editor_Custom_Control(
	$wp_customize,
	'onepress_features_desc',
	array(
		'label' 		=> esc_html__('Section Description', 'onepress'),
		'section' 		=> 'onepress_features_settings',
		'description'   => '',
	)
));

// Features layout
$wp_customize->add_setting( 'onepress_features_layout',
	array(
		'sanitize_callback' => 'sanitize_text_field',
		'default'           => '3',
	)
);

$wp_customize->add_control( 'onepress_features_layout',
	array(
		'label' 		=> esc_html__('Features Layout Setting', 'onepress'),
		'section' 		=> 'onepress_features_settings',
		'description'   => '',
		'type'          => 'select',
		'choices'       => array(
			'3' => esc_html__( '4 Columns', 'onepress' ),
			'4' => esc_html__( '3 Columns', 'onepress' ),
			'6' => esc_html__( '2 Columns', 'onepress' ),
		),
	)
);


onepress_add_upsell_for_section( $wp_customize, 'onepress_features_settings' );


$wp_customize->add_section( 'onepress_features_content' ,
	array(
		'priority'    => 6,
		'title'       => esc_html__( 'Section Content', 'onepress' ),
		'description' => '',
		'panel'       => 'onepress_features',
	)
);

// Features content
$wp_customize->add_setting(
	'onepress_features_boxes',
	array(
		//'default' => '',
		'sanitize_callback' => 'onepress_sanitize_repeatable_data_field',
		'transport' => 'refresh', // refresh or postMessage
	) );

$wp_customize->add_control(
	new Onepress_Customize_Repeatable_Control(
		$wp_customize,
		'onepress_features_boxes',
		array(
			'label' 		=> esc_html__('Features content', 'onepress'),
			'description'   => '',
			'section'       => 'onepress_features_content',
			'live_title_id' => 'title', // apply for unput text and textarea only
			'title_format'  => esc_html__('[live_title]', 'onepress'), // [live_title]
			'max_item'      => 4, // Maximum item can add
			'limited_msg' 	=> wp_kses_post( __( 'Upgrade to <a target="_blank" href="https://www.famethemes.com/plugins/onepress-plus/?utm_source=theme_customizer&utm_medium=text_link&utm_campaign=onepress_customizer#get-started">OnePress Plus</a> to be able to add more items and unlock other premium features!', 'onepress' ) ),
			'fields'    => array(
				'title'  => array(
					'title' => esc_html__('Title', 'onepress'),
					'type'  =>'text',
				),
				'icon_type'  => array(
					'title' => esc_html__('Custom icon', 'onepress'),
					'type'  =>'select',
					'options' => array(
						'icon' => esc_html__('Icon', 'onepress'),
						'image' => esc_html__('image', 'onepress'),
					),
				),
				'icon'  => array(
					'title' => esc_html__('Icon', 'onepress'),
					'type'  =>'icon',
					'required' => array( 'icon_type', '=', 'icon' ),
				),
				'image'  => array(
					'title' => esc_html__('Image', 'onepress'),
					'type'  =>'media',
					'required' => array( 'icon_type', '=', 'image' ),
				),
				'desc'  => array(
					'title' => esc_html__('Description', 'onepress'),
					'type'  =>'editor',
				),
				'link'  => array(
					'title' => esc_html__('Custom Link', 'onepress'),
					'type'  =>'text',
				),
			),

		)
	)
);

// About content source
$wp_customize->add_setting( 'onepress_about_content_source',
	array(
		'sanitize_callback' => 'sanitize_text_field',
		'default'           => 'content',
	)
);

$wp_customize->add_control( 'onepress_about_content_source',
	array(
		'label' 		=> esc_html__('Item content source', 'onepress'),
		'section' 		=> 'onepress_about_content',
		'description'   => '',
		'type'          => 'select',
		'choices'       => array(
			'content' => esc_html__( 'Full Page Content', 'onepress' ),
			'excerpt' => esc_html__( 'Page Excerpt', 'onepress' ),
		),
	)
);