Skip to content

Instantly share code, notes, and snippets.

View mahfuzul's full-sized avatar

Mahfuzul Hasan mahfuzul

View GitHub Profile
@mahfuzul
mahfuzul / vc_dependency.php
Last active July 20, 2023 09:27
Visual Composer field dependency variations
<?php
#Visual Composer field dependency examples:
array(
"type" => "attach_image",
"holder" => "div",
"param_name" => "section_title_image",
"dependency" => [
"element" => "title_type",
@mahfuzul
mahfuzul / flush_wp_rocket.php
Created April 30, 2025 06:55
Regenerates WP Rocket config file.
/**
* Updates .htaccess, regenerates WP Rocket config file.
*/
function flush_wp_rocket() {
if ( ! function_exists( 'rocket_generate_config_file' ) ) {
return false;
}
// Regenerate WP Rocket config file.