dvadf
File manager - Edit - /home/centroca/public_html/lite.tar
Back
templates/admin/entries/overview/bulk-actions.php 0000644 00000003406 15252502524 0016262 0 ustar 00 <?php /** * Bulk action for the Entries List page. * * @since 1.8.9 * * @var bool $show_filter Whether to show the filter block. */ ?> <div class="alignleft actions bulkactions wpforms-input-disabled" aria-disabled="true"> <label for="bulk-action-selector-top" class="screen-reader-text">Select bulk action</label> <select name="action" id="bulk-action-selector-top"> <option value="-1">Bulk actions</option> </select> <input type="submit" id="doaction" class="button action" value="Apply"> </div> <?php if ( ! empty( $show_filter ) ) { ?> <div class="alignleft actions wpforms-filter-date wpforms-input-disabled" aria-disabled="true"> <input class="regular-text wpforms-filter-date-selector form-control input active" placeholder="Select a date range" tabindex="0" type="text" readonly="readonly"> <button type="submit" name="action" value="filter_date" class="button">Filter</button> </div> <?php } ?> <div class="tablenav-pages one-page wpforms-input-disabled" aria-disabled="true"> <span class="displaying-num">12 items</span> <span class="pagination-links"> <span class="tablenav-pages-navspan button disabled" aria-hidden="true">«</span> <span class="tablenav-pages-navspan button disabled" aria-hidden="true">‹</span> <span class="paging-input"> <label for="current-page-selector" class="screen-reader-text">Current Page</label> <input class="current-page" id="current-page-selector" type="text" name="paged" value="1" size="1" aria-describedby="table-paging"> <span class="tablenav-paging-text"> of <span class="total-pages">1</span></span> </span> <span class="tablenav-pages-navspan button disabled" aria-hidden="true">›</span> <span class="tablenav-pages-navspan button disabled" aria-hidden="true">»</span> </span> </div> <br class="clear"> templates/admin/entries/overview/actions.php 0000644 00000002665 15252502524 0015335 0 ustar 00 <?php /** * HTML for the columns multiselect menu. * * @since 1.8.9 */ ?> <div class="wpforms-entries-settings-menu" aria-expanded="true"> <div class="wpforms-entries-settings-menu-wrap wpforms-entries-settings-menu-items wpforms-input-disabled" aria-disabled="true"> <span class="wpforms-settings-title first">Form Fields</span> <label role="option"><input type="checkbox" value="1" aria-disabled="false" checked><span>Name</span></label> <label role="option"><input type="checkbox" value="1" aria-disabled="false" checked><span>Email</span></label> <span class="wpforms-settings-title">Entry Meta</span> <label role="option"><input type="checkbox" value="1" aria-disabled="false" checked><span>Date</span></label> <label role="option"><input type="checkbox" value="1" aria-disabled="false"><span>Entry ID</span></label> <label role="option"><input type="checkbox" value="1" aria-disabled="false"><span>Entry Type</span></label> <label role="option"><input type="checkbox" value="1" aria-disabled="false"><span>User IP</span></label> <label role="option"><input type="checkbox" value="1" aria-disabled="false"><span>User Agent</span></label> <label role="option"><input type="checkbox" value="1" aria-disabled="false"><span>Unique User ID</span></label> </div> <button type="button" class="button button-secondary" id="wpforms-list-table-ext-edit-columns-select-submit" data-value="save-table-columns">Save Changes</button> </div> templates/admin/entries/overview/modal.php 0000644 00000007515 15252502524 0014770 0 ustar 00 <?php /** * Modal for the Entries List page. * * @since 1.8.9 * * @var bool $is_lite_connect_enabled Whether Lite Connect is enabled. * @var bool $is_lite_connect_allowed Whether Lite Connect is allowed. * @var int $entries_count Entries count. * @var string $enabled_since Enabled since. * @var bool $is_enabled Whether sample entries are enabled. */ ?> <div id="wpforms-sample-entry-modal" class="wpforms-sample-entries-modal entries-modal" style="<?php echo $is_enabled ? esc_attr( 'display: none' ) : ''; ?>"> <?php if ( ! $is_lite_connect_enabled ) : ?> <div class="entries-modal-content-top-notice"> <i class="wpforms-icon"></i><?php esc_html_e( 'Form entries are not stored in WPForms Lite.', 'wpforms-lite' ); ?> </div> <?php endif; ?> <div class="entries-modal-content"> <h2> <?php esc_html_e( 'View and Manage Your Form Entries inside WordPress', 'wpforms-lite' ); ?> </h2> <p> <?php esc_html_e( 'Once you upgrade to WPForms Pro, all future form entries will be stored in your WordPress database and displayed on this Entries screen.', 'wpforms-lite' ); ?> </p> <div class="wpforms-clear"> <ul class="left"> <li><i class="fa fa-check" aria-hidden="true"></i> <?php esc_html_e( 'View Entries in Dashboard', 'wpforms-lite' ); ?></li> <li><i class="fa fa-check" aria-hidden="true"></i> <?php esc_html_e( 'Export Entries in a CSV File', 'wpforms-lite' ); ?></li> <li><i class="fa fa-check" aria-hidden="true"></i> <?php esc_html_e( 'Add Notes / Comments', 'wpforms-lite' ); ?></li> <li><i class="fa fa-check" aria-hidden="true"></i> <?php esc_html_e( 'Save Favorite Entries', 'wpforms-lite' ); ?></li> </ul> <ul class="right"> <li><i class="fa fa-check" aria-hidden="true"></i> <?php esc_html_e( 'Mark Read / Unread', 'wpforms-lite' ); ?></li> <li><i class="fa fa-check" aria-hidden="true"></i> <?php esc_html_e( 'Print Entries', 'wpforms-lite' ); ?></li> <li><i class="fa fa-check" aria-hidden="true"></i> <?php esc_html_e( 'Resend Notifications', 'wpforms-lite' ); ?></li> <li><i class="fa fa-check" aria-hidden="true"></i> <?php esc_html_e( 'See Geolocation Data', 'wpforms-lite' ); ?></li> </ul> </div> </div> <div class="entries-modal-button"> <?php if ( $is_lite_connect_enabled && $is_lite_connect_allowed ) : ?> <p class="entries-modal-button-before"> <?php printf( '<strong>' . esc_html( /* translators: %d - backed up entries count. */ _n( '%d entry has been backed up', '%d entries have been backed up', $entries_count, 'wpforms-lite' ) ) . '</strong>', absint( $entries_count ) ); if ( ! empty( $enabled_since ) ) { echo '<br>'; printf( /* translators: %s - time when Lite Connect was enabled. */ esc_html__( 'since you enabled Lite Connect on %s', 'wpforms-lite' ), esc_html( wpforms_date_format( $enabled_since, '', true ) ) ); } // phpcs:ignore Squiz.PHP.EmbeddedPhp.ContentAfterEnd ?>.</p> <a href="<?php echo esc_url( wpforms_admin_upgrade_link( 'entries', 'Upgrade to WPForms Pro & Restore Form Entries Button' ) ); ?>" class="wpforms-btn wpforms-btn-lg wpforms-btn-orange wpforms-upgrade-modal" target="_blank" rel="noopener noreferrer"> <?php esc_html_e( 'Upgrade to WPForms Pro & Restore Form Entries', 'wpforms-lite' ); ?> </a> <?php else : ?> <a href="<?php echo esc_url( wpforms_admin_upgrade_link( 'entries', 'Upgrade to WPForms Pro Now Button' ) ); ?>" class="wpforms-btn wpforms-btn-lg wpforms-btn-orange wpforms-upgrade-modal" target="_blank" rel="noopener noreferrer"> <?php esc_html_e( 'Upgrade to WPForms Pro Now', 'wpforms-lite' ); ?> </a> <?php endif; ?> <p class="wpforms-entries-sample"> <a id="wpforms-entries-explore" href="#"> <?php esc_html_e( 'Explore Entries & Learn More', 'wpforms-lite' ); ?> </a> </p> </div> </div> templates/admin/entries/overview/entry-list.php 0000644 00000006475 15252502524 0016012 0 ustar 00 <?php /** * Entries List page with sample data. * * @since 1.8.9 * * @var bool $is_lite_connect_enabled Whether Lite Connect is enabled. * @var bool $is_lite_connect_allowed Whether Lite Connect is allowed. * @var int $entries_count Entries count. * @var string $enabled_since Enabled since. * @var array $sample_entries Sample entries. * @var array $utm UTM data. */ $sample_entry_enabled = ! empty( $_COOKIE['wpforms_sample_entries'] ); ?> <div id="wpforms-entries-list" class="wrap wpforms-admin-wrap wpforms-entries-list-upgrade <?php echo $sample_entry_enabled ? esc_attr( 'wpforms-entires-sample-view' ) : ''; ?>"> <h1 class="page-title">Entries</h1> <div id="wpforms-sample-entry-main-notice" class="wpforms-sample-entry-notice <?php echo $sample_entry_enabled ? esc_attr( 'wpf-no-animate' ) : ''; ?>"> <?php echo wpforms_render( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped 'admin/entries/notice', [ 'btn_utm' => $utm['entries_list_button'], 'link_utm' => $utm['entries_list_link'], ], true ); ?> </div> <div class="wpforms-admin-content-wrap"> <?php echo wpforms_render( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped 'admin/entries/overview/modal', [ 'is_lite_connect_enabled' => $is_lite_connect_enabled, 'is_lite_connect_allowed' => $is_lite_connect_allowed, 'entries_count' => $entries_count, 'enabled_since' => $enabled_since, 'is_enabled' => $sample_entry_enabled, ], true ); ?> <div id="wpforms-sample-entries-main" class="wpforms-admin-content"> <div class="form-details"> <span class="form-details-sub">Select Form</span> <h3 class="form-details-title"> General Inquiry Form <div class="form-selector wpforms-input-disabled" aria-disabled="true"> <a href="#" class="toggle dashicons dashicons-arrow-down-alt2"></a> </div> </h3> <div class="form-details-actions wpforms-input-disabled" aria-disabled="true"> <a href="#" class="form-details-actions-entries"><span class="dashicons dashicons-list-view"></span> All Entries </a> <a href="#" class="form-details-actions-edit"><span class="dashicons dashicons-edit"></span> Edit This Form</a> <a href="#" class="form-details-actions-preview"><span class="dashicons dashicons-visibility"></span> Preview Form</a> <a href="#" class="form-details-actions-export"><span class="dashicons dashicons-migrate"></span> Export All</a> <a href="#" class="form-details-actions-read"><span class="dashicons dashicons-marker"></span> Mark All Read</a> <a href="#" class="form-details-actions-removeall"><span class="dashicons dashicons-trash"></span>Trash All</a> </div> </div> <form id="wpforms-entries-table"> <?php echo wpforms_render( 'admin/entries/overview/header' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo wpforms_render( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped 'admin/entries/overview/table', [ 'entries' => $sample_entries ], true ); ?> </form> <div class="tablenav bottom"> <?php echo wpforms_render( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped 'admin/entries/overview/bulk-actions' ); ?> </div> </div> </div> </div> <div class="clear"></div> templates/admin/entries/overview/table.php 0000644 00000007512 15252502524 0014760 0 ustar 00 <?php /** * Table for the Entries List page. * * @since 1.8.9 * * @var array $entries Entry sample data. */ $time = time(); ?> <table class="wp-list-table widefat striped table-view-list has-many-columns wpforms-table-container"> <thead> <tr class="ui-sortable"> <td id="cb" class="manage-column column-cb check-column wpforms-input-disabled"> <label class="screen-reader-text" for="cb-select-all-1">Select All</label> <input id="cb-select-all-1" type="checkbox"> </td> <th scope="col" id="indicators" class="manage-column column-indicators"></th> <th scope="col" id="wpforms_field_1" class="manage-column column-wpforms_field_1 column-primary">Name</th> <th scope="col" id="wpforms_field_2" class="manage-column column-wpforms_field_2">Email</th> <th scope="col" id="date" class="manage-column column-date">Date</th> <th scope="col" id="actions" class="manage-column column-actions wpforms-input-disabled" aria-disabled="true" style="position: relative";> Actions <a href="#" title="Change columns to display" id="wpforms-list-table-ext-edit-columns-cog"><i class="fa fa-cog" aria-hidden="true"></i></a> <?php echo wpforms_render( 'admin/entries/overview/actions' ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> </th> </tr> </thead> <tbody id="the-list" data-wp-lists="list:entry"> <?php foreach ( $entries as $entry ) { ?> <tr> <th scope="row" class="check-column wpforms-input-disabled"><input type="checkbox" name="entry_id[]" value=""></th> <td class="indicators column-indicators has-row-actions wpforms-input-disabled" aria-disabled="true" data-colname=""> <span class="indicator-star <?php echo ! empty( $entry['star'] ) ? 'unstar' : 'star'; ?>" aria-label="Star entry"><span class="dashicons dashicons-star-filled"></span></span> <span class="indicator-read <?php echo ! empty( $entry['read'] ) ? 'read' : 'unread'; ?>" aria-label="Mark entry read"></span> </td> <td class="wpforms_field_1 column-wpforms_field_1 column-primary" data-colname="Name"> <?php echo esc_html( $entry['name'] ); ?> <button type="button" class="toggle-row"><span class="screen-reader-text">Show more details</span></button> </td> <td class="wpforms_field_2 column-wpforms_field_2" data-colname="Email"><?php echo esc_html( strtolower( str_replace( ' ', '.', $entry['name'] ) ) . '@example.com' ); ?> </td> <td class="date column-date" data-colname="Date"><?php echo esc_html( gmdate( 'm/d/Y h:i A', wp_rand( 1704067200, $time ) ) ); ?></td> <td class="actions column-actions" data-colname="Actions"> <a href="<?php echo esc_url( admin_url( 'admin.php?page=wpforms-entries&view=sample' ) ); ?>" title="View Form Entry" class="view">View</a> <span class="sep">|</span> <span class="wpforms-input-disabled" aria-disabled="true"><a href="#" title="Edit Form Entry" class="edit">Edit</a></span> <span class="sep">|</span> <span class="wpforms-input-disabled" aria-disabled="true"><a href="#" title="Spam Form Entry" class="spam">Spam</a></span> <span class="sep">|</span> <span class="wpforms-input-disabled" aria-disabled="true"><a href="#" title="Delete Form Entry" class="trash">Trash</a></span> </td> </tr> <?php } ?> </tbody> <tfoot> <tr> <td class="manage-column column-cb check-column wpforms-input-disabled"> <label class="screen-reader-text" for="cb-select-all-2">Select All</label> <input id="cb-select-all-2" type="checkbox"> </td> <th scope="col" class="manage-column column-indicators"></th> <th scope="col" class="manage-column column-wpforms_field_0 column-primary">Name</th> <th scope="col" class="manage-column column-wpforms_field_1">Email</th> <th scope="col" class="manage-column column-date">Date</th> <th scope="col" class="manage-column column-actions">Actions </th> </tr> </tfoot> </table> templates/admin/entries/overview/header.php 0000644 00000002764 15252502524 0015125 0 ustar 00 <?php /** * Header row for the Entries List page. * * @since 1.8.9 */ ?> <ul class="subsubsub wpforms-input-disabled" aria-disabled="true"> <li class="all"><a href="#" class="current">All <span class="count">(<span class="total-num">12</span>)</span></a> |</li> <li class="unread"><a href="#">Unread <span class="count">(<span class="unread-num">9</span>)</span></a> |</li> <li class="starred"><a href="#">Starred <span class="count">(<span class="starred-num">4</span>)</span></a> |</li> <li class="spam"><a href="#">Spam <span class="count">(0)</span></a></li> </ul> <p class="search-box wpforms-form-search-box wpforms-input-disabled" aria-disabled="true"> <select name="search[field]" class="wpforms-form-search-box-field"> <optgroup label="Form fields"> <option value="any" selected="selected">Any form field</option> </optgroup> </select> <select name="search[comparison]" class="wpforms-form-search-box-comparison"> <option value="contains" selected="selected">contains</option> </select> <label class="screen-reader-text" for="wpforms-entries-search-input"> Search: </label> <input type="search" name="search[term]" class="wpforms-form-search-box-term" value="" id="wpforms-entries-search-input"> <button type="submit" class="button">Search</button> </p> <div class="tablenav top"> <?php echo wpforms_render( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped 'admin/entries/overview/bulk-actions', [ 'show_filter' => true, ], true ); ?> </div> templates/admin/entries/notice.php 0000644 00000001436 15252502524 0013303 0 ustar 00 <?php /** * Sample data upsell notice. * * @since 1.8.9 * * @var string $btn_utm UTM link for the button. * @var string $link_utm UTM link for the text link. */ ?> <div class="wpforms-admin-content"> <div class="wpforms-sample-notification"> <div class="wpforms-sample-notification-content"> <h2>You’re Viewing Sample Data</h2> <p>Like what you see? <a href="<?php echo esc_url( $link_utm ); ?>">Upgrade to Pro</a> to get access to Entries and dozens of awesome features and addons!</p> </div> <p class="notice-buttons"> <a class="wpforms-btn wpforms-btn-orange wpforms-btn-md" href="<?php echo esc_url( $btn_utm ); ?>">Upgrade Now</a> </p> <a id="wpforms-hide-sample-data" href="#"><span class="dashicons dashicons-hidden"></span> Hide Sample Data</a> </div> </div> templates/admin/entries/single/entry.php 0000644 00000046301 15252502524 0014444 0 ustar 00 <?php /** * Entry single page. * * @since 1.8.9 * * @var array $utm UTM links. */ // Exit if accessed directly. use WPForms\Admin\Education\Helpers; if ( ! defined( 'ABSPATH' ) ) { exit; } ?> <div id="wpforms-entries-single" class="wrap wpforms-admin-wrap wpforms-entries-single-sample"> <h1 class="page-title"> View Entry <a href="<?php echo esc_url( admin_url( 'admin.php?page=wpforms-entries' ) ); ?>" class="page-title-action wpforms-btn wpforms-btn-light-grey"> <svg viewBox="0 0 16 14" class="page-title-action-icon"> <path d="M16 6v2H4l4 4-1 2-7-7 7-7 1 2-4 4h12Z"/> </svg> <span class="page-title-action-text"><?php esc_html_e( 'Back to All Entries', 'wpforms-lite' ); ?></span> </a> <div class="wpforms-admin-single-navigation"> <div class="wpforms-admin-single-navigation-text"> Entry 1 of 12 </div> <div class="wpforms-admin-single-navigation-buttons wpforms-input-disabled"> <div id="wpforms-admin-single-navigation-prev-link" class="wpforms-btn-grey inactive"> <span class="dashicons dashicons-arrow-left-alt2"></span> </div> <span class="wpforms-admin-single-navigation-current"> 1 </span> <div id="wpforms-admin-single-navigation-next-link" class="wpforms-btn-grey"> <span class="dashicons dashicons-arrow-right-alt2"></span> </div> </div> <div class="wpforms-entries-settings-container"> <button id="wpforms-entries-settings-button" class="wpforms-entries-settings-button button" type="button"> <span class="dashicons dashicons-admin-generic"></span> </button> <div class="wpforms-entries-settings-menu" aria-expanded="false" style="display: none;"> <div class="wpforms-entries-settings-menu-wrap wpforms-entries-settings-menu-items wpforms-input-disabled" aria-disabled="true"> <div class="wpforms-settings-title">Field Settings</div> <span class="wpforms-toggle-control"> <input type="checkbox" id="wpforms-entry-setting-show_field_descriptions" name="show_field_descriptions" value="1"> <label class="wpforms-toggle-control-icon" for="wpforms-entry-setting-show_field_descriptions"></label> <label for="wpforms-entry-setting-show_field_descriptions" class="wpforms-toggle-control-label">Field Descriptions</label> </span> <span class="wpforms-toggle-control"> <input type="checkbox" id="wpforms-entry-setting-show_empty_fields" name="show_empty_fields" value="1" checked="checked"> <label class="wpforms-toggle-control-icon" for="wpforms-entry-setting-show_empty_fields"></label> <label for="wpforms-entry-setting-show_empty_fields" class="wpforms-toggle-control-label">Empty Fields</label> </span> <span class="wpforms-toggle-control"> <input type="checkbox" id="wpforms-entry-setting-show_unselected_choices" name="show_unselected_choices" value="1"> <label class="wpforms-toggle-control-icon" for="wpforms-entry-setting-show_unselected_choices"></label> <label for="wpforms-entry-setting-show_unselected_choices" class="wpforms-toggle-control-label">Unselected Choices</label> </span> <span class="wpforms-toggle-control"> <input type="checkbox" id="wpforms-entry-setting-show_html_fields" name="show_html_fields" value="1"> <label class="wpforms-toggle-control-icon" for="wpforms-entry-setting-show_html_fields"></label> <label for="wpforms-entry-setting-show_html_fields" class="wpforms-toggle-control-label">HTML/Content Fields</label> </span> <span class="wpforms-toggle-control"> <input type="checkbox" id="wpforms-entry-setting-show_section_dividers" name="show_section_dividers" value="1" checked="checked"> <label class="wpforms-toggle-control-icon" for="wpforms-entry-setting-show_section_dividers"></label> <label for="wpforms-entry-setting-show_section_dividers" class="wpforms-toggle-control-label">Section Dividers</label> </span> <span class="wpforms-toggle-control"> <input type="checkbox" id="wpforms-entry-setting-show_page_breaks" name="show_page_breaks" value="1" checked="checked"> <label class="wpforms-toggle-control-icon" for="wpforms-entry-setting-show_page_breaks"></label> <label for="wpforms-entry-setting-show_page_breaks" class="wpforms-toggle-control-label">Page Breaks</label> </span> <div class="wpforms-settings-title">Display Settings</div> <span class="wpforms-toggle-control"> <input type="checkbox" id="wpforms-entry-setting-maintain_layouts" name="maintain_layouts" value="1"> <label class="wpforms-toggle-control-icon" for="wpforms-entry-setting-maintain_layouts"></label> <label for="wpforms-entry-setting-maintain_layouts" class="wpforms-toggle-control-label">Maintain Layouts</label> </span> <span class="wpforms-toggle-control"> <input type="checkbox" id="wpforms-entry-setting-compact_view" name="compact_view" value="1"> <label class="wpforms-toggle-control-icon" for="wpforms-entry-setting-compact_view"></label> <label for="wpforms-entry-setting-compact_view" class="wpforms-toggle-control-label">Compact View</label> </span> </div> </div> </div> </div> </h1> <?php echo wpforms_render( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped 'admin/entries/notice', [ 'btn_utm' => $utm['entry_single_button'], 'link_utm' => $utm['entry_single_link'], ], true ); ?> <div class="wpforms-admin-content"> <div id="poststuff"> <div id="post-body" class="metabox-holder columns-2"> <!-- Left column --> <div id="post-body-content" style="position: relative;"> <!-- Entry Fields metabox --> <div id="wpforms-entry-fields" class="postbox"> <div class="postbox-header"> <h2>General Inquiry Form</h2> </div> <div class="inside"> <div class="wpforms-entries-fields-wrapper wpforms-entry-maintain-layout"> <div class="wpforms-entry-field-item field entry-field-item wpforms-field-name wpforms-field-entry-name wpforms-field-entry-fields"> <p class="wpforms-entry-field-name">Name</p> <div class="wpforms-entry-field-value">Michael Johnson</div> </div> <div class="wpforms-entry-field-item field entry-field-item wpforms-field-email wpforms-field-entry-email wpforms-field-entry-fields wpforms-entry-field-row-alt"> <p class="wpforms-entry-field-name">Email</p> <div class="wpforms-entry-field-value">michael.johnson@example.com</div> </div> <div class="wpforms-entry-field-item field entry-field-item wpforms-field-phone wpforms-field-entry-phone wpforms-field-entry-fields wpforms-entry-field-row-alt"> <p class="wpforms-entry-field-name">Phone</p> <div class="wpforms-entry-field-value">+1-206-555-6789</div> </div> <div class="wpforms-entry-field-item field entry-field-item wpforms-field-textarea wpforms-field-entry-textarea wpforms-field-entry-fields"> <p class="wpforms-entry-field-name">Comment or Message</p> <div class="wpforms-entry-field-value">I really enjoyed your insightful posts on your blog! Your writing is engaging and makes complex topics easy to understand. I'm eager to dive deeper into your passion. Keep up the fantastic work! Oh BTW, I uploaded an illustration I created that’s inspired by your writing. I hope you like it!</div> </div> <div class="wpforms-entry-field-item field entry-field-item wpforms-field-file-upload wpforms-field-entry-file-upload wpforms-field-entry-fields wpforms-entry-field-row-alt"> <p class="wpforms-entry-field-name">File Upload</p> <div class="wpforms-entry-field-value"> <span class="dashicons dashicons-media-document"></span> <span class="file-name">illustration.jpg</span> </div> </div> <div class="wpforms-entry-field-item field entry-field-item wpforms-field-signature wpforms-field-entry-signature wpforms-field-entry-fields"> <p class="wpforms-entry-field-name">Signature</p> <div class="wpforms-entry-field-value"> <img src="<?php echo esc_url( WPFORMS_PLUGIN_URL . 'assets/lite/images/sample/signature.png' ); ?>" srcset="<?php echo esc_url( WPFORMS_PLUGIN_URL . 'assets/lite/images/sample/signature@2x.png' ); ?> 2x" style="max-width:100%;margin:0" alt="" > </div> </div> </div> </div> </div> <!-- Geolocation metabox --> <div id="wpforms-entry-geolocation" class="postbox"> <div class="postbox-header"> <h2>Location<?php Helpers::print_badge( 'Pro', 'sm', 'inline', 'platinum' ); ?></h2> </div> <div class="inside"> <img class="wpforms-input-disabled" aria-disabled="true" src="<?php echo esc_url( WPFORMS_PLUGIN_URL . 'assets/lite/images/sample/map.png' ); ?>" srcset="<?php echo esc_url( WPFORMS_PLUGIN_URL . 'assets/lite/images/sample/map@2x.png' ); ?> 2x" style="width: 100%" alt="" > <ul> <li> <span class="wpforms-geolocation-meta">Location</span> <span class="wpforms-geolocation-value">Seattle, Washington</span> </li> <li> <span class="wpforms-geolocation-meta">Postal</span> <span class="wpforms-geolocation-value">98125</span> </li> <li> <span class="wpforms-geolocation-meta">Country</span> <span class="wpforms-geolocation-value"> <img class="wpforms-geolocation-flag" src="<?php echo esc_url( WPFORMS_PLUGIN_URL . 'assets/lite/images/sample/flag.png' ); ?>" srcset="<?php echo esc_url( WPFORMS_PLUGIN_URL . 'assets/lite/images/sample/flag@2x.png' ); ?> 2x" alt="" > US </span> </li> <li> <span class="wpforms-geolocation-meta">Lat/Long</span> <span class="wpforms-geolocation-value">47.6061, -122.3328</span> </li> </ul> </div> </div> <!-- User Journey metabox --> <div id="wpforms-entry-user-journey" class="postbox"> <div class="postbox-header"> <h2>User Journey<?php Helpers::print_badge( 'Pro', 'sm', 'inline', 'platinum' ); ?></h2> </div> <div class="inside"> <table width="100%" cellspacing="0" cellpadding="0"> <thead> <tr> <th colspan="3" class="date">April 22, 2024</th> </tr> </thead> <tbody> <tr class="visit"> <td class="time">12:23 pm</td> <td class="title-area"> <span class="title">Search Results</span> <i class="fa fa-circle" aria-hidden="true"></i> <span class="path">/ <em>(Homepage)</em></span> <span class="go wpforms-input-disabled" aria-disabled="true"> <i class="fa fa-external-link" aria-hidden="true"></i> </span> </td> <td class="duration"></td> </tr> <tr class="submit"> <td class="time">12:23 pm</td> <td class="title-area"> <span class="title">Homepage</span> <i class="fa fa-circle" aria-hidden="true"></i> <span class="path"><em>https://www.google.com/</em></span> <span class="go wpforms-input-disabled" aria-disabled="true"> <i class="fa fa-external-link" aria-hidden="true"></i> </span> </td> <td class="duration">56 seconds</td> </tr> <tr class="submit"> <td class="time">12:24 pm</td> <td class="title-area"> <span class="title">Frequently Asked Questions</span> <i class="fa fa-circle" aria-hidden="true"></i> <span class="path"><em>/faq/</em></span> <span class="go wpforms-input-disabled" aria-disabled="true"> <i class="fa fa-external-link" aria-hidden="true"></i> </span> </td> <td class="duration">1 min</td> </tr> <tr class="submit"> <td class="time">12:25 pm</td> <td class="title-area"> <span class="title">About Us</span> <i class="fa fa-circle" aria-hidden="true"></i> <span class="path"><em>/about-us/</em></span> <span class="go wpforms-input-disabled" aria-disabled="true"> <i class="fa fa-external-link" aria-hidden="true"></i> </span> </td> <td class="duration">3 mins</td> </tr> <tr class="submit"> <td class="time">12:28 pm</td> <td class="title-area"> <span class="title">Meet The Team</span> <i class="fa fa-circle" aria-hidden="true"></i> <span class="path"><em>/about-us/meet-the-team/</em></span> <span class="go wpforms-input-disabled" aria-disabled="true"> <i class="fa fa-external-link" aria-hidden="true"></i> </span> </td> <td class="duration">3 mins</td> </tr> <tr class="submit"> <td class="time">12:31 pm</td> <td class="title-area"> <span class="title">Testimonials</span> <i class="fa fa-circle" aria-hidden="true"></i> <span class="path"><em>/testimonials/</em></span> <span class="go wpforms-input-disabled" aria-disabled="true"> <i class="fa fa-external-link" aria-hidden="true"></i> </span> </td> <td class="duration">2 mins</td> </tr> <tr class="submit"> <td class="time">12:33 pm</td> <td class="title-area"> <span class="title">General Inquiry Form</span> <i class="fa fa-circle" aria-hidden="true"></i> <span class="path"><em>/general-inquiry-form/</em></span> <span class="go wpforms-input-disabled" aria-disabled="true"> <i class="fa fa-external-link" aria-hidden="true"></i> </span> </td> <td class="duration">4 mins</td> </tr> <tr class="submit"> <td class="time">12:37 pm</td> <td class="title-area"> <i class="fa fa-check" aria-hidden="true"></i> <span class="title">General Inquiry Form Submitted</span> <i class="fa fa-circle" aria-hidden="true"></i> <span class="path">User took 7 steps over 14 mins</span> </td> <td class="duration"></td> </tr> </tbody> </table> </div> </div> <!-- Entry Notes metabox --> <div id="wpforms-entry-notes" class="postbox"> <div class="postbox-header"> <h2>Notes</h2> </div> <div class="inside"> <div class="wpforms-entry-sample-notes-new wpforms-input-disabled" aria-disabled="true"> <span class="button add">Add Note</span> </div> <div class="wpforms-entry-notes-list"> <div class="wpforms-entry-notes-single odd"> <div class="wpforms-entry-notes-byline"> Added by <span class="note-user wpforms-input-disabled" aria-disabled="true">Barry Huggins</span> on April 29, 2024 at 4:42 pm <span class="sep">|</span> <span class="sample-note-delete wpforms-input-disabled"> Delete </span> </div> <p><span>My illustration of the ones that have been submitted so far. We should reach out to him and offer a t-shirt.</span></p> </div> <div class="wpforms-entry-notes-single even"> <div class="wpforms-entry-notes-byline"> Added by <span class="note-user wpforms-input-disabled" aria-disabled="true">Teddy Bearington</span> on April 25, 2024 at 2:17 pm <span class="sep">|</span> <span class="sample-note-delete wpforms-input-disabled"> Delete </span> </div> <p><span>This person went above and beyond.</span></p> </div> </div> </div> </div> </div> <!-- Right column --> <div id="postbox-container-1" class="postbox-container"> <!-- Entry Details metabox --> <div id="wpforms-entry-details" class="postbox"> <div class="postbox-header"> <h2>Entry Details</h2> </div> <div class="inside"> <div class="wpforms-entry-details-meta"> <p class="wpforms-entry-id"> <span class="dashicons dashicons-admin-network"></span> Entry ID: <strong>544</strong> </p> <p class="wpforms-entry-date"> <span class="dashicons dashicons-calendar"></span> Submitted: <strong class="date-time"> April 22, 2024 at 12:37 PM </strong> </p> <p class="wpforms-entry-modified"> <span class="dashicons dashicons-calendar-alt"></span> Modified: <strong class="date-time"> April 22, 2024 at 12:37 PM </strong> </p> <p class="wpforms-entry-ip"> <span class="dashicons dashicons-location"></span> User IP: <strong>192.168.1.100</strong> </p> </div> <div id="major-publishing-actions"> <div id="publishing-action" class="wpforms-input-disabled" aria-disabled="true"> <span class="button button-primary button-large">Edit</span> </div> <div id="delete-action" class="wpforms-input-disabled" aria-disabled="true"> <span class="trash-sample">Trash Entry</span> </div> <div class="clear"></div> </div> </div> </div> <!-- Entry Actions metabox --> <div id="wpforms-entry-actions" class="postbox"> <div class="postbox-header"> <h2>Actions</h2> </div> <div class="inside"> <div class="wpforms-entry-actions-meta"> <p class="wpforms-entry-print-sample"><a href="https://wpforms.com/docs/how-to-print-form-entries/?utm_campaign=liteplugin&utm_source=WordPress&utm_medium=entries&utm_content=Print%20-%20Single%20Entry" target="_blank" rel="noopener noreferrer"><i class="dashicons dashicons-media-text"></i>Print</a></p> <p class="wpforms-entry-export"><a href="https://wpforms.com/docs/how-to-export-form-entries-to-csv-in-wpforms/?utm_campaign=liteplugin&utm_source=WordPress&utm_medium=entries&utm_content=Export%20CSV%20-%20Single%20Entry" target="_blank" rel="noopener noreferrer"><i class="dashicons dashicons-migrate"></i>Export (CSV)</a></p> <p class="wpforms-entry-export_xlsx"><a href="https://wpforms.com/docs/how-to-export-form-entries-to-csv-in-wpforms/?utm_campaign=liteplugin&utm_source=WordPress&utm_medium=entries&utm_content=Export%20XLSX%20-%20Single%20Entry" target="_blank" rel="noopener noreferrer"><i class="dashicons dashicons-media-spreadsheet"></i>Export (XLSX)</a></p> <p class="wpforms-entry-notifications"><i class="dashicons dashicons-email-alt"></i><span>Resend Notifications</span></p> <p class="wpforms-entry-star wpforms-input-disabled" aria-disabled="true"><i class="dashicons dashicons-star-filled"></i><span>Star</span></p> <p class="wpforms-entry-read wpforms-input-disabled" aria-disabled="true"><i class="dashicons dashicons-hidden"></i><span>Mark as Unread</span></p> <p class="wpforms-entry-spam wpforms-input-disabled" aria-disabled="true"><i class="dashicons dashicons-shield"></i><span>Mark as Spam</span></p> <p class="wpforms-entry-delete-sample wpforms-input-disabled" aria-disabled="true"><i class="dashicons dashicons-trash"></i><span>Delete Entry</span></p> </div> </div> </div> </div> </div> </div> </div> </div> templates/admin/addons.php 0000644 00000006635 15252502524 0011627 0 ustar 00 <?php /** * Admin > Addons page template. * * @since 1.6.7 * * @var string $upgrade_link_base Upgrade link base. * @var array $addons Addons data. */ use WPForms\Admin\Education\Helpers; if ( ! defined( 'ABSPATH' ) ) { exit; } ?> <div id="wpforms-admin-addons" class="wrap wpforms-admin-wrap wpforms-addons"> <h1 class="wpforms-addons-header"> <span class="wpforms-addons-header-title"> <?php esc_html_e( 'WPForms Addons', 'wpforms-lite' ); ?> </span> <span class="wpforms-addons-header-search"> <input type="search" placeholder="<?php esc_attr_e( 'Search Addons', 'wpforms-lite' ); ?>" id="wpforms-addons-search"> </span> </h1> <div class="wpforms-admin-content"> <div id="wpforms-addons-list-section-all"> <div class="list wpforms-addons-list"> <?php foreach ( $addons as $addon ) : $addon['icon'] = ! empty( $addon['icon'] ) ? $addon['icon'] : ''; $addon['title'] = ! empty( $addon['title'] ) ? $addon['title'] : __( 'Unknown Addon', 'wpforms-lite' ); $addon['title'] = str_replace( ' Addon', '', $addon['title'] ); $addon['excerpt'] = ! empty( $addon['excerpt'] ) ? $addon['excerpt'] : ''; $upgrade_link = add_query_arg( [ 'utm_content' => $addon['title'], ], $upgrade_link_base ); $licenses = [ 'basic', 'plus', 'pro', 'elite', 'agency', 'ultimate' ]; $addon_licenses = $addon['license']; $common_licenses = array_intersect( $licenses, $addon_licenses ); $minimum_required_license = reset( $common_licenses ); $image_alt = sprintf( /* translators: %s - addon title. */ __( '%s logo', 'wpforms-lite' ), $addon['title'] ); $badge = Helpers::get_addon_badge( $addon ); $item_classes = [ 'wpforms-addons-list-item', 'addon-item', ! empty( $badge ) ? 'has-badge' : '', ]; ?> <div class="<?php echo wpforms_sanitize_classes( $item_classes, true ); ?>"> <div class="wpforms-addons-list-item-header"> <img src="<?php echo esc_url( WPFORMS_PLUGIN_URL . 'assets/images/' . $addon['icon'] ); ?>" alt="<?php echo esc_attr( $image_alt ); ?>"> <div class="wpforms-addons-list-item-header-meta"> <div class="wpforms-addons-list-item-header-meta-title"> <?php printf( '<a href="%1$s" title="%2$s" target="_blank" rel="noopener noreferrer" class="addon-link">%3$s</a>', esc_url( $upgrade_link ), esc_attr__( 'Learn more', 'wpforms-lite' ), esc_html( $addon['title'] ) ); ?> <?php echo $badge; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> </div> <div class="wpforms-addons-list-item-header-meta-excerpt"> <?php echo esc_html( $addon['excerpt'] ); ?> </div> </div> </div> <div class="wpforms-addons-list-item-footer"> <?php Helpers::print_badge( $minimum_required_license, 'lg' ); ?> <a href="<?php echo esc_url( $upgrade_link ); ?>" target="_blank" rel="noopener noreferrer" class="button button-secondary wpforms-upgrade-modal"> <?php esc_html_e( 'Upgrade Now', 'wpforms-lite' ); ?> </a> </div> </div> <?php endforeach; ?> </div> </div> <div id="wpforms-addons-no-results"><?php esc_html_e( 'Sorry, we didn\'t find any addons that match your criteria.', 'wpforms-lite' ); ?></div> </div> </div> templates/education/admin/notice-bar.php 0000644 00000001642 15252502524 0014346 0 ustar 00 <?php /** * Admin/NoticeBar Education template for Lite. * * @since 1.6.6 * * @var string $upgrade_link Upgrade to Pro page URL. */ if ( ! defined( 'ABSPATH' ) ) { exit; } ?> <div id="wpforms-notice-bar" class="wpforms-dismiss-container"> <span class="wpforms-notice-bar-message"> <?php printf( wp_kses( /* translators: %s - WPForms.com Upgrade page URL. */ __( '<strong>You\'re using WPForms Lite.</strong> To unlock more features consider <a href="%s" target="_blank" rel="noopener noreferrer">upgrading to Pro</a> for 50%% off.', 'wpforms-lite' ), [ 'a' => [ 'href' => [], 'rel' => [], 'target' => [], ], 'strong' => [], ] ), esc_url( $upgrade_link ) ); ?> </span> <button type="button" class="wpforms-dismiss-button" title="<?php esc_attr_e( 'Dismiss this message.', 'wpforms-lite' ); ?>" data-section="admin-notice-bar"></button> </div> templates/education/admin/settings/integrations-item.php 0000644 00000002515 15252502524 0017625 0 ustar 00 <?php /** * Admin/Integrations item Education template for Lite. * * @since 1.6.6 * * @var string $clear_slug Clear slug (without `wpforms-` prefix). * @var string $modal_name Name of the addon used in modal window. * @var string $license_level License level. * @var string $name Name of the addon. * @var string $icon Addon icon. * @var string $video Video URL. */ if ( ! defined( 'ABSPATH' ) ) { exit; } ?> <div id="wpforms-integration-<?php echo esc_attr( $clear_slug ); ?>" class="wpforms-settings-provider wpforms-clear focus-out education-modal" data-name="<?php echo esc_attr( $modal_name ); ?>" data-action="upgrade" data-video="<?php echo esc_url( $video ); ?>" data-license="<?php echo esc_attr( $license_level ); ?>"> <div class="wpforms-settings-provider-header wpforms-clear"> <div class="wpforms-settings-provider-logo "> <i class="fa fa-chevron-right"></i> <img src="<?php echo esc_url( WPFORMS_PLUGIN_URL . 'assets/images/' . $icon ); ?>" alt="<?php echo esc_attr( $modal_name ); ?>"> </div> <div class="wpforms-settings-provider-info"> <h3><?php echo esc_html( $name ); ?></h3> <p> <?php printf( /* translators: %s - provider name. */ esc_html__( 'Integrate %s with WPForms', 'wpforms-lite' ), esc_html( $name ) ); ?> </p> </div> </div> </div> templates/education/admin/lite-connect/challenge-popup-footer.php 0000644 00000002454 15252502524 0021270 0 ustar 00 <?php /** * Admin/LiteConnect Challenge popup footer Education template for Lite. * * @since 1.7.4 * * @var string $toggle Enable Entry backups toggle markup. * @var bool $is_enabled Is backup entry enabled? */ if ( ! defined( 'ABSPATH' ) ) { exit; } ?> <div id="wpforms-challenge-popup-lite-connect" class="wpforms-education-lite-connect-wrapper wpforms-challenge-popup-footer"> <h3> <?php esc_html_e( 'One More Thing', 'wpforms-lite' ); ?> <img src="<?php echo esc_url( WPFORMS_PLUGIN_URL . 'assets/images/lite-connect/raised-hand.png' ); ?>" alt=""> </h3> <p> <?php esc_html_e( 'WPForms now offers offsite backups for your form entries. If you decide to upgrade to WPForms Pro, you can restore entries collected while you used WPForms Lite.', 'wpforms-lite' ); ?> </p> <hr> <div class="wpforms-education-lite-connect-setting <?php echo $is_enabled ? 'wpforms-hidden' : ''; ?>"> <?php echo $toggle; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> </div> <div class="wpforms-education-lite-connect-enabled-info <?php echo ! $is_enabled ? 'wpforms-hidden' : ''; ?>"> <img src="<?php echo esc_url( WPFORMS_PLUGIN_URL . 'assets/images/lite-connect/check-circle.svg' ); ?>" alt=""> <?php esc_html_e( 'Form Entry Backups Are Enabled', 'wpforms-lite' ); ?> </div> </div> templates/education/admin/lite-connect/dashboard-widget-before.php 0000644 00000002312 15252502524 0021352 0 ustar 00 <?php /** * Admin/LiteConnect Dashboard Widget before Education template for Lite. * * @since 1.7.4 * * @var string $toggle Enable Entry backups toggle markup. * @var bool $is_enabled Is backup entry enabled? * @var string $entries_since_info Entries information string. */ if ( ! defined( 'ABSPATH' ) ) { exit; } ?> <div id="wpforms-dash-widget-lite-connect-block" class="wpforms-dash-widget-block wpforms-education-lite-connect-wrapper"> <div class="wpforms-education-lite-connect-setting <?php echo $is_enabled ? 'wpforms-hidden' : ''; ?>"> <?php echo $toggle; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> </div> <div class="wpforms-education-lite-connect-enabled-info <?php echo ! $is_enabled ? 'wpforms-hidden' : ''; ?>"> <img src="<?php echo esc_url( WPFORMS_PLUGIN_URL . 'assets/images/lite-connect/info-circle.svg' ); ?>" alt=""> <span><?php echo esc_html( $entries_since_info ); ?></span> <a href="<?php echo esc_url( wpforms_admin_upgrade_link( 'dashboard-widget', 'restore-entries' ) ); ?>" target="_blank" rel="noopener noreferrer" class="wpforms-upgrade-modal"> <?php esc_html_e( 'Restore Entries', 'wpforms-lite' ); ?> </a> </div> </div> templates/education/admin/did-you-know.php 0000644 00000007610 15252502524 0014652 0 ustar 00 <?php /** * Admin/DidYouKnow Education template for Lite. * * @since 1.7.4 * * @var string $slug DYK message slug. * @var int $cols Table columns count. * @var string $title Message title. * @var string $desc Message body. * @var string $more_title Learn More button title. * @var string $more_link Learn More button URL. * @var string $more_class Learn More button class. * @var string $icon Message icon. * @var string $cont_class Container class. * @var string $enabled_title Message title in enabled mode. * @var string $enabled_desc Message body in enabled mode. * @var string $enabled_more_title Learn More button title in enabled mode. * @var string $enabled_more_link Learn More button URL in enabled mode. * @var string $enabled_more_class Learn More button class in enabled mode. * @var string $enabled_cont_class Container class in enabled mode. */ if ( ! defined( 'ABSPATH' ) ) { exit; } $default_icon = '<svg viewBox="0 0 352 512"><path d="M176 0C73.05 0-.12 83.54 0 176.24c.06 44.28 16.5 84.67 43.56 115.54C69.21 321.03 93.85 368.68 96 384l.06 75.18c0 3.15.94 6.22 2.68 8.84l24.51 36.84c2.97 4.46 7.97 7.14 13.32 7.14h78.85c5.36 0 10.36-2.68 13.32-7.14l24.51-36.84c1.74-2.62 2.67-5.7 2.68-8.84L256 384c2.26-15.72 26.99-63.19 52.44-92.22C335.55 260.85 352 220.37 352 176 352 78.8 273.2 0 176 0zm47.94 454.31L206.85 480h-61.71l-17.09-25.69-.01-6.31h95.9v6.31zm.04-38.31h-95.97l-.07-32h96.08l-.04 32zm60.4-145.32c-13.99 15.96-36.33 48.1-50.58 81.31H118.21c-14.26-33.22-36.59-65.35-50.58-81.31C44.5 244.3 32.13 210.85 32.05 176 31.87 99.01 92.43 32 176 32c79.4 0 144 64.6 144 144 0 34.85-12.65 68.48-35.62 94.68zM176 64c-61.75 0-112 50.25-112 112 0 8.84 7.16 16 16 16s16-7.16 16-16c0-44.11 35.88-80 80-80 8.84 0 16-7.16 16-16s-7.16-16-16-16z"/></svg>'; ?> <tr class="wpforms-dyk wpforms-dismiss-container wpforms-education-lite-connect-wrapper wpforms-dyk-<?php echo esc_attr( $slug ); ?>"> <td colspan="<?php echo esc_attr( $cols ); ?>" class="<?php echo esc_attr( $cont_class ); ?>"> <div class="wpforms-dyk-fbox wpforms-dismiss-out"> <div class="wpforms-dyk-icon"><?php echo empty( $icon ) ? $default_icon : $icon; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></div> <div class="wpforms-dyk-message"><strong><?php echo esc_html( $title ); ?></strong><br> <?php echo esc_html( $desc ); ?> </div> <div class="wpforms-dyk-buttons"> <?php if ( ! empty( $more_link ) ) : ?> <a href="<?php echo esc_url( $more_link ); ?>" class="button button-primary button-learn-more <?php echo esc_attr( $more_class ); ?>"><?php echo esc_html( $more_title ); ?></a> <?php endif; ?> <button type="button" class="wpforms-dismiss-button" title="<?php esc_attr_e( 'Dismiss this message.', 'wpforms-lite' ); ?>" data-section="admin-did-you-know-overview"></button> </div> </div> </td> <td colspan="<?php echo esc_attr( $cols ); ?>" class="<?php echo esc_attr( $enabled_cont_class ); ?>"> <div class="wpforms-dyk-fbox wpforms-dismiss-out"> <div class="wpforms-dyk-icon"><?php echo empty( $icon ) ? $default_icon : $icon; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></div> <div class="wpforms-dyk-message"><strong><?php echo esc_html( $enabled_title ); ?></strong><br> <?php echo esc_html( $enabled_desc ); ?> </div> <div class="wpforms-dyk-buttons"> <?php if ( ! empty( $enabled_more_link ) ) : ?> <a href="<?php echo esc_url( $enabled_more_link ); ?>" class="button button-primary button-learn-more <?php echo esc_attr( $enabled_more_class ); ?>"><?php echo esc_html( $enabled_more_title ); ?></a> <?php endif; ?> <button type="button" class="wpforms-dismiss-button" title="<?php esc_attr_e( 'Dismiss this message.', 'wpforms-lite' ); ?>" data-section="admin-did-you-know-overview"></button> </div> </div> </td> </tr> templates/education/lite-connect-modal.php 0000644 00000006462 15252502524 0014716 0 ustar 00 <?php /** * Admin/Settings/LiteConnect Education modal template for Lite. * * @since 1.7.4 */ use WPForms\Integrations\AI\Helpers as AIHelpers; if ( ! defined( 'ABSPATH' ) ) { exit; } ?> <script type="text/html" id="tmpl-wpforms-settings-lite-connect-modal-content"> <div class="wpforms-settings-lite-connect-modal-content"> <img src="<?php echo esc_url( WPFORMS_PLUGIN_URL . 'assets/images/sullie-alt.png' ); ?>" alt="<?php esc_attr_e( 'Sullie the WPForms mascot', 'wpforms-lite' ); ?>" class="wpforms-mascot"> <h2><?php esc_html_e( 'Form Entry Backups', 'wpforms-lite' ); ?></h2> <p> <?php esc_html_e( 'Free backups save every submission automatically, so when email notifications fail, your data is safe. Restore entries anytime with a Pro upgrade. Entry backups expire after 1 year.', 'wpforms-lite' ); ?> </p> <div class="wpforms-features"> <section> <img src="<?php echo esc_url( WPFORMS_PLUGIN_URL . 'assets/images/lite-connect/cloud.svg' ); ?>" alt="<?php esc_attr_e( 'Backup and Restore.', 'wpforms-lite' ); ?>"> <aside> <h4><?php esc_html_e( 'Backup & Restore', 'wpforms-lite' ); ?></h4> <p> <?php esc_html_e( 'When you upgrade to WPForms Pro, we\'ll automatically restore the entries that you collected in WPForms Lite.', 'wpforms-lite' ); ?> </p> </aside> </section> <section> <img src="<?php echo esc_url( WPFORMS_PLUGIN_URL . 'assets/images/lite-connect/lock-alt.svg' ); ?>" alt="<?php esc_attr_e( 'Security and Protection.', 'wpforms-lite' ); ?>"> <aside> <h4><?php esc_html_e( 'Security & Protection', 'wpforms-lite' ); ?></h4> <p> <?php esc_html_e( 'Entries are stored securely and privately until you\'re ready to upgrade. Our team cannot view your forms or entries.', 'wpforms-lite' ); ?> </p> </aside> </section> <?php if ( ! AIHelpers::is_disabled() ) : ?> <section> <img src="<?php echo esc_url( WPFORMS_PLUGIN_URL . 'assets/images/lite-connect/lock-ai.svg' ); ?>" alt="<?php esc_attr_e( 'WPForms AI.', 'wpforms-lite' ); ?>"> <aside> <h4><?php esc_html_e( 'WPForms AI', 'wpforms-lite' ); ?></h4> <p> <?php esc_html_e( 'Build your forms even faster with state-of-the-art generative AI built right into the form builder.', 'wpforms-lite' ); ?> </p> </aside> </section> <?php endif; ?> <section> <img src="<?php echo esc_url( WPFORMS_PLUGIN_URL . 'assets/images/lite-connect/envelope.svg' ); ?>" alt="<?php esc_attr_e( 'WPForms Newsletter.', 'wpforms-lite' ); ?>"> <aside> <h4><?php esc_html_e( 'WPForms Newsletter', 'wpforms-lite' ); ?></h4> <p> <?php esc_html_e( 'Ready to grow your website? Get the latest pro tips and updates from the WPForms team.', 'wpforms-lite' ); ?> </p> </aside> </section> </div> <footer> <?php printf( wp_kses( /* translators: %s - WPForms Terms of Service link. */ __( 'By enabling Lite Connect you agree to our <a href="%s" target="_blank" rel="noopener noreferrer">Terms of Service</a> and to share your information with WPForms.', 'wpforms-lite' ), [ 'a' => [ 'href' => [], 'target' => [], 'rel' => [], ], ] ), esc_url( wpforms_utm_link( 'https://wpforms.com/terms/', 'Lite Connect Modal', 'Terms of Service' ) ) ); ?> </footer> </div> </script> templates/education/builder/providers-item.php 0000644 00000002626 15252502524 0015635 0 ustar 00 <?php /** * Builder/Providers and Payments Education template for Lite. * * @since 1.6.6 * * @var string $clear_slug Clear slug (without `wpforms-` prefix). * @var string $modal_name Name of the addon used in modal window. * @var string $license_level License level. * @var string $name Name of the addon. * @var string $icon Addon icon. * @var string $video Video URL. * @var string $utm_content UTM content. * @var bool $recommended Flag for recommended providers. */ if ( ! defined( 'ABSPATH' ) ) { exit; } ?> <a href="#" class="wpforms-panel-sidebar-section icon wpforms-panel-sidebar-section-<?php echo esc_attr( $clear_slug ); ?> education-modal" data-name="<?php echo esc_attr( $modal_name ); ?>" data-slug="<?php echo esc_attr( $clear_slug ); ?>" data-video="<?php echo esc_url( $video ); ?>" data-license="<?php echo esc_attr( $license_level ); ?>" data-utm-content="<?php echo esc_attr( $utm_content ); ?>"> <img src="<?php echo esc_url( WPFORMS_PLUGIN_URL . 'assets/images/' . $icon ); ?>" alt="<?php echo esc_attr( $modal_name ); ?>"> <?php echo esc_html( $name ); ?> <?php if ( ! empty( $recommended ) ) : ?> <span class="wpforms-panel-sidebar-recommended"> <i class="fa fa-star" aria-hidden="true"></i> <?php esc_html_e( 'Recommended', 'wpforms-lite' ); ?> </span> <?php endif; ?> <i class="fa fa-angle-right wpforms-toggle-arrow"></i> </a> templates/education/builder/settings-item.php 0000644 00000001666 15252502524 0015463 0 ustar 00 <?php /** * Builder/Settings Education template for Lite. * * @since 1.6.6 * * @var string $clear_slug Clear slug (without `wpforms-` prefix). * @var string $modal_name Name of the addon used in modal window. * @var string $license_level License level. * @var string $name Name of the addon. * @var string $video Video URL. * @var string $utm_content UTM content. */ if ( ! defined( 'ABSPATH' ) ) { exit; } ?> <a href="#" class="wpforms-panel-sidebar-section wpforms-panel-sidebar-section-<?php echo esc_attr( $clear_slug ); ?> education-modal" data-name="<?php echo esc_attr( $modal_name ); ?>" data-slug="<?php echo esc_attr( $clear_slug ); ?>" data-video="<?php echo esc_url( $video ); ?>" data-license="<?php echo esc_attr( $license_level ); ?>" data-utm-content="<?php echo esc_attr( $utm_content ); ?>"> <?php echo esc_html( $name ); ?> <i class="fa fa-angle-right wpforms-toggle-arrow"></i> </a> templates/education/builder/lite-connect/ai-modal.php 0000644 00000006232 15252502524 0016730 0 ustar 00 <?php /** * Admin/Builder/LiteConnect Education modal template for Lite. * * @since 1.9.1 */ if ( ! defined( 'ABSPATH' ) ) { exit; } ?> <script type="text/html" id="tmpl-wpforms-builder-ai-lite-connect-modal-content"> <div class="wpforms-settings-lite-connect-modal-content"> <img src="<?php echo esc_url( WPFORMS_PLUGIN_URL . 'assets/images/sullie-alt.png' ); ?>" alt="<?php esc_attr_e( 'Sullie the WPForms mascot', 'wpforms-lite' ); ?>" class="wpforms-mascot"> <h2><?php esc_html_e( 'Enable AI Features in WPForms', 'wpforms-lite' ); ?></h2> <p> <?php esc_html_e( 'Before you can proceed, we need your permission to record what you input in order to generate content with AI. You’ll also get...', 'wpforms-lite' ); ?> </p> <div class="wpforms-features"> <section> <img src="<?php echo esc_url( WPFORMS_PLUGIN_URL . 'assets/images/lite-connect/lock-ai.svg' ); ?>" alt="<?php esc_attr_e( 'WPForms AI.', 'wpforms-lite' ); ?>"> <aside> <h4><?php esc_html_e( 'WPForms AI', 'wpforms-lite' ); ?></h4> <p> <?php esc_html_e( 'Build your forms even faster with state-of-the-art generative AI built right into the form builder.', 'wpforms-lite' ); ?> </p> </aside> </section> <section> <img src="<?php echo esc_url( WPFORMS_PLUGIN_URL . 'assets/images/lite-connect/cloud.svg' ); ?>" alt="<?php esc_attr_e( 'Backup and Restore.', 'wpforms-lite' ); ?>"> <aside> <h4><?php esc_html_e( 'Form Entry Backup & Restore', 'wpforms-lite' ); ?></h4> <p> <?php esc_html_e( 'When you upgrade to WPForms Pro, we\'ll automatically restore all of the entries that you collected in WPForms Lite.', 'wpforms-lite' ); ?> </p> </aside> </section> <section> <img src="<?php echo esc_url( WPFORMS_PLUGIN_URL . 'assets/images/lite-connect/lock-alt.svg' ); ?>" alt="<?php esc_attr_e( 'Security & Protection.', 'wpforms-lite' ); ?>"> <aside> <h4><?php esc_html_e( 'Security & Protection', 'wpforms-lite' ); ?></h4> <p> <?php esc_html_e( 'Entries are stored securely and privately until you\'re ready to upgrade. Our team cannot view your forms or entries.', 'wpforms-lite' ); ?> </p> </aside> </section> <section> <img src="<?php echo esc_url( WPFORMS_PLUGIN_URL . 'assets/images/lite-connect/envelope.svg' ); ?>" alt="<?php esc_attr_e( 'WPForms Newsletter.', 'wpforms-lite' ); ?>"> <aside> <h4><?php esc_html_e( 'WPForms Newsletter', 'wpforms-lite' ); ?></h4> <p> <?php esc_html_e( 'Ready to grow your website? Get the latest pro tips and updates from the WPForms team.', 'wpforms-lite' ); ?> </p> </aside> </section> </div> <footer> <?php printf( wp_kses( /* translators: %s - WPForms Terms of Service link. */ __( 'By enabling Lite Connect you agree to our <a href="%s" target="_blank" rel="noopener noreferrer">Terms of Service</a> and to share your information with WPForms.', 'wpforms-lite' ), [ 'a' => [ 'href' => [], 'target' => [], 'rel' => [], ], ] ), esc_url( wpforms_utm_link( 'https://wpforms.com/terms/', 'Lite Connect Modal', 'Terms of Service' ) ) ); ?> </footer> </div> </script> templates/education/builder/lite-connect/top-bar.php 0000644 00000002320 15252502524 0016603 0 ustar 00 <?php /** * Builder/LiteConnect Top Bar Education template for Lite. * * @since 1.7.4 * * @var string $toggle Enable Entry backups toggle markup. * @var bool $is_enabled Is backup entry enabled? */ if ( ! defined( 'ABSPATH' ) ) { exit; } ?> <div id="wpforms-builder-lite-connect-top-bar" class="wpforms-education-lite-connect-wrapper wpforms-dismiss-container"> <div class="wpforms-hidden-element"></div> <div class="wpforms-education-lite-connect-setting <?php echo $is_enabled ? 'wpforms-hidden' : ''; ?>"> <?php echo $toggle; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> </div> <div class="wpforms-education-lite-connect-enabled-info <?php echo ! $is_enabled ? 'wpforms-hidden' : ''; ?>"> <img src="<?php echo esc_url( WPFORMS_PLUGIN_URL . 'assets/images/lite-connect/check-circle.svg' ); ?>" alt=""> <?php esc_html_e( 'Form Entry Backups Are Enabled', 'wpforms-lite' ); ?> </div> <p><?php esc_html_e( 'Easily restore your entries when you upgrade to WPForms Pro.', 'wpforms-lite' ); ?></p> <button type="button" class="wpforms-dismiss-button" title="<?php esc_attr_e( 'Dismiss this message.', 'wpforms-lite' ); ?>" data-section="builder-lite-connect-top-bar"></button> </div> templates/education/builder/did-you-know.php 0000644 00000002325 15252502524 0015206 0 ustar 00 <?php /** * Builder/DidYouKnow Education template for Lite. * * @since 1.6.6 * * @var string $desc Message body. * @var string $more Learn More button URL. * @var string $link Upgrade to Pro page URL. * @var string $section The slug of the dismissible section. */ if ( ! defined( 'ABSPATH' ) ) { exit; } ?> <section class="wpforms-dyk wpforms-dismiss-container"> <div class="wpforms-dyk-fbox wpforms-dismiss-out"> <div class="wpforms-dyk-message"> <b><?php esc_html_e( 'Did You Know?', 'wpforms-lite' ); ?></b><br> <?php echo esc_html( $desc ); ?> </div> <div class="wpforms-dyk-buttons"> <?php if ( ! empty( $more ) ) { echo '<a href="' . esc_url( $more ) . '" class="learn-more">' . esc_html__( 'Learn More', 'wpforms-lite' ) . '</a>'; } ?> <a href="<?php echo esc_url( $link ); ?>" target="_blank" rel="noopener noreferrer" class="wpforms-btn wpforms-btn-md wpforms-btn-light-grey"><?php esc_html_e( 'Upgrade to Pro', 'wpforms-lite' ); ?></a> <button type="button" class="wpforms-dismiss-button" title="<?php esc_attr_e( 'Dismiss this message.', 'wpforms-lite' ); ?>" data-section="builder-did-you-know-<?php echo esc_attr( $section ); ?>"></button> </div> </div> </section> templates/builder/context-menu.php 0000644 00000012643 15252502524 0013337 0 ustar 00 <?php /** * WPForms Builder Context Menu (top) Template, Lite version. * * @since 1.8.8 * * @var int $form_id The form ID. * @var bool $is_form_template Whether it's a form template (`wpforms-template`), or form (`wpforms`). * @var bool $has_payments Whether the form has payments. */ use WPForms\Admin\Education\Helpers; if ( ! defined( 'ABSPATH' ) ) { exit; } // phpcs:disable WordPress.Arrays.ArrayDeclarationSpacing.AssociativeArrayFound ?> <div class="wpforms-context-menu wpforms-context-menu-dropdown" id="wpforms-context-menu"> <ul class="wpforms-context-menu-list"> <?php if ( $is_form_template ) : ?> <li class="wpforms-context-menu-list-item" data-action="duplicate-template" data-action-url="<?php echo esc_url( wp_nonce_url( add_query_arg( [ 'action' => 'duplicate', 'form_id' => $form_id ] ), 'wpforms_duplicate_form_nonce' ) ); ?>" > <span class="wpforms-context-menu-list-item-icon"> <i class="fa fa-copy"></i> </span> <span class="wpforms-context-menu-list-item-text"> <?php esc_html_e( 'Duplicate Template', 'wpforms-lite' ); ?> </span> </li> <?php else : ?> <li class="wpforms-context-menu-list-item" data-action="duplicate-form" data-action-url="<?php echo esc_url( wp_nonce_url( add_query_arg( [ 'action' => 'duplicate', 'form_id' => $form_id ] ), 'wpforms_duplicate_form_nonce' ) ); ?>" > <span class="wpforms-context-menu-list-item-icon"> <i class='fa fa-copy'></i> </span> <span class="wpforms-context-menu-list-item-text"> <?php esc_html_e( 'Duplicate Form', 'wpforms-lite' ); ?> </span> </li> <li class="wpforms-context-menu-list-item" data-action="save-as-template" data-action-url="<?php echo esc_url( wp_nonce_url( add_query_arg( [ 'action' => 'save_as_template', 'form_id' => $form_id ] ), 'wpforms_save_as_template_form_nonce' ) ); ?>" > <span class="wpforms-context-menu-list-item-icon"> <i class="fa fa-file-text-o"></i> </span> <span class="wpforms-context-menu-list-item-text"> <?php esc_html_e( 'Save as Template', 'wpforms-lite' ); ?> </span> </li> <?php endif; ?> <li class='wpforms-context-menu-list-divider'></li> <li class="wpforms-context-menu-list-item education-modal" data-action="upgrade" data-license="pro" data-name="Analytics" data-utm-content="Upgrade to Pro - Analytics Context Menu Item" > <span class="wpforms-context-menu-list-item-icon"> <i class="fa fa-bar-chart"></i> </span> <span class="wpforms-context-menu-list-item-text"> <?php esc_html_e( 'View Analytics', 'wpforms-lite' ); ?> </span> <?php Helpers::print_badge( 'Pro', 'sm', 'inline', 'stone' ); ?> </li> <li class="wpforms-context-menu-list-item education-modal" data-action="upgrade" data-license="pro" data-name="Entries" data-utm-content="Upgrade to Pro - Entries Context Menu Item" > <span class="wpforms-context-menu-list-item-icon"> <i class="fa fa-envelope-o"></i> </span> <span class="wpforms-context-menu-list-item-text"> <?php esc_html_e( 'View Entries', 'wpforms-lite' ); ?> </span> <?php Helpers::print_badge( 'Pro', 'sm', 'inline', 'stone' ); ?> </li> <li class="<?php echo esc_attr( $has_payments ? 'wpforms-context-menu-list-item' : 'wpforms-context-menu-list-item wpforms-context-menu-list-item-inactive' ); ?>" data-action="view-payments" data-action-url="<?php echo $has_payments ? esc_url( admin_url( 'admin.php?page=wpforms-payments&form_id=' . $form_id ) ) : ''; ?>" > <span class="wpforms-context-menu-list-item-icon"> <i class="fa fa-money"></i> </span> <span class="wpforms-context-menu-list-item-text"> <?php esc_html_e( 'View Payments', 'wpforms-lite' ); ?> </span> </li> <li class="wpforms-context-menu-list-divider"></li> <li class="wpforms-context-menu-list-item" data-action="whats-new" > <span class="wpforms-context-menu-list-item-icon"> <svg xmlns="http://www.w3.org/2000/svg" width="17" height="20" viewBox="0 0 17 20" fill="none"><path d="M13.6014 1.63137L14.7985 6.09878C15.4146 6.22486 16.0232 6.80589 16.2497 7.65107C16.4762 8.49626 16.2477 9.33393 15.7771 9.75119L16.9661 14.1884C17.0712 14.5808 16.9268 15.0077 16.605 15.2557C16.2833 15.5037 15.8364 15.5264 15.4919 15.3275L13.8079 14.3552C11.9708 13.2946 9.79038 13.0053 7.73779 13.5553L7.4963 13.62L8.53158 17.4837C8.67717 18.027 8.33762 18.571 7.82447 18.7085L5.89262 19.2261C5.34929 19.3717 4.81346 19.0623 4.66788 18.519L3.6326 14.6553C2.54594 14.9465 1.47428 14.3277 1.18311 13.2411L0.406655 10.3433C0.123572 9.28681 0.734202 8.18497 1.82087 7.8938L5.92605 6.79382C7.97865 6.24383 9.7223 4.9031 10.783 3.06598L11.7633 1.41214C11.9622 1.06769 12.3605 0.863896 12.7632 0.917765C13.1659 0.971634 13.5044 1.26915 13.6014 1.63137ZM12.2924 4.47327C10.9482 6.58047 8.85851 8.07862 6.44369 8.72567L6.20221 8.79037L6.97867 11.6882L7.22015 11.6234C9.63496 10.9764 12.2019 11.2592 14.4195 12.412L12.2924 4.47327Z" fill="#646970"/></svg> </span> <span class="wpforms-context-menu-list-item-text"> <?php esc_html_e( 'What\'s New', 'wpforms-lite' ); ?> </span> </li> <li class="wpforms-context-menu-list-item" data-action="keyboard-shortcuts" > <span class="wpforms-context-menu-list-item-icon"> <i class="fa fa-keyboard-o"></i> </span> <span class="wpforms-context-menu-list-item-text"> <?php esc_html_e( 'Keyboard Shortcuts', 'wpforms-lite' ); ?> </span> </li> </ul> </div> wpforms-lite.php 0000644 00000111120 15252502524 0007703 0 ustar 00 <?php /** * WPForms_Lite class file. */ // phpcs:disable Generic.Commenting.DocComment.MissingShort /** @noinspection PhpIllegalPsrClassPathInspection */ /** @noinspection AutoloadingIssuesInspection */ // phpcs:enable Generic.Commenting.DocComment.MissingShort if ( ! defined( 'ABSPATH' ) ) { exit; } use WPForms\Admin\Builder\TemplatesCache; use WPForms\Db\Analytics\Forms; use WPForms\Db\Analytics\Snapshots; use WPForms\Db\Payments\Meta as PaymentsMeta; use WPForms\Db\Payments\Payment; use WPForms\Lite\Integrations\LiteConnect\Integration as LiteConnectIntegration; use WPForms\Lite\Integrations\LiteConnect\LiteConnect; use WPForms\Logger\Repository; use WPForms\Tasks\Meta as TasksMeta; /** * WPForms Lite. Load Lite-specific features/functionality. * * @since 1.2.0 */ class WPForms_Lite { /** * Custom tables and their handlers. * * @since 1.9.0 */ public const CUSTOM_TABLES = [ 'wpforms_payments' => Payment::class, 'wpforms_payment_meta' => PaymentsMeta::class, 'wpforms_tasks_meta' => TasksMeta::class, 'wpforms_logs' => Repository::class, 'wpforms_analytics_snapshots' => Snapshots::class, 'wpforms_analytics_forms' => Forms::class, ]; /** * Primary class constructor. * * @since 1.2.2 */ public function __construct() { $this->hooks(); } /** * Register hooks. * * @since 1.8.9 */ private function hooks() { add_action( 'wpforms_install', [ $this, 'install' ] ); add_action( 'wpforms_form_settings_notifications', [ $this, 'form_settings_notifications' ], 8 ); add_action( 'wpforms_form_settings_confirmations', [ $this, 'form_settings_confirmations' ] ); add_action( 'wpforms_builder_enqueues_before', [ $this, 'builder_enqueues' ] ); add_action( 'wpforms_admin_page', [ $this, 'entries_page' ] ); add_action( 'wpforms_admin_settings_after', [ $this, 'settings_cta' ] ); add_action( 'wp_ajax_wpforms_lite_settings_upgrade', [ $this, 'settings_cta_dismiss' ] ); add_action( 'admin_enqueue_scripts', [ $this, 'admin_enqueues' ] ); add_filter( 'wpforms_helpers_templates_get_theme_template_paths', [ $this, 'add_templates' ] ); // Entries count logging for WPForms Lite. add_action( 'wpforms_process_entry_saved', [ $this, 'entry_submit' ], 10, 5 ); add_action( 'wpforms_process_entry_saved', [ $this, 'update_entry_count' ], 10, 5 ); // Upgrade to Pro WPForms menu bar item. add_action( 'admin_bar_menu', [ $this, 'upgrade_to_pro_menu' ], 1000 ); } /** * Form notification settings, supports multiple notifications. * * @since 1.2.3 * * @param object $settings Settings. * * @noinspection HtmlUnknownTarget */ public function form_settings_notifications( $settings ) { $cc = wpforms_setting( 'email-carbon-copy' ); $from_email = '{admin_email}'; $from_name = sanitize_text_field( get_option( 'blogname' ) ); // phpcs:disable WPForms.PHP.ValidateHooks.InvalidHookName /** * Allow filtering of text after the `From Name` field. * * @since 1.2.3 * @since 1.7.6 Added $form_data and $id arguments. * * @param string $value Value to be filtered. * @param array $form_data Form data. * @param int $id Notification ID. */ $from_name_after = apply_filters( 'wpforms_builder_notifications_from_name_after', '', $settings->form_data, 1 ); /** * Allow filtering of a text after the `From Email` field. * * @since 1.2.3 * @since 1.7.6 Added $form_data and $id arguments. * * @param array $value Value to be filtered. * @param array $form_data Form data. * @param int $id Notification ID. */ $from_email_after = apply_filters( 'wpforms_builder_notifications_from_email_after', '', $settings->form_data, 1 ); // phpcs:enable WPForms.PHP.ValidateHooks.InvalidHookName // Handle backwards compatibility. if ( empty( $settings->form_data['settings']['notifications'] ) ) { $settings->form_data['settings']['notifications'][1]['subject'] = ! empty( $settings->form_data['settings']['notification_subject'] ) ? $settings->form_data['settings']['notification_subject'] : sprintf( /* translators: %s - form name. */ esc_html__( 'New %s Entry', 'wpforms-lite' ), $settings->form->post_title ); $settings->form_data['settings']['notifications'][1]['email'] = ! empty( $settings->form_data['settings']['notification_email'] ) ? $settings->form_data['settings']['notification_email'] : '{admin_email}'; $settings->form_data['settings']['notifications'][1]['sender_name'] = ! empty( $settings->form_data['settings']['notification_fromname'] ) ? $settings->form_data['settings']['notification_fromname'] : $from_name; $settings->form_data['settings']['notifications'][1]['sender_address'] = ! empty( $settings->form_data['settings']['notification_fromaddress'] ) ? $settings->form_data['settings']['notification_fromaddress'] : $from_email; $settings->form_data['settings']['notifications'][1]['replyto'] = ! empty( $settings->form_data['settings']['notification_replyto'] ) ? $settings->form_data['settings']['notification_replyto'] : ''; } $id = 1; echo '<div class="wpforms-panel-content-section-title">'; echo '<span id="wpforms-builder-settings-notifications-title">'; esc_html_e( 'Notifications', 'wpforms-lite' ); echo '</span>'; echo '<button class="wpforms-builder-settings-block-add education-modal" data-utm-content="Multiple notifications" data-name="' . esc_attr__( 'Multiple notifications', 'wpforms-lite' ) . '">'; esc_html_e( 'Add New Notification', 'wpforms-lite' ); echo '</button>'; echo '</div>'; $dismissed = get_user_meta( get_current_user_id(), 'wpforms_dismissed', true ); if ( empty( $dismissed['edu-builder-notifications-description'] ) ) { echo '<div class="wpforms-panel-content-section-description wpforms-dismiss-container wpforms-dismiss-out">'; echo '<button type="button" class="wpforms-dismiss-button" title="' . esc_attr__( 'Dismiss this message.', 'wpforms-lite' ) . '" data-section="builder-notifications-description"></button>'; echo '<p>'; printf( wp_kses( /* translators: %s - link to the WPForms.com doc article. */ __( 'Notifications are emails sent when a form is submitted. By default, these emails include entry details. For setup and customization options, including a video overview, please <a href="%s" target="_blank" rel="noopener noreferrer">see our tutorial</a>.', 'wpforms-lite' ), [ 'a' => [ 'href' => [], 'rel' => [], 'target' => [], ], ] ), esc_url( wpforms_utm_link( 'https://wpforms.com/docs/setup-form-notification-wpforms/', 'Builder Notifications', 'Form Notifications Documentation' ) ) ); echo '</p>'; echo '<p>'; printf( wp_kses( /* translators: 1$s, %2$s - links to the WPForms.com doc articles. */ __( 'After saving these settings, be sure to <a href="%1$s" target="_blank" rel="noopener noreferrer">test a form submission</a>. This lets you see how emails will look, and to ensure that they <a href="%2$s" target="_blank" rel="noopener noreferrer">are delivered successfully</a>.', 'wpforms-lite' ), [ 'a' => [ 'href' => [], 'rel' => [], 'target' => [], ], 'br' => [], ] ), esc_url( wpforms_utm_link( 'https://wpforms.com/docs/how-to-properly-test-your-wordpress-forms-before-launching-checklist/', 'Builder Notifications', 'Testing A Form Documentation' ) ), esc_url( wpforms_utm_link( 'https://wpforms.com/docs/troubleshooting-email-notifications/', 'Builder Notifications', 'Troubleshoot Notifications Documentation' ) ) ); echo '</p>'; echo '</div>'; } wpforms_panel_field( 'toggle', 'settings', 'notification_enable', $settings->form_data, esc_html__( 'Enable Notifications', 'wpforms-lite' ) ); ?> <div class="wpforms-notification wpforms-builder-settings-block"> <div class="wpforms-builder-settings-block-header"> <span><?php esc_html_e( 'Default Notification', 'wpforms-lite' ); ?></span> </div> <div class="wpforms-builder-settings-block-content"> <?php wpforms_panel_field( 'text', 'notifications', 'email', $settings->form_data, esc_html__( 'Send To Email Address', 'wpforms-lite' ), [ 'default' => '{admin_email}', 'tooltip' => esc_html__( 'Enter the email address to receive form entry notifications. For multiple notifications, separate email addresses with a comma.', 'wpforms-lite' ), 'smarttags' => [ 'type' => 'all', 'fields' => 'email', 'allowed' => 'admin_email,user_email', ], 'parent' => 'settings', 'subsection' => $id, 'class' => 'email-recipient', 'input_class' => 'wpforms-smart-tags-enabled', ] ); if ( $cc ) : wpforms_panel_field( 'text', 'notifications', 'carboncopy', $settings->form_data, esc_html__( 'CC', 'wpforms-lite' ), [ 'smarttags' => [ 'type' => 'all', 'fields' => 'email', 'allowed' => 'admin_email,user_email', ], 'parent' => 'settings', 'subsection' => $id, 'input_class' => 'wpforms-smart-tags-enabled', ] ); endif; wpforms_panel_field( 'text', 'notifications', 'subject', $settings->form_data, esc_html__( 'Email Subject Line', 'wpforms-lite' ), [ 'default' => sprintf( /* translators: %s - form name. */ esc_html__( 'New Entry: %s', 'wpforms-lite' ), $settings->form->post_title ), 'smarttags' => [ 'type' => 'all', ], 'parent' => 'settings', 'subsection' => $id, 'input_class' => 'wpforms-smart-tags-enabled', ] ); wpforms_panel_field( 'text', 'notifications', 'sender_name', $settings->form_data, esc_html__( 'From Name', 'wpforms-lite' ), // phpcs:disable WPForms.PHP.ValidateHooks.InvalidHookName /** * Allow modifying the "From Name" field settings in the builder on Settings > Notifications panel. * * @since 1.7.6 * * @param array $args Field settings. * @param array $form_data Form data. * @param int $id Notification ID. */ apply_filters( 'wpforms_builder_notifications_sender_name_settings', [ 'default' => $from_name, 'smarttags' => [ 'type' => 'fields', 'fields' => 'name,text', ], 'parent' => 'settings', 'subsection' => $id, 'input_class' => 'wpforms-smart-tags-enabled', ], $settings->form_data, $id ) // phpcs:enable WPForms.PHP.ValidateHooks.InvalidHookName ); wpforms_panel_field( 'text', 'notifications', 'sender_address', $settings->form_data, esc_html__( 'From Email', 'wpforms-lite' ), // phpcs:disable WPForms.PHP.ValidateHooks.InvalidHookName /** * Allow modifying the "From Email" field settings in the builder on the Settings > Notifications panel. * * @since 1.7.6 * * @param array $args Field settings. * @param array $form_data Form data. * @param int $id Notification ID. */ apply_filters( 'wpforms_builder_notifications_sender_address_settings', [ 'default' => $from_email, 'smarttags' => [ 'type' => 'all', 'fields' => 'email', 'allowed' => 'admin_email,user_email', ], 'parent' => 'settings', 'subsection' => $id, 'input_class' => 'wpforms-smart-tags-enabled', ], $settings->form_data, $id ) // phpcs:enable WPForms.PHP.ValidateHooks.InvalidHookName ); wpforms_panel_field( 'text', 'notifications', 'replyto', $settings->form_data, esc_html__( 'Reply-To', 'wpforms-lite' ), [ 'tooltip' => esc_html( sprintf( /* translators: %s - <email@example.com>. */ __( 'Enter the email address or email address with recipient\'s name in "First Last %s" format.', 'wpforms-lite' ), // ​ is a zero-width space character. Without it, Tooltipster thinks it's an HTML tag // and closes it at the end of the string, hiding everything after this value. '<​email@example.com​>' ) ), 'smarttags' => [ 'type' => 'all', 'fields' => 'email,name', 'allowed' => 'admin_email,user_email', ], 'parent' => 'settings', 'subsection' => $id, 'input_class' => 'wpforms-smart-tags-enabled', ] ); wpforms_panel_field( 'textarea', 'notifications', 'message', $settings->form_data, esc_html__( 'Email Message', 'wpforms-lite' ), [ 'rows' => 6, 'default' => '{all_fields}', 'smarttags' => [ 'type' => 'all', ], 'parent' => 'settings', 'subsection' => $id, 'class' => 'email-msg', 'input_class' => 'wpforms-smart-tags-enabled', 'after' => '<p class="note">' . sprintf( /* translators: %s - {all_fields} Smart Tag. */ esc_html__( 'To display all form fields, use the %s Smart Tag.', 'wpforms-lite' ), '<code>{all_fields}</code>' ) . '</p>', ] ); /** * Fires after notification block content on the lite version. * * @since 1.7.7 * * @param array $settings Current confirmation data. * @param int $id Notification id. */ do_action( 'wpforms_lite_form_settings_notifications_block_content_after', $settings, $id ); ?> </div> </div> <?php /** * Fires after settings notification block. * * @since 1.5.8 * * @param string $type Settings block type. * @param array $settings Settings. */ do_action( 'wpforms_builder_settings_notifications_after', 'notifications', $settings ); // phpcs:ignore WPForms.PHP.ValidateHooks.InvalidHookName // phpcs:disable WPForms.PHP.ValidateHooks.InvalidHookName /** * Fires after notification block. * * @since 1.7.6 * * @param array $settings Current confirmation data. * @param int $id Notification id. */ do_action( 'wpforms_form_settings_notifications_single_after', $settings, 1 ); // phpcs:enable WPForms.PHP.ValidateHooks.InvalidHookName } /** * Lite admin scripts and styles. * * @since 1.5.7 */ public function admin_enqueues() { if ( ! wpforms_is_admin_page() ) { return; } $min = wpforms_get_min_suffix(); // Admin styles. wp_enqueue_style( 'wpforms-lite-admin', WPFORMS_PLUGIN_URL . "assets/lite/css/admin{$min}.css", [], WPFORMS_VERSION ); // Entries assets. wp_register_style( 'wpforms-admin-entry-list', WPFORMS_PLUGIN_URL . "assets/lite/css/admin/entries/entry-list{$min}.css", [], WPFORMS_VERSION ); wp_register_script( 'wpforms-admin-entry-list', WPFORMS_PLUGIN_URL . "assets/lite/js/admin/entries/entry-list{$min}.js", [ 'jquery' ], WPFORMS_VERSION, true ); wp_register_style( 'wpforms-admin-view-entry', WPFORMS_PLUGIN_URL . "assets/lite/css/admin/entries/view-entry{$min}.css", [], WPFORMS_VERSION ); wp_register_script( 'wpforms-admin-view-entry', WPFORMS_PLUGIN_URL . "assets/lite/js/admin/entries/view-entry{$min}.js", [ 'jquery' ], WPFORMS_VERSION, true ); } /** * Form confirmation settings, supports multiple confirmations. * * @since 1.4.8 * * @param WPForms_Builder_Panel_Settings $settings Builder panel settings. */ public function form_settings_confirmations( $settings ) { wp_enqueue_editor(); // Handle backwards compatibility. if ( empty( $settings->form_data['settings']['confirmations'] ) ) { $settings->form_data['settings']['confirmations'][1]['type'] = ! empty( $settings->form_data['settings']['confirmation_type'] ) ? $settings->form_data['settings']['confirmation_type'] : 'message'; $settings->form_data['settings']['confirmations'][1]['message'] = ! empty( $settings->form_data['settings']['confirmation_message'] ) ? $settings->form_data['settings']['confirmation_message'] : esc_html__( 'Thanks for contacting us! We will be in touch with you shortly.', 'wpforms-lite' ); $settings->form_data['settings']['confirmations'][1]['message_scroll'] = ! empty( $settings->form_data['settings']['confirmation_message_scroll'] ) ? $settings->form_data['settings']['confirmation_message_scroll'] : 1; $settings->form_data['settings']['confirmations'][1]['page'] = ! empty( $settings->form_data['settings']['confirmation_page'] ) ? $settings->form_data['settings']['confirmation_page'] : ''; $settings->form_data['settings']['confirmations'][1]['redirect'] = ! empty( $settings->form_data['settings']['confirmation_redirect'] ) ? $settings->form_data['settings']['confirmation_redirect'] : ''; } $field_id = 1; echo '<div class="wpforms-panel-content-section-title">'; esc_html_e( 'Confirmations', 'wpforms-lite' ); echo '<button class="wpforms-builder-settings-block-add education-modal" data-utm-content="Multiple confirmations" data-name="' . esc_attr__( 'Multiple confirmations', 'wpforms-lite' ) . '">'; esc_html_e( 'Add New Confirmation', 'wpforms-lite' ); echo '</button>'; echo '</div>'; ?> <div class="wpforms-confirmation wpforms-builder-settings-block"> <div class="wpforms-builder-settings-block-header"> <span><?php esc_html_e( 'Default Confirmation', 'wpforms-lite' ); ?></span> </div> <div class="wpforms-builder-settings-block-content"> <?php /** * Fires before each confirmation to add custom fields. * * @since 1.6.9 * * @param WPForms_Builder_Panel_Settings $settings Builder panel settings. * @param int $field_id Field ID. */ do_action( 'wpforms_lite_form_settings_confirmations_single_before', $settings, $field_id ); wpforms_panel_field( 'select', 'confirmations', 'type', $settings->form_data, esc_html__( 'Confirmation Type', 'wpforms-lite' ), [ 'default' => 'message', 'options' => [ 'message' => esc_html__( 'Message', 'wpforms-lite' ), 'page' => esc_html__( 'Show Page', 'wpforms-lite' ), 'redirect' => esc_html__( 'Go to URL (Redirect)', 'wpforms-lite' ), ], 'class' => 'wpforms-panel-field-confirmations-type-wrap', 'input_class' => 'wpforms-panel-field-confirmations-type', 'parent' => 'settings', 'subsection' => $field_id, ] ); wpforms_panel_field( 'textarea', 'confirmations', 'message', $settings->form_data, esc_html__( 'Confirmation Message', 'wpforms-lite' ), [ 'default' => esc_html__( 'Thanks for contacting us! We will be in touch with you shortly.', 'wpforms-lite' ), 'tinymce' => [ 'editor_height' => '200', ], 'input_id' => 'wpforms-panel-field-confirmations-message-' . $field_id, 'input_class' => 'wpforms-panel-field-confirmations-message', 'parent' => 'settings', 'subsection' => $field_id, 'class' => 'wpforms-panel-field-tinymce', 'smarttags' => [ 'type' => 'all', ], ] ); wpforms_panel_field( 'toggle', 'confirmations', 'message_scroll', $settings->form_data, esc_html__( 'Automatically scroll to the confirmation message', 'wpforms-lite' ), [ 'input_class' => 'wpforms-panel-field-confirmations-message_scroll', 'parent' => 'settings', 'subsection' => $field_id, ] ); wpforms_panel_field( 'select', 'confirmations', 'page', $settings->form_data, esc_html__( 'Confirmation Page', 'wpforms-lite' ), [ 'class' => 'wpforms-panel-field-confirmations-page-choicesjs', 'options' => wpforms_builder_form_settings_confirmation_get_pages( $settings->form_data, $field_id ), 'input_class' => 'wpforms-panel-field-confirmations-page', 'parent' => 'settings', 'subsection' => $field_id, 'placeholder' => esc_html__( 'Search for a page', 'wpforms-lite' ), 'choicesjs' => [ 'use_ajax' => true, 'callback_fn' => 'select_pages', ], ] ); wpforms_panel_field( 'text', 'confirmations', 'page_url_parameters', $settings->form_data, esc_html__( 'URL Parameters', 'wpforms-lite' ), [ 'input_id' => 'wpforms-panel-field-confirmations-page-url-parameters-' . $field_id, 'input_class' => 'wpforms-panel-field-confirmations-page-url-parameters', 'parent' => 'settings', 'subsection' => $field_id, 'tooltip' => esc_html__( 'Add query string parameters to append to the URL when the form is submitted. Separate multiple parameters with an ampersand (&).', 'wpforms-lite' ), ] ); wpforms_panel_field( 'text', 'confirmations', 'redirect', $settings->form_data, esc_html__( 'Confirmation Redirect URL', 'wpforms-lite' ) . ' <span class="required">*</span>', [ 'input_class' => 'wpforms-panel-field-confirmations-redirect', 'parent' => 'settings', 'subsection' => $field_id, ] ); wpforms_panel_field( 'toggle', 'confirmations', 'redirect_new_tab', $settings->form_data, esc_html__( 'Open confirmation in new tab', 'wpforms-lite' ), [ 'input_id' => 'wpforms-panel-field-confirmations-redirect_new_tab-' . $field_id, 'input_class' => 'wpforms-panel-field-confirmations-redirect_new_tab', 'parent' => 'settings', 'subsection' => $field_id, ] ); /** * Fires after each confirmation to add custom fields. * * @since 1.6.9 * * @param WPForms_Builder_Panel_Settings $settings Builder panel settings. * @param int $field_id Field ID. */ do_action( 'wpforms_lite_form_settings_confirmations_single_after', $settings, $field_id ); ?> </div> </div> <?php /** * Fires after builder settings confirmation block. * * @since 1.5.8 * * @param string $type Settings block type. * @param array $settings Settings. */ do_action( 'wpforms_builder_settings_confirmations_after', 'confirmations', $settings ); // phpcs:ignore WPForms.PHP.ValidateHooks.InvalidHookName } /** * Load assets for the lite version with the admin builder. * * @since 1.0.0 * * @noinspection HtmlUnknownTarget */ public function builder_enqueues() { $min = wpforms_get_min_suffix(); wp_enqueue_script( 'wpforms-builder-lite', WPFORMS_PLUGIN_URL . "assets/lite/js/admin/builder/admin-builder-lite{$min}.js", [ 'jquery', 'jquery-confirm' ], WPFORMS_VERSION, false ); $strings = [ 'disable_notifications' => sprintf( wp_kses( /* translators: %s - WPForms.com docs page URL. */ __( 'You\'ve just turned off notification emails for this form. Since entries are not stored in WPForms Lite, notification emails are recommended for collecting entry details. For setup steps, <a href="%s" target="_blank" rel="noopener noreferrer">please see our notification tutorial</a>.', 'wpforms-lite' ), [ 'a' => [ 'href' => [], 'target' => [], 'rel' => [], ], ] ), esc_url( wpforms_utm_link( 'https://wpforms.com/docs/setup-form-notification-wpforms/', 'Builder Notifications', 'Disable Notifications Alert' ) ) ), ]; $strings = apply_filters( 'wpforms_lite_builder_strings', $strings ); wp_localize_script( 'wpforms-builder-lite', 'wpforms_builder_lite', $strings ); } /** * Display upgrade notice at the bottom on the plugin settings pages. * * @since 1.4.7 * * @param string $view Current view inside the plugin settings page. */ public function settings_cta( $view ) { if ( get_option( 'wpforms_lite_settings_upgrade', false ) || apply_filters( 'wpforms_lite_settings_upgrade', false ) ) { return; } ?> <div class="settings-lite-cta"> <a href="#" class="dismiss" title="<?php esc_attr_e( 'Dismiss this message', 'wpforms-lite' ); ?>"><i class="fa fa-times-circle" aria-hidden="true"></i></a> <h5><?php esc_html_e( 'Get WPForms Pro and Unlock all the Powerful Features', 'wpforms-lite' ); ?></h5> <p><?php esc_html_e( 'Thanks for being a loyal WPForms Lite user. Upgrade to WPForms Pro to unlock all the awesome features and experience why WPForms is consistently rated the best WordPress form builder.', 'wpforms-lite' ); ?></p> <p> <?php printf( wp_kses( /* translators: %s - star icons. */ __( 'We know that you will truly love WPForms. It has over 13,000+ five star ratings (%s) and is active on over 6 million websites.', 'wpforms-lite' ), [ 'i' => [ 'class' => [], 'aria-hidden' => [], ], ] ), str_repeat( '<i class="fa fa-star" aria-hidden="true"></i>', 5 ) // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ); ?> </p> <h6><?php esc_html_e( 'Pro Features:', 'wpforms-lite' ); ?></h6> <div class="list"> <ul> <li> <?php printf( /* translators: %s - number of templates. */ esc_html__( '%s customizable form templates', 'wpforms-lite' ), '2100+' ); ?> </li> <li><?php esc_html_e( 'Store and manage form entries in WordPress', 'wpforms-lite' ); ?></li> <li><?php esc_html_e( 'Unlock all fields & features, including smart conditional logic', 'wpforms-lite' ); ?></li> <li><?php esc_html_e( 'Create powerful custom calculation forms', 'wpforms-lite' ); ?></li> <li><?php esc_html_e( 'Make surveys and generate reports', 'wpforms-lite' ); ?></li> <li><?php esc_html_e( 'Accept user-submitted content with the Post Submissions addon', 'wpforms-lite' ); ?></li> </ul> <ul> <li><?php esc_html_e( '9000+ integrations with marketing and payment services', 'wpforms-lite' ); ?></li> <li><?php esc_html_e( 'Let users save & resume submissions to prevent abandonment', 'wpforms-lite' ); ?></li> <li><?php esc_html_e( 'Take payments with Stripe, PayPal, Square, & Authorize.Net', 'wpforms-lite' ); ?></li> <li><?php esc_html_e( 'Export entries to Google Sheets, Excel, and CSV', 'wpforms-lite' ); ?></li> <li><?php esc_html_e( 'Collect signatures, geolocation data, and file uploads', 'wpforms-lite' ); ?></li> <li><?php esc_html_e( 'Create user registration and login forms', 'wpforms-lite' ); ?></li> </ul> </div> <p> <?php $utm_content = ucwords( $view ) . ' Tab'; ?> <a href="<?php echo esc_url( wpforms_admin_upgrade_link( 'settings-upgrade', $utm_content ) ); ?>" target="_blank" rel="noopener noreferrer"> <?php esc_html_e( 'Get WPForms Pro Today and Unlock all the Powerful Features »', 'wpforms-lite' ); ?> </a> </p> <p> <?php echo wp_kses( __( '<strong>Bonus:</strong> WPForms Lite users get <span class="green">50% off regular price</span>, automatically applied at checkout.', 'wpforms-lite' ), [ 'strong' => [], 'span' => [ 'class' => [], ], ] ); ?> </p> </div> <script type="text/javascript"> jQuery( function ( $ ) { $( document ).on( 'click', '.settings-lite-cta .dismiss', function ( event ) { event.preventDefault(); $.post( ajaxurl, { action: 'wpforms_lite_settings_upgrade', nonce: '<?php echo esc_html( wp_create_nonce( 'wpforms_settings_cta_dismiss' ) ); ?>' } ); $( '.settings-lite-cta' ).remove(); } ); } ); </script> <?php } /** * Dismiss upgrade notice at the bottom on the plugin settings pages. * * @since 1.4.7 */ public function settings_cta_dismiss() { if ( ! isset( $_POST['nonce'] ) || ! wp_verify_nonce( sanitize_key( $_POST['nonce'] ), 'wpforms_settings_cta_dismiss' ) ) { wp_send_json_error( esc_html__( 'Security check failed. Please try again.', 'wpforms-lite' ) ); } if ( ! wpforms_current_user_can() ) { wp_send_json_error(); } update_option( 'wpforms_lite_settings_upgrade', time() ); wp_send_json_success(); } /** * Display sample data and notify user that entries is a pro feature. * * @since 1.0.0 */ public function entries_page() { if ( wpforms_is_admin_page( 'entries', 'sample' ) ) { $this->entry_single_page(); return; } if ( wpforms_is_admin_page( 'entries' ) ) { $this->entries_list_page(); } } /** * Display the Entries List page with sample data. * * @since 1.8.9 */ private function entries_list_page() { $is_lite_connect_enabled = LiteConnect::is_enabled(); $is_lite_connect_allowed = LiteConnect::is_allowed(); wp_enqueue_style( 'wpforms-admin-entry-list' ); wp_enqueue_script( 'wpforms-admin-entry-list' ); echo wpforms_render( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped 'admin/entries/overview/entry-list', [ 'is_lite_connect_enabled' => $is_lite_connect_enabled, 'is_lite_connect_allowed' => $is_lite_connect_allowed, 'entries_count' => LiteConnectIntegration::get_new_entries_count(), 'enabled_since' => LiteConnectIntegration::get_enabled_since(), 'sample_entries' => $this->get_entries_list_data(), 'utm' => $this->get_entries_utm(), ], true ); } /** * Display the Single Entry page with sample data. * * @since 1.8.9 */ private function entry_single_page() { wp_enqueue_style( 'wpforms-admin-view-entry' ); wp_enqueue_script( 'wpforms-admin-view-entry' ); echo wpforms_render( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped 'admin/entries/single/entry', [ 'utm' => $this->get_entries_utm(), ], true ); } /** * Increase entries count once a form is submitted. * * @since 1.5.9 * @since 1.8.2 Added Payment ID. * * @param array $fields Set of form fields. * @param array $entry Entry contents. * @param array $form_data Form data. * @param int $entry_id Entry ID. * @param int $payment_id Payment ID for the payment form. * * @noinspection PhpMissingParamTypeInspection * @noinspection PhpUnusedParameterInspection */ public function update_entry_count( $fields, $entry, $form_data, $entry_id, $payment_id ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsed if ( ! empty( $form_data['spam_reason'] ) ) { return; } global $wpdb; /** * Filters whether to allow counting entries for Lite users. * * @since 1.5.9 * * @param bool $allow_entries_count True to allow, false to disallow. Default: true. */ if ( ! apply_filters( 'wpforms_dash_widget_allow_entries_count_lite', true ) ) { // phpcs:ignore WPForms.PHP.ValidateHooks.InvalidHookName return; } $form_id = absint( $form_data['id'] ); if ( empty( $form_id ) ) { return; } if ( wpforms_is_form_template( $form_id ) ) { return; } if ( add_post_meta( $form_id, 'wpforms_entries_count', 1, true ) ) { return; } // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->postmeta SET meta_value = meta_value + 1 WHERE post_id = %d AND meta_key = 'wpforms_entries_count'", $form_id ) ); } /** * Submit entry to the Lite Connect API. * * @since 1.7.4 * @since 1.8.2 Added Payment ID. * * @param array $fields Set of form fields. * @param array $entry Entry contents. * @param array $form_data Form data. * @param int $entry_id Entry ID. * @param int $payment_id Payment ID for the payment form. * * @noinspection PhpMissingParamTypeInspection * @noinspection PhpUnusedParameterInspection */ public function entry_submit( $fields, $entry, $form_data, $entry_id, $payment_id ) { $submission = wpforms()->obj( 'submission' ); $submission->register( $fields, $entry, $form_data['id'], $form_data ); // Prepare the entry args. $entry_args = $submission->prepare_entry_data(); if ( $payment_id ) { $entry_args['type'] = 'payment'; $entry_args['payment_id'] = $payment_id; } if ( ! empty( $form_data['spam_reason'] ) ) { $entry_args['status'] = 'spam'; } // Submit entry args and form data to the Lite Connect API. if ( ! empty( $entry_args ) && LiteConnect::is_allowed() && LiteConnect::is_enabled() ) { ( new LiteConnectIntegration() )->submit( $entry_args, $form_data ); } } /** * Add Lite-specific templates to the list of searchable template paths. * * @since 1.6.6 * * @param array $paths Paths to templates. * * @return array */ public function add_templates( $paths ) { $paths = (array) $paths; $paths[102] = trailingslashit( __DIR__ . '/templates' ); return $paths; } /** * Render Upgrade to Pro admin bar menu item. * * @since 1.7.4 * * @param WP_Admin_Bar $wp_admin_bar WordPress Admin Bar object. */ public function upgrade_to_pro_menu( WP_Admin_Bar $wp_admin_bar ) { $current_screen = is_admin() ? get_current_screen() : null; $upgrade_utm_content = $current_screen === null ? 'Upgrade to Pro' : 'Upgrade to Pro - ' . $current_screen->base; // phpcs:ignore WordPress.Security.NonceVerification.Recommended $upgrade_utm_content = empty( $_GET['view'] ) ? $upgrade_utm_content : $upgrade_utm_content . ': ' . sanitize_key( $_GET['view'] ); $wp_admin_bar->add_menu( [ 'parent' => 'wpforms-menu', 'id' => 'wpforms-upgrade', 'title' => esc_html__( 'Upgrade to Pro', 'wpforms-lite' ), 'href' => esc_url( $this->admin_upgrade_link( 'admin-bar', $upgrade_utm_content ) ), 'meta' => [ 'target' => '_blank', 'rel' => 'noopener noreferrer', ], ] ); } /** * Upgrade link used within the various admin pages. * * TODO: This is a duplicate of the function in the WPForms class. We should refactor this to use the same function. * * @since 1.8.5.1 * * @param string $medium URL parameter: utm_medium. * @param string $content URL parameter: utm_content. * * @return string */ private function admin_upgrade_link( string $medium = 'link', string $content = '' ): string { $url = 'https://wpforms.com/lite-upgrade/'; if ( wpforms()->is_pro() ) { $license_key = wpforms_get_license_key(); $url = add_query_arg( 'license_key', sanitize_text_field( $license_key ), 'https://wpforms.com/pricing/' ); } $upgrade = wpforms_utm_link( $url, apply_filters( 'wpforms_upgrade_link_medium', $medium ), $content ); // phpcs:ignore WPForms.PHP.ValidateHooks.InvalidHookName, WPForms.Comments.PHPDocHooks.RequiredHookDocumentation /** * Modify upgrade link. * * @since 1.5.1 * * @param string $upgrade Upgrade links. */ return apply_filters( 'wpforms_upgrade_link', $upgrade ); // phpcs:ignore WPForms.PHP.ValidateHooks.InvalidHookName } /** * Handle plugin installation upon activation. * * @since 1.7.4 */ public function install() { // Restart the import flags for Lite Connect if needed. if ( class_exists( LiteConnectIntegration::class ) ) { LiteConnectIntegration::maybe_restart_import_flag(); } // Wipe templates content cache. if ( class_exists( TemplatesCache::class ) ) { ( new TemplatesCache() )->wipe_content_cache(); } } /** * Retrieve UTM parameters for Entries pages. * * @since 1.8.9 * * @return array */ private function get_entries_utm(): array { return [ 'entries_list_button' => wpforms_admin_upgrade_link( 'entries', 'Upgrade Now - Entries list' ), 'entries_list_link' => wpforms_admin_upgrade_link( 'entries', 'Upgrade to Pro - Entries list' ), 'entry_single_button' => wpforms_admin_upgrade_link( 'entries', 'Upgrade to Pro - Single Entry' ), 'entry_single_link' => wpforms_admin_upgrade_link( 'entries', 'Upgrade to Pro - Single Entry' ), ]; } /** * Retrieve dummy data for the Entries List page. * * @since 1.8.9 * * return array */ private function get_entries_list_data(): array { return [ [ 'name' => 'Michael Johnson', 'read' => true, ], [ 'name' => 'David Thompson', 'read' => true, ], [ 'name' => 'Sarah Parker', 'read' => true, ], [ 'name' => 'Brian Anderson', 'read' => true, 'star' => true, ], [ 'name' => 'Emily Davis', 'read' => true, 'star' => true, ], [ 'name' => 'Laura White', 'read' => true, ], [ 'name' => 'Kevin Wilson', 'read' => true, ], [ 'name' => 'Megan Clark', 'read' => true, ], [ 'name' => 'Nicole Allen', 'read' => true, 'star' => true, ], [ 'name' => 'Jason Miller', ], [ 'name' => 'Rachel Moore', ], [ 'name' => 'Chris Taylor', 'star' => true, ], ]; } } new WPForms_Lite();
dvadf
dvadf
| ver. 1.4 |
Github
|
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings