This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<title>Ma page type</title> | |
<meta charset="utf-8"> | |
</head> | |
<body> | |
<!-- commentaire dans le htlm --> | |
<p>Mon paragraphe <br /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Function déclarée dans le fichier markup.php | |
function genesis_parse_attr( $context, $attributes = array(), $args = array() ) { | |
$defaults = array( | |
'class' => sanitize_html_class( $context ), | |
); | |
$attributes = wp_parse_args( $attributes, $defaults ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
la classe .grille-equipe est ajoutée dans la balise body avec l'extension | |
Custom Body Class | |
https://fr.wordpress.org/plugins/wp-custom-body-class/ | |
*/ | |
/* Suppression des speudo éléments :before et :after qui sont comptés dans la grille */ | |
.grille-equipe .entry-content:before, | |
.grille-equipe .entry-content:after { | |
display: none; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Gamme de couleur | |
*/ | |
function gn_gamme_couleur() { | |
// Ensemble de la gamme | |
return array ( | |
'black' => '#000000', | |
'dark-blue' => '#073559', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Affichage du HTML dans le block | |
* | |
* @author Grégoire Noyelle | |
* @since 1.0.0 | |
*/ | |
$template = array( | |
array( 'core/paragraph', array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Test composition Gut 1 | |
// A mettre dans un fichier de function dans votre thème ou dans les fichiers de votre extension | |
// Catégorie de Pattern | |
function acf_bloc_gutenberg_register_my_pattern_categories() { | |
// Vérifier si fonction existe | |
if (! function_exists('register_block_pattern_category') ) exit; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Options pour WooCommerce | |
Plugin URI: https://wwww.gregoirenoyelle.com | |
Description: Changer des réglage de WooCommerce depuis une extension. | |
Version: 2.0 | |
Author: Grégoire Noyelle | |
Author URI: http://wwww.gregoirenoyelle.com | |
License: GPL2 | |
License URI: https://www.gnu.org/licenses/gpl-2.0.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// A placer dans le fichier functions.php de votre thème | |
//* Contrôle si Advanced Custom Field est actif sur le site | |
if ( ! function_exists( 'get_field' ) ) { | |
// Variable pour URL de la page Extension | |
function page_plugin_redirect() { | |
return get_bloginfo('url') . '/wp-admin/plugins.php'; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // BALISE PHP À ENLEVER | |
/** | |
* Ajouter page d'options ACF 5 | |
* | |
* @package ACF | |
*/ | |
if( function_exists('acf_add_options_page') ) { | |
// Premier menu d'options |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Template Name: Image avant le contenu | |
//* Affichage du contenu ACF avant le contenu principal | |
add_action('genesis_entry_content','ap_contenu_fiche_cuisinier', 5); | |
function ap_contenu_fiche_cuisinier() { | |
//* Variables ACF pour l'image | |
// L'image ACF est enregistrée en tant que "ID de l'image" | |
$image_id = (int) get_field('nom_du_champ_image_acf'); |
NewerOlder