| 1 |
<div class="nav-menus-php"> |
| 2 |
<div class="wrap"> |
| 3 |
<?php FrmStylesHelper::style_menu('custom_css'); ?> |
| 4 |
|
| 5 |
<p><?php esc_html_e( 'You can add custom css here or in your theme style.css', 'formidable' ) ?></p> |
| 6 |
|
| 7 |
<?php include( FrmAppHelper::plugin_path() . '/classes/views/shared/errors.php' ); ?> |
| 8 |
|
| 9 |
<form method="post"> |
| 10 |
<input type="hidden" name="ID" value="<?php echo esc_attr( $style->ID ) ?>" /> |
| 11 |
<input type="hidden" name="<?php echo esc_attr( $frm_style->get_field_name('post_title', '') ); ?>" value="<?php echo esc_attr( $style->post_title ) ?>" /> |
| 12 |
<input type="hidden" name="<?php echo esc_attr( $frm_style->get_field_name('menu_order', '') ); ?>" value="<?php echo esc_attr( $style->menu_order ) ?>" /> |
| 13 |
<input type="hidden" name="style_name" value="frm_style_<?php echo esc_attr( $style->post_name ) ?>" /> |
| 14 |
<input type="hidden" name="frm_action" value="save_css" /> |
| 15 |
<?php wp_nonce_field( 'frm_custom_css_nonce', 'frm_custom_css' ); ?> |
| 16 |
|
| 17 |
<textarea name="<?php echo esc_attr( $frm_style->get_field_name('custom_css') ) ?>" id="<?php echo esc_attr( $id ) ?>" class="hide-if-js"><?php echo FrmAppHelper::esc_textarea( $style->post_content['custom_css'] ) ?></textarea> |
| 18 |
|
| 19 |
<?php |
| 20 |
if ( ! empty( $settings ) && $id == 'frm_codemirror_box' ) { |
| 21 |
wp_add_inline_script( |
| 22 |
'code-editor', |
| 23 |
sprintf( |
| 24 |
'jQuery( function() { wp.codeEditor.initialize( "' . esc_attr( $id ) . '", %s ); } );', |
| 25 |
wp_json_encode( $settings ) |
| 26 |
) |
| 27 |
); |
| 28 |
} |
| 29 |
|
| 30 |
foreach ( $style->post_content as $k => $v ) { |
| 31 |
if ( $k == 'custom_css' ) { |
| 32 |
continue; |
| 33 |
} |
| 34 |
?> |
| 35 |
<input type="hidden" value="<?php echo esc_attr($v) ?>" name="<?php echo esc_attr( $frm_style->get_field_name( $k ) ) ?>" /> |
| 36 |
<?php |
| 37 |
} |
| 38 |
?> |
| 39 |
<p class="button-controls"><input type="submit" name="nav-menu-locations" id="nav-menu-locations" class="button button-primary left" value="<?php esc_attr_e( 'Save Changes', 'formidable' ) ?>" /></p> |
| 40 |
|
| 41 |
</form> |
| 42 |
</div> |
| 43 |
</div> |
| 44 |
|