Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/wpforms-.../src/Admin/Builder/Settings
File: Themes.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace WPForms\Admin\Builder\Settings;
[2] Fix | Delete
[3] Fix | Delete
/**
[4] Fix | Delete
* Themes panel.
[5] Fix | Delete
*
[6] Fix | Delete
* @since 1.8.8
[7] Fix | Delete
*/
[8] Fix | Delete
class Themes {
[9] Fix | Delete
[10] Fix | Delete
/**
[11] Fix | Delete
* Init class.
[12] Fix | Delete
*
[13] Fix | Delete
* @since 1.8.8
[14] Fix | Delete
*/
[15] Fix | Delete
public function init() {
[16] Fix | Delete
[17] Fix | Delete
$this->hooks();
[18] Fix | Delete
}
[19] Fix | Delete
[20] Fix | Delete
/**
[21] Fix | Delete
* Register hooks.
[22] Fix | Delete
*
[23] Fix | Delete
* @since 1.8.8
[24] Fix | Delete
*/
[25] Fix | Delete
protected function hooks() {
[26] Fix | Delete
[27] Fix | Delete
add_action( 'wpforms_form_settings_panel_content', [ $this, 'panel_content' ], 10, 0 );
[28] Fix | Delete
}
[29] Fix | Delete
[30] Fix | Delete
/**
[31] Fix | Delete
* Add a content for `Themes` panel.
[32] Fix | Delete
*
[33] Fix | Delete
* @since 1.8.8
[34] Fix | Delete
*/
[35] Fix | Delete
public function panel_content() {
[36] Fix | Delete
?>
[37] Fix | Delete
<div class="wpforms-panel-content-section wpforms-panel-content-section-themes">
[38] Fix | Delete
<div class="wpforms-panel-content-section-themes-inner">
[39] Fix | Delete
<div class="wpforms-panel-content-section-themes-top">
[40] Fix | Delete
<div class="wpforms-panel-content-section-title">
[41] Fix | Delete
<?php esc_html_e( 'Form Themes', 'wpforms-lite' ); ?>
[42] Fix | Delete
</div>
[43] Fix | Delete
[44] Fix | Delete
<?php
[45] Fix | Delete
$this->get_top_alert();
[46] Fix | Delete
$this->get_main_content();
[47] Fix | Delete
?>
[48] Fix | Delete
[49] Fix | Delete
</div> <!-- .wpforms-panel-content-section-themes-top -->
[50] Fix | Delete
<div class="wpforms-panel-content-section-themes-bottom">
[51] Fix | Delete
<?php $this->get_bottom_alert(); ?>
[52] Fix | Delete
</div> <!-- .wpforms-panel-content-section-themes-bottom -->
[53] Fix | Delete
</div> <!-- .wpforms-panel-content-section-themes-inner -->
[54] Fix | Delete
</div> <!-- .wpforms-panel-content-section-themes -->
[55] Fix | Delete
<?php
[56] Fix | Delete
}
[57] Fix | Delete
[58] Fix | Delete
/**
[59] Fix | Delete
* Get top alert.
[60] Fix | Delete
*
[61] Fix | Delete
* @since 1.8.8
[62] Fix | Delete
*/
[63] Fix | Delete
private function get_top_alert() {
[64] Fix | Delete
[65] Fix | Delete
if ( $this->is_using_modern_markup() ) {
[66] Fix | Delete
return;
[67] Fix | Delete
}
[68] Fix | Delete
[69] Fix | Delete
?>
[70] Fix | Delete
<div class="wpforms-alert wpforms-alert-warning">
[71] Fix | Delete
<div class="wpforms-aside-left">
[72] Fix | Delete
<p class="wpforms-alert-heading">
[73] Fix | Delete
<?php esc_html_e( 'Before You Can Use Form Themes', 'wpforms-lite' ); ?>
[74] Fix | Delete
</p>
[75] Fix | Delete
<p class="wpforms-alert-content">
[76] Fix | Delete
<?php esc_html_e( 'Upgrade your forms to use our modern markup and unlock form themes and style controls.', 'wpforms-lite' ); ?>
[77] Fix | Delete
</p>
[78] Fix | Delete
</div>
[79] Fix | Delete
<div class="wpforms-aside-right">
[80] Fix | Delete
<a class="wpforms-btn wpforms-btn-md wpforms-btn-light-grey"
[81] Fix | Delete
href="<?php echo esc_url( admin_url( 'admin.php?page=wpforms-settings' ) ); ?>">
[82] Fix | Delete
<?php esc_html_e( 'Enable Modern Markup', 'wpforms-lite' ); ?>
[83] Fix | Delete
</a>
[84] Fix | Delete
</div>
[85] Fix | Delete
</div>
[86] Fix | Delete
<?php
[87] Fix | Delete
}
[88] Fix | Delete
[89] Fix | Delete
/**
[90] Fix | Delete
* Get bottom alert.
[91] Fix | Delete
*
[92] Fix | Delete
* @since 1.8.8
[93] Fix | Delete
*/
[94] Fix | Delete
private function get_bottom_alert() {
[95] Fix | Delete
[96] Fix | Delete
if ( ! $this->is_using_modern_markup() ) {
[97] Fix | Delete
return;
[98] Fix | Delete
}
[99] Fix | Delete
[100] Fix | Delete
$url = wpforms_utm_link( 'https://wpforms.com/features/suggest/', 'Builder Themes', 'Theme Request Link' );
[101] Fix | Delete
?>
[102] Fix | Delete
<div class="wpforms-alert wpforms-alert-info wpforms-bottom">
[103] Fix | Delete
<div class="wpforms-aside-left">
[104] Fix | Delete
<p class="wpforms-alert-heading">
[105] Fix | Delete
<?php esc_html_e( 'Not Using the Block Editor? Let us know!', 'wpforms-lite' ); ?>
[106] Fix | Delete
</p>
[107] Fix | Delete
<p class="wpforms-alert-content">
[108] Fix | Delete
<?php esc_html_e( 'If we get enough requests for themes in the form builder we may add them.', 'wpforms-lite' ); ?>
[109] Fix | Delete
</p>
[110] Fix | Delete
</div>
[111] Fix | Delete
<div class="wpforms-aside-right">
[112] Fix | Delete
<a class="wpforms-btn wpforms-btn-md wpforms-btn-light-grey"
[113] Fix | Delete
rel="noopener noreferrer"
[114] Fix | Delete
href="<?php echo esc_url( $url ); ?>"
[115] Fix | Delete
target="_blank">
[116] Fix | Delete
<?php esc_html_e( 'Request Feature', 'wpforms-lite' ); ?>
[117] Fix | Delete
</a>
[118] Fix | Delete
</div>
[119] Fix | Delete
</div>
[120] Fix | Delete
<?php
[121] Fix | Delete
}
[122] Fix | Delete
[123] Fix | Delete
/**
[124] Fix | Delete
* Get main content.
[125] Fix | Delete
*
[126] Fix | Delete
* @since 1.8.8
[127] Fix | Delete
*
[128] Fix | Delete
* @noinspection HtmlUnknownTarget
[129] Fix | Delete
*/
[130] Fix | Delete
private function get_main_content() {
[131] Fix | Delete
[132] Fix | Delete
$url = wpforms_utm_link( 'https://wpforms.com/docs/styling-your-forms/', 'Builder Themes', 'Description Link' );
[133] Fix | Delete
$video = 'https://www.youtube.com/embed/Km5kV-2SMLg';
[134] Fix | Delete
?>
[135] Fix | Delete
<p>
[136] Fix | Delete
<?php
[137] Fix | Delete
echo wp_kses(
[138] Fix | Delete
sprintf(
[139] Fix | Delete
/* translators: %s - URL to the documentation. */
[140] Fix | Delete
__( 'Customize the look and feel of your form with premade themes or simple style settings that allow you to use your own colors to match your brand. Themes and style settings are in the Block Editor, where you can see a realtime preview. <br /><a href="%s" target="_blank">Learn more about styling your forms</a>', 'wpforms-lite' ),
[141] Fix | Delete
esc_url( $url )
[142] Fix | Delete
),
[143] Fix | Delete
[
[144] Fix | Delete
'a' => [
[145] Fix | Delete
'href' => [],
[146] Fix | Delete
'target' => [],
[147] Fix | Delete
],
[148] Fix | Delete
'br' => [],
[149] Fix | Delete
]
[150] Fix | Delete
);
[151] Fix | Delete
?>
[152] Fix | Delete
</p>
[153] Fix | Delete
[154] Fix | Delete
<div class="wpforms-panel-content-section-video">
[155] Fix | Delete
<iframe
[156] Fix | Delete
src="<?php echo esc_url( $video ); ?>"
[157] Fix | Delete
title="<?php esc_attr_e( 'Form Themes', 'wpforms-lite' ); ?>"
[158] Fix | Delete
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
[159] Fix | Delete
width="640"
[160] Fix | Delete
height="360"
[161] Fix | Delete
loading="lazy"
[162] Fix | Delete
allowfullscreen></iframe>
[163] Fix | Delete
</div>
[164] Fix | Delete
<?php
[165] Fix | Delete
}
[166] Fix | Delete
[167] Fix | Delete
/**
[168] Fix | Delete
* Check if the form is using modern markup.
[169] Fix | Delete
*
[170] Fix | Delete
* @since 1.8.8
[171] Fix | Delete
*
[172] Fix | Delete
* @return bool
[173] Fix | Delete
*/
[174] Fix | Delete
private function is_using_modern_markup(): bool {
[175] Fix | Delete
// phpcs:ignore WPForms.Formatting.EmptyLineAfterFunctionDeclaration.AddEmptyLineAfterFunctionDeclaration
[176] Fix | Delete
return wpforms_get_render_engine() === 'modern';
[177] Fix | Delete
}
[178] Fix | Delete
}
[179] Fix | Delete
[180] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function