Edit File by line
/home/zeestwma/ceyloniy.../wp-conte.../plugins/wpforms-.../template.../integrat.../wpcode
File: code-snippets.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* WPCode integration code snippets page.
[2] Fix | Delete
*
[3] Fix | Delete
* @since 1.8.5
[4] Fix | Delete
*
[5] Fix | Delete
* @var array $snippets WPCode snippets list.
[6] Fix | Delete
* @var bool $action_required Indicate that user should install or activate WPCode.
[7] Fix | Delete
* @var string $action Popup button action.
[8] Fix | Delete
* @var string $plugin WPCode Lite download URL | WPCode Lite plugin slug.
[9] Fix | Delete
*/
[10] Fix | Delete
[11] Fix | Delete
if ( ! defined( 'ABSPATH' ) ) {
[12] Fix | Delete
exit;
[13] Fix | Delete
}
[14] Fix | Delete
?>
[15] Fix | Delete
[16] Fix | Delete
<?php
[17] Fix | Delete
$container_class = $action_required ? 'wpforms-wpcode-blur' : '';
[18] Fix | Delete
$popup_title = esc_html__( 'Please Install WPCode to Use the WPForms Snippet Library', 'wpforms-lite' );
[19] Fix | Delete
$popup_button_text = esc_html__( 'Install + Activate WPCode', 'wpforms-lite' );
[20] Fix | Delete
[21] Fix | Delete
if ( $action === 'update' ) {
[22] Fix | Delete
$popup_title = esc_html__( 'Please Update WPCode to Use the WPForms Snippet Library', 'wpforms-lite' );
[23] Fix | Delete
$popup_button_text = esc_html__( 'Update + Activate WPCode', 'wpforms-lite' );
[24] Fix | Delete
}
[25] Fix | Delete
[26] Fix | Delete
if ( $action === 'activate' ) {
[27] Fix | Delete
$popup_title = esc_html__( 'Please Activate WPCode to Use the WPForms Snippet Library', 'wpforms-lite' );
[28] Fix | Delete
$popup_button_text = esc_html__( 'Activate WPCode', 'wpforms-lite' );
[29] Fix | Delete
}
[30] Fix | Delete
?>
[31] Fix | Delete
[32] Fix | Delete
<div class="wpforms-wpcode">
[33] Fix | Delete
<?php if ( $action_required ) : ?>
[34] Fix | Delete
<div class="wpforms-wpcode-popup">
[35] Fix | Delete
<div class="wpforms-wpcode-popup-title"><?php echo esc_html( $popup_title ); ?></div>
[36] Fix | Delete
<div class="wpforms-wpcode-popup-description">
[37] Fix | Delete
<?php esc_html_e( 'Using WPCode, you can install WPForms code snippets with 1 click right from this page or the WPCode Library in the WordPress admin.', 'wpforms-lite' ); ?>
[38] Fix | Delete
</div>
[39] Fix | Delete
<div data-action="<?php echo esc_attr( $action ); ?>" data-plugin="<?php echo esc_attr( $plugin ); ?>" class="wpforms-wpcode-popup-button wpforms-btn wpforms-btn-lg wpforms-btn-orange"><?php echo esc_html( $popup_button_text ); ?></div>
[40] Fix | Delete
<a
[41] Fix | Delete
href="https://wordpress.org/plugins/insert-headers-and-footers/?utm_source=wpformsplugin&utm_medium=WPCode+WordPress+Repo&utm_campaign=plugin&utm_content=WPCode"
[42] Fix | Delete
class="wpforms-wpcode-popup-link">
[43] Fix | Delete
<?php esc_html_e( 'Learn more about WPCode', 'wpforms-lite' ); ?>
[44] Fix | Delete
</a>
[45] Fix | Delete
</div>
[46] Fix | Delete
<?php endif; ?>
[47] Fix | Delete
[48] Fix | Delete
<div class="wpforms-wpcode-container <?php echo sanitize_html_class( $container_class ); ?>">
[49] Fix | Delete
<div class="wpforms-setting-row tools wpforms-wpcode-header">
[50] Fix | Delete
<div class="wpforms-wpcode-header-meta">
[51] Fix | Delete
<h4><?php esc_html_e( 'Code Snippets', 'wpforms-lite' ); ?></h4>
[52] Fix | Delete
<p>
[53] Fix | Delete
<?php
[54] Fix | Delete
printf(
[55] Fix | Delete
wp_kses( /* translators: %s - WPCode library website URL. */
[56] Fix | Delete
__( 'Using WPCode, you can install WPForms code snippets with 1 click directly from this page or the <a href="%s" target="_blank" rel="noopener noreferrer">WPCode library</a>.', 'wpforms-lite' ),
[57] Fix | Delete
[
[58] Fix | Delete
'a' => [
[59] Fix | Delete
'href' => [],
[60] Fix | Delete
'rel' => [],
[61] Fix | Delete
'target' => [],
[62] Fix | Delete
],
[63] Fix | Delete
]
[64] Fix | Delete
),
[65] Fix | Delete
esc_url( admin_url( 'admin.php?page=wpcode-library' ) )
[66] Fix | Delete
);
[67] Fix | Delete
?>
[68] Fix | Delete
</p>
[69] Fix | Delete
</div>
[70] Fix | Delete
<div class="wpforms-wpcode-header-search">
[71] Fix | Delete
<label for="wpforms-wpcode-snippet-search"></label>
[72] Fix | Delete
<input
[73] Fix | Delete
type="search" placeholder="<?php esc_attr_e( 'Search Snippets', 'wpforms-lite' ); ?>"
[74] Fix | Delete
id="wpforms-wpcode-snippet-search">
[75] Fix | Delete
</div>
[76] Fix | Delete
</div>
[77] Fix | Delete
[78] Fix | Delete
<div id="wpforms-wpcode-snippets-list">
[79] Fix | Delete
<div class="list">
[80] Fix | Delete
<?php
[81] Fix | Delete
foreach ( $snippets as $snippet ) :
[82] Fix | Delete
$button_text = $snippet['installed'] ? __( 'Edit Snippet', 'wpforms-lite' ) : __( 'Install Snippet', 'wpforms-lite' );
[83] Fix | Delete
$button_type_class = $snippet['installed'] ? 'button-primary' : 'button-secondary';
[84] Fix | Delete
$button_action = $snippet['installed'] ? 'edit' : 'install';
[85] Fix | Delete
$badge_text = $snippet['installed'] ? __( 'Installed', 'wpforms-lite' ) : '';
[86] Fix | Delete
?>
[87] Fix | Delete
<div class="wpforms-wpcode-snippet">
[88] Fix | Delete
<div class="wpforms-wpcode-snippet-header">
[89] Fix | Delete
<h3 class="wpforms-wpcode-snippet-title"><?php echo esc_html( $snippet['title'] ); ?></h3>
[90] Fix | Delete
<div class="wpforms-wpcode-snippet-note"><?php echo esc_html( $snippet['note'] ); ?></div>
[91] Fix | Delete
</div>
[92] Fix | Delete
<div class="wpforms-wpcode-snippet-footer">
[93] Fix | Delete
<div class="wpforms-wpcode-snippet-badge"><?php echo esc_html( $badge_text ); ?></div>
[94] Fix | Delete
<a
[95] Fix | Delete
href="<?php echo esc_url( $snippet['install'] ); ?>"
[96] Fix | Delete
class="button wpforms-wpcode-snippet-button <?php echo sanitize_html_class( $button_type_class ); ?>"
[97] Fix | Delete
data-action="<?php echo esc_attr( $button_action ); ?>"><?php echo esc_html( $button_text ); ?> </a>
[98] Fix | Delete
</div>
[99] Fix | Delete
</div>
[100] Fix | Delete
<?php endforeach; ?>
[101] Fix | Delete
</div>
[102] Fix | Delete
<div id="wpforms-wpcode-no-results"><?php esc_html_e( "Sorry, we didn't find any snippets that match your criteria.", 'wpforms-lite' ); ?></div>
[103] Fix | Delete
</div>
[104] Fix | Delete
</div>
[105] Fix | Delete
</div>
[106] Fix | Delete
[107] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function