Skip to content

Instantly share code, notes, and snippets.

@cdsaenz
Last active July 31, 2025 23:51
Show Gist options
  • Select an option

  • Save cdsaenz/9bb6dfdb022a0a7780bdf4d620e41009 to your computer and use it in GitHub Desktop.

Select an option

Save cdsaenz/9bb6dfdb022a0a7780bdf4d620e41009 to your computer and use it in GitHub Desktop.
Clio Websites Empty Plugin
<?php
/**
* Plugin Name: Clio Site Customizations
* Plugin URI: https://cliowebsites.com
* Description: Clio Site Customizations
* Version: 1.0.0
* Author: csdev
* Author URI: https://cliowebsites.com
* License: GPL2
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: clio-site-customizations
* Domain Path: /languages
* Requires at least: 6.2
* Tested up to: 6.2
* Requires PHP: 8.0
*/
defined('ABSPATH') || exit;
<?php
/**
* Alternative Empty Plugin Creator
* Snippet: Add to functions.php in current theme and remove when needed
* It will run only once
* csdev@cliowebsites
*/
add_action('admin_init', function() {
$plugin_path = WP_PLUGIN_DIR . '/clio-site-customizations/clio-site-customizations.php';
if (!file_exists($plugin_path)) {
wp_mkdir_p(dirname($plugin_path));
file_put_contents($plugin_path, '<?php /* Plugin Name: Clio Site Customizations */');
// Optionally, activate. Edit then in /wp-admin/plugin-editor.php
activate_plugin('clio-site-customizations/clio-site-customizations.php');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment