PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 5.0
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v5.0
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
← All changes | classes/views/shared/admin-header.php +47 -49 6.265.0 View file →
@@ -2,14 +2,43 @@
2 2 if ( ! defined( 'ABSPATH' ) ) {
3 3 die( 'You are not allowed to call this page directly.' );
4 4 }
5 5
6 -FrmAppHelper::print_admin_banner( ! $has_nav && empty( $atts['switcher'] ) );
6 +if ( current_user_can( 'administrator' ) && ! FrmAppHelper::pro_is_installed() && ! $has_nav && empty( $atts['switcher'] ) ) {
7 + ?>
8 + <div class="frm-upgrade-bar">
9 + <span>You're using Formidable Forms Lite. To unlock more features consider</span>
10 + <a href="<?php echo esc_url( FrmAppHelper::admin_upgrade_link( 'top-bar' ) ); ?>" target="_blank" rel="noopener">upgrading to Pro</a>.
11 + </div>
12 + <?php
13 +}
7 14 ?>
8 -<div id="frm_top_bar" class="<?php echo esc_attr( 'frm_nav_bar' ); ?>">
15 +<div id="frm_top_bar">
16 + <?php if ( FrmAppHelper::is_full_screen() ) { ?>
17 + <div class="frm-full-close">
18 + <a href="<?php echo esc_attr( $atts['close'] ); ?>" aria-label="<?php esc_attr_e( 'Close', 'formidable' ); ?>">
19 + <?php FrmAppHelper::icon_by_class( 'frmfont frm_close_icon', array( 'aria-label' => 'Dismiss' ) ); ?>
20 + </a>
21 + </div>
22 + <?php } ?>
23 + <?php
24 + if ( isset( $atts['publish'] ) ) {
25 + echo '<div id="frm-publishing">';
26 + call_user_func( $atts['publish'][0], $atts['publish'][1] );
27 + echo '</div>';
28 + } elseif ( ! FrmAppHelper::pro_is_installed() ) {
29 + ?>
30 + <div id="frm-publishing">
31 + <a href="<?php echo esc_url( FrmAppHelper::admin_upgrade_link( 'header' ) ); ?>" class="button button-secondary frm-button-secondary">
32 + <?php esc_html_e( 'Upgrade', 'formidable' ); ?>
33 + </a>
34 + </div>
35 + <?php
36 + }
37 + ?>
38 +
9 39 <a href="<?php echo esc_url( admin_url( 'admin.php?page=formidable' ) ); ?>" class="frm-header-logo">
10 40 <?php FrmAppHelper::show_header_logo(); ?>
11 - <span class="screen-reader-text"><?php esc_html_e( 'View Forms', 'formidable' ); ?></span>
12 41 </a>
13 42
14 43 <?php
15 44 // Add form nav
@@ -19,60 +48,29 @@
19 48 call_user_func( $atts['switcher'][0], $atts['switcher'][1] );
20 49 } else {
21 50 // Used when no form is currently selected.
22 51 ?>
23 - <div class="frm_top_left">
52 + <div class="frm_top_left <?php echo esc_attr( $atts['import_link'] ? 'frm_top_wide' : '' ); ?>">
24 53 <h1>
25 - <?php
26 - echo esc_html( $atts['label'] );
27 - FrmAppHelper::add_new_item_link( $atts );
28 -
29 - if ( isset( $atts['cancel_link'] ) ) {
30 - ?>
31 - <a href="<?php echo esc_url( $atts['cancel_link'] ); ?>" class="button frm-button-secondary frm_animate_bg">
54 + <?php echo esc_html( $atts['label'] ); ?>
55 + <?php FrmAppHelper::add_new_item_link( $atts ); ?>
56 + <?php if ( $atts['import_link'] ) { ?>
57 + <a href="<?php echo esc_url( admin_url( 'admin.php?page=formidable-import' ) ); ?>" class="button button-secondary frm-button-secondary frm_animate_bg">
58 + <?php esc_html_e( 'Import', 'formidable' ); ?>
59 + </a>
60 + <?php } ?>
61 + <?php if ( isset( $atts['cancel_link'] ) ) { ?>
62 + <a href="<?php echo esc_url( $atts['cancel_link'] ); ?>" class="button button-secondary frm-button-secondary frm_animate_bg">
32 63 <?php esc_html_e( 'Cancel', 'formidable' ); ?>
33 64 </a>
34 - <?php
35 - }
36 - ?>
65 + <?php } ?>
37 66 </h1>
38 67 </div>
39 - <ul class="frm_form_nav"></ul>
40 68 <?php
41 - }//end if
69 + }
42 70
43 71 if ( isset( $atts['nav'] ) ) {
44 - FrmAppHelper::kses_echo( $atts['nav'], 'all' );
72 + echo FrmAppHelper::kses( $atts['nav'], 'all' ); // WPCS: XSS ok.
45 73 }
46 -
47 - echo '<div id="frm-publishing">';
48 -
49 - if ( ! empty( $atts['publish'] ) || ! empty( $atts['import_link'] ) ) {
50 - $btn_type = 'primary';
51 -
52 - if ( isset( $atts['publish'] ) && is_array( $atts['publish'] ) ) {
53 - call_user_func( $atts['publish'][0], $atts['publish'][1] );
54 - $btn_type = 'secondary';
55 - }
56 -
57 - if ( $atts['import_link'] ) {
58 - // Use primary style if it's the only button.
59 - FrmAppHelper::import_link( $btn_type );
60 - }
61 - } elseif ( ! FrmAppHelper::pro_is_installed() ) {
62 - ?>
63 - <a href="<?php echo esc_url( FrmAppHelper::admin_upgrade_link( 'header' ) ); ?>" class="button button-secondary frm-button-secondary">
64 - <?php esc_html_e( 'Upgrade', 'formidable' ); ?>
65 - </a>
66 - <?php
67 - }
68 - echo '</div>';
69 -
70 - if ( FrmAppHelper::is_full_screen() ) {
71 - ?>
72 - <div class="frm-full-close">
73 - <a href="<?php echo esc_url( $atts['close'] ); ?>" aria-label="<?php esc_attr_e( 'Close', 'formidable' ); ?>">
74 - <?php FrmAppHelper::icon_by_class( 'frmfont frm_close_icon', array( 'aria-label' => 'Dismiss' ) ); ?>
75 - </a>
76 - </div>
77 - <?php } ?>
74 + ?>
75 + <div style="clear:right;"></div>
78 76 </div>