Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * New Web FUNCTIONS FILE
- *
- *@subpackage mydomainofficial
- *
- */
- // This is the secret key for API authentication. You configured it in the settings menu of the license manager plugin..
- define('tema_sintaxedomain', '55265dd116c3c9.94260852'); //Rename this constant name so it is specific to your plugin or theme.
- // This is the URL where API query request will be sent to. This should be the URL of the site where you have installed the main license manager plugin. Get this value from the integration help page.
- define('sintaxedomain_licenca_servidor_url', 'http://www.mydomainofficial.com.br'); //Rename this constant name so it is specific to your plugin or theme.
- // This is a value that will be recorded in the license manager data so you can identify licenses for this item/product
- define('sintaxedomain_item_referencia', 'Tema New Web');//Rename this constant name so it is specific to your plugin or theme.
- add_action('admin_menu', 'slm_sample_license_menu');
- function slm_sample_license_menu() {
- add_options_page('Menu de Ativação de Licença', 'Licença New Web', 'manage_options', __FILE__, 'sample_license_management_page');
- }
- function sample_license_management_page() {
- echo '<div class="wrap">';
- echo '<h2>Gerenciar sua licença</h2>';
- /*** License activate button was clicked ***/
- if (isset($_REQUEST['activate_license'])) {
- $license_key = $_REQUEST['sample_license_key'];
- // API query parameters
- $api_params = array(
- 'slm_action' => 'slm_activate',
- 'secret_key' => tema_sintaxedomain,
- 'license_key' => $license_key,
- 'registered_domain' => $_SERVER['SERVER_NAME'],
- 'item_reference' => urlencode(sintaxedomain_item_referencia),
- );
- // Send query to the license manager server
- $response = wp_remote_get(add_query_arg($api_params, sintaxedomain_licenca_servidor_url), array('timeout' => 20, 'sslverify' => false));
- // Check for error in the response
- if (is_wp_error($response)){
- echo "Erro inesperado! A consulta retornou com um erro.";
- }
- //var_dump($response);//uncomment it if you want to look at the full response
- // License data.
- $license_data = json_decode(wp_remote_retrieve_body($response));
- // TODO - Do something with it.
- //var_dump($license_data);//uncomment it to look at the data
- if($license_data->result == 'success'){//Success was returned for the license activation
- //Uncomment the followng line to see the message that returned from the license server
- echo '<br /><strong>Situação da chave</strong>: '.$license_data->message;
- //Save the license key in the options table
- update_option('sample_license_key', $license_key);
- }
- else{
- //Show error to the user. Probably entered incorrect license key.
- //Uncomment the followng line to see the message that returned from the license server
- echo '<br /><strong>Situação da chave</strong>: '.$license_data->message;
- }
- // mydomainofficial Width Based on Size
- if ( ! isset( $content_width ) )
- $content_width = 780; // pixels
- /*** mydomainofficial Included Files ***/
- // mydomainofficial Bootstrap Nav Walker
- require_once('inc/bootstrap_navwalker.php');
- require_once('framework/functions.php');
- // mydomainofficial template-tags.php
- require_once('inc/template-tags.php');
- // mydomainofficial Custom Header
- // mydomainofficial Custom Background
- $avon_bg = array(
- 'default-image' => get_template_directory_uri() . '',
- );
- add_theme_support( 'custom-background', $avon_bg );
- // mydomainofficial RSS feed links
- add_theme_support( 'automatic-feed-links' );
- // mydomainofficial Theme Title
- add_filter( 'wp_title', 'filter_wp_title' );
- function filter_wp_title( $title ) {
- global $page, $paged;
- if ( is_feed() )
- return $title;
- $site_description = get_bloginfo( 'description' );
- $filtered_title = $title . get_bloginfo( 'name' );
- $filtered_title .= ( ! empty( $site_description ) && ( is_home() || is_front_page() ) ) ? ' | ' . $site_description: '';
- $filtered_title .= ( 2 <= $paged || 2 <= $page ) ? ' | ' . sprintf( __( 'Página %s', 'mydomainofficial' ), max( $paged, $page ) ) : '';
- return $filtered_title;
- }
- // mydomainofficial Post Thumbnails
- add_theme_support('post-thumbnails');
- add_image_size ( 'slide-image', 850, 380, true );
- add_image_size ( 'slide-image-reduzida', 850, 280, true );
- add_image_size ( 'home-thumb-gera', 265, 240, true );
- add_image_size ( 'home-thumb-referencia', 198, 253, true );
- add_image_size ( 'home-blog-thumb', 150, 150, true );
- // mydomainofficial Post relacionados
- set_post_thumbnail_size( 196, 110, true );
- // mydomainofficial Post Formats
- add_theme_support( 'post-formats', array( 'aside', 'image', 'link', 'quote', 'status', 'gallery', 'video', 'audio', 'chat' ) );
- // mydomainofficial Registering Menu
- register_nav_menu( 'primary', __( 'Menu Principal', 'mydomainofficial' ) );
- // mydomainofficial Scipts and Style Files
- function mydomainofficial_scripts_styles() {
- if ( is_singular() && comments_open() && get_option( 'thread_comments' ) )
- wp_enqueue_script( 'comment-reply' );
- // mydomainofficial Main Js File
- wp_enqueue_script( 'jquery' );
- wp_enqueue_script( '', get_template_directory_uri() . '/js/bootstrap.js', array(), '3.0', true );
- // mydomainofficial Main Bootstrap Css File
- wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css', array(), '3.0', false );
- wp_enqueue_style( 'iconfont', get_template_directory_uri() . '/css/font-awesome.css', array());
- // mydomainofficial Theme Main Stylesheet
- wp_enqueue_style( 'twentytwelve-style', get_stylesheet_uri() );
- }
- add_action( 'wp_enqueue_scripts', 'mydomainofficial_scripts_styles' );
- //data em quantidade de dias
- function time_ago() {
- echo human_time_diff(get_the_time('U'), current_time('timestamp')) . ' atrás';
- }
- // mydomainofficial Comentários/Pingbacks
- if ( ! function_exists( 'mydomainofficial_comment' ) ) :
- function mydomainofficial_comment( $comment, $args, $depth ) {
- $GLOBALS['comment'] = $comment;
- if ( 'pingback' == $comment->comment_type || 'trackback' == $comment->comment_type ) : ?>
- <li id="comment-<?php comment_ID(); ?>" <?php comment_class(); ?>>
- <div class="comment-body">
- <?php _e( 'Pingback:', 'mydomainofficial' ); ?> <?php comment_author_link(); ?> <?php edit_comment_link( __( 'Editar', 'mydomainofficial' ), '<span class="edit-link">', '</span>' ); ?>
- </div>
- <?php else : ?>
- <li id="comment-<?php comment_ID(); ?>" <?php comment_class( empty( $args['has_children'] ) ? '' : 'parent' ); ?>>
- <article id="div-comment-<?php comment_ID(); ?>" class="comment-body">
- <footer class="comment-meta">
- <div class="comment-author vcard">
- <?php if ( 0 != $args['avatar_size'] ) echo get_avatar( $comment, $args['avatar_size'] ); ?>
- <?php printf( __( '%s <span class="says"> a </span>', 'mydomainofficial' ), sprintf( '<cite class="fn">%s</cite>', get_comment_author_link() ) ); ?>
- <a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>">
- <time datetime="<?php comment_time( 'U' ); ?>">
- <?php echo time_ago(); ?>
- </time>
- </a>
- </div><!-- .comment-author -->
- <div class="comment-metadata">
- <?php edit_comment_link( __( 'Editar', 'mydomainofficial' ), '<span class="edit-link">', '</span>' ); ?>
- </div><!-- .comment-metadata -->
- <?php if ( '0' == $comment->comment_approved ) : ?>
- <p class="comment-awaiting-moderation"><?php _e( 'Seu comentário está aguardando moderação.', 'mydomainofficial' ); ?></p>
- <?php endif; ?>
- </footer><!-- .comment-meta -->
- <div class="comment-content">
- <?php comment_text(); ?>
- </div><!-- .comment-content -->
- <?php
- comment_reply_link( array_merge( $args, array(
- 'add_below' => 'div-comment',
- 'depth' => $depth,
- 'max_depth' => $args['max_depth'],
- 'before' => '<div class="reply">',
- 'after' => '</div>',
- ) ) );
- ?>
- </article><!-- .comment-body -->
- <?php
- endif;
- }
- endif; // ends check for mydomainofficial_comment()
- if ( ! function_exists( 'mydomainofficial_comment_reply_link' ) ):
- // Style comment reply links as buttons
- function mydomainofficial_comment_reply_link( $link ) {
- return str_replace( 'comment-reply-link', 'btn btn-default btn-xs', $link );
- }
- add_filter( 'comment_reply_link', 'mydomainofficial_comment_reply_link' );
- endif;
- // mydomainofficial Pagination
- function mydomainofficial_pagination_nav($pages = '', $range = 2)
- {
- $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) {
- echo "<div class='pagination-wrap'><ul class='pagination'>";
- if($paged > 2 && $paged > $range+1 && $showitems < $pages)
- echo "<li><a href='".get_pagenum_link(1)."'>«</a></li>";
- if($paged > 1 && $showitems < $pages)
- echo "<li><a href='".get_pagenum_link($paged - 1)."'>‹</a></li>";
- for ($i=1; $i <= $pages; $i++) {
- if (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems ))
- {
- echo ($paged == $i)? "<li class='active'><span class='current'>".$i."</span></li>":"<li><a href='".get_pagenum_link($i)."' class='inactive' >".$i."</a></li>";
- }
- }
- if ($paged < $pages && $showitems < $pages)
- echo "<li><a href='".get_pagenum_link($paged + 1)."'>›</a></li>";
- if ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages)
- echo "<li><a href='".get_pagenum_link($pages)."'>»</a></li>";
- echo "</ul></div>";
- }
- }
- // mydomainofficial Sidebar
- if ( ! function_exists( 'sidebar_widgets' ) ) :
- function sidebar_widgets() {
- register_sidebar( array(
- 'id' => 'sidebar_principal',
- 'name' => __( 'Sidebar Principal', 'mydomainofficial' ),
- 'description' => __( 'Esta barra lateral está localizado no lado direito ou esquerdo de cada página.', 'mydomainofficial' ),
- 'before_widget' => '<aside class="well widget %2$s" id="%1$s">',
- 'after_widget' => '</aside>',
- 'before_title' => '<h3 class="widget-title">',
- 'after_title' => '</h3>',
- ) );
- }
- add_action( 'widgets_init', 'sidebar_widgets' );
- endif;
- // mydomainofficial WP Link Pages
- $mydomainofficial_wp_link_pages = array(
- 'before' => '<p>' . __( 'Páginas:', 'mydomainofficial' ),
- 'after' => '</p>',
- 'link_before' => '',
- 'link_after' => '',
- 'next_or_number' => 'number',
- 'separator' => ' ',
- 'nextpagelink' => __( 'Próxima página', 'mydomainofficial' ),
- 'previouspagelink' => __( 'Página anterior', 'mydomainofficial' ),
- 'pagelink' => '%',
- 'echo' => 1
- );
- //* Adiciona informações do tema no box do painel do WordPress
- function wgr_add_dashboard_widgets() {
- wp_add_dashboard_widget('wp_dashboard_widget', 'Detalhes do Tema', 'wgr_theme_info');
- }
- add_action('wp_dashboard_setup', 'wgr_add_dashboard_widgets' );
- function wgr_theme_info() {
- echo "<ul>
- <li><strong>Desenvolvido por:</strong> New Web</li>
- <li><strong>Website:</strong> <a href='http://www.mydomainofficial.com.br'>www.mydomainofficial.com.br</a></li>
- <li><strong>Contato:</strong> <a href='mailto:sintaxedomain@gmail.com'>sintaxedomain@gmail.com</a></li>
- </ul>";
- };
- /*-----------------------------------------------------------------------------*
- Customizar painel do Admin
- *-----------------------------------------------------------------------------*/
- // customizando texto footer do admin
- function custom_admin_footer() {
- echo ' Personalizado por <a href="http://www.sintaxedomain.com.br" title="Tema New Web" target="_self">New Web </a>';
- }
- add_filter('admin_footer_text', 'custom_admin_footer');
- //remover barra Admin do front end
- function my_function_admin_bar(){
- return false;
- }
- add_filter( "show_admin_bar" , "my_function_admin_bar");
- //Remove Opção de tela
- function mydomainofficial_remove_screen_options(){
- return false;
- }
- add_filter('screen_options_show_screen', 'mydomainofficial_remove_screen_options');
- //Mudar Titulo hover
- add_filter('login_headertitle', 'mydomainofficial_custom_wp_login_title');
- function mydomainofficial_custom_wp_login_title() {
- return get_option('blogname');
- }
- //Link logo Login
- add_filter('login_headerurl', 'mydomainofficial_custom_wp_login_url');
- function mydomainofficial_custom_wp_login_url() {
- return home_url();
- }
- //altearando cor barra admin
- function mydomainofficial_custom_colors() {
- echo '<style type="text/css">#wpadminbar {background:#2C3E50}</style>';
- }
- add_action('admin_head', 'mydomainofficial_custom_colors');
- //Cores do Status dos posts
- add_action('admin_footer','mydomainofficial_posts_status_color');
- function mydomainofficial_posts_status_color(){
- ?>
- <style>
- .status-draft{background: #FCE3F2 !important;}
- .status-pending{background: #87C5D6 !important;}
- .status-publish{/* Nenhum background. Manter as cores alternadas */}
- .status-future{background: #C6EBF5 !important;}
- .status-private{background:#F2D46F;}
- </style>
- <?php
- }
- //alterando fundo admin
- add_action( 'login_head', 'mydomainofficial_custom_login' );
- function mydomainofficial_custom_login() {
- echo '<link media="all" type="text/css" href="'.get_template_directory_uri().'/framework/admin/login-style.css" rel="stylesheet">';
- }
- //Esconder opção de Cores do painel
- function admin_color_scheme() {
- global $_wp_admin_css_colors;
- $_wp_admin_css_colors = 0;
- }
- add_action('admin_head', 'admin_color_scheme');
- /**
- * Array de definições de configuração. Alterar cada linha, conforme necessário.
- * Se você quiser as cordas padrão para estar disponível sob seu próprio domínio do tema,
- * Deixar as cordas descomentada.
- * Algumas das cordas são adicionados em um sprintf, por isso ver os comentários no
- * Final de cada linha para o que cada argumento será.
- */
- $config = array(
- 'domain' => 'mydomainofficial', // Text domain - likely want to be the same as your theme.
- 'default_path' => '', // Default absolute path to pre-packaged plugins
- 'parent_menu_slug' => 'themes.php', // Default parent menu slug
- 'parent_url_slug' => 'themes.php', // Default parent URL slug
- 'menu' => 'install-required-plugins', // Menu slug
- 'has_notices' => true, // Show admin notices or not
- 'is_automatic' => true, // Automatically activate plugins after installation or not
- 'message' => '', // Message to output right before the plugins table
- 'strings' => array(
- 'page_title' => __( 'Instalação Obrigatório de Plugins', '' ),
- 'menu_title' => __( 'Instalação de Plugins', 'mydomainofficial' ),
- 'installing' => __( 'Instalando o Plugin: %s', 'mydomainofficial' ), // %1$s = plugin name
- 'oops' => __( 'Algo deu errado com o plugin API.', 'mydomainofficial' ),
- 'notice_can_install_required' => _n_noop( 'Este tema requer o seguinte plug-in: %1$s.', 'Este tema exige os seguintes plugins: %1$s.' ), // %1$s = plugin name(s)
- 'notice_can_install_recommended' => _n_noop( 'Este tema recomenda o seguinte plug-in: %1$s.', 'Este tema recomenda os seguintes plugins: %1$s.' ), // %1$s = plugin name(s)
- 'notice_cannot_install' => _n_noop( 'Desculpe, mas você não tem as permissões corretas para instalar o plugin %s. Contatar o administrador do site para obter ajuda sobre como tirar o plugin instalado. ',' Desculpe, mas você não tem as permissões corretas para instalar plugins %s. Contactar o administrador do site para obter ajuda em obter os plugins instalados.' ), // %1$s = plugin name(s)
- 'notice_can_activate_required' => _n_noop( 'O seguinte plugin necessário está atualmente inativo: %1$s.', 'Os seguintes plugins necessários estão inativo no momento: %1$s.' ), // %1$s = plugin name(s)
- 'notice_can_activate_recommended' => _n_noop( 'O seguinte plug-in recomendado esta inativo no momento: %1$s.', 'Os seguintes plugins recomendados estão inativo no momento: %1$s.' ), // %1$s = plugin name(s)
- 'notice_cannot_activate' => _n_noop( 'Desculpe, mas você não tem as permissões corretas para ativar o plugin %s. Contactar o administrador do site para obter ajuda em obter o plugin ativado. ',' Desculpe, mas você não tem as permissões corretas para ativar plugins %s. Contactar o administrador do site para obter ajuda em obter os plugins ativados.' ), // %1$s = plugin name(s)
- 'notice_ask_to_update' => _n_noop( 'O seguinte plugin precisa ser atualizado para a versão mais recente para garantir o máximo de compatibilidade com este tema: %1$s.', 'Os seguintes plugins precisam ser atualizados para a sua versão mais recente para garantir a máxima compatibilidade com este tema: %1$s.' ), // %1$s = plugin name(s)
- 'notice_cannot_update' => _n_noop( 'Desculpe, mas você não tem as permissões corretas para atualizar o plug-in %s. Contactar o administrador do site para obter ajuda em obter o plugin atualizado. ',' Desculpe, mas você não tem as permissões corretas para atualizar plugins %s. Contactar o administrador do site para obter ajuda em obter os plugins atualizados.' ), // %1$s = plugin name(s)
- 'install_link' => _n_noop( 'Comece a instalação de plug-in', 'Comece a instalação dos plugins' ),
- 'activate_link' => _n_noop( 'Ative o plugin instalado', 'Ative os plugins instalados' ),
- 'return' => __( 'Retornar para instalação de Plugins Obrigatório', 'mydomainofficial' ),
- 'plugin_activated' => __( 'Plugin ativado com sucesso.', 'mydomainofficial' ),
- 'complete' => __( 'Todos os plugins instalado e ativado com sucesso. %s', 'mydomainofficial' ), // %1$s = dashboard link
- 'nag_type' => 'updated' // Determines admin notice type - can only be 'updated' or 'error'
- )
- );
- wpgr( $plugins, $config );
- }
- function new_excerpt_more( $more ) {
- return ' ... <a class="leia-mais" href="'. get_permalink( get_the_ID() ) . '">'. get_theme_option('txtartigosleiamais') .'</a>';
- }
- add_filter( 'excerpt_more', 'new_excerpt_more' );
- function custom_excerpt_length( $length ) {
- return ''. get_theme_option('qtdcaracterleiamais') .'';
- }
- add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );
- /*-----------------------------------------------------------------------------*
- Botões das Redes Sociais
- *-----------------------------------------------------------------------------*/
- add_action( 'wp_footer', 'include_social_js' );
- function include_social_js() {
- $lang = get_bloginfo('language');
- $lang_g = strtolower(substr($lang, 0, 2));
- $lang_fb = str_replace('-', '_', $lang);
- ?>
- <!-- Social -->
- <script type="text/javascript">
- //<![CDATA[
- // google plus
- window.___gcfg = {lang: '<?php echo $lang_g; ?>'};
- (function() {
- var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
- po.src = 'https://apis.google.com/js/plusone.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
- })();
- // facebook
- document.write('<div id="fb-root"></div>');
- (function(d, s, id) {
- var js, fjs = d.getElementsByTagName(s)[0];
- if (d.getElementById(id)) return;
- js = d.createElement(s); js.id = id;
- js.src = "//connect.facebook.net/<?php echo $lang_fb; ?>/all.js#xfbml=1";
- fjs.parentNode.insertBefore(js, fjs);
- }(document, 'script', 'facebook-jssdk'));
- // twitter
- !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
- // ]]>
- </script>
- <!-- /Social -->
- <?php
- }
- function social_buttons_code(){
- global $post;
- $permalink = get_permalink($post->ID);
- $title = get_the_title($post->ID);
- $buttonsCode = array();
- //facebook
- $buttonsCode[] = '<div class="social social-button-fblike"><!-- Facebook like--><div id="fb-root"></div><div class="fb-like" data-href="'.$permalink.'" data-send="false" data-layout="button_count" data-width="100" data-height="20" data-show-faces="false"></div></div>'; //data-send="true" se quiser combinar like button com send button
- //Twitter
- $buttonsCode[] = '<div class="social social-buttom-twitter"><!-- Twitter--><div id="twitter"><a href="https://twitter.com/share" class="twitter-share-button" data-text="'.$title.'" data-url="'.$permalink.'" rel="nofollow"></a></div></div>';
- //G+
- $buttonsCode[] = '<div class="social social-button-googleplus"><!-- Google Plus One--><div class="g-plusone" data-size="medium" data-href="'.$permalink.'"></div></div>';
- $social_buttonscode = '<div id="social-buttons-wrapper" class="clearfix">'."\n";
- $social_buttonscode .= implode("\n", $buttonsCode) . "\n";
- $social_buttonscode .= '</div>'."\n";
- return $social_buttonscode;
- }
- add_filter( 'the_content', 'insert_social_buttons' );
- //Se quiser que os botões apareçam também nos resumos, descomente a linha abaixo....
- //add_filter( 'the_excerpt', 'insert_social_buttons' );
- function insert_social_buttons($content){
- if( !is_page() || !is_search() ){
- //incluo os botões antes do conteúdo... Se quiser que apareça depois do conteúdo, basta colocar a linha $social_content = social_ ... depois da variável $content = $social_...
- $social_content = social_buttons_code();
- $content = $social_content . $content;
- }
- return $content;
- }
- /*-----------------------------------------------------------------------------*
- Novos campos de contato
- *-----------------------------------------------------------------------------*/
- if ( ! function_exists('mydomainofficial_new_contact_fields') ) {
- function mydomainofficial_new_contact_fields( $contact_fields ) {
- // Twitter
- $contact_fields['twitter'] = 'Twitter URL - Usar: http://';
- // Facebbok
- $contact_fields['facebook'] = 'Facebook - Usar: URL http://';
- // Google+
- $contact_fields['googleplus'] = 'Google+ - Usar: URL http://';
- return $contact_fields;
- } // neweb_new_contact_fields
- add_filter('user_contactmethods', 'mydomainofficial_new_contact_fields', 10, 1);
- } // function_existsaa
- /*-----------------------------------------------------------------------------*
- author no single
- *-----------------------------------------------------------------------------*/
- if ( ! function_exists('mydomainofficial_author_area') ) {
- function mydomainofficial_author_area() {
- // Apenas apresentaremos a área do autor nos posts na íntegra
- if ( is_single() ):
- $author_id = get_the_author_meta( 'ID' );
- ?>
- <!-- Área do autor -->
- <div class="tp-author-area clearfix">
- <!-- Conteúdo interno da área do autor -->
- <div class="tp-inner-author-area">
- <!-- Gravatar -->
- <div class="tp-author-gravatar">
- <?php if(get_theme_option('avatar-upload')) {?>
- <a href="<?php echo esc_url( home_url( '/' ) ); ?>"><img src ="<?php echo esc_url(get_theme_option('avatar-upload')); ?>" /></a>
- <?php } else { ?>
- <a class="tp-author-link" href="<?php echo esc_url( get_author_posts_url( $author_id ) ); ?>">
- <?php echo get_avatar( get_the_author_meta( 'user_email' ), 150 ); ?>
- </a>
- <?php } ?>
- </div> <!-- tp-author-gravatar -->
- <!-- Nome e link do autor -->
- <h3 class="tp-about-autor-heading">
- <span class="byline"><span class="glyphicon glyphicon-user"></span> <span class="author vcard">
- <a href="<?php echo get_author_posts_url( $author_id );?>">
- <?php echo get_the_author(); ?>
- </a>
- </span></span>
- </h3>
- <!-- Descrição do autor -->
- <div class="tp-author-info">
- <?php the_author_meta( 'description' ); ?>
- </div> <!-- tp-author-info -->
- <!-- Links sociais -->
- <p class="tp-social-links clearfix">
- <?php if ( get_the_author_meta( 'facebook', $author_id ) ): ?>
- <a class="tp-author-social-link-f" href="<?php
- echo get_the_author_meta( 'facebook', $author_id );
- ?>" target="_blank"><i class="fa fa-facebook"></i></a> <i class="fa fa-circle"></i>
- <?php endif;?>
- <?php if ( get_the_author_meta( 'googleplus', $author_id ) ): ?>
- <a class="tp-author-social-link-g" href="<?php
- echo get_the_author_meta( 'googleplus', $author_id );
- ?>?rel=author" rel="author" target="_blank"><i class="fa fa-google-plus"></i> </a> <i class="fa fa-circle"></i>
- <?php endif;?>
- <?php if ( get_the_author_meta( 'twitter', $author_id ) ): ?>
- <a class="tp-author-social-link-t" href="<?php
- echo get_the_author_meta( 'twitter', $author_id );
- ?>" target="_blank"><i class="fa fa-twitter"></i></a>
- <?php endif;?>
- </p>
- </div> <!-- tp-inner-author-area -->
- </div> <!-- tp-author-area -->
- <?php endif; // is_single() ?>
- <?php
- } // mydomainofficial_author_area
- } // function_exists
- /*-----------------------------------------------------------------------------*
- author in sidebar
- *-----------------------------------------------------------------------------*/
- if ( ! function_exists('mydomainofficial_author_area_sidebar') ) {
- function mydomainofficial_author_area_sidebar() {
- // Apenas apresentaremos a área do autor na sidebar.
- $author_id = get_the_author_meta( 'ID' );
- ?>
- <!-- Área do autor -->
- <div class="tp-author-area clearfix" style="text-align:center">
- <!-- Conteúdo interno da área do autor -->
- <div class="tp-inner-author-area">
- <!-- Gravatar -->
- <div class="tp-author-gravatar-sidebar">
- <?php if(get_theme_option('avatar-upload')) {?>
- <a href="<?php echo esc_url( home_url( '/' ) ); ?>">
- <img src ="<?php echo esc_url(get_theme_option('avatar-upload')); ?>" />
- </a>
- <?php } else { ?>
- <a class="tp-author-link" href="<?php echo esc_url( get_author_posts_url( $author_id ) ); ?>">
- <?php echo get_avatar( get_the_author_meta( 'user_email' ), 150 ); ?>
- </a>
- <?php } ?>
- </div> <!-- tp-author-gravatar -->
- <div class="clearfix"></div>
- <!-- Nome e link do autor -->
- <h3 class="tp-about-autor-heading-sidebar">
- <span style="font-weight:bold"> <span class="author vcard">
- <a href="<?php echo get_author_posts_url( $author_id );?>">
- <?php echo get_the_author(); ?>
- </a>
- </span></span>
- </h3>
- <!-- Descrição do autor -->
- <div class="tp-author-info">
- <?php the_author_meta( 'description' ); ?>
- </div> <!-- tp-author-info -->
- <!-- Links sociais -->
- <p class="tp-social-links clearfix">
- <?php if ( get_the_author_meta( 'facebook', $author_id ) ): ?>
- <a class="tp-author-social-link-f" href="<?php
- echo get_the_author_meta( 'facebook', $author_id );
- ?>" target="_blank"><i class="fa fa-facebook"></i></a> <i class="fa fa-circle"></i>
- <?php endif;?>
- <?php if ( get_the_author_meta( 'googleplus', $author_id ) ): ?>
- <a class="tp-author-social-link-g" href="<?php
- echo get_the_author_meta( 'googleplus', $author_id );
- ?>?rel=author" rel="author" target="_blank"><i class="fa fa-google-plus"></i> </a> <i class="fa fa-circle"></i>
- <?php endif;?>
- <?php if ( get_the_author_meta( 'twitter', $author_id ) ): ?>
- <a class="tp-author-social-link-t" href="<?php
- echo get_the_author_meta( 'twitter', $author_id );
- ?>" target="_blank"><i class="fa fa-twitter"></i></a>
- <?php endif;?>
- </p>
- </div> <!-- tp-inner-author-area -->
- </div> <!-- tp-author-area -->
- <?php
- } // mydomainofficial_author_area
- } // function_exists
- } /*** End of sample license deactivation ***/
- ?>
- <p>Please enter the license key for this product to activate it. You were given a license key when you purchased this item.</p>
- <form action="" method="post">
- <table class="form-table">
- <tr>
- <th style="width:100px;"><label for="sample_license_key">Chave da licença</label></th>
- <td ><input class="regular-text" type="text" id="sample_license_key" name="sample_license_key" value="<?php echo get_option('sample_license_key'); ?>" ></td>
- </tr>
- </table>
- <p class="submit">
- <input type="submit" name="activate_license" value="Ativar" class="button-primary" />
- <input type="submit" name="deactivate_license" value="Desativar" class="button" />
- </p>
- </form>
- <?php
- echo '</div>';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement