WordPress.org

Make WordPress Core

Ticket #9424: test-media-button-filters.php

File test-media-button-filters.php, 1.2 KB (added by simonwheatley, 6 years ago)

Plugin which tests the diff submitted for this ticket

Line 
1<?php
2/*
3Plugin Name: Test Media Button Filters
4Plugin URI: http://simonwheatley.co.uk/wordpress/test-media-button-filters
5*/
6
7/*  Copyright 2009 Simon Wheatley
8
9    This program is free software; you can redistribute it and/or modify
10    it under the terms of the GNU General Public License as published by
11    the Free Software Foundation; either version 2 of the License, or
12    (at your option) any later version.
13
14    This program is distributed in the hope that it will be useful,
15    but WITHOUT ANY WARRANTY; without even the implied warranty of
16    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17    GNU General Public License for more details.
18
19    You should have received a copy of the GNU General Public License
20    along with this program; if not, write to the Free Software
21    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
22
23*/
24
25function return_nothing()
26{
27        $args = func_get_args();
28        error_log( "About to return nothing, here's the args " . print_r( $args, true ) );
29        return false;
30}
31
32add_filter( 'image_upload_button', 'return_nothing' );
33add_filter( 'video_upload_button', 'return_nothing' );
34add_filter( 'audio_upload_button', 'return_nothing' );
35add_filter( 'media_upload_button', 'return_nothing' );
36
37?>