Commit realizado el 12:13:52 08-04-2024

This commit is contained in:
Pagina Web Monito
2024-04-08 12:13:55 -04:00
commit 0c33094de9
7815 changed files with 1365694 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
<?php
/**
* Single Payment page - Advanced details template.
*
* @since 1.8.2
*
* @var array $details_list Details list.
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
?>
<div id="wpforms-payment-advanced-info" class="postbox">
<div class="postbox-header">
<h2 class="hndle">
<span><?php echo esc_html__( 'Advanced Details', 'wpforms-lite' ); ?></span>
</h2>
</div>
<div class="inside">
<?php
foreach ( $details_list as $item ) :
?>
<div class="wpforms-payment-advanced-item" >
<p class="wpforms-payment-advanced-item-label">
<?php echo esc_html( $item['label'] ); ?>
</p>
<div class="wpforms-payment-advanced-item-value">
<?php if ( isset( $item['link'] ) ) : ?>
<a href="<?php echo esc_url( $item['link'] ); ?>" target="_blank" rel="noopener noreferrer" class="wpforms-link">
<?php endif; ?>
<?php echo wp_kses_post( nl2br( make_clickable( $item['value'] ) ) ); ?>
<?php if ( isset( $item['link'] ) ) : ?>
</a>
<?php endif; ?>
</div>
</div>
<?php endforeach; ?>
</div>
</div>

View File

@@ -0,0 +1,85 @@
<?php
/**
* Single Payment page - Details metabox.
*
* @since 1.8.2
*
* @var object $payment Payment object.
* @var string $submitted Submitted date.
* @var string $gateway_name Gateway name.
* @var string $gateway_link Link to gateway payment details.
* @var string $form_edit_link Link to the builder.
* @var string $delete_link Link for a payment delete action.
* @var bool $test_mode Is payment in test mode.
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
?>
<div id="wpforms-payment-details" class="postbox">
<div class="postbox-header">
<h2 class="hndle">
<span><?php esc_html_e( 'Details', 'wpforms-lite' ); ?></span>
</h2>
</div>
<div class="inside">
<div class="wpforms-payment-details-meta">
<p class="wpforms-payment-date">
<span class="dashicons dashicons-calendar"></span>
<?php esc_html_e( 'Submitted:', 'wpforms-lite' ); ?>
<strong class="date-time">
<?php echo esc_html( $submitted ); ?>
</strong>
</p>
<p class="wpforms-payment-gateway">
<span class="dashicons dashicons-store"></span>
<?php esc_html_e( 'Gateway:', 'wpforms-lite' ); ?>
<a href="<?php echo esc_url( $gateway_link ); ?>" class="wpforms-link" target="_blank" rel="noopener noreferrer"><?php echo esc_html( $gateway_name ); ?></a>
</p>
<p class="wpforms-payment-form">
<span class="dashicons dashicons-wpforms"></span>
<?php
esc_html_e( 'Form:', 'wpforms-lite' );
// Output the form edit link, if available.
// The output could be a link or a span, depending on the availability of the form.
echo wp_kses(
$form_edit_link,
[
'a' => [
'href' => [],
'class' => [],
],
'span' => [ 'class' => [] ],
]
);
?>
</p>
<?php if ( $test_mode ) : ?>
<p class="wpforms-payment-test-mode">
<span class="dashicons dashicons-marker"></span>
<?php esc_html_e( 'Payment Mode:', 'wpforms-lite' ); ?>
<strong><?php esc_html_e( 'Test', 'wpforms-lite' ); ?></strong>
</p>
<?php endif; ?>
</div>
<div class="wpforms-payment-actions">
<div class="status"></div>
<div class="actions">
<a class="button button-large button-delete" href="<?php echo esc_url( $delete_link ); ?>">
<?php esc_html_e( 'Delete', 'wpforms-lite' ); ?>
</a>
</div>
<div class="clear"></div>
</div>
</div>
</div>

View File

@@ -0,0 +1,59 @@
<?php
/**
* Single Payment page - Payment details template for single and subscription data.
*
* @since 1.8.2
*
* @var array $entry_fields Entry object.
* @var array $form_data Form data.
* @var int $entry_id Entry ID.
* @var string $entry_id_title Entry title id.
* @var string $entry_url Entry page URL.
* @var string $entry_status Entry status.
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
?>
<div id="wpforms-payment-entry-fields" class="postbox">
<div class="postbox-header">
<h2 class="hndle">
<span><?php echo esc_html__( 'Entry Summary', 'wpforms-lite' ); ?></span>
<?php if ( ! empty( $entry_id_title ) ) : ?>
<span class="wpforms-payment-entry-id"><?php echo esc_html( $entry_id_title ); ?></span>
<?php endif; ?>
</h2>
</div>
<div class="inside">
<?php foreach ( $entry_fields as $key => $field ) : ?>
<div class="wpforms-payment-entry-field <?php echo wpforms_sanitize_classes( $field['field_class'] ); ?>" >
<p class="wpforms-payment-entry-field-name">
<?php echo esc_html( wp_strip_all_tags( $field['field_name'] ) ); ?>
</p>
<div class="wpforms-payment-entry-field-value">
<?php echo wp_kses_post( nl2br( make_clickable( $field['field_value'] ) ) ); ?>
</div>
</div>
<?php endforeach; ?>
</div>
<?php if ( $entry_id_title && $entry_status !== 'trash' ) : ?>
<div class="wpforms-payment-actions">
<div class="status"></div>
<div class="actions">
<a class="button" href="<?php echo esc_url( $entry_url ); ?>">
<?php echo esc_html__( 'View Entry', 'wpforms-lite' ); ?>
</a>
<div class="clear"></div>
</div>
</div>
<?php endif; ?>
</div>

View File

@@ -0,0 +1,59 @@
<?php
/**
* Single Payment page - Heading navigation.
*
* @since 1.8.2
*
* @var int $count Count of all payments.
* @var int $prev_count Count of previous payments.
* @var string $prev_url Previous payment URL.
* @var string $prev_class Previous payment class.
* @var string $next_url Next payment URL.
* @var string $next_class Next payment class.
* @var string $overview_url Payments Overview page URL.
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
?>
<a href="<?php echo esc_url( $overview_url ); ?>" class="page-title-action wpforms-btn wpforms-btn-orange" data-action="back">
<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 Payments', 'wpforms-lite' ); ?></span>
</a>
<div class="wpforms-admin-single-navigation">
<div class="wpforms-admin-single-navigation-text">
<?php
printf( /* translators: %1$d - current number of payment, %2$d - total number of payments. */
esc_html__( 'Payment %1$d of %2$d', 'wpforms-lite' ),
(int) $prev_count + 1,
(int) $count
);
?>
</div>
<div class="wpforms-admin-single-navigation-buttons">
<a
href="<?php echo esc_url( $prev_url ); ?>"
title="<?php esc_attr_e( 'Previous payment', 'wpforms-lite' ); ?>"
id="wpforms-admin-single-navigation-prev-link"
class="wpforms-btn-grey <?php echo sanitize_html_class( $prev_class ); ?>">
<span class="dashicons dashicons-arrow-left-alt2"></span>
</a>
<span
class="wpforms-admin-single-navigation-current"
title="<?php esc_attr_e( 'Current payment', 'wpforms-lite' ); ?>">
<?php echo (int) $prev_count + 1; ?>
</span>
<a
href="<?php echo esc_url( $next_url ); ?>"
title="<?php esc_attr_e( 'Next payment', 'wpforms-lite' ); ?>"
id="wpforms-admin-single-navigation-next-link"
class="wpforms-btn-grey <?php echo sanitize_html_class( $next_class ); ?>">
<span class="dashicons dashicons-arrow-right-alt2"></span>
</a>
</div>
</div>

