PluginProbe
WP Display Header / 8
WP Display Header v8
9 8 trunk 2.0.0 2.0.1 2.1.0 2.2.0 3 4 5 6 7
wp-display-header / wp-display-header.php

wp-display-header.php in WP Display Header 8, at wp-display-header.php

49 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: WP Display Header
4 * Plugin URI: http://en.wp.obenland.it/wp-display-header/?utm_source=wordpress&utm_medium=plugin&utm_campaign=wp-display-header
5 * Description: This plugin lets you specify a header image for each post and taxonomy/author archive page individually, from your default headers and custom headers.
6 * Version: 8
7 * Author: Konstantin Obenland
8 * Author URI: http://en.wp.obenland.it/?utm_source=wordpress&utm_medium=plugin&utm_campaign=wp-display-header
9 * Text Domain: wp-display-header
10 * Domain Path: /lang
11 * License: GPLv2
12 *
13 * @package wp-display-header
14 */
15
16 /**
17 * Instantiates the class if current theme supports Custom Headers.
18 *
19 * @since 1.2 - 03.05.2011
20 */
21 function obenland_wpdh_instantiate() {
22 if ( current_theme_supports( 'custom-header' ) ) {
23 if ( ! class_exists( 'Obenland_Wp_Plugins_V5' ) ) {
24 require_once 'class-obenland-wp-plugins-v5.php';
25 }
26
27 require_once 'class-obenland-wp-display-header.php';
28
29 new Obenland_Wp_Display_Header();
30 }
31 }
32 add_action( 'init', 'obenland_wpdh_instantiate', 1 );
33
34 /**
35 * Plugin activation.
36 */
37 function obenland_wp_display_header_activation() {
38 load_plugin_textdomain( 'wp-display-header', false, 'wp-display-header/lang' );
39
40 if ( ! current_theme_supports( 'custom-header' ) ) {
41 wp_die( esc_html__( 'Your current theme does not support Custom Headers.', 'wp-display-header' ), '', array( 'back_link' => true ) );
42 }
43
44 if ( version_compare( get_bloginfo( 'version' ), '3.2', '<' ) ) {
45 wp_die( esc_html__( 'WP Display Headers requires WordPress version 3.2 or later.', 'wp-display-header' ), '', array( 'back_link' => true ) );
46 }
47 }
48 register_activation_hook( __FILE__, 'obenland_wp_display_header_activation' );
49