PluginProbe
Booking Manager – Sync WP Booking Calendar – Import Events, Export Bookings to ICS Calendar / 2.0.2
Booking Manager – Sync WP Booking Calendar – Import Events, Export Bookings to ICS Calendar v2.0.2
2.1.21 2.1.20 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 trunk 1.1 2.0 2.0.1 2.0.10.2 2.0.11 2.0.12 2.0.13 2.0.14 2.0.15 2.0.16 2.0.17 2.0.18 2.0.2 2.0.20 2.0.21 2.0.22 All 55 releases
booking-manager / core / any / wpbm-class-notices.php

wpbm-class-notices.php in Booking Manager – Sync WP Booking Calendar – Import Events, Export Bookings to ICS Calendar 2.0.2, at core/any/wpbm-class-notices.php

338 lines 12.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php /**
2 * @version 1.0
3 * @description Notices Class
4 * @category Show system Notices
5 * @author wpdevelop
6 *
7 * @web-site http://oplugins.com/
8 * @email info@oplugins.com
9 *
10 * @modified 2015-11-13
11 */
12
13 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
14
15 /** Showing our system notices in admin panel */
16 class WPBM_Notices {
17
18
19 function __construct() {
20
21 // Hooks for showing notices only at specific admin pages
22 add_action( 'wpbm_hook_wpbm_page_header', array( $this, 'show_system_notices' ) );
23 add_action( 'wpbm_settings_after_header', array( $this, 'show_system_notices' ) );
24 }
25
26
27 /** Check and show some system messages
28 *
29 * @param array $page_arr array( 'page' => $this->in_page() ) || array( 'page' => $this->in_page(), 'subpage' => 'emails_settings' )
30 */
31 public function show_system_notices( $page_arr ) {
32
33 if ( ! in_array( $page_arr, array( 'oplugins', 'opl-settings' ) ) )
34 return false;
35
36
37 ///////////////////////////////////////////////////////////
38 $notice_id = 'wpbm_system_notice_free_instead_paid';
39 ///////////////////////////////////////////////////////////
40 if ( wpbm_is_updated_paid_to_free()
41 && ( ! wpbm_section_is_dismissed( $notice_id ) )
42 // || true
43 ) {
44
45 ?><div id="<?php echo $notice_id; ?>"
46 class="wpbm_system_notice wpbm_is_dismissible wpbm_is_hideable updated notice-warning"
47 data-nonce="<?php echo wp_create_nonce( $nonce_name = $notice_id . '_wpbmnonce' ); ?>"
48 data-user-id="<?php echo get_current_user_id(); ?>"
49 ><?php
50
51 wpbm_x_dismiss_button();
52
53 echo '<strong>' . __( 'Warning!', 'booking-manager' ) . '</strong> ';
54 printf( __( 'Probabaly you updated your paid version of Booking Manager by free version or update process failed. You can request the new update of your paid version at %1sthis page%2s.', 'booking-manager' )
55 , '<a href="http://oplugins.com/plugins/wp-booking-manager/booking-manager-update/" target="_blank">', '</a>' );
56
57 ?></div><?php
58 }
59 ///////////////////////////////////////////////////////////
60
61
62 if ( ! in_array( $page_arr, array( 'oplugins' ) ) )
63 return false;
64
65
66
67
68
69 ///////////////////////////////////////////////////////////
70 $notice_id = 'wpbm-panel-get-started';
71 ///////////////////////////////////////////////////////////
72
73 if ( ! wpbm_section_is_dismissed( $notice_id ) ) {
74 ?>
75 <style type="text/css" media="screen">
76 /* WPBM Welcome Panel */
77 .wpbm-panel .welcome-panel {
78 background: linear-gradient(to top, #F5F5F5, #FAFAFA) repeat scroll 0 0 #F5F5F5;
79 border-color: #DFDFDF;
80 position: relative;
81 overflow: auto;
82 margin: 10px 0;
83 padding: 23px 10px 12px;
84 border-width: 1px;
85 border-style: solid;
86 border-radius: 3px;
87 font-size: 13px;
88 line-height: 2.1em;
89 }
90 .wpbm-panel .welcome-panel h3 {
91 margin: 0;
92 font-size: 21px;
93 font-weight: 400;
94 line-height: 1.2;
95 }
96 .wpbm-panel .welcome-panel h4 {
97 margin: 1.33em 0 0;
98 font-size: 13px;
99 font-weight: 600;
100 }
101 .wpbm-panel .welcome-panel .wpbm-help-message h4 {
102 font-size: 1.1em;
103 }
104 .wpbm-panel .welcome-panel a{
105 color:#21759B;
106 }
107 .wpbm-panel .welcome-panel .about-description {
108 font-size: 16px;
109 margin: 0;
110 }
111 .wpbm-panel .welcome-panel .welcome-panel-close {
112 position: absolute;
113 top: 5px;
114 right: 10px;
115 padding: 8px 3px;
116 font-size: 13px;
117 text-decoration: none;
118 line-height: 1;
119 }
120 .wpbm-panel .welcome-panel .welcome-panel-close:before {
121 content: ' ';
122 position: absolute;
123 left: -12px;
124 width: 10px;
125 height: 100%;
126 background: url('../wp-admin/images/xit.gif') 0 7% no-repeat;
127 }
128 .wpbm-panel .welcome-panel .welcome-panel-close:hover:before {
129 background-position: 100% 7%;
130 }
131 .wpbm-panel .welcome-panel .button.button-hero {
132 margin: 15px 0 3px;
133 }
134 .wpbm-panel .welcome-panel-content {
135 margin-left: 13px;
136 max-width: 1500px;
137 }
138 .wpbm-panel .welcome-panel .welcome-panel-column-container {
139 clear: both;
140 overflow: hidden;
141 position: relative;
142 }
143 .wpbm-panel .welcome-panel .welcome-panel-column-container.wpbm-help-message {
144 background: #fff;
145 border: 1px solid #eee;
146 border-radius: 1px;
147 }
148 .wpbm-panel .welcome-panel .welcome-panel-column {
149 width: 32%;
150 min-width: 200px;
151 float: left;
152 }
153 .ie8 .wpbm-panel .welcome-panel .welcome-panel-column {
154 min-width: 230px;
155 }
156 .wpbm-panel .welcome-panel .welcome-panel-column:first-child {
157 width: 36%;
158 }
159 .wpbm-panel .welcome-panel-column p {
160 margin-top: 7px;
161 }
162 .wpbm-panel .welcome-panel .welcome-icon {
163 background: none;
164 display: block;
165 padding: 2px 0 8px 2px;
166 }
167 .wpbm-panel .welcome-panel .welcome-add-page {
168 background-position: 0 2px;
169 }
170 .wpbm-panel .welcome-panel .welcome-edit-page {
171 background-position: 0 -90px;
172 }
173 .wpbm-panel .welcome-panel .welcome-learn-more {
174 background-position: 0 -136px;
175 }
176 .wpbm-panel .welcome-panel .welcome-comments {
177 background-position: 0 -182px;
178 }
179 .wpbm-panel .welcome-panel .welcome-view-site {
180 background-position: 0 -274px;
181 }
182 .wpbm-panel .welcome-panel .welcome-widgets-menus {
183 background-position: 1px -229px;
184 line-height: 14px;
185 }
186 .wpbm-panel .welcome-panel .welcome-write-blog {
187 background-position: 0 -44px;
188 }
189 .wpbm-panel .welcome-panel .welcome-panel-column ul {
190 margin: 0.8em 1em 1em 0;
191 }
192 .wpbm-panel .welcome-panel .welcome-panel-column li {
193 line-height: 1.7em;
194 list-style-type: none;
195 margin:0;
196 padding:0;
197 }
198 .wpbm-panel .welcome-panel .wpbm-help-message .welcome-panel-column li {
199 list-style-type: none;
200 list-style-position: inside;
201 line-height: 1.7em;
202 margin:15px 0 10px;
203 font-size: 13px;
204 }
205 .wpbm-panel .welcome-panel .wpbm-help-message .welcome-panel-column li div {
206 display: inline;
207 }
208 .welcome-panel-footer-collumn {
209 width:33%;
210 text-align: center;
211 font-style:italic;
212 float:left;
213 }
214 @media screen and (max-width: 870px) {
215 .welcome-panel-footer-collumn {
216 width:100%;
217 float:none;
218 }
219
220 .wpbm-panel .welcome-panel .welcome-panel-column,
221 .wpbm-panel .welcome-panel .welcome-panel-column:first-child {
222 display: block;
223 float: none;
224 width: 100%;
225 }
226 .wpbm-panel .welcome-panel .welcome-panel-column li {
227 display: inline-block;
228 margin-right: 13px;
229 }
230 .wpbm-panel .welcome-panel .welcome-panel-column ul {
231 margin: 0.4em 0 0;
232 }
233 .wpbm-panel .welcome-panel .welcome-icon {
234 padding-left: 25px;
235 }
236 }
237 </style>
238 <div id="<?php echo $notice_id ?>"
239 class="wpbm-panel wpbm_is_dismissible wpbm_is_hideable "
240 data-nonce="<?php echo wp_create_nonce( $nonce_name = $notice_id . '_wpbmnonce' ); ?>"
241 data-user-id="<?php echo get_current_user_id(); ?>"
242
243 ><div class="welcome-panel"><?php
244
245 wpbm_x_dismiss_button( '&times;', array( 'style' => 'font-size:1.5em;margin-top:-0.8em;' ) );
246
247 ?>
248 <div class="welcome-panel-content">
249 <p class="about-description"><?php //_e( 'We&#8217;ve assembled some links to get you started:', 'booking-manager');
250 $message_ics = sprintf( __( 'List events or bookings from different sources at your website with easy via .ics feeds', 'booking-manager' ) );
251 $message_ics = str_replace( array( '.ics' ), array( '<strong>.ics</strong>' ), $message_ics );
252 echo $message_ics;
253 ?></p>
254 <div class="welcome-panel-column-container wpbm-help-message ">
255 <div class="welcome-panel-column">
256 <h4><?php _e( 'How to start showing events from .ics feeds (files)?', 'booking-manager'); ?></h4>
257 <ul>
258 <li><div class="welcome-icon"><?php
259 echo '1. ';
260 _e( 'Upload .ics file via this page or simply copy URL to .ics feed from external website.', 'booking-manager' );
261 ?></div>
262 </li>
263 <li><div class="welcome-icon"><?php
264 echo '2. ';
265 printf( __( 'Insert into page the shortcode for listing events from .ics feed.', 'booking-manager' ) );
266 echo '<br/>';
267 printf( __( 'Read more about %sshortcode configuration here%s.', 'booking-manager' ), '<a href="http://oplugins.com/plugins/wp-booking-manager/booking-manager-help/">', '</a>' );
268 ?></div>
269 </li>
270 </div>
271 <div class="welcome-panel-column">
272 <h4><?php _e( 'Next Steps', 'booking-manager'); ?></h4>
273 <ul>
274 <li><div class="welcome-icon"><?php
275 printf( __( 'Configure different options in %sSettings%s.' , 'booking-manager'),
276 '<a href="' . esc_url( wpbm_get_settings_url() ) . '">', '</a>' );
277 ?></div></li>
278 <li><div class="welcome-icon"><?php
279 printf( __( 'Configure your predefined %sEvents Listing Template%s.', 'booking-manager'),
280 '<a href="' . esc_url( wpbm_get_settings_url() . '&subtab=listing' ) . '">', '</a>' );
281 ?></div></li>
282 </ul>
283 </div>
284 <div class="welcome-panel-column welcome-panel-last">
285 <h4><?php _e( 'Integartion with', 'booking-manager'); ?> <a href="https://wordpress.org/plugins/booking/" target="_blank">Booking Calendar</a></h4>
286 <?php
287
288 printf( __( 'This plugin have native integration with %s plugin.', 'booking-manager' )
289 , '<a href="https://wordpress.org/plugins/booking/" target="_blank"><strong>Booking Calendar</strong></a>' );
290
291 echo '<br />';
292 printf( __( 'It can sync bookings from %s with different sources', 'booking-manager' )
293 , '<a href="https://wordpress.org/plugins/booking/" target="_blank"><strong>Booking Calendar</strong></a>' );
294
295 echo ' <em>(<strong><a href="https://www.airbnb.com/help/article/99/how-do-i-sync-my-airbnb-calendar-with-another-calendar" target="_blank">Airbnb</a></strong>, '
296 . '<strong><a href="https://partnersupport.booking.com/hc/en-us/articles/213424709-How-do-I-export-my-calendar-" target="_blank">Booking.com</a></strong>, '
297 . '<strong><a href="https://help.homeaway.com/articles/How-do-I-export-my-calendar-data-to-a-Google-calendar" target="_blank">HomeAway</a></strong>, '
298 . '<strong><a href="https://rentalsupport.tripadvisor.com/articles/FAQ/noc-How-does-calendar-sync-work" target="_blank">TripAdvisor</a></strong>, '
299 . '<strong><a href="https://help.vrbo.com/articles/How-do-I-export-my-calendar-data-to-a-Google-calendar" target="_blank">VRBO</a></strong>, '
300 . '<strong><a href="https://helpcenter.flipkey.com/articles/FAQ/noc-How-does-calendar-sync-work" target="_blank">FlipKey</a></strong> '
301 . str_replace( array( '.ics', 'iCalendar' ), array( '<strong>.ics</strong>', '<strong>iCalendar</strong>' ),
302 __( 'and any other calendar that uses .ics format', 'booking-manager' )
303 )
304 . ')</em>.<br/>'
305 ?>
306 </div>
307 </div>
308 <div class="welcome-panel-footer">
309 <div class="welcome-panel-footer-collumn"><?php
310 printf( __( 'Still having questions? Contact %sSupport%s.', 'booking-manager'),
311 '<a href="http://oplugins.com/plugins/booking-manager/#support" target="_blank">',
312 '</a>' );
313 ?></div><div class="welcome-panel-footer-collumn"><?php
314 printf( __( 'Do you require new feature? Send your %ssuggestion%s to us.', 'booking-manager'),
315 '<a href="mailto:newfeature@oplugins.com?Subject=booking-manager" target="_blank">',
316 '</a>' );
317 ?></div><div class="welcome-panel-footer-collumn"><?php
318 printf( __( 'Need even more functionality? Check %s higher versions %s', 'booking-manager'),
319 '<a href="http://oplugins.com/plugins/booking-manager/" target="_blank">',
320 '</a>'
321 ); ?>
322 </div>
323 <div style="clear:both;"></div>
324 </div>
325
326 </div>
327 <?php
328
329 ?></div></div><?php
330 }
331
332
333
334 }
335
336 }
337
338 new WPBM_Notices(); // Run