Skip to content

Instantly share code, notes, and snippets.

View etomProductions's full-sized avatar
🎯
Focusing

Etom Productions etomProductions

🎯
Focusing
View GitHub Profile
@etomProductions
etomProductions / wpse_70758.php
Created October 18, 2020 17:24 — forked from brasofilo/wpse_70758.php
WordPress plugin : Prevent Categories Deletion
<?php
/*
Plugin Name: Prevent Category Deletion
Plugin URI: http://wordpress.stackexchange.com/q/70758/12615
Description: Prevent deletion of categories. Modify the $undeletable array to suit your setup. Use Category SLUGS.
Author: brasofilo
Version: 1.0
Author URI: http://wordpress.stackexchange.com/users/12615/brasofilo
*/
@etomProductions
etomProductions / block-category-delete-example.php
Created October 18, 2020 17:22 — forked from hakre/block-category-delete-example.php
Wordpress Block Category Delete Example
<?php
/**
* Block deletion of certain categories by their ID.
*
* Copyright (C) 2010 hakre <http://hakre.wordpress.com/>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.