PluginProbe
Property Hive / 2.2.4
Property Hive v2.2.4
2.3.1 2.3.0 2.2.6 2.2.5 2.2.4 2.2.3 2.2.2 1.4.46 1.4.47 1.4.48 1.4.49 1.4.5 1.4.50 1.4.51 1.4.52 1.4.53 1.4.54 1.4.55 1.4.56 1.4.57 1.4.58 1.4.59 1.4.6 1.4.60 1.4.61 All 261 releases
propertyhive / includes / admin / post-types / class-ph-admin-header-stripes.php

class-ph-admin-header-stripes.php in Property Hive 2.2.4, at includes/admin/post-types/class-ph-admin-header-stripes.php

59 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * PropertyHive Header Stripes
4 *
5 *
6 *
7 * @author PropertyHive
8 * @category Admin
9 * @package PropertyHive/Admin/Header Stripes
10 * @version 1.0.0
11 */
12
13 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
14
15 /**
16 * PH_Admin_Header_Stripes
17 */
18 class PH_Admin_Header_Stripes {
19
20 /**
21 * Constructor
22 */
23 public function __construct() {
24
25 //add_action( 'edit_form_top', array( $this, 'add_header_stripe' ), 10, 1 );
26
27 }
28
29 /**
30 * Add PH Header Stripe
31 */
32 public function add_header_stripe( $post ) {
33
34 global $post, $propertyhive, $property;
35
36 if ($post->post_status != 'auto-draft')
37 {
38 if ($post->post_type == 'property')
39 {
40 $property = new PH_Property((int)$post->ID);
41
42 echo '<div style="background:#2ea2cc; border:1px solid #0074a2; border-radius:4px; padding:10px 15px; color:#FFF;">';
43
44 echo propertyhive_get_property_thumbnail('thumbnail', 'alignleft');
45
46 echo '<h1>' . esc_html(get_the_title($post->ID)) . '</h1>';
47 echo '<h3>' . $property->get_formatted_price() . '</h3>';
48
49 echo '<div class="clear"></div>';
50
51 echo '</div>';
52 }
53 }
54
55 }
56
57 }
58
59 new PH_Admin_Header_Stripes();