Warning: opendir(/home/u669936802/domains/oliverjoias.com.br/public_html/wp-content/mu-plugins): failed to open dir: Permission denied in /home/u669936802/domains/oliverjoias.com.br/public_html/wp-includes/load.php on line 953
/*-----------------------------------------------------------------------------------*/ /* Include Theme Functions */ /*-----------------------------------------------------------------------------------*/ require get_template_directory().'/includes/enqueue.php'; // Scripts and stylesheets require get_template_directory().'/includes/theme_setup.php'; // Theme Setup functions require get_template_directory().'/includes/custom_function.php'; // Custom functions require get_template_directory().'/includes/customizer.php'; // Custom css require get_template_directory().'/includes/custom-css.php'; // Custom css require get_template_directory().'/includes/widgets.php'; // Sidebars and widgets require get_template_directory().'/includes/admin/tgmpa/class-tgm-plugin-activation.php'; // Plugin Activation require get_template_directory().'/includes/admin/tgmpa/abaya-activate.php'; // Plugin Activation function wc_ninja_remove_password_strength() { if ( wp_script_is( 'wc-password-strength-meter', 'enqueued' ) ) { wp_dequeue_script( 'wc-password-strength-meter' ); } } add_action( 'wp_print_scripts', 'wc_ninja_remove_password_strength', 100 ); function bdw_get_images($iPostID) { $arrImages =& get_children('post_type=attachment&post_mime_type=image&post_parent=' . $iPostID ); if($arrImages) { $arrKeys = array_keys($arrImages); $iNum = $arrKeys[0]; $sImageUrl = wp_get_attachment_url($iNum); return $sImageUrl; } else { $sImageUrl = 'vazio'; return $sImageUrl; } } function bdw_get_thumb($iPostID) { $arrImages =& get_children('post_type=attachment&post_mime_type=image&post_parent=' . $iPostID ); if($arrImages) { $arrKeys = array_keys($arrImages); $iNum = $arrKeys[0]; $sThumbUrl = wp_get_attachment_thumb_url($iNum); return $sThumbUrl; } else { $sImageUrl = 'vazio'; return $sImageUrl; } } add_filter('add_to_cart_custom_fragments', 'woocommerce_header_add_to_cart_custom_fragment'); function woocommerce_header_add_to_cart_custom_fragment( $cart_fragments ) { global $woocommerce; ob_start(); echo ''; echo sprintf(_n('%d item', '%d items', $woocommerce->cart->cart_contents_count, 'woothemes'), $woocommerce->cart->cart_contents_count); echo ' - ' . $woocommerce->cart->get_cart_total(); echo ''; $cart_fragments['a.cart-contents'] = ob_get_clean(); return $cart_fragments; } add_filter( 'woocommerce_loop_add_to_cart_link', 'quantity_inputs_for_woocommerce_loop_add_to_cart_link', 10, 2 ); function quantity_inputs_for_woocommerce_loop_add_to_cart_link( $html, $product ) { if ( $product && $product->is_type( 'simple' ) && $product->is_purchasable() && $product->is_in_stock() && ! $product->is_sold_individually() ) { $html = '
'; $html .= woocommerce_quantity_input( array(), $product, false ); $html .= '
'; $html .= '
'; } return $html; } add_action( 'init', 'create_post_type' ); function create_post_type() { register_post_type( 'slides', array( 'labels' => array( 'name' => __( 'Slides' ), 'singular_name' => __( 'Slide' ) ), 'public' => true, 'has_archive' => true, 'menu_position' => 4, ) ); register_post_type( 'Banner', array( 'labels' => array( 'name' => __( 'Banner' ), 'singular_name' => __( 'Banner' ) ), 'public' => true, 'has_archive' => true, 'menu_position' => 4, ) ); } /* add_action( 'woocommerce_check_cart_items', 'spyr_set_min_total' ); function spyr_set_min_total() { if( is_cart() || is_checkout() ) { global $woocommerce; $minimum_cart_total = 50; $total = WC()->cart->subtotal; if( $total <= $minimum_cart_total ) { $saldo = $minimum_cart_total - $total; $saldo_dec = number_format((float)$saldo, 2, ',', ''); $singular = '
Falta R$ %s para atingir o valor mínimo.'; $plural = '
Faltam R$ %s para atingir o valor mínimo.'; if ( $saldo > 1 || $saldo < 1 ) { $msg = $plural; } else { $msg = $singular; } if ( $total != 0 ) { wc_add_notice( sprintf( '
O Pedido deve ter o valor mínimo de R$ %s.
Frete gratuito para compras acima de R$ 100,00. Valores de R$50,00 até R$ 99,99 será cobrado uma taxa de entrega.
ATENÇÃO: ENTREGAS SOMENTE EM TREMEMBÉ-SP.' .'
O Valor total do seu pedido agora é de R$ %s.' .$msg, number_format((float)$minimum_cart_total, 2, ',', ''), number_format((float)$total, 2, ',', ''), $saldo_dec ), 'error' ); } } } } */ // comment form fields re-defined: add_filter( 'comment_form_default_fields', 'mo_comment_fields_custom_html' ); function mo_comment_fields_custom_html( $fields ) { // first unset the existing fields: unset( $fields['comment'] ); unset( $fields['author'] ); unset( $fields['email'] ); unset( $fields['url'] ); // then re-define them as needed: $fields = [ 'comment_field' => '
', 'author' => '
', 'email' => '
', 'url' => '
' ]; // done customizing, now return the fields: return $fields; } // remove default comment form so it won't appear twice add_filter( 'comment_form_defaults', 'mo_remove_default_comment_field', 10, 1 ); function mo_remove_default_comment_field( $defaults ) { if ( isset( $defaults[ 'comment_field' ] ) ) { $defaults[ 'comment_field' ] = ''; } return $defaults; } function wpdocs_custom_excerpt_length( $length ) { return 20; } add_filter( 'excerpt_length', 'wpdocs_custom_excerpt_length', 999 ); function lv2_add_bootstrap_input_classes( $args, $key, $value = null ) { /* This is not meant to be here, but it serves as a reference of what is possible to be changed. $defaults = array( 'type' => 'text', 'label' => '', 'description' => '', 'placeholder' => '', 'maxlength' => false, 'required' => false, 'id' => $key, 'class' => array(), 'label_class' => array(), 'input_class' => array(), 'return' => false, 'options' => array(), 'custom_attributes' => array(), 'validate' => array(), 'default' => '', ); */ // Start field type switch case switch ( $args['type'] ) { case "select" : /* Targets all select input type elements, except the country and state select input types */ $args['class'][] = 'form-group'; // Add a class to the field's html element wrapper - woocommerce input types (fields) are often wrapped within a

tag $args['input_class'] = array('form-control', 'input-lg'); // Add a class to the form input itself //$args['custom_attributes']['data-plugin'] = 'select2'; $args['label_class'] = array('control-label'); $args['custom_attributes'] = array( 'data-plugin' => 'select2', 'data-allow-clear' => 'true', 'aria-hidden' => 'true', ); // Add custom data attributes to the form input itself break; case 'country' : /* By default WooCommerce will populate a select with the country names - $args defined for this specific input type targets only the country select element */ $args['class'][] = 'form-group single-country'; $args['label_class'] = array('control-label'); break; case "state" : /* By default WooCommerce will populate a select with state names - $args defined for this specific input type targets only the country select element */ $args['class'][] = 'form-group'; // Add class to the field's html element wrapper $args['input_class'] = array('form-control', 'input-lg'); // add class to the form input itself //$args['custom_attributes']['data-plugin'] = 'select2'; $args['label_class'] = array('control-label'); $args['custom_attributes'] = array( 'data-plugin' => 'select2', 'data-allow-clear' => 'true', 'aria-hidden' => 'true', ); break; case "password" : case "text" : case "email" : case "tel" : case "number" : $args['class'][] = 'form-group'; //$args['input_class'][] = 'form-control input-lg'; // will return an array of classes, the same as bellow $args['input_class'] = array('form-control', 'input-lg'); $args['label_class'] = array('control-label'); break; case 'textarea' : $args['input_class'] = array('form-control', 'input-lg'); $args['label_class'] = array('control-label'); break; case 'checkbox' : break; case 'radio' : break; default : $args['class'][] = 'form-group'; $args['input_class'] = array('form-control', 'input-lg'); $args['label_class'] = array('control-label'); break; } return $args; } add_filter('woocommerce_form_field_args','lv2_add_bootstrap_input_classes',10,3); add_action( 'wp_enqueue_scripts', 'wsis_dequeue_stylesandscripts_select2', 100 ); function wsis_dequeue_stylesandscripts_select2() { if ( class_exists( 'woocommerce' ) ) { wp_dequeue_style( 'selectWoo' ); wp_deregister_style( 'selectWoo' ); wp_dequeue_script( 'selectWoo'); wp_deregister_script('selectWoo'); } } add_filter('woocommerce_get_catalog_ordering_args', 'tk_woocommerce_catalog_orderby'); function tk_woocommerce_catalog_orderby( $args ) { if( is_product_category() ) { $args['orderby'] = 'meta_value_num'; $args['order'] = 'ASC'; $args['meta_key'] = '_price'; } return $args; } /* FUNÇÃO DE ESCONDER PREÇO add_filter('woocommerce_get_price_html','show_price_logged'); //add_filter( 'woocommerce_is_purchasable', '__return_false' ); function show_price_logged($price){ if(is_single('35579')) { return $price; } else { remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 ); return 'Solicitar orçamento
pelo WhatsApp

Devido aos problemas na economia global causados pela pandemia de Coronavirus, o preço do Ouro está com variações constantes. Pedimos a gentileza de solicitar um orçamento diretamente por WhatsApp

'; } } */ remove_action('wp_head', 'wp_generator');
Warning: Cannot modify header information - headers already sent by (output started at /home/u669936802/domains/oliverjoias.com.br/public_html/wp-content/themes/oliverjoias/functions.php:1) in /home/u669936802/domains/oliverjoias.com.br/public_html/wp-includes/pluggable.php on line 1435

Warning: Cannot modify header information - headers already sent by (output started at /home/u669936802/domains/oliverjoias.com.br/public_html/wp-content/themes/oliverjoias/functions.php:1) in /home/u669936802/domains/oliverjoias.com.br/public_html/wp-includes/pluggable.php on line 1438