| 1 |
<?php |
| 2 |
/* |
| 3 |
Plugin Name: Unique Headers |
| 4 |
Plugin URI: http://geek.ryanhellyer.net/ |
| 5 |
Description: Unique Headers |
| 6 |
Version: 1.0.4 |
| 7 |
Author: Ryan Hellyer / Metronet |
| 8 |
Author URI: http://geek.ryanhellyer.net/ |
| 9 |
|
| 10 |
------------------------------------------------------------------------ |
| 11 |
Copyright Ryan Hellyer |
| 12 |
|
| 13 |
This program is free software; you can redistribute it and/or modify |
| 14 |
it under the terms of the GNU General Public License as published by |
| 15 |
the Free Software Foundation; either version 2 of the License, or |
| 16 |
(at your option) any later version. |
| 17 |
|
| 18 |
This program is distributed in the hope that it will be useful, |
| 19 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 20 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 21 |
GNU General Public License for more details. |
| 22 |
|
| 23 |
You should have received a copy of the GNU General Public License |
| 24 |
along with this program; if not, write to the Free Software |
| 25 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 26 |
|
| 27 |
*/ |
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
/** |
| 32 |
* Do not continue processing since file was called directly |
| 33 |
* |
| 34 |
* @since 1.0 |
| 35 |
* @author Ryan Hellyer <ryanhellyer@gmail.com> |
| 36 |
*/ |
| 37 |
if ( !defined( 'ABSPATH' ) ) |
| 38 |
die( 'Eh! What you doin in here?' ); |
| 39 |
|
| 40 |
/** |
| 41 |
* Load classes |
| 42 |
* |
| 43 |
* @since 1.0 |
| 44 |
* @author Ryan Hellyer <ryanhellyer@gmail.com> |
| 45 |
*/ |
| 46 |
require( 'inc/class-category-header-images.php' ); |
| 47 |
require( 'inc/class-post-header-images.php' ); |
| 48 |
require( 'inc/class-multi-post-thumbnails.php' ); |
| 49 |
|
| 50 |
/** |
| 51 |
* Define constants |
| 52 |
* |
| 53 |
* @since 1.0 |
| 54 |
* @author Ryan Hellyer <ryanhellyer@gmail.com> |
| 55 |
*/ |
| 56 |
define( 'UNIQUEHEADERS_DIR', dirname( __FILE__ ) . '/' ); // Plugin folder DIR |
| 57 |
define( 'UNIQUEHEADERS_URL', WP_PLUGIN_URL . '/' . basename( UNIQUEHEADERS_DIR ) . '' ); // Plugin folder URL |
| 58 |
define( 'UNIQUEHEADERS_OPTION', 'hyper-headers' ); |
| 59 |
|
| 60 |
/** |
| 61 |
* Instantiate classes |
| 62 |
* |
| 63 |
* @since 1.0 |
| 64 |
* @author Ryan Hellyer <ryanhellyer@gmail.com> |
| 65 |
*/ |
| 66 |
new Category_Header_Images(); |
| 67 |
new Post_Header_Images(); |
| 68 |
new MultiPostThumbnails( |
| 69 |
array( |
| 70 |
'label' => __( 'Custom Header', 'unique_headers' ), |
| 71 |
'id' => 'custom-header', |
| 72 |
'post_type' => 'post' |
| 73 |
) |
| 74 |
); |
| 75 |
new MultiPostThumbnails( |
| 76 |
array( |
| 77 |
'label' => __( 'Custom Header', 'unique_headers' ), |
| 78 |
'id' => 'custom-header', |
| 79 |
'post_type' => 'page' |
| 80 |
) |
| 81 |
); |
| 82 |
|