Commit ec31d665 authored by agnez's avatar agnez

pro theme start adapt

parent e270683c
......@@ -42,6 +42,7 @@ get_header();?>
get_template_part( 'no-results' );
endif; ?>
</div>
<div class="clearfix"></div>
<div class="clearfix">
</div>
<?php get_footer(); ?>
......@@ -261,6 +261,7 @@ add_filter( 'wp_footer', 'cdx_handel_external_links', 999);
function vs_add_googleanalytics() { ?>
// Paste your Google Analytics code here
UA-12605197-11
<?php }
......
......@@ -17,8 +17,8 @@ get_header(); ?>
<div id="content-blog" class="container">
<div class="middle-align">
<?php while ( have_posts() ) : the_post(); ?>
<h1><?php the_title();?></h1>
<?php if(has_post_thumbnail()) { ?>
<h1><?php the_title();?></h1><?php
if(has_post_thumbnail()) { ?>
<div class="feature-box"><?php
$thumb_img = get_post_meta( get_post_thumbnail_id() );?>
<img src="<?php the_post_thumbnail_url('full'); ?>" width="100%" alt="<?php echo $thumb_img['_wp_attachment_image_alt']['0'];?>">
......@@ -26,9 +26,9 @@ get_header(); ?>
$img_legende = get_post(get_post_thumbnail_id())->post_excerpt;
if(!empty($img_legende)){
echo '<div class="legende">' . $img_legende . '</div>';
}?>
<?php } ?>
<?php the_content();
}
}
the_content();
wp_link_pages( array(
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'multipurpose-blog' ) . '</span>',
......
/*!
Theme Name: Voisin Solidaires
Theme Name: Voisin Solidaires non pro
Theme URI: http://buywptemplates.com/multipurpose-blog-wordpress-theme
Description: Multipurpose-blog Child
Author: Lore Mipsum
......
<?php
/**
* The template for displaying Archive pages.
*
* Learn more: http://codex.wordpress.org/Template_Hierarchy
*
* @package multipurpose blog
*/
get_header();?>
<div class="container">
<h1 class="page-title"><?php single_cat_title();?></h1>
<div class="row">
<?php if ( have_posts() ) :
/* Start the Loop */
while ( have_posts() ) : the_post();?>
<div class="col-md-4 col-sm-4">
<div id="post-<?php the_ID(); ?>" <?php post_class('inner-service'); ?>>
<h3 class="section-title"><a href="<?php echo esc_url( get_permalink() ); ?>" title="<?php the_title_attribute(); ?>"><?php the_title();?></a></h3>
<?php
// TODO trouver comment afficher date uniquement si page cat 1
if(has_post_thumbnail()) {
$thumb_img = get_post_meta( get_post_thumbnail_id() );
$img_alt = get_post_meta( get_post_thumbnail_id(), '_wp_attachment_image_alt', true);
the_post_thumbnail( 'medium', array( 'alt' => $img_alt ) );
$img_legende = get_post(get_post_thumbnail_id())->post_excerpt;
if(!empty($img_legende)){
echo '<div class="legende">' . $img_legende . '</div>';
}
$img_description = get_post(get_post_thumbnail_id())->post_content;
if(!empty($img_description)){
echo '<div class="description">' . $img_description . '</div>';
}
}
if(!has_post_thumbnail()) {
get_template_part( 'template-parts/formatview',get_post_format() );
}?>
</div>
</div><?php
endwhile;
else :
get_template_part( 'no-results' );
endif; ?>
</div>
<div class="clearfix">
</div>
<?php get_footer(); ?>
/*!
Theme Name: CDE - ULB
Theme URI: http://example.com/radix-child/
Description: Education Hub Pro Child
Author: Lore Mipsum
Template: education-hub-pro
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: light, white, one-column, two-columns, left-sidebar, right-sidebar, fixed-layout, custom-background, custom-colors, custom-menu, featured-images, full-width-template, post-formats, sticky-post, translation-ready, responsive-layout, theme-options, threaded-comments
Text Domain: eduhubchild
*/#slider .slide-cap a.read-more{border-color:gold;display:inline-block}
/*# sourceMappingURL=style.css.map */
{
"version": 3,
"mappings": "AAAA;;;;;;;;;;;EAWE,AAEF,8BAA+B,CAC3B,YAAY,CAAC,IAAI,CACjB,OAAO,CAAE,YAAY",
"sources": ["../../multipurpose-blog-child_dev/sass/style.scss"],
"names": [],
"file": "style.css"
}
\ No newline at end of file
<?php
/**
* The template for displaying the footer.
*
* Contains the closing of the #content div and all content after
*
* @package multipurpose blog
*/
?>
<div class="footer-wp">
<div class="container">
<div class="row">
<div class="col-md-4 col-sm-4">
<?php dynamic_sidebar('footer-1');?>
</div>
<div class="col-md-4 col-sm-4">
<?php dynamic_sidebar('footer-2');?>
</div>
<div class="col-md-4 col-sm-4">
<?php dynamic_sidebar('footer-3');?>
</div>
</div>
</div>
</div>
<div class="inner">
<div class="copyright-wrapper">
<?php dynamic_sidebar('footer-b');?>
</div>
<div class="clear"></div>
</div>
<?php wp_footer(); ?>
</body>
</html>
\ No newline at end of file
<?php
add_action( 'after_setup_theme', 'voisinssolidaires_setup' );
function voisinssolidaires_setup() {
load_child_theme_textdomain( 'voisinssolidaires', get_stylesheet_directory() . '/languages' );//Loads the child theme textdomain.
}
?>
<?php
//* Dequeue parent's styles - Remove Google Fonts https://technumero.com/remove-google-fonts-from-wordpress-theme/
add_action( 'wp_print_styles', 'tn_dequeue_google_fonts_style' );
function tn_dequeue_google_fonts_style() {
wp_dequeue_style( 'multipurpose-blog-font' );
}
/*enqueue_scripts*/
add_action( 'wp_enqueue_scripts', 'my_parent_theme_css' );
function my_parent_theme_css() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.css');
wp_enqueue_style( 'child-style', get_stylesheet_uri(), array( 'parent-style,bootstrap' ) );
wp_enqueue_style( 'dashicons' );
}
/*enqueue_styles*/
// hook in late to make sure the parent theme's registration has fired so you can undo it. Otherwise the parent will simply enqueue its script anyway.
add_action('wp_enqueue_scripts', 'my_parent_theme_js', 100);
function my_parent_theme_js()
{
wp_dequeue_script('parent_theme_script_handle');
wp_enqueue_script('child_theme_script_handle', get_stylesheet_directory_uri().'/js/jquery.nivo.slider.js', array('jquery'));
}
?>
<?php
add_action( 'after_setup_theme', 'vs_thumbs' );
function vs_thumbs() {
add_theme_support( 'post-thumbnails' );
//set_post_thumbnail_size( 300, 150, true ); // default Post Thumbnail dimensions (cropped)
// additional image sizes
add_image_size( 'imagebox', 600, 400, true );
add_image_size( 'pagethumb', 760, 200 ); //soft proportional crop mode
}
?>
<?php
add_action( 'after_setup_theme', 'vs_remove_theme_support', 11 );
function vs_remove_theme_support() {
remove_theme_support( 'post-formats' );
add_theme_support( 'post-formats', array('video','audio',) );
}
?>
<?php
/* Theme Widgets Setup */
function vs_widgets_init() {
register_sidebar( array(
'name' => __( 'Tob bandeau left', 'voisinssolidaires' ),
'description' => __( 'On the very top - left', 'voisinssolidaires' ),
'id' => 'top_border_left',
'before_widget' => '<span id="%1$s" class="widget %2$s">',
'after_widget' => '</span>',
'before_title' => '<b class="widget-title">',
'after_title' => '</b>',
) );
register_sidebar( array(
'name' => __( 'Tob bandeau right', 'voisinssolidaires' ),
'description' => __( 'On the very top - right', 'voisinssolidaires' ),
'id' => 'top_border_right',
'before_widget' => '<span id="%1$s" class="widget %2$s">',
'after_widget' => '</span>',
'before_title' => '<b class="widget-title">',
'after_title' => '</b>',
) );
register_sidebar( array(
'name' => __( 'Bottom footer', 'voisinssolidaires' ),
'description' => __( 'On the very bottom', 'voisinssolidaires' ),
'id' => 'footer-b',
'before_widget' => '<div>',
'after_widget' => '</div>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
) );
register_sidebar( array (
'name' => __( 'Page Login espace membre', 'voisinssolidaires' ),
'description' => __( 'Widgets sur page spécifique avec slug "espace-membres"', 'voisinssolidaires' ),
'id' => 'widget-em',
'before_widget' => '<div id="espace-membres-widget">',
'after_widget' => '</div>',
'before_title' => '<b class="widget-title">',
'after_title' => '</b>',
) );
}
add_action( 'widgets_init', 'vs_widgets_init' );
?>
<?php
// taxonomies
function vs_page_taxonomie() {
$labels = array(
'name' => _x( 'Special functions', 'taxonomy general name', 'voisinssolidaires' ),
'singular_name' => _x( 'Special function', 'taxonomy singular name', 'voisinssolidaires' ),
'all_items' => __( 'All Special functions', 'voisinssolidaires' ),
'parent_item' => null,
'parent_item_colon' => null,
'search_items' => __( 'Search Special functions', 'voisinssolidaires' ),
'edit_item' => __( 'Edit Special function', 'voisinssolidaires' ),
'update_item' => __( 'Update Special function', 'voisinssolidaires' ),
'add_new_item' => __( 'Add New Special function', 'voisinssolidaires' ),
'new_item_name' => __( 'New special function Name', 'voisinssolidaires' ),
'menu_name' => __( 'Special functions' )
);
$capabilities = array (
'manage_terms' => 'manage_options', //by default only admin
'edit_terms' => 'manage_options',
'delete_terms' => 'manage_options',
'assign_terms' => 'edit_posts'
);
$args = array(
'hierarchical' => false,
'labels' => $labels,
'show_ui' => true,
'show_admin_column' => true,
'query_var' => true,
'public' => true, //needs to be public for the radio-button plugin to work
'rewrite' => false,
'capabilities' => $capabilities
);
register_taxonomy( 'pagetaxo', array( 'page' ), $args );
}
add_action( 'init', 'vs_page_taxonomie',0 );
function vs_metaboxes() {
// Add category metabox to page
register_taxonomy_for_object_type('pagetaxo', 'page');
}
add_action( 'init', 'vs_metaboxes' );
?>
<?php
// https://seventhqueen.com/blog/code-snippets/restrict-guest-users-from-accessing-buddypress-or-bbpress-pages.html
/**
* Redirect buddypress and bbpress pages to registration page
*/
function vs_page_template_redirect()
{
//if not logged in and on a bp page except registration or activation
if( ! is_user_logged_in() &&
( ( ! bp_is_blog_page() && ! bp_is_activation_page() && ! bp_is_register_page() ) || is_bbpress() )
)
{
wp_redirect( home_url( '/register/' ) );
exit();
}
}
add_action( 'template_redirect', 'vs_page_template_redirect' );
?>
<?php
// supprimer intitulé "catégorie" "tag" "autheur" https://wordpress.stackexchange.com/questions/179585/remove-category-tag-author-from-the-archive-title#answer-179590
add_filter( 'get_the_archive_title', function ($title) {
if ( is_category() ) {
$title = single_cat_title( '', false );
} elseif ( is_tag() ) {
$title = single_tag_title( '', false );
} elseif ( is_author() ) {
$title = '<span class="vcard">' . get_the_author() . '</span>' ;
}
return $title;
});
?>
<?php
// disable access to wp-admin for non-administrators
function block_wp_admin_access() {
if ( is_admin() && ! current_user_can( 'administrator' ) && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
wp_redirect( home_url() );
exit;
}
}
//add_action( 'init', 'block_wp_admin_access' );
?>
<?php
//email new user accound created
add_filter( 'wp_new_user_notification_email_admin', 'vs_new_user_notification_email', 10, 3 );
function vs_new_user_notification_email( $wp_new_user_notification_email, $user, $blogname ) {
$wp_new_user_notification_email['subject'] = sprintf( '[%s] nouveau voisin solidaire %s enregistré.', $blogname, $user->user_login );
$wp_new_user_notification_email['message'] = sprintf( "%s ( %s ) a été ajouté au site %s.", $user->user_login, $user->user_email, $blogname );
return $wp_new_user_notification_email;
}
add_filter( 'wp_new_user_notification_email' , 'edit_user_notification_email', 10, 3 );
function edit_user_notification_email( $wp_new_user_notification_email, $user, $blogname ) {
$message = sprintf(__("Bonjour %s %s," ), $user->user_firstname, $user->user_lastname ) . "\r\n\r\n";
$message .= sprintf(__( "L’administrateur ou l’administratrice du site %s vient de vous créer un profil pour accéder à l’espace membre du site, réservé uniquement aux voisin.e.s solidaire.s engagé.e.s dans le projet. Cet espace a été pensé comme un espace collectif et d’échanges entre tous les voisins solidaires, notamment pour vous accompagner durant la relation avec vos voisin.e.s réfugié.e.s." ), $blogname ) . "\r\n\r\n";
$message .= wp_login_url() . "\r\n";
$message .= sprintf(__( 'Votre login : %s' ), $user->user_login ) . "\r\n";
$message .= sprintf(__( 'Votre mot de passe : %s' ), $user->user_pass ) . "\r\n\r\n";
$message .= __("Grâce à cet accès, nous vous invitons à aller sur votre profil pour le personnaliser (changer le mot de passe, mettre une photo etc.) mais aussi à interagir avec d’autres sur le forum, structuré en différentes thématiques utiles. De plus, Vous pourrez accéder à notre boite à outils, pensée comme une aide pratique, et à la liste de tous les autres membres afin de pouvoir aussi leur envoyer un message privé." ) . "\r\n";
$message .= __("Cet espace est le vôtre, n’hésitez pas à nous contacter pour nous faire des retours, que ce soit à propos de sa forme ou du fond, mais aussi pour proposer d’autres outils qui vous sembleraient pertinent de partager etc." ) . "\r\n";
$message .= __("Merci d’avance et à bientôt !" );
$wp_new_user_notification_email['message'] = $message;
return $wp_new_user_notification_email;
}
?>
<?php
// external links to blank https://stackoverflow.com/questions/41874623/open-every-external-link-in-a-new-window-automatically-html-css
function cdx_handel_external_links() {?>
<script type="text/javascript">
( function( $ ) {
$("a[href^=http]").click(function(){
if(this.href.indexOf(location.hostname) == -1) {
$(this).attr({
target: "_blank"
});
}
})
//Add Nofollow
$("a").each(function(){
if(this.href.indexOf('nytimes.com') >0 ){
$(this).attr({
rel: "nofollow"
});
}
});
} )( jQuery );
</script>
<?php
}
add_filter( 'wp_footer', 'cdx_handel_external_links', 999);
?>
<?php
//add_action('wp_head', 'vs_add_googleanalytics');
function vs_add_googleanalytics() { ?>
// Paste your Google Analytics code here
UA-12605197-11
<?php }
/**
* Checks to see if we're on the front page or not.
*/
function twentyseventeen_is_frontpage() {
return ( is_front_page() && ! is_home() );
}
?>
<?php
/**
* The Header for our theme.
*
* Displays all of the <head> section and everything up till <div id="bwt_content">
*
* @package Multipurpose Blog Pro
* @subpackage multipurpose_blog_pro
* @since multipurpose_blog_pro 1.0
*/
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width">
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<link href="https://fonts.googleapis.com/css?family=Dancing+Script" rel="stylesheet">
<?php wp_head(); ?>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-107422631-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-107422631-1');
</script>
</head>
<body <?php body_class(); ?>>
<div id="header">
<?php // Top bar
get_template_part( 'template-parts/header/topbar' ); ?>
<div class="logo_bar">
<div class="logo">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
<img src="<?php echo get_stylesheet_directory_uri(); ?>/images/logoVS.jpg" alt="<?php esc_attr(bloginfo( 'name' )); ?>" title="<?php esc_attr(bloginfo( 'description' ));?> " />
</a>
</div>
</div>
<div class="container">
<div class="menus">
<div class="toggle"><a class="toggleMenu" href="#"><?php esc_html_e('Menu','multipurpose-blog'); ?></a></div>
<div class="menubox header">
<div class="nav">
<?php wp_nav_menu( array('theme_location' => 'primary') ); ?>
</div>
<div class="clearfix"></div>
</div>
</div>
</div>
<div class="clearfix"></div>
</div>
\ No newline at end of file
This diff is collapsed.
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/theme/multipurpose-blog-"
"child\n"
"POT-Creation-Date: 2018-05-16 20:06+0200\n"
"PO-Revision-Date: 2018-05-16 20:13+0200\n"
"Last-Translator: Lore <lore@mipsum.be>\n"
"Language-Team: \n"
"Language: fr_FR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.8.11\n"
"X-Poedit-Basepath: .\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: functions.php:48
msgid "Bottom footer"
msgstr "Bas de page"
#: functions.php:49
msgid "On the very bottom"
msgstr "Pied de page"
#: functions.php:65
msgctxt "taxonomy general name"
msgid "Special functions"
msgstr "Fonctionnements spécifiques"
#: functions.php:66
msgctxt "taxonomy singular name"
msgid "Special function"
msgstr "Fonctionnement spécifique"
#: functions.php:67
msgid "All Special functions"
msgstr "Tous fonctionnements spécifiques"
#: functions.php:70
msgid "Search Special functions"
msgstr "Chercher fonctionnements spécifiques"
#: functions.php:71
msgid "Edit Special function"
msgstr "Éditer le fonctionnement spécifique"
#: functions.php:72
msgid "Update Special function"
msgstr "Mettre le fonctionnement spécifique à jour"
#: functions.php:73
msgid "Add New Special function"
msgstr "Ajouter un fonctionnement spécifique"
#: functions.php:74
msgid "New special function Name"
msgstr "Nouveau fonctionnement spécifique"
#: functions.php:75
msgid "Special functions"
msgstr "Fonctionnement spécifique"
#: page-template/custom-home-page.php:57
msgid "Learn More"
msgstr "En savoir plus"
#: page-template/custom-home-page.php:113
msgid "Pages:"
msgstr "Pages :"
#: page-template/custom-home-page.php:117
msgid "Page"
msgstr ""
#. Theme Name of the plugin/theme
msgid "Voisin Solidaires"
msgstr ""
#. Theme URI of the plugin/theme
msgid "http://buywptemplates.com/multipurpose-blog-wordpress-theme"
msgstr ""
#. Description of the plugin/theme
msgid "Multipurpose-blog Child"
msgstr ""
#. Author of the plugin/theme
msgid "Lore Mipsum"
msgstr ""
#. Template Name of the plugin/theme
msgid "Custom Home Page"
msgstr "Page d'accueil"
#. Template Name of the plugin/theme
msgid "Page with Left Sidebar"
msgstr "Colonne gauche pour calendrier"
#. Template Name of the plugin/theme
msgid "Page with Right Sidebar"
msgstr "Page avec colonne de droite"