Plugin Directory

Changeset 747657


Ignore:
Timestamp:
07/29/2013 06:48:12 AM (12 years ago)
Author:
Beej
Message:

Updated with the more efficient page-specific hook.

Location:
delete-custom-header/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • delete-custom-header/trunk/delete-custom-header.php

    r713629 r747657  
    33Plugin Name: Delete Custom Header
    44Description: Delete uploaded header images and remove them from the database.
    5 Version: 1.2.0
     5Version: 1.2.1
    66Author: Ben Yates
    77Author URI: http://bayates.host-ed.me/wordpress/
     
    1010if (!function_exists('delete_custom_header')) {
    1111    function delete_custom_header() {
    12         if ($_GET['page'] != 'custom-header')
    13             return;
    1412        if (!current_user_can('edit_theme_options'))
    1513            return;
     
    3533        }
    3634    }
    37     add_action('admin_init', 'delete_custom_header');
     35    add_action('load-appearance_page_custom-header', 'delete_custom_header');
    3836}
    3937
  • delete-custom-header/trunk/readme.txt

    r714011 r747657  
    44Tags: headers
    55Requires at least: 3.0.1
    6 Tested up to: 3.5.1
     6Tested up to: 3.5.2
    77Stable tag: trunk
    88License: GPLv2 or later
Note: See TracChangeset for help on using the changeset viewer.