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-team.php.tar

home/xbodynamge/lebauwcentre/wp-content/themes/onepress/section-parts/section-team.php000064400000011042151144074470025433 0ustar00<?php
$id       = get_theme_mod( 'onepress_team_id', esc_html__('team', 'onepress') );
$disable  = get_theme_mod( 'onepress_team_disable' ) ==  1 ? true : false;
$title    = get_theme_mod( 'onepress_team_title', esc_html__('Our Team', 'onepress' ));
$subtitle = get_theme_mod( 'onepress_team_subtitle', esc_html__('Section subtitle', 'onepress' ));
$layout   = intval( get_theme_mod( 'onepress_team_layout', 3 ) );
if ( $layout <= 0 ){
    $layout = 3;
}
$user_ids = onepress_get_section_team_data();
if ( onepress_is_selective_refresh() ) {
    $disable = false;
}
if ( ! empty( $user_ids ) ) {
    $desc = get_theme_mod( 'onepress_team_desc' );
    ?>
    <?php if ( ! $disable ) : ?>
        <?php if ( ! onepress_is_selective_refresh() ){ ?>
        <section id="<?php if ($id != '') { echo esc_attr( $id ); }; ?>" <?php do_action('onepress_section_atts', 'team'); ?>
                 class="<?php echo esc_attr(apply_filters('onepress_section_class', 'section-team section-padding section-meta onepage-section', 'team')); ?>">
        <?php } ?>
            <?php do_action('onepress_section_before_inner', 'team'); ?>
            <div class="<?php echo esc_attr( apply_filters( 'onepress_section_container_class', 'container', 'team' ) ); ?>">
                <?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="team-members row team-layout-<?php echo intval( 12 / $layout  ); ?>">
                    <?php
                    if ( ! empty( $user_ids ) ) {
                        $n = 0;

                        foreach ( $user_ids as $member ) {
                            $member = wp_parse_args( $member, array(
                                'user_id'  =>array(),
                            ));

                            $link = isset( $member['link'] ) ?  $member['link'] : '';
                            $user_id = wp_parse_args( $member['user_id'],array(
                                'id' => '',
                             ) );

                            $image_attributes = wp_get_attachment_image_src( $user_id['id'], 'onepress-small' );
                            $image_alt = get_post_meta( $user_id['id'], '_wp_attachment_image_alt', true);

                            if ( $image_attributes ) {
                                $image = $image_attributes[0];
                                $data = get_post( $user_id['id'] );
                                $n ++ ;
                                ?>
                                <div class="team-member wow slideInUp">
                                    <div class="member-thumb">
                                        <?php if ( $link ) { ?>
                                            <a href="<?php echo esc_url( $link ); ?>">
                                        <?php } ?>
                                        <img src="<?php echo esc_url( $image ); ?>" alt="<?php echo $image_alt; ?>">
                                        <?php if ( $link ) { ?>
                                            </a>
                                        <?php } ?>
                                        <?php do_action( 'onepress_section_team_member_media', $member ); ?>
                                    </div>
                                    <div class="member-info">
                                        <h5 class="member-name"><?php if ( $link ) { ?><a href="<?php echo esc_url( $link ); ?>"><?php } ?><?php echo esc_html( $data->post_title ); ?><?php if ( $link ) { ?></a><?php } ?></h5>
                                        <span class="member-position"><?php echo esc_html( $data->post_content ); ?></span>
                                    </div>
                                </div>
                                <?php
                            }

                        } // end foreach
                    }

                    ?>
                </div>
            </div>
            <?php do_action('onepress_section_after_inner', 'team'); ?>
        <?php if ( ! onepress_is_selective_refresh() ){ ?>
        </section>
        <?php } ?>
    <?php endif;
}
home/xbodynamge/lebauwcentre/wp-content/themes/onepress/inc/customize-configs/section-team.php000064400000011144151152031400027045 0ustar00<?php
/**
 * Section: Team
 */
$wp_customize->add_panel( 'onepress_team' ,
	array(
		'priority'        => 250,
		'title'           => esc_html__( 'Section: Team', 'onepress' ),
		'description'     => '',
		'active_callback' => 'onepress_showon_frontpage'
	)
);

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

// Show Content
$wp_customize->add_setting( 'onepress_team_disable',
	array(
		'sanitize_callback' => 'onepress_sanitize_checkbox',
		'default'           => '',
	)
);
$wp_customize->add_control( 'onepress_team_disable',
	array(
		'type'        => 'checkbox',
		'label'       => esc_html__('Hide this section?', 'onepress'),
		'section'     => 'onepress_team_settings',
		'description' => esc_html__('Check this box to hide this section.', 'onepress'),
	)
);
// Section ID
$wp_customize->add_setting( 'onepress_team_id',
	array(
		'sanitize_callback' => 'onepress_sanitize_text',
		'default'           => esc_html__('team', 'onepress'),
	)
);
$wp_customize->add_control( 'onepress_team_id',
	array(
		'label'     	=> esc_html__('Section ID:', 'onepress'),
		'section' 		=> 'onepress_team_settings',
		'description'   => 'The section ID should be English character, lowercase and no space.'
	)
);

// Title
$wp_customize->add_setting( 'onepress_team_title',
	array(
		'sanitize_callback' => 'sanitize_text_field',
		'default'           => esc_html__('Our Team', 'onepress'),
	)
);
$wp_customize->add_control( 'onepress_team_title',
	array(
		'label'    		=> esc_html__('Section Title', 'onepress'),
		'section' 		=> 'onepress_team_settings',
		'description'   => '',
	)
);

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

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

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

$wp_customize->add_control( 'onepress_team_layout',
	array(
		'label' 		=> esc_html__('Team Layout Settings', 'onepress'),
		'section' 		=> 'onepress_team_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_team_settings' );

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

// Team member settings
$wp_customize->add_setting(
	'onepress_team_members',
	array(
		'sanitize_callback' => 'onepress_sanitize_repeatable_data_field',
		'transport' => 'refresh', // refresh or postMessage
	) );


$wp_customize->add_control(
	new Onepress_Customize_Repeatable_Control(
		$wp_customize,
		'onepress_team_members',
		array(
			'label'     => esc_html__('Team members', 'onepress'),
			'description'   => '',
			'section'       => 'onepress_team_content',
			//'live_title_id' => 'user_id', // 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(
				'user_id' => array(
					'title' => esc_html__('User media', 'onepress'),
					'type'  =>'media',
					'desc'  => '',
				),
				'link' => array(
					'title' => esc_html__('Custom Link', 'onepress'),
					'type'  =>'text',
					'desc'  => '',
				),
			),

		)
	)
);