Skip to content

Commit b5dd749

Browse files
committed
content-extras plugin plan
1 parent 10bf01f commit b5dd749

3 files changed

Lines changed: 34 additions & 3 deletions

File tree

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,12 @@ Please select a folder in the list above to see your plugin's development.
1010
- assets/icon-128x128.png
1111
- assets/icon-256x256.png
1212
- assets/screenshot-1.jpg
13+
14+
### Content plugin categories
15+
16+
1. bulk edit aid
17+
+ lenghten Menu taxonomy selector
18+
+ Post navigator subm
19+
+ Keep category tree
20+
1. integration
21+
1. UI cleaning
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
/*
3+
Plugin Name: Media URL Column
4+
Plugin Description: Adds URL column to the Media list page with autoselect.
5+
*/
6+
7+
8+
add_filter( 'manage_media_columns', 'muc_column' );
9+
add_action( 'manage_media_custom_column', 'muc_value', 10, 2 );
10+
11+
function muc_column( $cols ) {
12+
$cols['media_url'] = "URL";
13+
return $cols;
14+
}
15+
16+
function muc_value( $column_name, $id ) {
17+
if ( 'media_url' === $column_name )
18+
printf( '<input class="media-url-input nameless-input" style="width:100%%" type="text" readonly="" onclick="%s" value="%s" />',
19+
'jQuery(this).select();',
20+
wp_get_attachment_url( $id )
21+
);
22+
}

wordpress-fail2ban/block-bad-requests/wp-login-bad-request.inc.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,13 @@ private function check() {
109109

110110
// block non-static requests from CDN
111111
// but allow robots.txt
112-
if ( ! empty( $this->cdn_headers ) && 'robots.txt' !== $request_path ) {
112+
if ( ! empty( $this->cdn_headers ) && '/robots.txt' !== $request_path ) {
113113
$commons = array_intersect( $this->cdn_headers, array_keys( $_SERVER ) );
114114
if ( $commons === $this->cdn_headers ) {
115115
// workaround to prevent edge server banning
116-
//TODO block these from .htaccess
117-
$this->prefix = 'Attack from CDN: ';
116+
//TODO block these by another method
118117
$this->trigger_count = 1;
118+
$this->prefix = 'Attack through CDN: ';
119119
return 'bad_request_cdn_attack';
120120
}
121121
}

0 commit comments

Comments
 (0)