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
// display title | |
if (!function_exists('display_title_acf')) { | |
function display_title_acf($title = '', $tag = "h2", $class = '') | |
{ | |
if (!empty($title)) { | |
echo '<' . $tag . ' class="title ' . $class . '">' . $title . '</' . $tag . '>'; | |
} | |
} | |
} |
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
if (!function_exists('storefront_site_title_or_logo')) { | |
/** | |
* Display the site title or logo | |
* | |
* @since 2.1.0 | |
* @param bool $echo Echo the string or return it. | |
* @return string | |
*/ | |
function storefront_site_title_or_logo($echo = true) | |
{ |
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
export class stickyScrollElement { | |
/** | |
* Constructs a new sticky instance. | |
* | |
* @param stickyItem Element parent contenant le sticky | |
* @param limiteWrapper container dans lequel le sticky doit se déplacer | |
* @param stickyNav Navigation sticky qui faudrait enlever des calculs | |
*/ | |
constructor( |
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
const menuSticky = () => { | |
const body = document.body; | |
const stickyMenu = document.querySelector(".wrapper-sticky-header"); // wrap your header with that | |
const menuHeight = stickyMenu.offsetHeight; | |
stickyMenu.style.height = menuHeight + 'px'; | |
// const nav = document.querySelector(".page-header nav"); |
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 lang="fr"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<?php wp_head(); ?> | |
</head> |
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
import $ from "jquery"; | |
/******************************************/ | |
/*************** PUBLICATIONS *************/ | |
/******************************************/ | |
$(function() { | |
var $publications = $('#container_loadResult_js'); | |
var $seeMore = $("#load_more_js"); | |
var $filterCategories = $('#filter_category_js'); | |
var $filterTag = $('#filter_tag_js'); |
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
/** | |
* External dependencies | |
*/ | |
import { isEmpty } from "lodash"; | |
/** | |
* WordPress dependencies | |
*/ | |
const { isBlobURL } = wp.blob; |
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
function gutenberg_examples_dynamic() { | |
// automatically load dependencies and version | |
register_block_type( 'custom-e2s/bloc-left', array( | |
'api_version' => 2, | |
'render_callback' => function($attributes, $content ) { | |
$path = locate_template( 'templates/blocks/bloc-left.php' ); | |
if ( file_exists( $path ) ) { | |
ob_start(); |
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
// ----------------------- | |
/** | |
* Declare our custom attribute | |
*/ | |
const setDecalageButton = (settings, name) => { | |
return Object.assign({}, settings, { | |
attributes: Object.assign({}, settings.attributes, { | |
decallage: { type: "boolean", default: false }, | |
decallagevalue: { type: "number", default: 0 }, |
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
ajouter sa clé pubique sur le serveur, pour se connecter sans mot de passe | |
ssh-copy-id -i ~/.ssh/id_rsa.pub user@server |
NewerOlder