| Current Path : /home/x/b/o/xbodynamge/namtation/wp-content/ |
| Current File : /home/x/b/o/xbodynamge/namtation/wp-content/section-about.php.tar |
home/xbodynamge/lebauwcentre/wp-content/themes/onepress/section-parts/section-about.php 0000644 00000010233 15114053516 0025612 0 ustar 00 <?php
$id = get_theme_mod( 'onepress_about_id', esc_html__( 'about', 'onepress' ) );
$disable = get_theme_mod( 'onepress_about_disable' ) == 1 ? true : false;
$title = get_theme_mod( 'onepress_about_title', esc_html__( 'About Us', 'onepress' ) );
$subtitle = get_theme_mod( 'onepress_about_subtitle', esc_html__( 'Section subtitle', 'onepress' ) );
$desc = wp_kses_post( get_theme_mod( 'onepress_about_desc' ) );
if ( onepress_is_selective_refresh() ) {
$disable = false;
}
// Get data
$page_ids = onepress_get_section_about_data();
$content_source = get_theme_mod( 'onepress_about_content_source' );
?>
<?php if ( ! $disable ) { ?>
<?php if ( ! onepress_is_selective_refresh() ) { ?>
<section id="<?php if ( $id != '' ) {
echo esc_attr( $id );
}; ?>" <?php do_action( 'onepress_section_atts', 'about' ); ?> class="<?php echo esc_attr( apply_filters( 'onepress_section_class', 'section-about section-padding onepage-section', 'about' ) ); ?>">
<?php } ?>
<?php do_action( 'onepress_section_before_inner', 'about' ); ?>
<div class="<?php echo esc_attr( apply_filters( 'onepress_section_container_class', 'container', 'about' ) ); ?>">
<?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', $desc ) . '</div>';
} ?>
</div>
<?php } ?>
<div class="row">
<?php
if ( is_array( $page_ids ) && ! empty( $page_ids ) ) {
$col = 3;
$num_col = 4;
$n = count( $page_ids );
if ( $n < 4 ) {
switch ( $n ) {
case 3:
$col = 4;
$num_col = 3;
break;
case 2:
$col = 6;
$num_col = 2;
break;
default:
$col = 12;
$num_col = 1;
}
}
// Layout columns
$_layout = absint( get_theme_mod( 'onepress_about_layout', 3 ) );
if ( $n > $_layout ) {
$num_col = $_layout;
$col = round( 12 / $_layout );
}
$j = 0;
foreach ( $page_ids as $post_id => $settings ) {
$post_id = $settings['content_page'];
$post_id = apply_filters( 'wpml_object_id', $post_id, 'page', true );
$post = get_post( $post_id );
$class = 'col-lg-' . $col;
if ( $n == 1 ) {
$class .= ' col-sm-12 ';
} else {
$class .= ' col-sm-6 ';
}
if ( $j >= $num_col ) {
$j = 1;
$class .= ' clearleft';
} else {
$j++;
}
?>
<div class="<?php echo esc_attr( $class ); ?> wow slideInUp">
<?php if ( has_post_thumbnail( $post ) ) { ?>
<div class="about-image"><?php
if ( $settings['enable_link'] ) {
echo '<a href="' . esc_url( get_permalink( $post ) ) . '">';
}
echo get_the_post_thumbnail( $post, 'onepress-medium' );
if ( $settings['enable_link'] ) {
echo '</a>';
}
?></div>
<?php } ?>
<?php if ( ! $settings['hide_title'] ) { ?>
<h3><?php
if ( $settings['enable_link'] ) {
echo '<a href="' . esc_url( get_permalink( $post ) ) . '">';
}
echo get_the_title( $post );
if ( $settings['enable_link'] ) {
echo '</a>';
}
?></h3>
<?php } ?>
<?php
if ( $content_source == 'excerpt' ) {
$excerpt = get_the_excerpt( $post );
echo apply_filters( 'the_excerpt', $excerpt );
} else {
$content = apply_filters( 'the_content', $post->post_content );
$content = str_replace( ']]>', ']]>', $content );
echo $content;
}
?>
</div>
<?php
} // end foreach
wp_reset_postdata();
}// ! empty pages ids
?>
</div>
</div>
<?php do_action( 'onepress_section_after_inner', 'about' ); ?>
<?php if ( ! onepress_is_selective_refresh() ) { ?>
</section>
<?php } ?>
<?php }
home/xbodynamge/lebauwcentre/wp-content/themes/onepress/inc/customize-configs/section-about.php 0000644 00000013036 15115003611 0027234 0 ustar 00 <?php
/**
* Section: About
*/
$wp_customize->add_panel( 'onepress_about',
array(
'priority' => 160,
'title' => esc_html__( 'Section: About', 'onepress' ),
'description' => '',
'active_callback' => 'onepress_showon_frontpage'
)
);
$wp_customize->add_section( 'onepress_about_settings',
array(
'priority' => 3,
'title' => esc_html__( 'Section Settings', 'onepress' ),
'description' => '',
'panel' => 'onepress_about',
)
);
// Show Content
$wp_customize->add_setting( 'onepress_about_disable',
array(
'sanitize_callback' => 'onepress_sanitize_checkbox',
'default' => '',
)
);
$wp_customize->add_control( 'onepress_about_disable',
array(
'type' => 'checkbox',
'label' => esc_html__( 'Hide this section?', 'onepress' ),
'section' => 'onepress_about_settings',
'description' => esc_html__( 'Check this box to hide this section.', 'onepress' ),
)
);
// Section ID
$wp_customize->add_setting( 'onepress_about_id',
array(
'sanitize_callback' => 'onepress_sanitize_text',
'default' => esc_html__( 'about', 'onepress' ),
)
);
$wp_customize->add_control( 'onepress_about_id',
array(
'label' => esc_html__( 'Section ID:', 'onepress' ),
'section' => 'onepress_about_settings',
'description' => esc_html__( 'The section ID should be English character, lowercase and no space.', 'onepress' )
)
);
// Title
$wp_customize->add_setting( 'onepress_about_title',
array(
'sanitize_callback' => 'sanitize_text_field',
'default' => esc_html__( 'About Us', 'onepress' ),
)
);
$wp_customize->add_control( 'onepress_about_title',
array(
'label' => esc_html__( 'Section Title', 'onepress' ),
'section' => 'onepress_about_settings',
'description' => '',
)
);
// Sub Title
$wp_customize->add_setting( 'onepress_about_subtitle',
array(
'sanitize_callback' => 'sanitize_text_field',
'default' => esc_html__( 'Section subtitle', 'onepress' ),
)
);
$wp_customize->add_control( 'onepress_about_subtitle',
array(
'label' => esc_html__( 'Section Subtitle', 'onepress' ),
'section' => 'onepress_about_settings',
'description' => '',
)
);
// Description
$wp_customize->add_setting( 'onepress_about_desc',
array(
'sanitize_callback' => 'onepress_sanitize_text',
'default' => '',
)
);
$wp_customize->add_control( new OnePress_Editor_Custom_Control(
$wp_customize,
'onepress_about_desc',
array(
'label' => esc_html__( 'Section Description', 'onepress' ),
'section' => 'onepress_about_settings',
'description' => '',
)
) );
if ( class_exists( 'OnePress_Plus' ) ) {
// About column
$wp_customize->add_setting( 'onepress_about_layout',
array(
'sanitize_callback' => 'sanitize_text_field',
'default' => 3,
)
);
$wp_customize->add_control( 'onepress_about_layout',
array(
'label' => esc_html__( 'Layout Settings', 'onepress' ),
'section' => 'onepress_about_settings',
'description' => '',
'type' => 'select',
'choices' => array(
4 => esc_html__( '4 Columns', 'onepress' ),
3 => esc_html__( '3 Columns', 'onepress' ),
2 => esc_html__( '2 Columns', 'onepress' ),
1 => esc_html__( '1 Column', 'onepress' ),
),
)
);
}
onepress_add_upsell_for_section( $wp_customize , 'onepress_about_settings' );
$wp_customize->add_section( 'onepress_about_content',
array(
'priority' => 6,
'title' => esc_html__( 'Section Content', 'onepress' ),
'description' => '',
'panel' => 'onepress_about',
)
);
// About Items
$wp_customize->add_setting(
'onepress_about_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_about_boxes',
array(
'label' => esc_html__( 'About content page', 'onepress' ),
'description' => '',
'section' => 'onepress_about_content',
'live_title_id' => 'content_page', // apply for unput text and textarea only
'title_format' => esc_html__( '[live_title]', 'onepress' ), // [live_title]
'max_item' => 3, // 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(
'content_page' => array(
'title' => esc_html__( 'Select a page', 'onepress' ),
'type' => 'select',
'options' => $option_pages
),
'hide_title' => array(
'title' => esc_html__( 'Hide item title', 'onepress' ),
'type' => 'checkbox',
),
'enable_link' => array(
'title' => esc_html__( 'Link to single page', 'onepress' ),
'type' => 'checkbox',
),
),
)
)
);
// 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' ),
),
)
);