/home/vianto5/ceibaresidencial.mx/wp-content/themes/moore_old/inc
Edit: /home/vianto5/ceibaresidencial.mx/wp-content/themes/moore_old/inc/functions.php (4341B)
ID;
} else {
return null;
}
}
function moore_custom_text ($content = "",$limit = 15) {
$content = explode(' ', $content, $limit);
if (count($content)>=$limit) {
array_pop($content);
$content = implode(" ",$content).'...';
} else {
$content = implode(" ",$content);
}
$content = preg_replace('`[[^]]*]`','',$content);
return strip_tags( $content );
}
/**
* Google Font sanitization
*
* @param string JSON string to be sanitized
* @return string Sanitized input
*/
if ( ! function_exists( 'moore_google_font_sanitization' ) ) {
function moore_google_font_sanitization( $input ) {
$val = json_decode( $input, true );
if( is_array( $val ) ) {
foreach ( $val as $key => $value ) {
$val[$key] = sanitize_text_field( $value );
}
$input = json_encode( $val );
}
else {
$input = json_encode( sanitize_text_field( $val ) );
}
return $input;
}
}
/* Default Primary Font in Customize */
if ( ! function_exists( 'moore_default_primary_font' ) ) {
function moore_default_primary_font() {
$customizer_defaults = json_encode(
array(
'font' => 'Poppins',
'regularweight' => '100,200,300,400,500,600,700,800,900',
'category' => 'serif'
)
);
return $customizer_defaults;
}
}
/* Default Second Font in Customize */
if ( ! function_exists( 'moore_default_second_font' ) ) {
function moore_default_second_font() {
$customizer_defaults = json_encode(
array(
'font' => 'Bludhaven',
'regularweight' => '100,200,300,400,500,600,700,800,900',
'category' => 'serif'
)
);
return $customizer_defaults;
}
}
if ( ! function_exists( 'moore_woo_sidebar' ) ) {
function moore_woo_sidebar(){
if( class_exists('woocommerce') && is_product() ){
return get_theme_mod( 'woo_product_layout', 'woo_layout_1c' );
}else{
return get_theme_mod( 'woo_archive_layout', 'woo_layout_1c' );
}
}
}