PluginProbe
Property Hive / 2.2.3
Property Hive v2.2.3
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 1.4.62 All 260 releases
propertyhive / includes / admin / settings / class-ph-settings-get-involved.php

class-ph-settings-get-involved.php in Property Hive 2.2.3, at includes/admin/settings/class-ph-settings-get-involved.php

191 lines 9.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * PropertyHive Get Involved Settings
4 *
5 * @author PropertyHive
6 * @category Admin
7 * @package PropertyHive/Admin
8 * @version 1.0.0
9 */
10
11 if ( ! defined( 'ABSPATH' ) ) {
12 exit; // Exit if accessed directly
13 }
14
15 if ( ! class_exists( 'PH_Settings_Get_Involved' ) ) :
16
17 /**
18 * PH_Settings_Get_Involved
19 */
20 class PH_Settings_Get_Involved extends PH_Settings_Page {
21
22 /**
23 * Constructor.
24 */
25 public function __construct()
26 {
27 $this->id = 'getinvolved';
28 $this->label = __( 'Get Involved', 'propertyhive' );
29
30 add_filter( 'propertyhive_settings_tabs_array', array( $this, 'add_settings_page' ), 20 );
31 add_action( 'propertyhive_settings_' . $this->id, array( $this, 'output' ) );
32 add_action( 'propertyhive_admin_field_getinvolved', array( $this, 'getinvolved_setting' ) );
33 }
34
35 /**
36 * Get settings array
37 *
38 * @return array
39 */
40 public function get_settings()
41 {
42 global $hide_save_button;
43
44 $hide_save_button = TRUE;
45
46 return apply_filters( 'propertyhive_get_involved_settings', array(
47
48 array(
49 'type' => 'getinvolved',
50 ),
51
52 array( 'type' => 'sectionend', 'id' => 'get_involved_options')
53
54 ) );
55 }
56
57 /**
58 * Output the settings
59 */
60 public function output()
61 {
62 $settings = $this->get_settings();
63
64 PH_Admin_Settings::output_fields( $settings );
65 }
66
67 private function draw_get_involved_details($heading, $description)
68 {
69 ?>
70 <div class="details">
71 <h1><?php echo $heading; ?></h1>
72 <p><?php echo $description; ?></p>
73 </div>
74 <?php
75 }
76
77 /**
78 * Output boxes showing ways to get involved
79 *
80 * @access public
81 * @return void
82 */
83 public function getinvolved_setting()
84 {
85 $assets_path = str_replace( array( 'http:', 'https:' ), '', PH()->plugin_url() ) . '/assets/';
86
87 ?>
88 <style type="text/css">
89
90 .get-involved ul { list-style-type:none; margin:0; padding:0; }
91 .get-involved ul li { float:left; width:40%; padding:0 10px; margin-bottom:25px; box-sizing:border-box; }
92 .get-involved ul li:nth-child(2n+1) { clear:left; }
93 .get-involved ul li .padding { background:#FFF; padding:15px; box-sizing:border-box; }
94 .get-involved ul li:last-child .padding { border:1px solid #CCC; box-shadow:0px 0px 9px 0px rgba(0,0,0,0.2); -webkit-box-shadow:0px 0px 9px 0px rgba(0,0,0,0.2); }
95 .get-involved ul li .thumbnail { text-align:center; padding-top:8px; }
96
97
98 .get-involved a { display:block; height:100%; text-decoration:none; color:black; border:1px solid #CCC; box-shadow:0px 0px 9px 0px rgba(0,0,0,0.2); -webkit-box-shadow:0px 0px 9px 0px rgba(0,0,0,0.2); transition:all 0.15s; -webkit-transition:all 0.15s; }
99 .get-involved a:hover { box-shadow:0px 0px 9px 0px rgba(0,0,0,0.4); -webkit-box-shadow:0px 0px 9px 0px rgba(0,0,0,0.4); }
100 .get-involved h1 { padding-top:0; font-weight:bold; }
101 .get-involved .padding .details p { font-size:1.1em; margin-bottom:10px; }
102 .get-involved .intro-text { width:81%; font-size:1.1em; }
103 .get-involved img { max-width:100%; }
104
105 @media (max-width:550px) {
106 .get-involved ul li { width:100%; padding:0; }
107 }
108
109 </style>
110 <table class="form-table">
111 <tr>
112 <td class="get-involved">
113 <p class="intro-text">
114 Our objective since launching Property Hive back in 2015 has always been to make it easy for developers and agents alike to get involved and contribute to allow us to make an estate agency WordPress plugin that everyone can benefit from.<br><br>
115 Below you'll find just a few ways in which you can get involved:
116 </p>
117 </td>
118 </tr>
119 <tr>
120 <td class="get-involved">
121 <ul>
122 <li>
123 <a href="https://trello.com/b/jb7bjB6j/property-hive-roadmap" target="_blank">
124 <div class="padding">
125 <?php $this->draw_get_involved_details('Public Feature Roadmap', 'See what features are coming up and currently in progress. Vote on features and submit your own ideas.'); ?>
126 <div class="thumbnail">
127 <img src="<?php echo $assets_path; ?>images/admin/get-involved/trello.png" alt="Public Feature Roadmap">
128 </div>
129 </div>
130 </a>
131 </li>
132 <li>
133 <a href="https://github.com/propertyhive/WP-Property-Hive" target="_blank">
134 <div class="padding">
135 <?php $this->draw_get_involved_details('Open Source Codebase', 'Being open source, you can develop your own Property Hive features and push them back for everybody to benefit from.'); ?>
136 <div class="thumbnail">
137 <img src="<?php echo $assets_path; ?>images/admin/get-involved/github.png" alt="Open Source Codebase">
138 </div>
139 </div>
140 </a>
141 </li>
142 <li>
143 <a href="https://wp-property-hive.com/extend-property-hive-sample-add-on/" target="_blank">
144 <div class="padding">
145 <?php $this->draw_get_involved_details('Build Your Own Add On', 'Get your creative juices flowing and build your own add on. We\'ve even got a skeleton add on available to get you started.'); ?>
146 <div class="thumbnail">
147 <img src="<?php echo $assets_path; ?>images/admin/get-involved/addons.png" alt="Build Your Own Add On">
148 </div>
149 </div>
150 </a>
151 </li>
152 <?php /*<li>
153 <div class="padding">
154 <?php $this->draw_get_involved_details('Sign Up To Our Newsletter', 'Ensure you\'re always in the know and get notified of new releases by signing up to our newsletter.'); ?>
155 <br>
156 <!-- Begin Mailchimp Signup Form -->
157 <link href="//cdn-images.mailchimp.com/embedcode/classic-10_7.css" rel="stylesheet" type="text/css">
158 <style type="text/css">
159 #mc_embed_signup{background:#fff; clear:left; font-size:14px; }
160 </style>
161 <div id="mc_embed_signup">
162 <form action="https://wp-property-hive.us9.list-manage.com/subscribe/post?u=92cc489fc12939370f2b630b4&amp;id=58f44dd68b" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
163 <div id="mc_embed_signup_scroll">
164 <div class="mc-field-group">
165 <label for="mce-EMAIL">Email Address</label>
166 <input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL">
167 </div>
168 <div id="mce-responses" class="clear">
169 <div class="response" id="mce-error-response" style="display:none"></div>
170 <div class="response" id="mce-success-response" style="display:none"></div>
171 </div> <!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups-->
172 <div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_92cc489fc12939370f2b630b4_58f44dd68b" tabindex="-1" value=""></div>
173 <div class="clear"><input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button"></div>
174 </div>
175 </form>
176 </div>
177 <script type='text/javascript' src='//s3.amazonaws.com/downloads.mailchimp.com/js/mc-validate.js'></script><script type='text/javascript'>(function($) {window.fnames = new Array(); window.ftypes = new Array();fnames[0]='EMAIL';ftypes[0]='email';}(jQuery));var $mcj = jQuery.noConflict(true);</script>
178 <!--End mc_embed_signup-->
179 </div>
180 </li>*/?>
181 </ul>
182 </td>
183 </tr>
184 <?php
185 }
186 }
187
188 endif;
189
190 return new PH_Settings_Get_Involved();
191