PluginProbe ʕ •ᴥ•ʔ
Custom Post Type UI / 1.13.4
Custom Post Type UI v1.13.4
1.19.2 1.19.1 1.19.0 trunk 0.7.0.0 0.7.1.0 0.7.2.0 0.8.0.0 0.8.1 0.8.2 0.8.3 0.8.4 0.8.5 0.9.0 0.9.5 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.1.0 1.1.1 1.1.2 1.1.3 1.10.0 1.10.1 1.10.2 1.11.0 1.11.1 1.11.2 1.12.0 1.12.1 1.13.0 1.13.1 1.13.2 1.13.3 1.13.4 1.13.5 1.13.6 1.13.7 1.14.0 1.15.0 1.15.1 1.16.0 1.17.0 1.17.1 1.17.2 1.17.3 1.18.0 1.18.1 1.18.2 1.18.3 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.4.0 1.4.1 1.4.2 1.4.3 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.6.0 1.6.1 1.6.2 1.7.0 1.7.1 1.7.2 1.7.3 1.7.4 1.7.5 1.8.0 1.8.1 1.8.2 1.9.0 1.9.1 1.9.2
custom-post-type-ui / inc / about.php
custom-post-type-ui / inc Last commit date
tools-sections 3 years ago about.php 3 years ago listings.php 3 years ago post-types.php 3 years ago support.php 3 years ago taxonomies.php 3 years ago tools.php 3 years ago utility.php 3 years ago wp-cli.php 3 years ago
about.php
193 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 * @license GPL-2.0+
10 */
11
12 // phpcs:disable WebDevStudios.All.RequireAuthor
13
14 // Exit if accessed directly.
15 if ( ! defined( 'ABSPATH' ) ) {
16 exit;
17 }
18
19 /**
20 * Enqueue our Custom Post Type UI assets.
21 *
22 * @since 1.6.0
23 */
24 function cptui_about_assets() {
25 $current_screen = get_current_screen();
26
27 if ( ! is_object( $current_screen ) || 'toplevel_page_cptui_main_menu' !== $current_screen->base ) {
28 return;
29 }
30
31 if ( wp_doing_ajax() ) {
32 return;
33 }
34
35 wp_enqueue_style( 'cptui-css' );
36 }
37 add_action( 'admin_enqueue_scripts', 'cptui_about_assets' );
38
39 /**
40 * Display our primary menu page.
41 *
42 * @since 0.3.0
43 *
44 * @internal
45 */
46 function cptui_settings() {
47 ?>
48 <div class="wrap about-wrap">
49 <?php
50
51 /**
52 * Fires inside and at the top of the wrapper for the main plugin landing page.
53 *
54 * @since 1.0.0
55 */
56 do_action( 'cptui_main_page_start' );
57 ?>
58 <h1><?php esc_html_e( 'Custom Post Type UI', 'custom-post-type-ui' ); ?> <?php echo esc_html( CPTUI_VERSION ); ?></h1>
59
60 <?php
61
62 /**
63 * Fires after the main page `<h1>` heading tag.
64 *
65 * @since 1.3.0
66 */
67 do_action( 'cptui_main_page_after_header' );
68 ?>
69 <div class="cptui-intro-devblock">
70 <p class="about-text cptui-about-text">
71 <?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' ); ?>
72 </p>
73 <div class="cptui-badge"></div>
74 </div>
75 <?php
76 /**
77 * Fires before the About Page changelog.
78 *
79 * @since 1.4.0
80 */
81 do_action( 'cptui_main_page_before_changelog' );
82 ?>
83
84 <h2>
85 <?php
86 printf(
87 // translators: Placeholder will hold the plugin version.
88 esc_html__( "What's new in version %s", 'custom-post-type-ui' ),
89 esc_html( CPTUI_VERSION )
90 );
91 ?>
92 </h2>
93 <div class="changelog about-integrations">
94 <div class="cptui-feature feature-section col three-col">
95 <div class="col">
96 <h2><?php esc_html_e( 'Post type descriptions', 'custom-post-type-ui' ); ?></h2>
97 <p><?php esc_html_e( 'We have updated a number of details around the post type description field. First we addressed issues with the Tools area when descriptions included quotes. Second we fixed an issue around stripping HTML from the field from previous security updates.', 'custom-post-type-ui' ); ?></p>
98 <h2><?php esc_html_e( 'Miscellaneous code cleanup and separation.', 'custom-post-type-ui' ); ?></h2>
99 <p><?php esc_html_e( 'Largely under the hood, but we have done some separation of our code and done more to help ensure code quality.', 'custom-post-type-ui' ); ?></p>
100 <h2><?php esc_html_e( 'Branding.', 'custom-post-type-ui' ); ?></h2>
101 <p><?php esc_html_e( 'We updated our branding for the plugin. Both within our UI but also on WordPress.org', 'custom-post-type-ui' ); ?></p>
102 <h2><?php esc_html_e( 'Miscellaneous.', 'custom-post-type-ui' ); ?></h2>
103 <p><?php esc_html_e( 'Added notes about some post type features also needing theme support declared for them to work. Fixed a pluralization issue with our UI and forms.', 'custom-post-type-ui' ); ?></p>
104 </div>
105 </div>
106 </div>
107
108 <div class="extranotes">
109 <?php
110
111 /**
112 * Fires inside a div for extra notes.
113 *
114 * @since 1.3.0
115 */
116 do_action( 'cptui_main_page_extra_notes' );
117 ?>
118 </div>
119 </div>
120 <?php
121 }
122
123 /**
124 * Display Pluginize-based content.
125 *
126 * @since 1.4.0
127 */
128 function cptui_pluginize_content() {
129 // translators: Placeholder will hold the name of the author of the plugin.
130 echo '<h1>' . sprintf( esc_html__( 'More from %s', 'custom-post-type-ui' ), 'WebDevStudios' ) . '</h1>';
131 echo '<div class="wdspromos-about">';
132 $ads = cptui_get_ads();
133 if ( ! empty( $ads ) ) {
134
135 foreach ( $ads as $ad ) {
136
137 $the_ad = sprintf(
138 '<img src="%s" alt="%s">',
139 esc_attr( $ad['image'] ),
140 esc_attr( $ad['text'] )
141 );
142
143 // Escaping $the_ad breaks the html.
144 printf(
145 '<p><a href="%s">%s</a></p>',
146 esc_url( $ad['url'] ),
147 $the_ad // phpcs:ignore
148 );
149 }
150 }
151 echo '</div>';
152 }
153 add_action( 'cptui_main_page_extra_notes', 'cptui_pluginize_content', 9 );
154
155 /**
156 * Render our newsletter form for the about page.
157 *
158 * @since 1.4.0
159 */
160 function cptui_about_page_newsletter() {
161
162 if ( cptui_is_new_install() ) {
163 return '';
164 }
165
166 ?>
167 <div class='wdsoctosignup'>
168 <?php
169 cptui_newsletter_form();
170 ?>
171 </div>
172
173 <?php
174
175 return '';
176 }
177 add_action( 'cptui_main_page_before_changelog', 'cptui_about_page_newsletter' );
178
179 /**
180 * Marks site as not new at the end of the about/main page.
181 *
182 * Can't be done on activation or else cptui_is_new_install() will immediately start
183 * returning false. So we'll do it at the end of the redirected landing page.
184 *
185 * @since 1.5.0
186 */
187 function cptui_mark_not_new() {
188 if ( cptui_is_new_install() ) {
189 cptui_set_not_new_install();
190 }
191 }
192 add_action( 'cptui_main_page_extra_notes', 'cptui_mark_not_new', 999 );
193