Skip to content

Instantly share code, notes, and snippets.


Giang Le gianghl1983

View GitHub Profile
alex-authlab / ff-user-email-verification.php
Last active Dec 15, 2020
Email verification add-on plugin for user created with Fluent Form Plugin
View ff-user-email-verification.php
Plugin Name: Fluent Form User Email Verification
Description: Fluent Form User Email Verification
Version: 1.0
Author: WPManageNinja Support Team
Author URI:
Plugin URI:
License: GPLv2 or later
Text Domain: fluentform
domtra / functions.php
Created Dec 3, 2019
Store complex ACF fields as JSON
View functions.php
namespace Flynt\AcfPerformance;
define('ACF_STORE_AS_JSON', true);
add_action('acf/init', function () {
$types = acf()->fields->types;
if (defined('ACF_STORE_AS_JSON') && ACF_STORE_AS_JSON) {
damiencarbery / disable-plugins-by-url.php
Last active Dec 29, 2020
Class To Disable WordPress Plugins By URL - Disable specified plugins except for certain pages - enhanced with caching.
View disable-plugins-by-url.php
Plugin Name: Class To Disable WordPress Plugins By URL
Plugin URI:
Description: Disable specified plugins except for certain pages - enhanced with caching.
Version: 0.1
Author: Damien Carbery
Author URI:
BODA82 / acf-change-file-upload-directory.php
Created Oct 24, 2016
Change the upload directory of Advanced Custom Fields file upload field.
View acf-change-file-upload-directory.php
// ACF upload prefilter
function gist_acf_upload_dir_prefilter($errors, $file, $field) {
// Only allow editors and admins, change capability as you see fit
if( !current_user_can('edit_pages') ) {
$errors[] = 'Only Editors and Administrators may upload attachments';
// This filter changes directory just for item being uploaded
View import-demo.php
Plugin Name: Import demo
Plugin URI:
Description: A demo import for my blog
Version: 1.0
Author: Roy Duineveld
Author URI:
wpsmith / WPS_Extend_Plugin.php
Last active Jan 18, 2021
PHP: WPS_Extend_Plugin Class designed to declare a plugin dependency and used for extending a plugin.
View WPS_Extend_Plugin.php
* Contains WPS_Extend_Plugin class. and wps_extend_plugins function.
* @package WPS_Core
* @author Travis Smith <>
* @copyright 2015 WP Smith, Travis Smith
* @license GNU Public License
* @version 1.0.0
* @since File available since Release 1.0.0
thachpham92 / gist:d57b18cf02e3550acdb5
Last active Jul 6, 2022
Tất cả các tham số trong WP_Query
View gist:d57b18cf02e3550acdb5
// Source:
// Xem hướng dẫn WP_Query toàn tập:
$args = array(
//////Author Parameters - Tham số lấy bài viết theo tác giả
'author' => '1,2,3,', //(int) - Các ID tác giả cần lấy bài viết (thêm dấu - vào để loại trừ tác giả, ví dụ: -14, -20)
'author_name' => 'luetkemj', //(string) - Lấy bài viết dựa theo tên nick name của tác giả
'author__in' => array( 2, 6 ), //(array) - Lấy bài dựa theo ID của tác giả