fix bug et maj MUplugin security
This commit is contained in:
parent
8ae27b4474
commit
7d64e737dd
2 changed files with 10 additions and 4 deletions
|
|
@ -2,7 +2,7 @@
|
|||
/*
|
||||
* Plugin Name: Admin Useraccount Security
|
||||
* Description: Met en place des règles de base afin de protéger les comptes administrateurs.
|
||||
* Version: 1.2
|
||||
* Version: 1.3
|
||||
* Author: Yann Gonidec
|
||||
* Author URI:
|
||||
*/
|
||||
|
|
@ -61,9 +61,9 @@ function remove_wp_version_rss() {
|
|||
}
|
||||
add_filter('the_generator','remove_wp_version_rss');
|
||||
|
||||
/** Désactivation des feeds RSS */
|
||||
/** new 31.01.2019 - Désactivation des feeds RSS */
|
||||
function wpb_disable_feed() {
|
||||
wp_die( __('Aucun flux disponible <a href="'. get_bloginfo('url') .'">retour à l\'accueil</a>.') );
|
||||
wp_die( __('Aucun flux disponible <a href="'. get_bloginfo('url') .'">retour à l\'accueil</a>.'), "Pas de flux RSS", array('response' => 200) );
|
||||
}
|
||||
add_action('do_feed', 'wpb_disable_feed', 1);
|
||||
add_action('do_feed_rdf', 'wpb_disable_feed', 1);
|
||||
|
|
@ -73,6 +73,12 @@ add_action('do_feed_atom', 'wpb_disable_feed', 1);
|
|||
add_action('do_feed_rss2_comments', 'wpb_disable_feed', 1);
|
||||
add_action('do_feed_atom_comments', 'wpb_disable_feed', 1);
|
||||
|
||||
/** new 31.01.2019 - Supprime les liens RSS dans le header des pages */
|
||||
add_action( 'wp_head', 'wpse33072_wp_head', 1 );
|
||||
function wpse33072_wp_head(){
|
||||
remove_action( 'wp_head', 'feed_links_extra', 3 );
|
||||
remove_action( 'wp_head', 'feed_links', 2 );
|
||||
}
|
||||
|
||||
/** Masque la version de Wordpress dans les sources du site */
|
||||
remove_action('wp_head', 'wp_generator');
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ if(isset($_GET['str']) && $_GET['str'] != ""){
|
|||
<div class="search_container">
|
||||
<?php
|
||||
$listPdt = array();
|
||||
if ($query->have_posts()){
|
||||
if (isset($query ) && $query->have_posts()){
|
||||
while ($query->have_posts()): $query->the_post();
|
||||
$onePdt = array();
|
||||
$pdt_categorie = get_field('pdt_categorie');
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue