about.php
8 years ago
listings.php
8 years ago
post-types.php
8 years ago
support.php
8 years ago
taxonomies.php
8 years ago
tools.php
8 years ago
utility.php
8 years ago
about.php
202 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Custom Post Type UI About Page. |
| 4 | * |
| 5 | * @package CPTUI |
| 6 | * @subpackage About |
| 7 | * @author WebDevStudios |
| 8 | * @since 1.3.0 |
| 9 | */ |
| 10 | |
| 11 | // Exit if accessed directly. |
| 12 | if ( ! defined( 'ABSPATH' ) ) { |
| 13 | exit; |
| 14 | } |
| 15 | |
| 16 | /** |
| 17 | * Display our primary menu page. |
| 18 | * |
| 19 | * @since 0.3.0 |
| 20 | * |
| 21 | * @internal |
| 22 | */ |
| 23 | function cptui_settings() { |
| 24 | ?> |
| 25 | <div class="wrap about-wrap"> |
| 26 | <?php |
| 27 | |
| 28 | /** |
| 29 | * Fires inside and at the top of the wrapper for the main plugin landing page. |
| 30 | * |
| 31 | * @since 1.0.0 |
| 32 | */ |
| 33 | do_action( 'cptui_main_page_start' ); ?> |
| 34 | <h1><?php esc_html_e( 'Custom Post Type UI', 'custom-post-type-ui' ); ?> <?php echo CPTUI_VERSION; ?></h1> |
| 35 | |
| 36 | <?php |
| 37 | |
| 38 | /** |
| 39 | * Fires after the main page `<h1>` heading tag. |
| 40 | * |
| 41 | * @since 1.3.0 |
| 42 | */ |
| 43 | do_action( 'cptui_main_page_after_header' ); |
| 44 | ?> |
| 45 | |
| 46 | <div class="about-text cptui-about-text"> |
| 47 | <?php esc_html_e( 'Thank you for choosing Custom Post Type UI! We hope that your experience with our plugin makes creating post types and taxonomies and organizing your content quick and easy.', 'custom-post-type-ui' ); ?> |
| 48 | </div> |
| 49 | <div class="cptui-badge"></div> |
| 50 | |
| 51 | <?php |
| 52 | /** |
| 53 | * Fires before the About Page changelog. |
| 54 | * |
| 55 | * @since 1.4.0 |
| 56 | */ |
| 57 | do_action( 'cptui_main_page_before_changelog' ); ?> |
| 58 | |
| 59 | <h2><?php printf( esc_html__( "What's new in version %s", 'custom-post-type-ui' ), CPTUI_VERSION ); ?></h2> |
| 60 | <div class="changelog about-integrations"> |
| 61 | <div class="cptui-feature feature-section col three-col"> |
| 62 | <div class="col"> |
| 63 | <h2><?php esc_html_e( 'Renamed the Import/Export menu.', 'custom-post-type-ui' ); ?></h2> |
| 64 | <p><?php esc_html_e( 'As Custom Post Type UI has evolved, we have found need to rename one of the menus. The Import/Export menu has now been renamed "Tools" to better reflect the utilities provided there.', 'custom-post-type-ui' ); ?></p> |
| 65 | </div> |
| 66 | <div class="col"> |
| 67 | <h2><?php esc_html_e( 'Eliminated page refresh need for importing.', 'custom-post-type-ui' ); ?></h2> |
| 68 | <p><?php esc_html_e( 'Previously we eliminated page refresh need while creating new post types and taxonomies. We noticed this did not apply when importing settings. With this latest release, we have amended the issue.', 'custom-post-type-ui' ); ?></p> |
| 69 | </div> |
| 70 | <div class="col last-feature"> |
| 71 | <h2><?php esc_html_e( 'Multiple issue fixes.', 'custom-post-type-ui' ); ?></h2> |
| 72 | <p><?php esc_html_e( 'We have fixed the following issues in this version. Added "action" as a reserved taxonomy name. Updated `get_terms()` handling for WordPress 4.5. Fixed PHP notices related to rewrite indexes, that were present since version 1.0.6. Prevented triggering a slug conversion when tabbing through the edit screen.', 'custom-post-type-ui' ) ?></p> |
| 73 | </div> |
| 74 | </div> |
| 75 | </div> |
| 76 | |
| 77 | <div class="extranotes"> |
| 78 | <?php |
| 79 | |
| 80 | /** |
| 81 | * Fires inside a div for extra notes. |
| 82 | * |
| 83 | * @since 1.3.0 |
| 84 | */ |
| 85 | do_action( 'cptui_main_page_extra_notes' ); ?> |
| 86 | </div> |
| 87 | </div> |
| 88 | <?php |
| 89 | } |
| 90 | |
| 91 | /** |
| 92 | * Display Pluginize-based content. |
| 93 | * |
| 94 | * @since 1.4.0 |
| 95 | */ |
| 96 | function cptui_pluginize_content() { |
| 97 | echo '<h1>' . sprintf( esc_html__( 'More from %s', 'custom-post-type-ui' ), 'WebDevStudios' ) . '</h1>'; |
| 98 | echo '<div class="wdspromos-about">'; |
| 99 | $ads = cptui_get_ads(); |
| 100 | if ( ! empty( $ads ) ) { |
| 101 | |
| 102 | foreach ( $ads as $ad ) { |
| 103 | |
| 104 | $the_ad = sprintf( |
| 105 | '<img src="%s" alt="%s">', |
| 106 | esc_attr( $ad['image'] ), |
| 107 | esc_attr( $ad['text'] ) |
| 108 | ); |
| 109 | |
| 110 | // Escaping $the_ad breaks the html. |
| 111 | printf( |
| 112 | '<p><a href="%s">%s</a></p>', |
| 113 | esc_url( $ad['url'] ), |
| 114 | $the_ad |
| 115 | ); |
| 116 | } |
| 117 | } |
| 118 | echo '</div>'; |
| 119 | } |
| 120 | add_action( 'cptui_main_page_extra_notes', 'cptui_pluginize_content', 9 ); |
| 121 | |
| 122 | /** |
| 123 | * Render our newsletter form for the about page. |
| 124 | * |
| 125 | * @since 1.4.0 |
| 126 | */ |
| 127 | function cptui_about_page_newsletter() { |
| 128 | |
| 129 | if ( cptui_is_new_install() ) { |
| 130 | return ''; |
| 131 | } |
| 132 | |
| 133 | ?> |
| 134 | <h3><?php esc_html_e( 'Stay informed', 'custom-post-type-ui' ); ?></h3> |
| 135 | <?php |
| 136 | cptui_about_page_newsletter_form(); |
| 137 | |
| 138 | return ''; |
| 139 | } |
| 140 | add_action( 'cptui_main_page_before_changelog', 'cptui_about_page_newsletter' ); |
| 141 | |
| 142 | /** |
| 143 | * Outputs our newsletter signup form. |
| 144 | * |
| 145 | * @since 1.4.0 |
| 146 | * |
| 147 | * @internal |
| 148 | */ |
| 149 | function cptui_about_page_newsletter_form() { |
| 150 | ?> |
| 151 | <!-- Begin MailChimp Signup Form --> |
| 152 | <link href="//cdn-images.mailchimp.com/embedcode/classic-10_7.css" rel="stylesheet" type="text/css"> |
| 153 | <div id="mc_embed_signup"> |
| 154 | <form action="//webdevstudios.us1.list-manage.com/subscribe/post?u=67169b098c99de702c897d63e&id=9cb1c7472e" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate> |
| 155 | <div id="mc_embed_signup_scroll"> |
| 156 | |
| 157 | <p> |
| 158 | <strong><?php esc_html_e( 'Wanna make the most of WordPress? Sign up for the Pluginize newsletter and get access to discounts, plugin announcements, and more!', 'custom-post-type-ui' ); ?></strong> |
| 159 | </p> |
| 160 | <div class="mc-field-group"> |
| 161 | <label for="mce-EMAIL"><?php esc_html_e( 'Email Address', 'custom-post-type-ui' ); ?></label> |
| 162 | <input tabindex="-1" type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL"> |
| 163 | </div> |
| 164 | <div id="mce-responses" class="clear"> |
| 165 | <div class="response" id="mce-error-response" style="display:none"></div> |
| 166 | <div class="response" id="mce-success-response" style="display:none"></div> |
| 167 | </div> <!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups--> |
| 168 | <div style="position: absolute; left: -5000px;" aria-hidden="true"> |
| 169 | <input type="text" name="b_67169b098c99de702c897d63e_9cb1c7472e" tabindex="-1" value=""></div> |
| 170 | <div class="clear"> |
| 171 | <input type="submit" value="<?php esc_attr_e( 'Subscribe', 'custom-post-type-ui' ); ?>" name="subscribe" id="mc-embedded-subscribe" class="button" tabindex="-1"> |
| 172 | </div> |
| 173 | </div> |
| 174 | </form> |
| 175 | </div> |
| 176 | <script type='text/javascript' src='//s3.amazonaws.com/downloads.mailchimp.com/js/mc-validate.js'></script> |
| 177 | <script type='text/javascript'>(function ($) { |
| 178 | window.fnames = new Array(); |
| 179 | window.ftypes = new Array(); |
| 180 | fnames[0] = 'EMAIL'; |
| 181 | ftypes[0] = 'email'; |
| 182 | }(jQuery)); |
| 183 | var $mcj = jQuery.noConflict(true);</script> |
| 184 | <!--End mc_embed_signup--> |
| 185 | <?php |
| 186 | } |
| 187 | |
| 188 | /** |
| 189 | * Marks site as not new at the end of the about/main page. |
| 190 | * |
| 191 | * Can't be done on activation or else cptui_is_new_install() will immediately start |
| 192 | * returning false. So we'll do it at the end of the redirected landing page. |
| 193 | * |
| 194 | * @since 1.5.0 |
| 195 | */ |
| 196 | function cptui_mark_not_new() { |
| 197 | if ( cptui_is_new_install() ) { |
| 198 | cptui_set_not_new_install(); |
| 199 | } |
| 200 | } |
| 201 | add_action( 'cptui_main_page_extra_notes', 'cptui_mark_not_new', 999 ); |
| 202 |