View File

@@ -0,0 +1,56 @@
<?php
/**
* Single Payment page - Log metabox.
*
* @since 1.8.2
*
* @var array $logs Logs.
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
?>
<div id="wpforms-payment-logs" class="postbox">
<div class="postbox-header">
<h2 class="hndle">
<span><?php esc_html_e( 'Log', 'wpforms-lite' ); ?></span>
</h2>
</div>
<div class="inside">
<?php if ( empty( $logs ) ) : ?>
<span class="wpforms-payment-no-logs"><?php esc_html_e( 'No Logs', 'wpforms-lite' ); ?></span>
<?php endif; ?>
<?php
foreach ( $logs as $log ) :
$item = json_decode( $log['value'], false );
$date_time = sprintf( /* translators: %1$s - date, %2$s - time when item was created, e.g. "Oct 22, 2022 at 11:11 am". */
__( '%1$s at %2$s', 'wpforms-lite' ),
wpforms_date_format( $item->date, 'M j, Y', true ),
wpforms_time_format( $item->date, '', true )
);
if ( empty( $item->value ) ) {
continue;
}
?>
<div class="wpforms-payment-log-item" >
<span class="wpforms-payment-log-item-value">
<?php echo esc_html( $item->value ); ?>
</span>
<span class="wpforms-payment-log-item-date">
<?php echo esc_html( $date_time ); ?>
</span>
</div>
<?php endforeach; ?>
</div>
</div>

