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
#!/bin/bash | |
# Default options | |
LOCALE="fr_FR" | |
DB_HOST='localhost' | |
VIRUSTOTAL_KEY='YOUR_KEY' | |
printf "Name of the project? cf My Project: " | |
read PROJECT_NAME |
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
# ignore Wordpress files | |
/.htaccess | |
wp-content/uploads | |
sitemap.xml | |
sitemap.xml.gz | |
wp-config-locale.php | |
*.sql | |
php-errors.log | |
# ignore specific themes |
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 | |
// Inspired by Isotrope code: https://gist.github.com/isotrope/1930f90518bdbfa074c3 and MCSF https://gist.github.com/mcsf/6c5cda9ee61acc8849c6 | |
// Creates a query var called "tri" | |
function query_vars_tri( $vars ){ | |
$vars[] = "tri"; | |
return $vars; | |
} | |
add_filter( 'query_vars', 'query_vars_tri' ); |
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 | |
add_filter( 'jetpack_sharing_display_text', 'custom_jetpack_sharing_display_text', 10, 2 ); | |
function custom_jetpack_sharing_display_text( $title ){ | |
return ''; | |
} |
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 | |
// Owlcarousel: default settings for all owlcarousels | |
function custom_owlcarousel_shortcode_atts($defaults){ | |
$args = array( | |
'post_parent' => '' // ID of Page containing images, default is current page ID | |
'order' => 'ASC', // Order | |
'orderby' => 'ID', // Orderby | |
'image_size' => 'large', // Image size: thumbnail, medium, large, full | |
'exclude' => '' // Exclude images by listing their IDs, separate by comma |
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 | |
// Payline : préciser le mode de paiement dans les commandes | |
add_action('manage_shop_order_posts_custom_column', 'payline_payment_mean_admin_column', 10, 2); | |
function payline_payment_mean_admin_column($column) | |
{ | |
global $post; | |
switch ($column) { | |
case 'order_total' : | |
$paymentmean = get_post_meta($post->ID, 'Payment mean', true); | |
if(!empty($paymentmean)){ |
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 | |
/** | |
* Elementor: Force posts per page number for posts widget on Category Pages | |
* | |
* @param $query | |
*/ | |
function elementor_category_posts_per_page( $query ) { | |
$category_id_or_slug = 'myslug'; |
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 | |
// Appeler une image de Média de la bibliothèque WordPress, avec l'ID de l'image en question | |
echo wp_get_attachment_image( 18662, 'large', false, ['class' => 'customclass', 'id' => 'customid']); // thumbnail, medium, large, full | |
?> |