PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 5.4
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v5.4
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/styles/custom_css.php +57 -12 6.255.4 View file →
@@ -2,22 +2,67 @@
2 2 if ( ! defined( 'ABSPATH' ) ) {
3 3 die( 'You are not allowed to call this page directly.' );
4 4 }
5 5 ?>
6 -<div id="template">
6 +<div class="frm_wrap">
7 + <form method="post">
8 + <div class="frm_page_container">
9 + <?php
10 + FrmAppHelper::get_admin_header(
11 + array(
12 + 'label' => __( 'Custom CSS', 'formidable' ),
13 + 'hide_title' => false,
14 + 'publish' => array( 'FrmStylesHelper::save_button', array() ),
15 + 'nav' => FrmStylesHelper::get_style_menu( 'custom_css' ),
16 + )
17 + );
18 + ?>
19 +
20 + <div class="columns-2">
21 + <div id="post-body-content">
22 +
23 + <div class="frm-inner-content" id="template">
24 +
25 + <h2 class="frm-h2">
26 + <?php esc_html_e( 'Add Custom CSS', 'formidable' ); ?>
27 + </h2>
7 28 <p class="howto">
8 29 <?php esc_html_e( 'You can add custom css here or in your theme style.css. Any CSS added here will be used anywhere the Formidable CSS is loaded.', 'formidable' ); ?>
9 30 </p>
10 31
11 - <?php
12 - require FrmAppHelper::plugin_path() . '/classes/views/shared/errors.php';
32 + <?php require FrmAppHelper::plugin_path() . '/classes/views/shared/errors.php'; ?>
33 + <input type="hidden" name="ID" value="<?php echo esc_attr( $style->ID ); ?>" />
34 + <input type="hidden" name="<?php echo esc_attr( $frm_style->get_field_name( 'post_title', '' ) ); ?>" value="<?php echo esc_attr( $style->post_title ); ?>" />
35 + <input type="hidden" name="<?php echo esc_attr( $frm_style->get_field_name( 'menu_order', '' ) ); ?>" value="<?php echo esc_attr( $style->menu_order ); ?>" />
36 + <input type="hidden" name="style_name" value="frm_style_<?php echo esc_attr( $style->post_name ); ?>" />
37 + <input type="hidden" name="frm_action" value="save_css" />
38 + <?php wp_nonce_field( 'frm_custom_css_nonce', 'frm_custom_css' ); ?>
13 39
14 - $textarea_params = array(
15 - 'name' => 'frm_custom_css',
16 - 'id' => $id,
17 - );
18 - if ( ! empty( $settings ) ) {
19 - $textarea_params['class'] = 'hide-if-js';
20 - }
21 - ?>
22 - <textarea <?php FrmAppHelper::array_to_html_params( $textarea_params, true ); ?>><?php echo FrmAppHelper::esc_textarea( $custom_css ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></textarea>
40 + <textarea name="<?php echo esc_attr( $frm_style->get_field_name( 'custom_css' ) ); ?>" id="<?php echo esc_attr( $id ); ?>" class="<?php echo empty( $settings ) ? '' : 'hide-if-js'; ?>"><?php echo FrmAppHelper::esc_textarea( $style->post_content['custom_css'] ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></textarea>
41 +
42 + <?php
43 + if ( ! empty( $settings ) ) {
44 + wp_add_inline_script(
45 + 'code-editor',
46 + sprintf(
47 + 'jQuery( function() { wp.codeEditor.initialize( "' . esc_attr( $id ) . '", %s ); } );',
48 + wp_json_encode( $settings )
49 + )
50 + );
51 + }
52 +
53 + foreach ( $style->post_content as $k => $v ) {
54 + if ( $k === 'custom_css' ) {
55 + continue;
56 + }
57 + ?>
58 + <input type="hidden" value="<?php echo esc_attr( $v ); ?>" name="<?php echo esc_attr( $frm_style->get_field_name( $k ) ); ?>" />
59 + <?php
60 + }
61 + ?>
62 +
63 +</div>
64 +</div>
65 +</div>
66 +</div>
67 +</form>
23 68 </div>