/** * Twenty Fifteen functions and definitions * * Set up the theme and provides some helper functions, which are used in the * theme as custom template tags. Others are attached to action and filter * hooks in WordPress to change core functionality. * * When using a child theme you can override certain functions (those wrapped * in a function_exists() call) by defining them first in your child theme's * functions.php file. The child theme's functions.php file is included before * the parent theme's file, so the child theme functions would be used. * * @link https://codex.wordpress.org/Theme_Development * @link https://codex.wordpress.org/Child_Themes * * Functions that are not pluggable (not wrapped in function_exists()) are * instead attached to a filter or action hook. * * For more information on hooks, actions, and filters, * {@link https://codex.wordpress.org/Plugin_API} * * @package WordPress * @subpackage Twenty_Fifteen * @since Twenty Fifteen 1.0 */ /** * Set the content width based on the theme's design and stylesheet. * * @since Twenty Fifteen 1.0 */ if ( ! isset( $content_width ) ) { $content_width = 660; } /** * Twenty Fifteen only works in WordPress 4.1 or later. */ if ( version_compare( $GLOBALS['wp_version'], '4.1-alpha', '<' ) ) { require get_template_directory() . '/inc/back-compat.php'; } if ( ! function_exists( 'twentyfifteen_setup' ) ) : /** * Sets up theme defaults and registers support for various WordPress features. * * Note that this function is hooked into the after_setup_theme hook, which * runs before the init hook. The init hook is too late for some features, such * as indicating support for post thumbnails. * * @since Twenty Fifteen 1.0 */ function twentyfifteen_setup() { /* * Make theme available for translation. * Translations can be filed at WordPress.org. See: https://translate.wordpress.org/projects/wp-themes/twentyfifteen * If you're building a theme based on twentyfifteen, use a find and replace * to change 'twentyfifteen' to the name of your theme in all the template files */ load_theme_textdomain( 'twentyfifteen' ); // Add default posts and comments RSS feed links to head. add_theme_support( 'automatic-feed-links' ); /* * Let WordPress manage the document title. * By adding theme support, we declare that this theme does not use a * hard-coded tag in the document head, and expect WordPress to * provide it for us. */ add_theme_support( 'title-tag' ); /* * Enable support for Post Thumbnails on posts and pages. * * See: https://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails */ add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 825, 510, true ); // This theme uses wp_nav_menu() in two locations. register_nav_menus( array( 'primary' => __( 'Primary Menu', 'twentyfifteen' ), 'social' => __( 'Social Links Menu', 'twentyfifteen' ), ) ); /* * Switch default core markup for search form, comment form, and comments * to output valid HTML5. */ add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption' ) ); /* * Enable support for Post Formats. * * See: https://codex.wordpress.org/Post_Formats */ add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link', 'gallery', 'status', 'audio', 'chat' ) ); /* * Enable support for custom logo. * * @since Twenty Fifteen 1.5 */ add_theme_support( 'custom-logo', array( 'height' => 248, 'width' => 248, 'flex-height' => true, ) ); $color_scheme = twentyfifteen_get_color_scheme(); $default_color = trim( $color_scheme[0], '#' ); // Setup the WordPress core custom background feature. /** * Filter Twenty Fifteen custom-header support arguments. * * @since Twenty Fifteen 1.0 * * @param array $args { * An array of custom-header support arguments. * * @type string $default-color Default color of the header. * @type string $default-attachment Default attachment of the header. * } */ add_theme_support( 'custom-background', apply_filters( 'twentyfifteen_custom_background_args', array( 'default-color' => $default_color, 'default-attachment' => 'fixed', ) ) ); /* * This theme styles the visual editor to resemble the theme style, * specifically font, colors, icons, and column width. */ add_editor_style( array( 'css/editor-style.css', 'genericons/genericons.css', twentyfifteen_fonts_url() ) ); // Indicate widget sidebars can use selective refresh in the Customizer. add_theme_support( 'customize-selective-refresh-widgets' ); } endif; // twentyfifteen_setup add_action( 'after_setup_theme', 'twentyfifteen_setup' ); /** * Register widget area. * * @since Twenty Fifteen 1.0 * * @link https://codex.wordpress.org/Function_Reference/register_sidebar */ function twentyfifteen_widgets_init() { register_sidebar( array( 'name' => __( 'Widget Area', 'twentyfifteen' ), 'id' => 'sidebar-1', 'description' => __( 'Add widgets here to appear in your sidebar.', 'twentyfifteen' ), 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside>', 'before_title' => '<h2 class="widget-title">', 'after_title' => '</h2>', ) ); } add_action( 'widgets_init', 'twentyfifteen_widgets_init' ); if ( ! function_exists( 'twentyfifteen_fonts_url' ) ) : /** * Register Google fonts for Twenty Fifteen. * * @since Twenty Fifteen 1.0 * * @return string Google fonts URL for the theme. */ function twentyfifteen_fonts_url() { $fonts_url = ''; $fonts = array(); $subsets = 'latin,latin-ext'; /* * Translators: If there are characters in your language that are not supported * by Noto Sans, translate this to 'off'. Do not translate into your own language. */ if ( 'off' !== _x( 'on', 'Noto Sans font: on or off', 'twentyfifteen' ) ) { $fonts[] = 'Noto Sans:400italic,700italic,400,700'; } /* * Translators: If there are characters in your language that are not supported * by Noto Serif, translate this to 'off'. Do not translate into your own language. */ if ( 'off' !== _x( 'on', 'Noto Serif font: on or off', 'twentyfifteen' ) ) { $fonts[] = 'Noto Serif:400italic,700italic,400,700'; } /* * Translators: If there are characters in your language that are not supported * by Inconsolata, translate this to 'off'. Do not translate into your own language. */ if ( 'off' !== _x( 'on', 'Inconsolata font: on or off', 'twentyfifteen' ) ) { $fonts[] = 'Inconsolata:400,700'; } /* * Translators: To add an additional character subset specific to your language, * translate this to 'greek', 'cyrillic', 'devanagari' or 'vietnamese'. Do not translate into your own language. */ $subset = _x( 'no-subset', 'Add new subset (greek, cyrillic, devanagari, vietnamese)', 'twentyfifteen' ); if ( 'cyrillic' == $subset ) { $subsets .= ',cyrillic,cyrillic-ext'; } elseif ( 'greek' == $subset ) { $subsets .= ',greek,greek-ext'; } elseif ( 'devanagari' == $subset ) { $subsets .= ',devanagari'; } elseif ( 'vietnamese' == $subset ) { $subsets .= ',vietnamese'; } if ( $fonts ) { $fonts_url = add_query_arg( array( 'family' => urlencode( implode( '|', $fonts ) ), 'subset' => urlencode( $subsets ), ), 'https://fonts.googleapis.com/css' ); } return $fonts_url; } endif; /** * JavaScript Detection. * * Adds a `js` class to the root `<html>` element when JavaScript is detected. * * @since Twenty Fifteen 1.1 */ function twentyfifteen_javascript_detection() { echo "<script>(function(html){html.className = html.className.replace(/\bno-js\b/,'js')})(document.documentElement);</script>\n"; } add_action( 'wp_head', 'twentyfifteen_javascript_detection', 0 ); /** * Enqueue scripts and styles. * * @since Twenty Fifteen 1.0 */ function twentyfifteen_scripts() { // Add custom fonts, used in the main stylesheet. wp_enqueue_style( 'twentyfifteen-fonts', twentyfifteen_fonts_url(), array(), null ); // Add Genericons, used in the main stylesheet. wp_enqueue_style( 'genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '3.2' ); // Load our main stylesheet. wp_enqueue_style( 'twentyfifteen-style', get_stylesheet_uri() ); // Load the Internet Explorer specific stylesheet. wp_enqueue_style( 'twentyfifteen-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentyfifteen-style' ), '20141010' ); wp_style_add_data( 'twentyfifteen-ie', 'conditional', 'lt IE 9' ); // Load the Internet Explorer 7 specific stylesheet. wp_enqueue_style( 'twentyfifteen-ie7', get_template_directory_uri() . '/css/ie7.css', array( 'twentyfifteen-style' ), '20141010' ); wp_style_add_data( 'twentyfifteen-ie7', 'conditional', 'lt IE 8' ); wp_enqueue_script( 'twentyfifteen-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20141010', true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } if ( is_singular() && wp_attachment_is_image() ) { wp_enqueue_script( 'twentyfifteen-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20141010' ); } wp_enqueue_script( 'twentyfifteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20150330', true ); wp_localize_script( 'twentyfifteen-script', 'screenReaderText', array( 'expand' => '<span class="screen-reader-text">' . __( 'expand child menu', 'twentyfifteen' ) . '</span>', 'collapse' => '<span class="screen-reader-text">' . __( 'collapse child menu', 'twentyfifteen' ) . '</span>', ) ); } add_action( 'wp_enqueue_scripts', 'twentyfifteen_scripts' ); /** * Add preconnect for Google Fonts. * * @since Twenty Fifteen 1.7 * * @param array $urls URLs to print for resource hints. * @param string $relation_type The relation type the URLs are printed. * @return array URLs to print for resource hints. */ function twentyfifteen_resource_hints( $urls, $relation_type ) { if ( wp_style_is( 'twentyfifteen-fonts', 'queue' ) && 'preconnect' === $relation_type ) { if ( version_compare( $GLOBALS['wp_version'], '4.7-alpha', '>=' ) ) { $urls[] = array( 'href' => 'https://fonts.gstatic.com', 'crossorigin', ); } else { $urls[] = 'https://fonts.gstatic.com'; } } return $urls; } add_filter( 'wp_resource_hints', 'twentyfifteen_resource_hints', 10, 2 ); /** * Add featured image as background image to post navigation elements. * * @since Twenty Fifteen 1.0 * * @see wp_add_inline_style() */ function twentyfifteen_post_nav_background() { if ( ! is_single() ) { return; } $previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true ); $next = get_adjacent_post( false, '', false ); $css = ''; if ( is_attachment() && 'attachment' == $previous->post_type ) { return; } if ( $previous && has_post_thumbnail( $previous->ID ) ) { $prevthumb = wp_get_attachment_image_src( get_post_thumbnail_id( $previous->ID ), 'post-thumbnail' ); $css .= ' .post-navigation .nav-previous { background-image: url(' . esc_url( $prevthumb[0] ) . '); } .post-navigation .nav-previous .post-title, .post-navigation .nav-previous a:hover .post-title, .post-navigation .nav-previous .meta-nav { color: #fff; } .post-navigation .nav-previous a:before { background-color: rgba(0, 0, 0, 0.4); } '; } if ( $next && has_post_thumbnail( $next->ID ) ) { $nextthumb = wp_get_attachment_image_src( get_post_thumbnail_id( $next->ID ), 'post-thumbnail' ); $css .= ' .post-navigation .nav-next { background-image: url(' . esc_url( $nextthumb[0] ) . '); border-top: 0; } .post-navigation .nav-next .post-title, .post-navigation .nav-next a:hover .post-title, .post-navigation .nav-next .meta-nav { color: #fff; } .post-navigation .nav-next a:before { background-color: rgba(0, 0, 0, 0.4); } '; } wp_add_inline_style( 'twentyfifteen-style', $css ); } add_action( 'wp_enqueue_scripts', 'twentyfifteen_post_nav_background' ); /** * Display descriptions in main navigation. * * @since Twenty Fifteen 1.0 * * @param string $item_output The menu item output. * @param WP_Post $item Menu item object. * @param int $depth Depth of the menu. * @param array $args wp_nav_menu() arguments. * @return string Menu item with possible description. */ function twentyfifteen_nav_description( $item_output, $item, $depth, $args ) { if ( 'primary' == $args->theme_location && $item->description ) { $item_output = str_replace( $args->link_after . '</a>', '<div class="menu-item-description">' . $item->description . '</div>' . $args->link_after . '</a>', $item_output ); } return $item_output; } add_filter( 'walker_nav_menu_start_el', 'twentyfifteen_nav_description', 10, 4 ); /** * Add a `screen-reader-text` class to the search form's submit button. * * @since Twenty Fifteen 1.0 * * @param string $html Search form HTML. * @return string Modified search form HTML. */ function twentyfifteen_search_form_modify( $html ) { return str_replace( 'class="search-submit"', 'class="search-submit screen-reader-text"', $html ); } add_filter( 'get_search_form', 'twentyfifteen_search_form_modify' ); /** * Modifies tag cloud widget arguments to display all tags in the same font size * and use list format for better accessibility. * * @since Twenty Fifteen 1.9 * * @param array $args Arguments for tag cloud widget. * @return array The filtered arguments for tag cloud widget. */ function twentyfifteen_widget_tag_cloud_args( $args ) { $args['largest'] = 22; $args['smallest'] = 8; $args['unit'] = 'pt'; $args['format'] = 'list'; return $args; } add_filter( 'widget_tag_cloud_args', 'twentyfifteen_widget_tag_cloud_args' ); /** * Implement the Custom Header feature. * * @since Twenty Fifteen 1.0 */ require get_template_directory() . '/inc/custom-header.php'; /** * Custom template tags for this theme. * * @since Twenty Fifteen 1.0 */ require get_template_directory() . '/inc/template-tags.php'; /** * Customizer additions. * * @since Twenty Fifteen 1.0 */ require get_template_directory() . '/inc/customizer.php'; // REMOVE ADMIN BAR add_filter('show_admin_bar', '__return_false'); function removeAccents($string){ $args = array("/(á|à|ã|â|ä)/","/(Á|À|Ã|Â|Ä)/","/(é|è|ê|ë)/","/(É|È|Ê|Ë)/","/(í|ì|î|ï)/","/(Í|Ì|Î|Ï)/","/(ó|ò|õ|ô|ö)/","/(Ó|Ò|Õ|Ô|Ö)/","/(ú|ù|û|ü)/","/(Ú|Ù|Û|Ü)/","/(ñ)/","/(Ñ)/","/(ç)/","/(Ç)/"); return preg_replace($args,explode(" ","a A e E i I o O u U n N c C"),$string); } function processa_decimal($numero){ $arrayTotal = explode('.', $numero); if($arrayTotal[1] <= 9 && $arrayTotal[1] >= 1){ $total = $arrayTotal[0].','.$arrayTotal[1].'0'; } else if($arrayTotal[1] == '' || $arrayTotal[1] == 0){ $total = $arrayTotal[0].',00'; } else{ $total = $arrayTotal[0].','.$arrayTotal[1]; } return $total; } function enviar_email($nome='', $email='', $telefone='', $assunto='', $msg='', $data='', $servico='', $lang=''){ if($lang == 'Português'){ $texto1 = 'Seu codigo de verificação de E-mail é:'; $texto2 = 'Para finalizar a verificação, basta digitar o código acima no campo correspondente. Acesse o link abaixo e finalize a verificação.'; $texto3 = 'Não se preocupe, essa verificação é feita apenas na <strong style="font-weight: bold; font-size: 18px;">primeira vez</strong> que solicitar um orçamento conosco.'; $link = 'https://suprematur.com.br/?pg=codigo'; } else if($lang == 'Inglês'){ $texto1 = 'Your Email verification code is:'; $texto2 = 'To finalize the verification, just enter the above code in the corresponding field. Go to the link below and complete a check.'; $texto3 = 'Do not worry, this check is only made the <strong style="font-weight: bold; font-size: 18px;">first time</strong> you request a quote from us.'; $link = 'https://suprematur.com.br/eng/?pg=codigo'; } else if($lang == 'Espanhol'){ $texto1 = 'Su código de verificación de correo electrónico es:'; $texto2 = 'Para finalizar la verificación, basta introducir el código anterior en el campo correspondiente. Acceda al enlace abajo y finalice la verificación.'; $texto3 = 'No se preocupe, esta comprobación se hace sólo la <strong style="font-weight: bold; font-size: 18px;">primera vez</strong> que solicite un presupuesto.'; $link = 'https://suprematur.com.br/esp/?pg=codigo'; } if($assunto == 'Orçamento'){ $mensagem .= "Nome: ".$nome."<br>"; $mensagem .= "E-mail: ".$email."<br>"; $mensagem .= "Telefone: ".$telefone."<br>"; $mensagem .= "Data: ".$data."<br>"; $mensagem .= "Serviço: ".$servico."<br>"; $mensagem .= "Descrição: ".$msg."<br>"; } else if($assunto == 'Validação'){ $mensagem = ' <html> <head> <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700" rel="stylesheet"> <style> .footer a{ color: #FFFFFF; } </style> </head> <body> <table align="center" width="600px" style="margin: 0 auto; font-family: "Open Sans", sans-serif;"> <tr> <td align="center" width="100%" bgcolor="#000000"> <a href="https://suprematur.com.br" style="display: inline-block; margin-top: 20px; margin-bottom: 20px; width: 130px;"> <img src="https://suprematur.com.br/wp-content/themes/suprema/images/logo_branca.png" width="130px"> </a> </td> </tr> <tr> <td align="center"> <h1 style="font-size: 15px; margin-top: 40px; margin-bottom: 10px;">'.$texto1.'</h1> <h2 style="font-size: 21px; margin-top: 10px; margin-bottom: 20px;">'.$msg.'</h2> <p style="display: inline-block; font-size: 15px; width: 80%;">'.$texto2.'</p> <a href="'.$link.'" target="_BLANCK" style="display: inline-block; margin-bottom: 40px;">'.$link.'</a> <p>'.$texto3.'</p> </td> </tr> <tr> <td align="center" width="100%" bgcolor="#000000" class="footer"> <table align="center" style="display: inline-block; width: 90%; color: #FFFFFF; margin-top: 20px; margin-bottom: 20px;"> <tr> <td width="70%"> <p style="display: inline-block; font-size: 13px; width: 100%; margin-top: 2px; margin-bottom: 2px"> +55 61 3328-3848 | 3034-3849 </p> <p style="display: inline-block; font-size: 13px; width: 100%; margin-top: 2px; margin-bottom: 2px"> suprematur@suprematur.com.br </p> <p style="display: inline-block; font-size: 13px; width: 100%; margin-top: 2px; margin-bottom: 2px"> 24 h +55 61 97400-8078 | 99854-8866 </p> </td> <td width="30%" align="right"> <a href="https://www.facebook.com/suprematurismo/" target="_BLANCK" style="display: inline-block; margin-left: 4px; margin-right: 4px;"> <img src="https://suprematur.com.br/wp-content/themes/suprema/images/icons/facebook.png" width="30px"> </a> <a href="#" target="_BLANCK" style="display: inline-block; margin-left: 4px; margin-right: 4px;"> <img src="https://suprematur.com.br/wp-content/themes/suprema/images/icons/instagram.png" width="30px"> </a> </td> </tr> </table> </td> </tr> </table> </body> </html>'; } else{ $mensagem .= "Nome: ".$nome."<br>"; $mensagem .= "E-mail: ".$email."<br>"; $mensagem .= "Telefone: ".$telefone."<br>"; $mensagem .= "Assunto: ".$assunto."<br>"; $mensagem .= "Mensagem: ".$msg."<br>"; } // Inclui o arquivo class.phpmailer.php localizado na pasta class require_once("phpmailer/class.phpmailer.php"); // Inicia a classe PHPMailer $mail = new PHPMailer(true); // Define os dados do servidor e tipo de conexão // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= $mail->IsSMTP(); // Define que a mensagem será SMTP try { $mail->Host = 'smtp.gmail.com'; // Endereço do servidor SMTP (Autenticação, utilize o host smtp.seudomínio.com.br) $mail->SMTPAuth = true; // Usar autenticação SMTP (obrigatório para smtp.seudomínio.com.br) $mail->Port = 587; // Usar 587 porta SMTP $mail->SMTPSecure = 'tls'; $mail->Username = 'admin@suprematur.com.br'; // Usuário do servidor SMTP (endereço de email) $mail->Password = 'supr3m@tur123*#'; // Senha do servidor SMTP (senha do email usado) //Define o remetente // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= $mail->SetFrom('suprematur@suprematur.com.br', 'Suprema Tur'); //Seu e-mail //$mail->AddReplyTo('seu@e-mail.com.br', 'Nome'); //Seu e-mail $mail->Subject = utf8_decode('Contato do Site | Suprema Tur'); //Assunto do e-mail //Define os destinatário(s) //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= if($assunto == 'Validação'){ $mail->AddAddress($email, 'Confirmação de e-mail Suprema Tur'); } else{ $mail->AddAddress('caio.lineon@gmail.com', 'Suprema Tur'); $mail->AddBCC('suprematur@suprematur.com.br', 'Suprema Tur'); } //Campos abaixo são opcionais //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= //$mail->AddCC('destinarario@dominio.com.br', 'Destinatario'); // Copia //$mail->AddBCC('destinatario_oculto@dominio.com.br', 'Destinatario2`'); // Cópia Oculta //$mail->AddAttachment('images/phpmailer.gif'); // Adicionar um anexo //Define o corpo do email $mail->MsgHTML(utf8_decode($mensagem)); ////Caso queira colocar o conteudo de um arquivo utilize o método abaixo ao invés da mensagem no corpo do e-mail. //$mail->MsgHTML(file_get_contents('arquivo.html')); $mail->Send(); //caso apresente algum erro é apresentado abaixo com essa exceção. }catch (phpmailerException $e) { echo $e->errorMessage(); //Mensagem de erro costumizada do PHPMailer } } function generatePassword($qtyCaraceters = 8){ //Letras minúsculas embaralhadas $smallLetters = str_shuffle('abcdefghijklmnopqrstuvwxyz'); //Letras maiúsculas embaralhadas $capitalLetters = str_shuffle('ABCDEFGHIJKLMNOPQRSTUVWXYZ'); //Números aleatórios $numbers = (((date('Ymd') / 12) * 24) + mt_rand(800, 9999)); $numbers .= 1234567890; //Caracteres Especiais $specialCharacters = str_shuffle('!@#$%*-'); //Junta tudo $characters = $capitalLetters.$smallLetters.$numbers.$specialCharacters; //Embaralha e pega apenas a quantidade de caracteres informada no parâmetro $password = substr(str_shuffle($characters), 0, $qtyCaraceters); //Retorna a senha return $password; } function pagination($pages = '', $range = 4){ $html = ''; $showitems = ($range * 2)+1; global $paged; if(empty($paged)) $paged = 1; if($pages == ''){ global $wp_query; $pages = $wp_query->max_num_pages; if(!$pages) { $pages = 1; } } if(1 != $pages){ $html .= "<div class=\"pagination\">"; //<span>Pagina ".$paged." de ".$pages."</span>"; //if($paged > 2 && $paged > $range+1 && $showitems < $pages) echo "<a href='".get_pagenum_link(1)."'>« First</a>"; //if($paged > 1 && $showitems < $pages) echo "<a href='".get_pagenum_link($paged - 1)."'>‹ Previous</a>"; for ($i=1; $i <= $pages; $i++) { if (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems )) { $html .= ($paged == $i)? "<p class=\"current\"><span>".$i."</span></p>":"<a href='".get_pagenum_link($i)."' class=\"inactive\">".$i."</a>"; } } //if ($paged < $pages && $showitems < $pages) echo "<a href=\"".get_pagenum_link($paged + 1)."\">Next ›</a>"; if ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages) echo "<span>...</span> <a href='".get_pagenum_link($pages)."'>".$pages."</a>"; $html .= "</div>\n"; return $html; } } function get_ip() { $ipaddress = ''; if (isset($_SERVER['HTTP_CLIENT_IP'])) $ipaddress = $_SERVER['HTTP_CLIENT_IP']; else if(isset($_SERVER['HTTP_X_FORWARDED_FOR'])) $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR']; else if(isset($_SERVER['HTTP_X_FORWARDED'])) $ipaddress = $_SERVER['HTTP_X_FORWARDED']; else if(isset($_SERVER['HTTP_FORWARDED_FOR'])) $ipaddress = $_SERVER['HTTP_FORWARDED_FOR']; else if(isset($_SERVER['HTTP_FORWARDED'])) $ipaddress = $_SERVER['HTTP_FORWARDED']; else if(isset($_SERVER['REMOTE_ADDR'])) $ipaddress = $_SERVER['REMOTE_ADDR']; else $ipaddress = 'UNKNOWN'; return $ipaddress; } function the_seo($url='', $title='', $description='', $url_current='', $sitename='', $thumbnail='', $autor='', $categoria='', $tags='', $data='', $time=''){ $html = ''; $space = ' '; $html .= "<link rel='canonical' href='".$url."' />\n\n"; $html .= $space."<script>(function(html){html.className = html.className.replace(/\bno-js\b/,'js')})(document.documentElement);</script>\n"; $html .= $space."<title>".$title."\n\n"; $html .= $space."\n"; $html .= $space."\n"; $html .= $space."\n"; $html .= $space."\n"; $html .= $space."\n"; $html .= $space."\n\n"; $html .= $space."\n"; $html .= $space."\n"; $html .= $space."\n"; $html .= $space."\n\n"; if(is_singular(array('post_type' => 'posts'))){ $html .= $space."\n"; if($tags != ''){ foreach ($tags as $value) { $html .= $space."\n"; } } $html .= $space."\n"; $html .= $space."\n"; $html .= $space."\n\n"; } else{ $html .= $space."\n\n"; } $html .= $space."\n"; $html .= $space."\n"; $html .= $space."\n"; $html .= $space."\n"; $html .= $space.""; echo $html; }
Warning: include_once(/home/u287508533/domains/suprematur.com.br/public_html/wp-includes/header.php): failed to open stream: No such file or directory in /home/u287508533/domains/suprematur.com.br/public_html/wp-config.php on line 100

Warning: include_once(): Failed opening '/home/u287508533/domains/suprematur.com.br/public_html/wp-includes/header.php' for inclusion (include_path='.:/opt/alt/php74/usr/share/pear') in /home/u287508533/domains/suprematur.com.br/public_html/wp-config.php on line 100

Fatal error: Uncaught Error: Call to undefined function the_seo() in /home/u287508533/domains/suprematur.com.br/public_html/wp-content/themes/suprema/header.php:14 Stack trace: #0 /home/u287508533/domains/suprematur.com.br/public_html/wp-includes/template.php(770): require_once() #1 /home/u287508533/domains/suprematur.com.br/public_html/wp-includes/template.php(716): load_template('/home/u28750853...', true, Array) #2 /home/u287508533/domains/suprematur.com.br/public_html/wp-includes/general-template.php(48): locate_template(Array, true, true, Array) #3 /home/u287508533/domains/suprematur.com.br/public_html/wp-content/themes/suprema/single-articulo.php(2): get_header() #4 /home/u287508533/domains/suprematur.com.br/public_html/wp-includes/template-loader.php(106): include('/home/u28750853...') #5 /home/u287508533/domains/suprematur.com.br/public_html/wp-blog-header.php(19): require_once('/home/u28750853...') #6 /home/u287508533/domains/suprematur.com.br/public_html/index.php(17): require('/home/u28750853...') #7 {main} t in /home/u287508533/domains/suprematur.com.br/public_html/wp-content/themes/suprema/header.php on line 14