1: <?php
2: /**
3: * Welcome Page Class
4: *
5: * @package EPL
6: * @subpackage Admin/Classes/Welcome
7: * @copyright Copyright (c) 2020, Merv Barrett
8: * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
9: * @since 1.0
10: */
11:
12: // Exit if accessed directly.
13: if ( ! defined( 'ABSPATH' ) ) {
14: exit;
15: }
16:
17: // phpcs:disable WordPress.Security.NonceVerification
18:
19: /**
20: * EPL_Welcome Class
21: *
22: * A general class for About and Credits page.
23: *
24: * @since 1.0
25: */
26: class EPL_Welcome {
27:
28: /**
29: * The capability users should have to view the page
30: *
31: * @var string The capability users should have to view the page
32: */
33: public $minimum_capability = 'edit_published_posts';
34:
35: /**
36: * Get things started
37: *
38: * @since 1.0
39: */
40: public function __construct() {
41: add_action( 'admin_menu', array( $this, 'admin_menus' ) );
42: add_action( 'admin_head', array( $this, 'admin_head' ) );
43: add_action( 'admin_init', array( $this, 'epl_welcome' ) );
44: }
45:
46: /**
47: * Register the Dashboard Pages which are later hidden but these pages
48: * are used to render the Welcome and Credits pages.
49: *
50: * @access public
51: * @since 1.0
52: * @return void
53: */
54: public function admin_menus() {
55: // About Page.
56: add_dashboard_page(
57: esc_html__( 'Welcome to Easy Property Listings', 'easy-property-listings' ),
58: esc_html__( 'Welcome to Easy Property Listings', 'easy-property-listings' ),
59: $this->minimum_capability,
60: 'epl-about',
61: array( $this, 'about_screen' )
62: );
63:
64: // Getting Started Page.
65: add_dashboard_page(
66: esc_html__( 'Getting started with Easy Property Listings', 'easy-property-listings' ),
67: esc_html__( 'Getting started with Easy Property Listings', 'easy-property-listings' ),
68: $this->minimum_capability,
69: 'epl-getting-started',
70: array( $this, 'getting_started_screen' )
71: );
72:
73: // Credits Page.
74: add_dashboard_page(
75: esc_html__( 'The people that build Easy Property Listings', 'easy-property-listings' ),
76: esc_html__( 'The people that build Easy Property Listings', 'easy-property-listings' ),
77: $this->minimum_capability,
78: 'epl-credits',
79: array( $this, 'credits_screen' )
80: );
81: }
82:
83: /**
84: * Hide Individual Dashboard Pages
85: *
86: * @access public
87: * @since 1.0
88: * @since 3.6 Styles for the What's New headlines.
89: * @return void
90: */
91: public function admin_head() {
92: remove_submenu_page( 'index.php', 'epl-about' );
93: remove_submenu_page( 'index.php', 'epl-getting-started' );
94: remove_submenu_page( 'index.php', 'epl-credits' );
95:
96: // Badge for welcome page.
97: $badge_url = EPL_PLUGIN_URL . 'lib/assets/images/epl-wp-badge.png';
98: ?>
99: <style>
100: /*<![CDATA[*/
101: .epl-badge {
102: padding-top: 150px;
103: height: 52px;
104: width: 185px;
105: color: #666;
106: font-weight: bold;
107: font-size: 14px;
108: text-align: center;
109: text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
110: margin: 0 -5px;
111: background: url('<?php echo esc_url( $badge_url ); ?>') no-repeat;
112: }
113:
114: .epl-about-wrap .epl-badge {
115: position: absolute;
116: top: 0;
117: right: 0;
118: }
119:
120: .epl-welcome-screenshots {
121: float: right;
122: margin-left: 10px!important;
123: }
124:
125: .epl-whats-new {
126: display: grid;
127: grid-template-columns: repeat(4, 1fr);
128: gap: 20px;
129: margin: 24px 0;
130: }
131:
132: @media (max-width: 1280px) {
133: .epl-whats-new {
134: grid-template-columns: repeat(2, 1fr);
135: }
136: }
137:
138: @media (max-width: 600px) {
139: .epl-whats-new {
140: grid-template-columns: 1fr;
141: }
142: }
143:
144: .epl-whats-new__item {
145: background: #fff;
146: border-radius: 8px;
147: padding: 24px;
148: box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
149: }
150:
151: .epl-about-wrap .epl-whats-new__item h3 {
152: margin: 0 0 8px;
153: font-size: 18px;
154: }
155:
156: .epl-about-wrap .epl-whats-new__item p {
157: margin: 0;
158: font-size: 14px;
159: }
160:
161: .epl-whats-new__more {
162: text-align: center;
163: }
164: /*]]>*/
165: </style>
166: <?php
167: }
168:
169: /**
170: * Navigation tabs
171: *
172: * @access public
173: * @since 1.0
174: * @return void
175: */
176: public function tabs() {
177: $selected = isset( $_GET['page'] ) ? sanitize_text_field( wp_unslash( $_GET['page'] ) ) : 'epl-about';
178: ?>
179: <h2 class="nav-tab-wrapper">
180: <a class="nav-tab <?php echo 'epl-about' === $selected ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'epl-about' ), 'index.php' ) ) ); ?>">
181: <?php esc_html_e( "What's New", 'easy-property-listings' ); ?>
182: </a>
183: <a class="nav-tab <?php echo 'epl-getting-started' === $selected ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'epl-getting-started' ), 'index.php' ) ) ); ?>">
184: <?php esc_html_e( 'Getting Started', 'easy-property-listings' ); ?>
185: </a>
186: <a class="nav-tab <?php echo 'epl-credits' === $selected ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'epl-credits' ), 'index.php' ) ) ); ?>">
187: <?php esc_html_e( 'Credits', 'easy-property-listings' ); ?>
188: </a>
189: </h2>
190: <?php
191: }
192:
193: /**
194: * Parse the EPL readme.txt file
195: *
196: * @since 3.1.20
197: * @since 3.6 Fix: shows only the Changelog section. The Upgrade Notice section after it showed as stray "=" lines and an "Upgrade Notice" heading.
198: * @return string $readme HTML formatted readme file
199: */
200: public function parse_readme() {
201: $file = file_exists( EPL_PLUGIN_PATH . 'readme.txt' ) ? EPL_PLUGIN_PATH . 'readme.txt' : null;
202: if ( ! $file ) {
203: $readme = '<p>' . esc_html__( 'No valid changelog was found.', 'easy-property-listings' ) . '</p>';
204: } else {
205: $readme = file_get_contents( $file ); //phpcs:ignore
206: $readme = explode( '== Changelog ==', $readme );
207: $readme = end( $readme );
208: // Stop at the next section (== Upgrade Notice ==).
209: $readme = preg_split( '/^== /m', $readme );
210: $readme = nl2br( esc_html( trim( $readme[0] ) ) );
211: $readme = preg_replace( '/`(.*?)`/', '<code>\\1</code>', $readme );
212: $readme = preg_replace( '/[\040]\*\*(.*?)\*\*/', ' <strong>\\1</strong>', $readme );
213: $readme = preg_replace( '/[\040]\*(.*?)\*/', ' <em>\\1</em>', $readme );
214: $readme = preg_replace( '/= (.*?) =/', '<h4>\\1</h4>', $readme );
215: $readme = preg_replace( '/\[(.*?)\]\((.*?)\)/', '<a href="\\2">\\1</a>', $readme );
216: }
217: return $readme;
218: }
219:
220: /**
221: * What's new in this version: a few headlines for the What's New tab.
222: *
223: * The full story is a post on easypropertylistings.com.au/whats-new/, so only these
224: * few lines need translating each release. Edit them for each x.y.0 release.
225: *
226: * @since 3.6 New: headlines are back on the What's New tab.
227: *
228: * @return array Each item has a title and a text.
229: */
230: public function get_whats_new() {
231: $items = array(
232: array(
233: 'title' => __( 'Search up to 48 times faster', 'easy-property-listings' ),
234: 'text' => __( 'Search pages, dropdowns and listing counts load in a fraction of the time, with the same results.', 'easy-property-listings' ),
235: ),
236: array(
237: 'title' => __( 'Under Offer keeps the price', 'easy-property-listings' ),
238: 'text' => __( 'Under offer listings show their advertised price, as NSW underquoting rules require. Change it in Settings > Labels.', 'easy-property-listings' ),
239: ),
240: array(
241: 'title' => __( 'One listing shortcode', 'easy-property-listings' ),
242: 'text' => __( '[listing] now does everything [listing_advanced] does: features, locations, open homes, auctions and more.', 'easy-property-listings' ),
243: ),
244: array(
245: 'title' => __( 'Elementor widgets (beta)', 'easy-property-listings' ),
246: 'text' => __( 'Design single listing, archive and agent templates in Elementor with 30 Easy Property Listings widgets.', 'easy-property-listings' ),
247: ),
248: );
249:
250: /**
251: * Filters the What's New headlines on the welcome page.
252: *
253: * @since 3.6
254: *
255: * @param array $items Each item has a title and a text.
256: */
257: return (array) apply_filters( 'epl_whats_new_items', $items );
258: }
259:
260: /**
261: * Render About Screen
262: *
263: * @access public
264: * @since 1.0
265: * @since 3.6 What's New headlines and a link to the full post on easypropertylistings.com.au instead of the "visit the website" notice.
266: * @return void
267: */
268: public function about_screen() {
269: list( $display_version ) = explode( '-', EPL_PROPERTY_VER );
270: ?>
271: <div class="wrap about-wrap epl-about-wrap">
272: <h1>
273: <?php
274: /* Translators: %s is the version number. */
275: printf( esc_html__( 'Welcome to Easy Property Listings %s', 'easy-property-listings' ), esc_attr( $display_version ) );
276: ?>
277: </h1>
278: <div class="about-text">
279: <?php
280: /* Translators: %s is the version number. */
281: printf( esc_html__( 'Thank you for updating to the latest version! Easy Property Listings %s is ready to make your real estate website faster, safer and better!', 'easy-property-listings' ), esc_attr( $display_version ) );
282: ?>
283: </div>
284: <div class="epl-badge">
285: <?php
286: /* Translators: %s is the version number. */
287: printf( esc_html__( 'Version %s', 'easy-property-listings' ), esc_attr( $display_version ) );
288: ?>
289: </div>
290:
291: <?php $this->tabs(); ?>
292:
293: <div class="changelog headline-feature epl-clearfix">
294: <h2 id="guide-theme">
295: <?php
296: /* Translators: %s is the version number. */
297: printf( esc_html__( 'What\'s New in %s', 'easy-property-listings' ), esc_html( $display_version ) );
298: ?>
299: </h2>
300:
301: <div class="epl-whats-new">
302: <?php foreach ( $this->get_whats_new() as $item ) : ?>
303: <div class="epl-whats-new__item">
304: <h3><?php echo esc_html( $item['title'] ); ?></h3>
305: <p><?php echo esc_html( $item['text'] ); ?></p>
306: </div>
307: <?php endforeach; ?>
308: </div>
309:
310: <p class="epl-whats-new__more">
311: <a class="button button-primary button-hero" href="<?php echo esc_url( 'https://easypropertylistings.com.au/whats-new/?utm_source=plugin&utm_medium=welcome&utm_content=whats_new&utm_campaign=epl_whats_new' ); ?>" target="_blank" rel="noopener noreferrer">
312: <?php
313: /* Translators: %s is the version number. */
314: printf( esc_html__( 'See everything new in %s', 'easy-property-listings' ), esc_html( $display_version ) );
315: ?>
316: </a>
317: </p>
318: </div>
319:
320:
321: <div class="changelog headline-feature">
322:
323: <h2 id="guide-changelog"><?php esc_html_e( 'Full Change Log', 'easy-property-listings' ); ?></h2>
324:
325: <div class="feature-section">
326: <?php echo wp_kses_post( $this->parse_readme() ); ?>
327: </div>
328: </div>
329:
330: <div class="return-to-dashboard">
331: <a href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'epl-settings' ), 'admin.php' ) ) ); ?>"><?php esc_html_e( 'Go to Easy Property Listings Settings', 'easy-property-listings' ); ?></a>
332: </div>
333: </div>
334: <?php
335: }
336:
337: /**
338: * Render Getting Started Screen
339: *
340: * @access public
341: * @since 1.0
342: * @return void
343: */
344: public function getting_started_screen() {
345: list( $display_version ) = explode( '-', EPL_PROPERTY_VER );
346: ?>
347: <div class="wrap about-wrap epl-about-wrap epl-clearfix">
348: <h1>
349: <?php
350: /* Translators: %s is the version number. */
351: printf( esc_html__( 'Welcome to Easy Property Listings %s', 'easy-property-listings' ), esc_attr( $display_version ) );
352: ?>
353: </h1>
354: <div class="about-text">
355: <?php
356: /* Translators: %s is the version number. */
357: printf( esc_html__( 'Thank you for updating to the latest version! Easy Property Listings %s is ready to make your real estate website faster, safer and better!', 'easy-property-listings' ), esc_attr( $display_version ) );
358: ?>
359: </div>
360: <div class="epl-badge">
361: <?php
362: /* Translators: %s is the version number. */
363: printf( esc_html__( 'Version %s', 'easy-property-listings' ), esc_attr( $display_version ) );
364: ?>
365: </div>
366:
367: <?php $this->tabs(); ?>
368:
369: <div class="changelog headline-feature epl-clearfix">
370: <h2><?php esc_html_e( 'Real Estate Tools for WordPress', 'easy-property-listings' ); ?></h2>
371:
372: <div class="featured-image">
373: <img src="<?php echo esc_url( EPL_PLUGIN_URL . 'lib/assets/images/screenshots/epl-welcome.png' ); ?>" class="epl-welcome-featured-image"/>
374: </div>
375: </div>
376:
377: <div class="changelog headline-feature epl-clearfix">
378: <h2><?php esc_html_e( 'Quick Start Guide', 'easy-property-listings' ); ?></h2>
379:
380: <h3 class="about-description" style="text-align: center;"><?php esc_html_e( 'Use the tips below to get started using Easy Property Listings. You will be up and running in no time!', 'easy-property-listings' ); ?></h3>
381:
382: <div class="feature-section">
383: <ul style="text-align: center;">
384: <li><a href="#guide-configure"><?php esc_html_e( 'Activate the listing types you need & configure the plugin general settings', 'easy-property-listings' ); ?></a></li>
385: <li><a href="#guide-page"><?php esc_html_e( 'Create a blank page for each activated listing type', 'easy-property-listings' ); ?></a></li>
386: <li><a href="#guide-first-listing"><?php esc_html_e( 'Publish your first listing for testing your theme setup', 'easy-property-listings' ); ?></a></li>
387:
388: <li><a href="#guide-theme"><?php esc_html_e( 'Setup your theme to work with the plugin', 'easy-property-listings' ); ?></a></li>
389: <li><a href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'epl-about' ), 'index.php' ) ) ); ?>#guide-changelog"><?php esc_html_e( 'Full Change Log', 'easy-property-listings' ); ?></a></li>
390: <li><a href="#guide-help"><?php esc_html_e( 'Visit Support', 'easy-property-listings' ); ?></a></li>
391: </ul>
392: </div>
393: </div>
394:
395: <div class="changelog headline-feature epl-clearfix">
396:
397: <h2 id="guide-configure"><?php esc_html_e( 'Activate the listing types you need', 'easy-property-listings' ); ?></h2>
398:
399: <div class="feature-section">
400:
401: <div class="col">
402:
403: <p><?php esc_html_e( 'Visit the general settings page and enable the listing types you need. Once you have pressed save visit the Permalinks page to re-fresh your sites permalinks.', 'easy-property-listings' ); ?></p>
404:
405: <p><?php esc_html_e( 'Instead of classifying everything as a property, Easy Property Listings allows you to separate the different listing types which is better for SEO and RSS feeds.', 'easy-property-listings' ); ?></p>
406:
407: <p><strong><?php esc_html_e( 'Supported Listing Types', 'easy-property-listings' ); ?></strong></p>
408: <ul>
409: <li><?php esc_html_e( 'Property (Residential)', 'easy-property-listings' ); ?></li>
410: <li><?php esc_html_e( 'Rental', 'easy-property-listings' ); ?></li>
411: <li><?php esc_html_e( 'Land', 'easy-property-listings' ); ?></li>
412: <li><?php esc_html_e( 'Rural', 'easy-property-listings' ); ?></li>
413: <li><?php esc_html_e( 'Commercial', 'easy-property-listings' ); ?></li>
414: <li><?php esc_html_e( 'Commercial Land', 'easy-property-listings' ); ?></li>
415: <li><?php esc_html_e( 'Business', 'easy-property-listings' ); ?></li>
416: </ul>
417: </div>
418:
419: <div class="col">
420: <img src="<?php echo esc_url( EPL_PLUGIN_URL . 'lib/assets/images/screenshots/epl-general-settings.png' ); ?>" class="epl-welcome-screenshots"/>
421: </div>
422: </div>
423: </div>
424:
425: <div class="changelog headline-feature epl-clearfix">
426:
427: <h2 id="guide-page"><?php esc_html_e( 'Create a blank page for each activated listing type', 'easy-property-listings' ); ?></h2>
428:
429: <div class="feature-section">
430: <div class="col">
431:
432: <p><?php esc_html_e( 'Doing this allows you to add "Property", "Land" and "Rental" pages to your WordPress menu. Add a new page for each listing type you activated.', 'easy-property-listings' ); ?></p>
433:
434: <p><?php esc_html_e( 'For example, lets say you have activated: Property, Rental and Land. Create three pages, one called "Property", another "Land" and the third "Rental" these will be the custom post type slugs/permalinks eg: property, rental and land.', 'easy-property-listings' ); ?></p>
435:
436: <p><?php esc_html_e( 'Publish a test "Property Listing" and visit your new property page and you will see the new property and others you have created.', 'easy-property-listings' ); ?></p>
437:
438: <p><?php esc_html_e( 'Now you can rename them to whatever you like eg: "For Sale", "For Rent" etc, but leave the slug/permalink as it was,', 'easy-property-listings' ); ?> <strong><?php esc_html_e( 'this is very important.', 'easy-property-listings' ); ?></strong></p>
439:
440: </div>
441:
442: <div class="col">
443: <img src="<?php echo esc_url( EPL_PLUGIN_URL . 'lib/assets/images/screenshots/epl-default-pages.png' ); ?>" class="epl-welcome-screenshots"/>
444: </div>
445: </div>
446:
447: </div>
448:
449: <div class="changelog headline-feature epl-clearfix">
450:
451: <h2 id="guide-first-listing" class="epl-welcome-sub-heading"><?php esc_html_e( 'Publish Your First Listing', 'easy-property-listings' ); ?></h2>
452:
453: <div class="featured-image">
454: <?php $video_add_listing_id = 'h6B8LLecfbw'; ?>
455:
456: <div class="video-container">
457: <iframe width="640" height="360" src="//www.youtube.com/embed/<?php echo esc_attr( $video_add_listing_id ); ?>" frameborder="0" allowfullscreen ></iframe>
458: </div>
459: </div>
460:
461: <h3 class="epl-welcome-sub-heading"><?php esc_html_e( 'Title & Author', 'easy-property-listings' ); ?></h3>
462:
463: <div class="feature-section epl-clearfix">
464:
465: <div class="col">
466:
467: <h4><?php esc_html_e( 'Title', 'easy-property-listings' ); ?></h4>
468: <p><?php esc_html_e( 'Use the full listing address as the title.', 'easy-property-listings' ); ?>
469:
470: <p><?php esc_html_e( 'When a property is being sold the "heading" is frequently changed and can cause permalink issues. Not to mention the search engine benefits.', 'easy-property-listings' ); ?></p>
471:
472: <h4><?php esc_html_e( 'Author or Primary Real Estate Agent', 'easy-property-listings' ); ?></h4>
473: <p><?php esc_html_e( 'Select the author to show the name of the agent who has listed the property with their contact details. For best results each real estate agent should have their own WordPress user profile which allows for the output of their details on the listing and in widgets.', 'easy-property-listings' ); ?></p>
474:
475: </div>
476:
477: <div class="col">
478: <img src="<?php echo esc_url( EPL_PLUGIN_URL . 'lib/assets/images/screenshots/epl-add-listing-title.png' ); ?>" class="epl-welcome-screenshots"/>
479: </div>
480: </div>
481:
482: <h3 class="epl-welcome-sub-heading"><?php esc_html_e( 'Gallery and Featured Image', 'easy-property-listings' ); ?></h3>
483:
484: <div class="feature-section epl-clearfix">
485:
486: <div class="col">
487:
488: <h4><?php esc_html_e( 'Gallery', 'easy-property-listings' ); ?></h4>
489: <p><?php esc_html_e( 'Add a gallery of images to your listings with the WordPress Add Media button.', 'easy-property-listings' ); ?></p>
490:
491: <p><?php esc_html_e( 'You can automatically output a gallery from the Display options page.', 'easy-property-listings' ); ?></p>
492:
493: <p><?php esc_html_e( 'If set to automatic, just upload your images to the listing and press x to close the media upload box once the images are attached to the listing. You can also easily adjust the number of gallery columns from the plugin Display options.', 'easy-property-listings' ); ?></p>
494:
495: <h4><?php esc_html_e( 'Gallery Light Box', 'easy-property-listings' ); ?></h4>
496: <p><?php esc_html_e( 'Using a light box plug-in like Easy FancyBox, your automatic gallery images will use the light box effect.', 'easy-property-listings' ); ?></p>
497:
498: </div>
499:
500: <div class="col">
501: <img src="<?php echo esc_url( EPL_PLUGIN_URL . 'lib/assets/images/screenshots/epl-add-listing-gallery.png' ); ?>" class="epl-welcome-screenshots"/>
502: </div>
503:
504: </div>
505:
506:
507: <h3 class="epl-welcome-sub-heading"><?php esc_html_e( 'Listing Details', 'easy-property-listings' ); ?></h3>
508:
509: <div class="feature-section epl-clearfix">
510:
511: <div class="col">
512:
513: <h4><?php esc_html_e( 'Heading', 'easy-property-listings' ); ?></h4>
514: <p><?php esc_html_e( 'Enter the descriptive listing headline like "Great Property with Views".', 'easy-property-listings' ); ?></p>
515:
516: <h4><?php esc_html_e( 'Second Listing Agent', 'easy-property-listings' ); ?></h4>
517: <p><?php esc_html_e( 'If the listing has two real estate agents marketing it, enter their WordPress user name here. The primary agent is the post Author.', 'easy-property-listings' ); ?></p>
518:
519: <h4><?php esc_html_e( 'Inspection Times', 'easy-property-listings' ); ?></h4>
520: <p><?php esc_html_e( 'Now supports multiple inspection times, add one per line. Past inspection dates will not display when using the new format.', 'easy-property-listings' ); ?></p>
521:
522: <p><?php esc_html_e( 'The output is now wrapped in an iCal format so clicking on the date will open the users calendar.', 'easy-property-listings' ); ?></p>
523:
524: </div>
525:
526: <div class="col">
527: <img src="<?php echo esc_url( EPL_PLUGIN_URL . 'lib/assets/images/screenshots/epl-add-listing-details.png' ); ?>" class="epl-welcome-screenshots"/>
528: </div>
529:
530: </div>
531:
532: <h3 style="font-size: 1.8em; text-align: center;"><?php esc_html_e( 'Search by location', 'easy-property-listings' ); ?></h3>
533:
534: <div class="feature-section epl-clearfix">
535:
536: <div class="col">
537: <p><?php esc_html_e( 'Although the address details are added into the Property Address box the location search you also need to add the City/Suburb to the location search taxonomy.', 'easy-property-listings' ); ?></p>
538: <p><?php esc_html_e( 'This works like post tags and will populate the search widget/shortcode with your listings and it will automatically filter out options if no listings have that option.', 'easy-property-listings' ); ?></p>
539: </div>
540:
541: <div class="col">
542: <img src="<?php echo esc_url( EPL_PLUGIN_URL . 'lib/assets/images/screenshots/epl-add-listing-details-location.png' ); ?>" class="epl-welcome-screenshots"/>
543: </div>
544:
545: </div>
546: </div>
547:
548: <hr/>
549:
550: <div class="changelog headline-feature epl-clearfix">
551:
552: <h2 id="guide-theme" class="epl-welcome-sub-heading"><?php esc_html_e( 'Configure your theme', 'easy-property-listings' ); ?></h2>
553: <h3 class="about-description" style="text-align: center;"><?php esc_html_e( 'We have done our best to integrate Easy Property Listings with all WordPress themes.', 'easy-property-listings' ); ?></h3>
554:
555: <div class="feature-section col two-col">
556:
557: <div class="col">
558: <h4><?php esc_html_e( 'Theme Compatibility', 'easy-property-listings' ); ?></h4>
559: <p><?php esc_html_e( 'Once you add a listing and if your page is really wide or your sidebar is under the content enable Theme Compatibility mode from settings.', 'easy-property-listings' ); ?></p>
560:
561: <p><?php esc_html_e( 'Review your listing and if you are seeing double images, hop back over to Settings page and either disable the theme feature image or the one provided by Easy Property Listings.', 'easy-property-listings' ); ?></p>
562:
563: <h4><?php esc_html_e( 'Shortcodes', 'easy-property-listings' ); ?></h4>
564:
565: <p><?php esc_html_e( 'The featured image settings have no impact on the Easy Property Listings shortcodes and widgets.', 'easy-property-listings' ); ?></p>
566: </div>
567:
568: <div class="col last-feature">
569:
570: <h4><?php esc_html_e( 'Theme Compatibility not required for some themes', 'easy-property-listings' ); ?></h4>
571: <ul>
572: <li><a href="http://ithemes.com/member/go.php?r=15200&i=l37"><?php esc_html_e( 'iThemes Builder Themes', 'easy-property-listings' ); ?></a></li>
573: <li><?php esc_html_e( 'Genesis Framework by StudioPress', 'easy-property-listings' ); ?></li>
574: <li><?php esc_html_e( 'Headway Theme Framework', 'easy-property-listings' ); ?></li>
575: <li><?php esc_html_e( 'Twenty 11, 12, 13, 14, 15, 16, 17 &#38; 19 by WordPress.', 'easy-property-listings' ); ?></li>
576: <li><?php esc_html_e( 'Divi by Elegant Themes.', 'easy-property-listings' ); ?></li>
577: <li><?php esc_html_e( 'Many others, add a listing and see how it looks.', 'easy-property-listings' ); ?></li>
578: </ul>
579: <p><?php esc_html_e( 'We have a selection of pre configured templates here for many popular themes', 'easy-property-listings' ); ?> <a href="https://codex.easypropertylistings.com.au/article/185-theme-templates"><?php esc_html_e( 'here', 'easy-property-listings' ); ?></a>.</p>
580: </div>
581: </div>
582: </div>
583:
584: <hr/>
585:
586: <div class="changelog headline-feature epl-clearfix">
587: <h2 id="theme-instructions" class="epl-welcome-sub-heading"><?php esc_html_e( 'Advanced instructions', 'easy-property-listings' ); ?></h2>
588:
589: <div class="feature-section">
590: <?php $theme_instructions = '<a href="https://codex.easypropertylistings.com.au/article/49-theme-setup">' . esc_html__( 'theme setup instructions can be found here', 'easy-property-listings' ) . '</a>'; ?>
591: <?php $custom_template_link = '<a href="https://codex.easypropertylistings.com.au/article/121-how-to-create-your-own-custom-theme-templates-or-modify-existing-ones-using-the-theme-template-loader">' . esc_html__( 'custom templates', 'easy-property-listings' ) . '</a>'; ?>
592: <h4 style="text-align: center;">
593: <?php
594: /* Translators: %s is a link with translated words "theme setup instructions can be found here". */
595: printf( esc_html__( 'Detailed %s.', 'easy-property-listings' ), wp_kses_post( $theme_instructions ) );
596: ?>
597: </h4>
598: <h4 style="text-align: center;">
599: <?php
600: /* Translators: %s is a link with translated words. "custom templates". */
601: printf( esc_html__( 'How to create your own %s.', 'easy-property-listings' ), wp_kses_post( $custom_template_link ) );
602: ?>
603: </h4>
604: </div>
605: </div>
606:
607: <hr/>
608:
609: <div class="changelog headline-feature epl-clearfix">
610:
611: <div class="feature-section">
612:
613: <h2 class="about-description" style="text-align: center;"><?php esc_html_e( 'Stuck getting your theme to work?', 'easy-property-listings' ); ?></h2>
614: <p style="text-align: center;"><?php esc_html_e( 'Not all themes follow modern WordPress coding standards and these may take a little more time and experience to get working. If you just can not get it to work, visit', 'easy-property-listings' ); ?> <a href="https://easypropertylistings.com.au/support-ticket/"><?php esc_html_e( 'premium support', 'easy-property-listings' ); ?></a> <?php esc_html_e( 'and fill out a theme support request.', 'easy-property-listings' ); ?></p>
615:
616: <p style="text-align:center;"><?php esc_html_e( 'If the theme is available in the WordPress.org theme directory let us know the theme name and URL where we can download it in your support ticket. If its a premium theme or are in a hurry submit a priority support ticket along with the theme in a zip or a download link to it on a file sharing site like Dropbox.', 'easy-property-listings' ); ?></p>
617:
618: </div>
619:
620: </div>
621:
622: <hr/>
623:
624: <div class="changelog headline-feature epl-clearfix">
625:
626: <h2 id="guide-help" class="about-description" style="text-align: center;"><?php esc_html_e( 'Need Help?', 'easy-property-listings' ); ?></h2>
627:
628: <div class="feature-section col three-col">
629: <div class="col">
630: <h4><?php esc_html_e( 'Premium Support', 'easy-property-listings' ); ?></h4>
631: <p>
632: <?php
633: /* Translators: %s is a link. */
634: printf( __( 'We do our best to provide the best support we can. If you encounter a problem or have a question, post a question in the <a href="%s">support forums</a>.', 'easy-property-listings' ), esc_url( 'https://easypropertylistings.com.au/support-ticket/' ) ); // phpcs:ignore WordPress.Security.EscapeOutput
635: ?>
636: </p>
637: </div>
638:
639: <div class="col">
640: <h4><?php esc_html_e( 'Need Even Faster Support?', 'easy-property-listings' ); ?></h4>
641: <p><?php _e( '<a href="https://easypropertylistings.com.au/support-ticket/">Priority Support forums</a> are there for customers that need faster and/or more in-depth assistance.', 'easy-property-listings' ); // phpcs:ignore WordPress.Security.EscapeOutput ?>
642:
643:
644: <?php
645: /* Translators: %s is a link. */
646: printf( __( 'We do our best to provide the best support we can. If you encounter a problem or have a question, post a question in the <a href="%s">support forums</a>.', 'easy-property-listings' ), esc_url( 'https://easypropertylistings.com.au/support-ticket/' ) ); // phpcs:ignore WordPress.Security.EscapeOutput
647: ?>
648:
649:
650:
651: </p>
652: </div>
653:
654: <div class="col last-feature">
655: <h4><?php esc_html_e( 'Documentation and Short Codes', 'easy-property-listings' ); ?></h4>
656: <p><?php esc_html_e( 'Read the', 'easy-property-listings' ); ?> <a href="https://codex.easypropertylistings.com.au/"><?php esc_html_e( 'documentation', 'easy-property-listings' ); ?></a> <?php esc_html_e( ' and instructions on how to use the included', 'easy-property-listings' ); ?> <a href="https://codex.easypropertylistings.com.au/category/25-shortcodes"><?php esc_html_e( 'shortcodes', 'easy-property-listings' ); ?></a>.</p>
657: </div>
658: </div>
659: </div>
660:
661: <hr/>
662:
663: <div class="changelog headline-feature epl-clearfix">
664:
665: <div class="feature-section col two-col">
666: <div class="col">
667: <h3><?php esc_html_e( 'Stay Up to Date', 'easy-property-listings' ); ?></h3>
668: <h4><?php esc_html_e( 'Get Notified of Extension Releases', 'easy-property-listings' ); ?></h4>
669: <p><?php _e( 'New extensions that make Easy Property Listings even more powerful are released nearly every single week. Subscribe to the newsletter to stay up to date with our latest releases. <a href="http://eepurl.com/TRO9f" target="_blank">Sign up now</a> to ensure you do not miss a release!', 'easy-property-listings' ); // phpcs:ignore WordPress.Security.EscapeOutput ?></p>
670:
671: <h4><?php esc_html_e( 'Get Alerted About New Tutorials', 'easy-property-listings' ); ?></h4>
672: <p><?php _e( '<a href="http://eepurl.com/TRO9f" target="_blank">Sign up now</a> to hear about the latest tutorial releases that explain how to take Easy Property Listings further.', 'easy-property-listings' ); // phpcs:ignore WordPress.Security.EscapeOutput ?></p>
673: </div>
674:
675: <?php $sl_link = '<a href="https://easypropertylistings.com.au/extensions/sliders/">' . esc_html__( 'Sliders', 'easy-property-listings' ) . '</a>'; ?>
676: <?php $br_link = '<a href="https://easypropertylistings.com.au/extensions/brochures/">' . esc_html__( 'Brochures', 'easy-property-listings' ) . '</a>'; ?>
677: <?php $am_link = '<a href="https://easypropertylistings.com.au/extensions/advanced-mapping/">' . esc_html__( 'Advanced Mapping', 'easy-property-listings' ) . '</a>'; ?>
678: <?php $tm_link = '<a href="https://easypropertylistings.com.au/extensions/testimonial-manager/">' . esc_html__( 'Testimonial Manager', 'easy-property-listings' ) . '</a>'; ?>
679: <?php $sd_link = '<a href="https://easypropertylistings.com.au/extensions/staff-directory/">' . esc_html__( 'Agent/Staff Directory', 'easy-property-listings' ) . '</a>'; ?>
680: <?php $lp_link = '<a href="https://easypropertylistings.com.au/extensions/location-profiles/">' . esc_html__( 'Location Profiles', 'easy-property-listings' ) . '</a>'; ?>
681: <?php $store = '<a href="https://easypropertylistings.com.au/extensions/">' . esc_html__( 'Add-On Store', 'easy-property-listings' ) . '</a>'; ?>
682: <div class="col last-feature">
683: <h3><?php esc_html_e( 'Extend With Extensions', 'easy-property-listings' ); ?></h3>
684: <h4><?php esc_html_e( '18 Extensions and many more coming', 'easy-property-listings' ); ?></h4>
685: <p>
686: <?php
687: /* Translators: %1$s, %2$s, %3$s, %4$s, %5$s, %6$s, %7$s are link s to extensions. */
688: printf( esc_html__( 'Add-on plug ins are available that greatly extend the default functionality of Easy Property Listings. There are extensions for %1$s, %2$s, %3$s, %4$s, %5$s, %6$s, and many, many more. Visit the %7$s to further enhance your real estate website.', 'easy-property-listings' ), wp_kses_post( $sl_link ), wp_kses_post( $br_link ), wp_kses_post( $am_link ), wp_kses_post( $tm_link ), wp_kses_post( $sd_link ), wp_kses_post( $lp_link ), wp_kses_post( $store ) );
689: ?>
690: </p>
691:
692: <h4><?php esc_html_e( 'Visit the Extension Store', 'easy-property-listings' ); ?></h4>
693: <p><a href="https://easypropertylistings.com.au/extensions/" target="_blank"><?php esc_html_e( 'The Extensions store', 'easy-property-listings' ); ?></a> <?php esc_html_e( 'has a list of all available extensions to make your real estate website even better.', 'easy-property-listings' ); ?></p>
694: </div>
695: </div>
696: </div>
697: </div>
698: <?php
699: }
700:
701: /**
702: * Render Credits Screen
703: *
704: * @access public
705: * @since 1.0
706: * @return void
707: */
708: public function credits_screen() {
709: list( $display_version ) = explode( '-', EPL_PROPERTY_VER );
710: ?>
711: <div class="wrap about-wrap epl-about-wrap">
712: <h1>
713: <?php
714: /* Translators: %s is a version number. */
715: printf( esc_html__( 'Welcome to Easy Property Listings %s', 'easy-property-listings' ), esc_attr( $display_version ) );
716: ?>
717: </h1>
718: <div class="about-text">
719: <?php
720: /* Translators: %s is a version number. */
721: printf( esc_html__( 'Thank you for updating to the latest version! Easy Property Listings %s is ready to make your real estate website faster, safer and better!', 'easy-property-listings' ), esc_attr( $display_version ) );
722: ?>
723: </div>
724: <div class="epl-badge">
725: <?php
726: /* Translators: %s is a version number. */
727: printf( esc_html__( 'Version %s', 'easy-property-listings' ), esc_attr( $display_version ) );
728: ?>
729: </div>
730:
731: <?php $this->tabs(); ?>
732:
733: <p class="about-description"><?php esc_html_e( 'Easy Property Listings is created by a worldwide team of developers who aim to provide the #1 property listings platform for managing your real estate business through WordPress.', 'easy-property-listings' ); ?></p>
734:
735: <?php echo wp_kses_post( $this->epl_contributors() ); ?>
736: </div>
737: <?php
738: }
739:
740:
741: /**
742: * Render Contributors List
743: *
744: * @since 1.0
745: * @uses EPL_Welcome::epl_get_contributors()
746: * @return string $contributor_list HTML formatted list of all the contributors for EPL
747: */
748: public function epl_contributors() {
749: $contributors = $this->get_epl_contributors();
750:
751: if ( empty( $contributors ) ) {
752: return '';
753: }
754:
755: $contributor_list = '<ul class="wp-people-group">';
756:
757: foreach ( $contributors as $contributor ) {
758: $contributor_list .= '<li class="wp-person">';
759: $contributor_list .= sprintf(
760: '<a href="%s" title="%s">',
761: esc_url( 'https://github.com/' . $contributor->login ),
762: /* Translators: %s is username form GitHub. */
763: esc_html( sprintf( esc_html__( 'View %s', 'easy-property-listings' ), esc_url( $contributor->login ) ) )
764: );
765: $contributor_list .= sprintf( '<img src="%s" width="64" height="64" class="gravatar" alt="%s" />', esc_url( $contributor->avatar_url ), esc_html( $contributor->login ) );
766: $contributor_list .= '</a>';
767: $contributor_list .= sprintf( '<a class="web" href="%s">%s</a>', esc_url( 'https://github.com/' . $contributor->login ), esc_html( $contributor->login ) );
768: $contributor_list .= '</a>';
769: $contributor_list .= '</li>';
770: }
771:
772: $contributor_list .= '</ul>';
773:
774: return $contributor_list;
775: }
776:
777: /**
778: * Retreive list of contributors from GitHub.
779: *
780: * @access public
781: * @since 1.0
782: * @return array $contributors List of contributors
783: */
784: public function get_epl_contributors() {
785: $contributors = get_transient( 'epl_contributors' );
786:
787: if ( false !== $contributors ) {
788: return $contributors;
789: }
790:
791: $response = wp_remote_get( 'https://api.github.com/repos/easypropertylistings/Easy-Property-Listings/contributors', array( 'sslverify' => false ) );
792:
793: if ( is_wp_error( $response ) || 200 !== wp_remote_retrieve_response_code( $response ) ) {
794: return array();
795: }
796:
797: $contributors = json_decode( wp_remote_retrieve_body( $response ) );
798:
799: if ( ! is_array( $contributors ) ) {
800: return array();
801: }
802:
803: set_transient( 'epl_contributors', $contributors, 3600 );
804:
805: return $contributors;
806: }
807:
808: /**
809: * Sends user to the Welcome page on first activation of EPL as well as each
810: * time EPL is upgraded to a new version
811: *
812: * @access public
813: * @since 1.0
814: * @return void
815: */
816: public function epl_welcome() {
817: // Bail if no activation redirect.
818: if ( ! get_transient( '_epl_activation_redirect' ) ) {
819: return;
820: }
821:
822: // Delete the redirect transient.
823: delete_transient( '_epl_activation_redirect' );
824:
825: // Bail if activating from network, or bulk.
826: if ( is_network_admin() || isset( $_GET['activate-multi'] ) ) {
827: return;
828: }
829:
830: $upgrade = get_option( 'epl_version_upgraded_from' );
831:
832: if ( ! $upgrade ) { // First time install.
833: wp_safe_redirect( admin_url( 'index.php?page=epl-getting-started' ) );
834: exit;
835: } else { // Update.
836: wp_safe_redirect( admin_url( 'index.php?page=epl-about' ) );
837: exit;
838: }
839: }
840: }
841: new EPL_Welcome();
842: