Skip to content

Instantly share code, notes, and snippets.

View wpchannel's full-sized avatar
:octocat:

Aurélien Denis wpchannel

:octocat:
View GitHub Profile
@wpchannel
wpchannel / import-terms-taxonomy-polylang-wordpress.php
Last active February 28, 2023 07:43
Custom script to import CSV file containing terms into a WordPress site using Polylang as multilingual plugin.
<?php
require_once('wp/wp-load.php');
// Set the path to the CSV file
$file_path = 'brands.csv';
// Open the CSV file
if (($handle = fopen($file_path, 'r')) !== FALSE) {
// Loop through each row in the CSV file
@wpchannel
wpchannel / import-products-polylang-wordpress.php
Last active February 28, 2023 07:44
Custom script to import CSV file containing products into a WordPress site using Polylang as multilingual plugin.
<?php
require_once('wp/wp-load.php');
// Set the path to the CSV file
$file_path = 'products.csv';
$count = 0;
$csv_data = array();
@wpchannel
wpchannel / import-media-polylang-wordpress.php
Last active February 28, 2023 07:44
Custom script to import CSV file containing images into a WordPress site using Polylang as multilingual plugin.
<?php
require_once( 'wp/wp-load.php' );
// Set the path to the CSV file
$file_path = 'products_images.csv';
$count = 0;
$csv_data = array();
@wpchannel
wpchannel / mu-yoast-seo-disable-notifications.php
Last active April 16, 2023 08:33
Hide annoying notifications after each upgrade of Yoast SEO plugin and others admin notices
<?php if (!defined('ABSPATH')) die('Restricted Area');
/*
* Plugin Name: Disable Yoast SEO Notifications
* Description: Hide annoying notifications after each upgrade of Yoast SEO plugin and others admin notices.
* Version: 1.1
* Author: Aurélien Denis
* Author URI: https://wpchannel.com/
*/
@wpchannel
wpchannel / mu-sanitize-filename.php
Last active April 21, 2024 14:51
Clean file name when uploading in WordPress
<?php if ( ! defined( 'ABSPATH' ) ) {
die( 'Restricted Area' );
}
/*
* Plugin Name: Sanitize File Name
* Description: Clean file name when uploading files in WordPress.
* Version: 20240103
* Author: Mickaël Gris (Saipafo) & Aurélien Denis (WP channel)
* Author URI: https://wpchannel.com/wordpress/tutoriels-wordpress/renommer-automatiquement-fichiers-accentues-wordpress/