File: /disk001/machen/www/support/wp-content/themes/wp-moose/inc/universal/options.php
<?php
if ( !function_exists( 'wp_moose_get_sidebar_layout_options' ) ) {
/**
* Returns sidebar layout options.
*
* @return array $choices
*/
function wp_moose_get_sidebar_layout_options()
{
return array(
'no-sidebar' => array(
'image' => trailingslashit( get_template_directory_uri() ) . 'dist/images/sidebar-none.png',
'name' => esc_html__( 'No Sidebar', 'wp-moose' ),
),
'left-sidebar' => array(
'image' => trailingslashit( get_template_directory_uri() ) . 'dist/images/sidebar-left.png',
'name' => esc_html__( 'Left Sidebar', 'wp-moose' ),
),
'right-sidebar' => array(
'image' => trailingslashit( get_template_directory_uri() ) . 'dist/images/sidebar-right.png',
'name' => esc_html__( 'Right Sidebar', 'wp-moose' ),
),
);
}
}
if ( !function_exists( 'wp_moose_get_archive_layout_options' ) ) {
/**
* Return archive layout options.
*
* @return array $choices
*/
function wp_moose_get_archive_layout_options()
{
$options = array(
'archive-left' => array(
'image' => trailingslashit( get_template_directory_uri() ) . 'dist/images/archive-left.png',
'name' => esc_html__( 'Align Left', 'wp-moose' ),
),
'archive-right' => array(
'image' => trailingslashit( get_template_directory_uri() ) . 'dist/images/archive-right.png',
'name' => esc_html__( 'Align Right', 'wp-moose' ),
),
'archive-grid' => array(
'image' => trailingslashit( get_template_directory_uri() ) . 'dist/images/archive-grid-pro.png',
'name' => esc_html__( 'Grid', 'wp-moose' ),
),
);
return $options;
}
}
if ( !function_exists( 'wp_moose_get_style_options' ) ) {
/**
* Return style options.
*
* @return array $choices
*/
function wp_moose_get_style_options()
{
$choices = array(
'primary' => esc_html__( 'Primary', 'wp-moose' ),
'accent' => esc_html__( 'Accent (Pro)', 'wp-moose' ),
'secondary' => esc_html__( 'Secondary (Pro)', 'wp-moose' ),
'neutral' => esc_html__( 'Neutral (Pro)', 'wp-moose' ),
);
return $choices;
}
}
if ( !function_exists( 'wp_moose_get_pagination_options' ) ) {
/**
* Return archive pagination options.
*
* @return array $choices array
*/
function wp_moose_get_pagination_options()
{
return array(
'numeric' => esc_html__( 'Numeric', 'wp-moose' ),
'prev-next' => esc_html__( 'Prev And Next', 'wp-moose' ),
);
}
}
if ( !function_exists( 'wp_moose_get_footer_style_options' ) ) {
/**
* Return footer style options.
*
* @return array $choices
*/
function wp_moose_get_footer_style_options()
{
return array_merge( array(
'base' => esc_html__( 'Base', 'wp-moose' ),
), wp_moose_get_style_options() );
}
}
if ( !function_exists( 'wp_moose_get_header_style_options' ) ) {
/**
* Return header style options.
*
* @return array $choices
*/
function wp_moose_get_header_style_options()
{
return array_merge( array(
'transparent' => esc_html__( 'Transparent', 'wp-moose' ),
'ghost' => esc_html__( 'Base', 'wp-moose' ),
), wp_moose_get_style_options(), array(
'custom' => esc_html__( 'Custom (Pro)', 'wp-moose' ),
) );
}
}
if ( !function_exists( 'wp_moose_get_menu_style_options' ) ) {
/**
* Return menu style options.
*
* @return array $choices
*/
function wp_moose_get_menu_style_options()
{
return array_merge( array(
'links' => esc_html__( 'Links', 'wp-moose' ),
'pills' => esc_html__( 'Pills (pro)', 'wp-moose' ),
'underline' => esc_html__( 'Underline (pro)', 'wp-moose' ),
'bordered' => esc_html__( 'Bordered (pro)', 'wp-moose' ),
) );
}
}
if ( !function_exists( 'wp_moose_get_container_style_options' ) ) {
/**
* Return container style options.
*
* @return array $choices
*/
function wp_moose_get_container_style_options()
{
return array(
'shadow-boxes' => esc_html__( 'Shadow Boxes', 'wp-moose' ),
'border-boxes' => esc_html__( 'Border Boxes', 'wp-moose' ),
'ghost' => esc_html__( 'Ghost', 'wp-moose' ),
);
}
}
if ( !function_exists( 'wp_moose_get_container_style_css' ) ) {
/**
* Return css class for container style
*
* @param $type
*
* @return string
*/
function wp_moose_get_container_style_css( $type )
{
$styles = array(
'shadow-boxes' => 'shadow-md bg-base',
'border-boxes' => 'border border-base-200 bg-base',
'ghost' => '',
);
return ( isset( $styles[$type] ) ? $styles[$type] : $styles['shadow-boxes'] );
}
}
if ( !function_exists( 'wp_moose_get_button_style_options' ) ) {
/**
* Return button style options.
*
* @return array $choices
*/
function wp_moose_get_button_style_options()
{
return array_merge( array(
'ghost' => esc_html__( 'Ghost', 'wp-moose' ),
'link' => esc_html__( 'Link', 'wp-moose' ),
), wp_moose_get_style_options() );
}
}
if ( !function_exists( 'wp_moose_get_header_style_css' ) ) {
/**
* Return css class for header style
*
* @return string
*/
function wp_moose_get_header_style_css( $style, $default = 'ghost' )
{
$styles = array(
'transparent' => 'navbar-transparent',
'ghost' => 'navbar-ghost',
'primary' => 'navbar-primary',
);
return ( isset( $styles[$style] ) ? $styles[$style] : $styles[$default] );
}
}
if ( !function_exists( 'wp_moose_get_header_menu_style_css' ) ) {
/**
* Return css class for header menu style
*
* @return string
*/
function wp_moose_get_header_menu_style_css( $navbar_style, $menu_style )
{
$variants = array(
'transparent' => 'menu-transparent',
'ghost' => 'menu-ghost',
'primary' => 'menu-primary',
);
$styles = array(
'links' => 'menu-links',
);
return wp_moose_clsx( array( ( isset( $variants[$navbar_style] ) ? $variants[$navbar_style] : $variants['ghost'] ), ( isset( $styles[$menu_style] ) ? $styles[$menu_style] : $styles['links'] ) ) );
}
}
if ( !function_exists( 'wp_moose_get_footer_style_css' ) ) {
/**
* Return css class for footer style
*
* @return string
*/
function wp_moose_get_footer_style_css( $style, $default = 'base' )
{
$styles = array(
'base' => 'bg-base text-base-content border-base-100',
'primary' => 'bg-primary text-primary-content border-primary-focus',
);
return ( isset( $styles[$style] ) ? $styles[$style] : $styles[$default] );
}
}
if ( !function_exists( 'wp_moose_get_button_style_css' ) ) {
/**
* Return css class for button style
*
* @return string
*/
function wp_moose_get_button_style_css( $style, $default = 'primary' )
{
$styles = array(
'transparent' => 'btn-transparent',
'ghost' => 'btn-ghost',
'link' => 'btn-link',
'primary' => 'btn-primary',
);
return ( isset( $styles[$style] ) ? $styles[$style] : $styles[$default] );
}
}
if ( !function_exists( 'wp_moose_get_hero_background_types' ) ) {
/**
* Get hero background types
*
* @return array
*/
function wp_moose_get_hero_background_types()
{
return array(
'solid-color' => esc_html__( 'Solid Color', 'wp-moose' ),
'gradient-color' => esc_html__( 'Gradient Color', 'wp-moose' ),
'image' => esc_html__( 'Image', 'wp-moose' ),
);
}
}
if ( !function_exists( 'wp_moose_get_hero_content_type' ) ) {
/**
* Get hero content types
*/
function wp_moose_get_hero_content_type()
{
$choices = array(
'simple' => esc_html__( 'Simple', 'wp-moose' ),
'widgets-area' => esc_html__( 'Widgets Area (Pro)', 'wp-moose' ),
);
return $choices;
}
}
if ( !function_exists( 'wp_moose_get_text_align_options' ) ) {
/**
* Get text align options
*/
function wp_moose_get_text_align_options()
{
return array(
'left' => esc_html__( 'Align Left', 'wp-moose' ),
'center' => esc_html__( 'Align Center', 'wp-moose' ),
'right' => esc_html__( 'Align Right', 'wp-moose' ),
);
}
}
if ( !function_exists( 'wp_moose_get_text_align_css' ) ) {
function wp_moose_get_text_align_css( $align )
{
$styles = array(
'left' => 'text-left',
'center' => 'text-center',
'right' => 'text-right',
);
return $styles[$align];
}
}
if ( !function_exists( 'wp_moose_get_text_transform_options' ) ) {
/**
* Text transform options
*
* @return array
*/
function wp_moose_get_text_transform_options()
{
return array(
'' => esc_html__( 'Inherit', 'wp-moose' ),
'none' => esc_html__( 'None', 'wp-moose' ),
'capitalize' => esc_html__( 'Capitalize', 'wp-moose' ),
'uppercase' => esc_html__( 'Uppercase', 'wp-moose' ),
'lowercase' => esc_html__( 'Lowercase', 'wp-moose' ),
);
}
}