Logo y estilos para enlazar con GitLab desde el sitio

This commit is contained in:
Manuel Cillero 2018-06-06 17:44:45 +02:00
parent 0a17edd515
commit 54411d0d56
2 changed files with 31 additions and 7 deletions

View file

@ -111,17 +111,19 @@ function avia_change_tag_page_layout( $layout, $context ) {
}
/*
* Register new icon as a theme icon fot Github.
* Register new icons as a theme icons fot GitHub and GitLab.
* See https://kriesi.at/documentation/enfold/custom-social-icons/
*/
add_filter( 'avf_default_icons', 'avia_add_custom_icon', 10, 1 );
function avia_add_custom_icon( $icons ) {
$icons['github'] = array( 'font' =>'fontello', 'icon' => 'uf09b' );
$icons['gitlab'] = array( 'font' =>'fontello', 'icon' => 'uf296' );
return $icons;
}
add_filter( 'avf_social_icons_options', 'avia_add_custom_social_icon', 10, 1 );
function avia_add_custom_social_icon( $icons ) {
$icons['GitHub'] = 'github';
$icons['GitLab'] = 'gitlab';
return $icons;
}
@ -588,10 +590,17 @@ function avia_remove_debug() {
add_filter( 'w3tc_can_print_comment', '__return_false', 10, 1 );
/*
* Adding a dynamic current year to socket.
* Adding legal information in socket using a shortcode.
* See http://www.kriesi.at/support/topic/how-do-i-add-a-dynamic-current-year-to-socket
*/
add_shortcode( 'y', 'current_year_func' );
function current_year_func( $atts ) {
return date( 'Y' );
add_shortcode( 'infolegal', 'infolegal_func' );
function infolegal_func( $atts ) {
$legal = '<div id="legal">';
$legal .= '<span class="legal-notice"><a href="/legal">Aviso legal</a></span>';
$legal .= '<span class="legal-privacy"> &nbsp;|&nbsp; <a href="/legal/politica-de-privacidad">Política de privacidad</a></span>';
$legal .= '<span class="legal-cookies"> &nbsp;|&nbsp; <a href="/legal/politica-de-cookies">Uso de cookies</a></span>';
$legal .= '<span class="legal-terms"> &nbsp;|&nbsp; <a href="/legal/terminos-de-uso">Términos de uso</a></span>';
$legal .= '</div> ';
$legal .= '2009-' . date( 'Y' ) . ' &copy; manuel.cillero.es';
return $legal;
}