This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Foce File Download | |
* Usage: http://example.com/download.php?file=./uploads/image.jpg | |
* | |
* There are a couple of *ninja* exit() as security guarantee, adapt as necessary | |
* | |
*/ | |
// grab the requested file's name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 5G BLACKLIST/FIREWALL | |
# @ http://perishablepress.com/5g-blacklist/ | |
# 5G:[QUERY STRINGS] | |
<ifModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{QUERY_STRING} (localhost|mosconfig|scanner) [NC,OR] | |
# RewriteCond %{QUERY_STRING} (environ|localhost|mosconfig|scanner) [NC,OR] | |
# too many pieces of legitimate content with the word "environment" in the URL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
!defined( 'ABSPATH' ) AND exit; | |
/* | |
Plugin Name: Custom Installation Script | |
Plugin URI: http://wordpress.stackexchange.com/q/75420/12615 | |
Description: Create our own content on WP install | |
License: GPL | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action('admin_init', 'so_13646200_add_post_gallery'); | |
add_action('save_post' , 'so_13646200_update_post_gallery'); | |
function so_13646200_add_post_gallery() { | |
add_meta_box( | |
'post_gallery', | |
'Clients Logo Options', | |
'so_13646200_post_gallery_options', | |
'post', | |
'normal', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// REMOVE WP-CONTENT | |
// Rewrites DO NOT happen for child themes | |
// Add .htaccess rewrite rules to convert urls | |
// like "http://example.com/wp-content/themes/theme-name/path" into "http://example.com/path" | |
/* | |
in case your wordpress is in a folder, | |
and you change the site_url to the root of the domain, | |
add the folder name in lines 29 to 34, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Value of $nodes in the following: | |
* global $wp_admin_bar; | |
* $nodes = $wp_admin_bar->get_nodes(); | |
*/ | |
Array | |
( | |
[user-actions] => stdClass Object | |
( | |
[id] => user-actions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
Auxiliary menu and page with a button to open the thickbox | |
*/ | |
add_action('admin_menu', 'add_auxiliary_menu'); | |
function add_auxiliary_menu() | |
{ | |
add_menu_page( | |
'TB', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Old Upload Method | |
* Plugin URI: http://wordpress.org/support/topic/is-there-a-way-to-disable-the-new-media-manager | |
* Description: Replace the new media upload with the old thickbox | |
* Author: A.Morita, brasofilo | |
* Version: 1.2 | |
* License: GPLv2 or later | |
* |
OlderNewer