PluginProbe ʕ •ᴥ•ʔ
Secure Custom Fields / trunk
Secure Custom Fields vtrunk
6.9.1 6.9.0 6.8.9 6.8.7 6.8.8 6.8.6 6.8.4 6.8.5 trunk 6.4.0-beta1 6.4.0-beta2 6.4.1 6.4.1-beta3 6.4.1-beta4 6.4.1-beta5 6.4.1-beta6 6.4.1-beta7 6.4.2 6.5.0 6.5.1 6.5.2 6.5.3 6.5.4 6.5.5 6.5.6 6.5.7 6.6.0 6.7.0 6.7.1 6.8.0 6.8.1 6.8.2 6.8.3
secure-custom-fields / includes / admin / views / global / header.php
secure-custom-fields / includes / admin / views / global Last commit date
form-top.php 1 year ago header.php 1 year ago index.php 1 year ago navigation.php 7 months ago
header.php
40 lines
1 <?php
2 //phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- included template file.
3
4 global $post_type, $post_type_object, $acf_page_title;
5 $post_new_file = sprintf(
6 'post-new.php?post_type=%s',
7 is_string( $post_type ) ? $post_type : 'acf-field-group'
8 );
9
10 $page_title = false;
11 if ( isset( $acf_page_title ) ) {
12 $page_title = $acf_page_title;
13 } elseif ( is_object( $post_type_object ) ) {
14 $page_title = $post_type_object->labels->name;
15 }
16 if ( $page_title ) {
17 ?>
18 <div class="acf-headerbar">
19
20 <h1 class="acf-page-title">
21 <?php
22 echo esc_html( $page_title );
23 ?>
24 </h1>
25 <?php
26 if ( ! empty( $post_type_object ) && current_user_can( $post_type_object->cap->create_posts ) ) {
27 $class = 'acf-btn acf-btn-sm';
28
29 printf(
30 '<a href="%1$s" class="%2$s"><i class="acf-icon acf-icon-plus"></i>%3$s</a>',
31 esc_url( admin_url( $post_new_file ) ),
32 esc_attr( $class ),
33 esc_html( $post_type_object->labels->add_new )
34 );
35 }
36 ?>
37
38 </div>
39 <?php } ?>
40