PluginProbe
WP Display Header / 9
WP Display Header v9
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 9, at wp-display-header.php

50 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: 9
7 * Author: Konstantin Obenland
8 * Author URI: http://en.wp.obenland.it/?utm_source=wordpress&utm_medium=plugin&utm_campaign=wp-display-header
9 * Requires PHP: 7.4
10 * Text Domain: wp-display-header
11 * Domain Path: /lang
12 * License: GPLv2
13 *
14 * @package wp-display-header
15 */
16
17 /**
18 * Instantiates the class if current theme supports Custom Headers.
19 *
20 * @since 1.2 - 03.05.2011
21 */
22 function obenland_wpdh_instantiate() {
23 if ( current_theme_supports( 'custom-header' ) ) {
24 if ( ! class_exists( 'Obenland_Wp_Plugins_V5' ) ) {
25 require_once 'class-obenland-wp-plugins-v5.php';
26 }
27
28 require_once 'class-obenland-wp-display-header.php';
29
30 new Obenland_Wp_Display_Header();
31 }
32 }
33 add_action( 'init', 'obenland_wpdh_instantiate', 1 );
34
35 /**
36 * Plugin activation.
37 */
38 function obenland_wp_display_header_activation() {
39 load_plugin_textdomain( 'wp-display-header', false, 'wp-display-header/lang' );
40
41 if ( ! current_theme_supports( 'custom-header' ) ) {
42 wp_die( esc_html__( 'Your current theme does not support Custom Headers.', 'wp-display-header' ), '', array( 'back_link' => true ) );
43 }
44
45 if ( version_compare( get_bloginfo( 'version' ), '3.2', '<' ) ) {
46 wp_die( esc_html__( 'WP Display Headers requires WordPress version 3.2 or later.', 'wp-display-header' ), '', array( 'back_link' => true ) );
47 }
48 }
49 register_activation_hook( __FILE__, 'obenland_wp_display_header_activation' );
50