View File

@@ -0,0 +1,27 @@
<?php
/**
* No template payment HTML template.
*
* @since 1.8.2
*
* @var string $message An abort message to display.
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
?>
<div class="wpforms-admin-empty-state-container wpforms-admin-no-payments">
<h2 class="waving-hand-emoji"><?php esc_html_e( 'Hi there!', 'wpforms-lite' ); ?></h2>
<p><?php echo esc_html( $message ); ?></p>
<img src="<?php echo esc_url( WPFORMS_PLUGIN_URL . 'assets/images/empty-states/payments/no-payments.svg' ); ?>" alt="" style="max-width: 314px;">
<a href="<?php echo esc_url( admin_url( 'admin.php?page=wpforms-payments' ) ); ?>" class="wpforms-btn wpforms-btn-lg wpforms-btn-orange">
<?php esc_html_e( 'Back to All Payments', 'wpforms-lite' ); ?>
</a>
</div>

View File

@@ -0,0 +1,83 @@
<?php
/**
* Single Payment page - Payment details template for single and subscription data.
*
* @since 1.8.2
*
* @var string $title Block title.
* @var string $payment_id Payment id.
* @var string $gateway_link Link to gateway payment details.
* @var string $gateway_text Gateway link text.
* @var string $gateway_name Gateway name.
* @var string $gateway_action_text Gateway action link text.
* @var string $gateway_action_link Gateway action link.
* @var string $gateway_action_slug Gateway action slug.
* @var int $payment_id_raw Payment id raw.
* @var string $status Payment or Subscription status.
* @var string $status_label Payment or Subscription status label.
* @var bool $disabled Is gateway action disabled.
* @var array $stat_cards Stat cards to display.
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
?>
<div id="wpforms-payment-info" class="postbox">
<div class="postbox-header">
<h2 class="hndle">
<span><?php echo esc_html( $title ); ?></span>
<?php if ( isset( $payment_id ) ) : ?>
<span class="wpforms-payment-id"><?php echo esc_html( $payment_id ); ?></span>
<?php endif; ?>
</h2>
</div>
<div class="inside">
<ul class="wpforms-payments-details-list">
<?php foreach ( $stat_cards as $key => $stat_card ) : ?>
<li class="wpforms-payments-details-stat-card">
<button class="<?php echo wpforms_sanitize_classes( $stat_card['button_classes'], true ); ?>" >
<span class="stat-card-label"><?php echo esc_html( $stat_card['label'] ); ?></span>
<span class="stat-card-value">
<?php echo ! empty( $stat_card['value'] ) ? esc_html( $stat_card['value'] ) : esc_html__( 'N/A', 'wpforms-lite' ); ?>
<?php if ( ! empty( $stat_card['tooltip'] ) ) : ?>
<i class="wpforms-single-payment-tooltip" data-tooltip-content="#wpforms-single-payment-tooltip-content-<?php echo esc_attr( $key ); ?>"></i>
<span id="wpforms-single-payment-tooltip-content-<?php echo esc_attr( $key ); ?>" class="wpforms-single-payment-tooltip-content"><?php echo wp_kses_post( $stat_card['tooltip'] ); ?></span>
<?php endif; ?>
</span>
</button>
</li>
<?php endforeach; ?>
</ul>
</div>
<div class="wpforms-payment-actions">
<div class="status">
<span class="wpforms-payment-action-status-label"><?php esc_html_e( 'Status:', 'wpforms-lite' ); ?></span>
<span class="wpforms-payment-action-status-value <?php echo esc_attr( $status ); ?>"><?php echo wp_kses( $status_label, [ 'span' => [] ] ); ?></span>
</div>
<?php if ( $gateway_link ) : ?>
<div class="actions">
<a href="<?php echo esc_url( $gateway_link ); ?>" class="link" target="_blank" rel="noopener noreferrer">
<?php echo esc_html( $gateway_text ); ?>
</a>
<?php if ( ! $disabled ) : ?>
<a href="<?php echo esc_url( $gateway_action_link ); ?>"
class="button wpforms-payments-single-action"
target="_blank"
rel="noopener noreferrer"
id="wpforms-payments-single-<?php echo esc_attr( $gateway_action_slug ); ?>"
data-action-id="<?php echo esc_attr( $payment_id_raw ); ?>"
data-gateway="<?php echo esc_attr( $gateway_name ); ?>"
data-action-type="<?php echo esc_attr( $gateway_action_slug ); ?>">
<?php echo esc_html( $gateway_action_text ); ?>
</a>
<?php endif; ?>
</div>
<?php endif; ?>
<div class="clear"></div>
</div>
</div>

View File

@@ -0,0 +1,66 @@
<?php
/**
* Single Payment page - Display a table outlining the subscription payment history.
*
* @since 1.8.4
*
* @var string $title Table heading.
* @var array $renewals Renewal payments data.
* @var array $types Payment types.
* @var array $statuses Payment statuses.
* @var string $placeholder_na_text Placeholder text. Display "N\A" if empty.
* @var string $single_url Single payment URL. Note that payment ID will be appended to this URL.
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
?>
<div class="postbox">
<div class="postbox-header">
<h2 class="hndle">
<span><?php echo esc_html( $title ); ?></span>
</h2>
</div>
<table class="wpforms-subscription-payment-history" role="table" aria-label="<?php esc_attr_e( 'Subscription Renewal History Table', 'wpforms-lite' ); ?>">
<thead>
<tr>
<th scope="col"><?php esc_html_e( 'Payment ID', 'wpforms-lite' ); ?></th>
<th scope="col"><?php esc_html_e( 'Date', 'wpforms-lite' ); ?></th>
<th scope="col"><?php esc_html_e( 'Type', 'wpforms-lite' ); ?></th>
<th scope="col"><?php esc_html_e( 'Total', 'wpforms-lite' ); ?></th>
<th scope="col"><?php esc_html_e( 'Status', 'wpforms-lite' ); ?></th>
</thead>
<tbody>
<?php
foreach ( $renewals as $renewal ) :
// phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
$is_current = isset( $_GET['payment_id'] ) && $renewal->id === wp_unslash( $_GET['payment_id'] );
?>
<tr class="<?php echo $is_current ? sanitize_html_class( 'current' ) : ''; ?>">
<td data-title="<?php esc_attr_e( 'Payment ID', 'wpforms-lite' ); ?>">
<a href="<?php echo esc_url( add_query_arg( [ 'payment_id' => $renewal->id ], $single_url ) ); ?>">
<?php echo esc_html( $renewal->id ); ?>
</a>
</td>
<td data-title="<?php esc_attr_e( 'Date', 'wpforms-lite' ); ?>">
<?php echo wpforms_datetime_format( $renewal->date_created_gmt, 'M j, Y', true ); ?>
</td>
<td data-title="<?php esc_attr_e( 'Type', 'wpforms-lite' ); ?>">
<?php echo esc_html( isset( $types[ $renewal->type ] ) ? $renewal->type : $placeholder_na_text ); ?>
</td>
<td data-title="<?php esc_attr_e( 'Total', 'wpforms-lite' ); ?>">
<?php echo wpforms_format_amount( wpforms_sanitize_amount( $renewal->total_amount, $renewal->currency ), true, $renewal->currency ); ?>
</td>
<td data-title="<?php esc_attr_e( 'Status', 'wpforms-lite' ); ?>">
<?php echo esc_html( $statuses[ $renewal->status ] ); ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<?php
/* Omit closing PHP tag at the end of PHP files to avoid "headers already sent" issues. */