Prep Plugin for release on WordPress.org
Escape everything that should be escaped. Add nonce checks where needed. Sanitize all inputs. Apply Code style changes across the codebase. Correct many deprecation notices. Optimize load order of many filters.
This commit is contained in:
.phpcs.xml.distsetuptest.shsunrise.php
assets
inc
admin-pages
class-broadcast-edit-admin-page.phpclass-checkout-form-edit-admin-page.phpclass-checkout-form-list-admin-page.phpclass-customer-edit-admin-page.phpclass-customer-list-admin-page.phpclass-customizer-admin-page.phpclass-dashboard-admin-page.phpclass-discount-code-edit-admin-page.phpclass-domain-edit-admin-page.phpclass-domain-list-admin-page.phpclass-edit-admin-page.phpclass-email-edit-admin-page.phpclass-email-template-customize-admin-page.phpclass-event-view-admin-page.phpclass-hosting-integration-wizard-admin-page.phpclass-invoice-template-customize-admin-page.phpclass-membership-edit-admin-page.phpclass-migration-alert-admin-page.phpclass-payment-edit-admin-page.phpclass-product-edit-admin-page.phpclass-settings-admin-page.phpclass-setup-wizard-admin-page.phpclass-site-edit-admin-page.phpclass-site-list-admin-page.phpclass-template-previewer-customize-admin-page.phpclass-top-admin-nav-menu.phpclass-view-logs-admin-page.phpclass-webhook-edit-admin-page.phpclass-webhook-list-admin-page.phpclass-wizard-admin-page.php
api
checkout
class-cart.phpclass-checkout-pages.phpclass-checkout.phpclass-legacy-checkout.phpclass-line-item.php
class-admin-notices.phpclass-ajax.phpclass-api.phpclass-async-calls.phpclass-dashboard-widgets.phpclass-domain-mapping.phpclass-faker.phpclass-helper.phpclass-light-ajax.phpclass-logger.phpclass-maintenance-mode.phpclass-newsletter.phpclass-requirements.phpclass-session-cookie.phpclass-settings.phpclass-sunrise.phpclass-views.phpclass-whitelabel.phpsignup-fields
debug
development
functions
compatiblity.phpdate.phpfinancial.phplegacy.phpmarkup-helpers.phpoptions.phpsort.phpstring-helpers.phpsunrise.phpurl.php
gateways
helpers
integrations
host-providers
limitations
limits
list-tables
class-base-list-table.phpclass-checkout-form-list-table.phpclass-customer-list-table.phpclass-customers-payment-list-table.phpclass-email-list-table.phpclass-membership-line-item-list-table.phpclass-membership-list-table-widget.phpclass-membership-list-table.phpclass-memberships-site-list-table.phpclass-payment-line-item-list-table.phpclass-payment-list-table-widget.phpclass-payment-list-table.phpclass-product-list-table.phpclass-site-list-table.php
managers
class-customer-manager.phpclass-domain-manager.phpclass-email-manager.phpclass-event-manager.phpclass-gateway-manager.phpclass-limitation-manager.phpclass-notes-manager.phpclass-site-manager.phpclass-webhook-manager.php
models
tax
ui
views
about.phpadmin-notices.php
admin-pages
fields
field-actions.phpfield-code-editor.phpfield-color-picker.phpfield-dashicon.phpfield-group.phpfield-header.phpfield-hidden.phpfield-html.phpfield-image.phpfield-link.phpfield-multiselect.phpfield-note.phpfield-repeater.phpfield-select-icon.phpfield-select.phpfield-small-header.phpfield-submit.phpfield-tab-select.phpfield-text-display.phpfield-text-edit.phpfield-text.phpfield-textarea.phpfield-toggle.phpfield-wp-editor.phpform.php
partials
base
centered.php
checkout-forms
customers
dash.phpedit.phpedit
empty-state.phpfilter.phpgrid.phplist.phpproducts
responsive-table-row.phpsettings.phpwizard.phpwizard
broadcast
checkout
fields
field-checkbox-multi.phpfield-checkbox.phpfield-group.phpfield-hidden.phpfield-html.phpfield-note.phpfield-password.phpfield-payment-methods.phpfield-products.phpfield-radio.phpfield-select.phpfield-submit.phpfield-text.phpfield-toggle.phpform.php
partials
paypal
templates
order-bump
order-summary
period-selection
pricing-table
steps
template-selection
customers
dashboard-statistics
filter.phpwidget-countries.phpwidget-forms.phpwidget-most-visited-sites.phpwidget-mrr-growth.phpwidget-new-accounts.phpwidget-revenue.phpwidget-tax-by-code.phpwidget-tax-by-day.phpwidget-tax-graph.phpwidget-taxes.php
dashboard-widgets
account-summary.phpactivity-stream.phpbilling-info.phpcurrent-membership-product-details.phpcurrent-membership.phpcurrent-site.phpdomain-mapping.phpfirst-steps.phpinvoices.phplimits-and-quotas.phplogin-form.phpmy-sites.phpsite-actions.phpsummary.phpthank-you.php
domain
email
emails
admin
customer
events
invoice
legacy
signup
limitations
memberships
payments
settings
shortcodes
sites
system-info
taxes
ui
wizards
@@ -53,7 +53,7 @@ $has_tax_included = false;
|
||||
}
|
||||
|
||||
.invoice-box table {
|
||||
border-collapse: 1;
|
||||
border-collapse: 1px;
|
||||
}
|
||||
|
||||
.invoice-box table tr.heading th {
|
||||
@@ -150,12 +150,12 @@ $has_tax_included = false;
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<strong><?php _e('Invoice #', 'wp-multisite-waas'); ?></strong><br>
|
||||
<strong><?php esc_html_e('Invoice #', 'wp-multisite-waas'); ?></strong><br>
|
||||
<?php echo esc_html($payment->get_invoice_number()); ?>
|
||||
<br>
|
||||
<?php echo esc_html(sprintf(__('Created: %s', 'wp-multisite-waas'), date_i18n(get_option('date_format'), strtotime($payment->get_date_created())))); ?><br>
|
||||
<?php echo esc_html(sprintf(esc_html__('Created: %s', 'wp-multisite-waas'), date_i18n(get_option('date_format'), strtotime($payment->get_date_created())))); ?><br>
|
||||
|
||||
<?php esc_html_e('Due on Receipte', 'wp-multisite-waas'); ?><br>
|
||||
<?php esc_html_e('Due on Receipt', 'wp-multisite-waas'); ?><br>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -191,7 +191,7 @@ $has_tax_included = false;
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<strong><?php _e('Bill to', 'wp-multisite-waas'); ?></strong>
|
||||
<strong><?php esc_html_e('Bill to', 'wp-multisite-waas'); ?></strong>
|
||||
<br>
|
||||
<?php
|
||||
|
||||
@@ -211,23 +211,23 @@ $has_tax_included = false;
|
||||
<tr class="heading">
|
||||
|
||||
<th style="text-align: left;">
|
||||
<?php _e('Item', 'wp-multisite-waas'); ?>
|
||||
<?php esc_html_e('Item', 'wp-multisite-waas'); ?>
|
||||
</th>
|
||||
|
||||
<th style="width: 17%;">
|
||||
<?php _e('Price', 'wp-multisite-waas'); ?>
|
||||
<?php esc_html_e('Price', 'wp-multisite-waas'); ?>
|
||||
</th>
|
||||
|
||||
<th style="width: 17%;">
|
||||
<?php _e('Discount', 'wp-multisite-waas'); ?>
|
||||
<?php esc_html_e('Discount', 'wp-multisite-waas'); ?>
|
||||
</th>
|
||||
|
||||
<th style="width: 17%;">
|
||||
<?php _e('Tax', 'wp-multisite-waas'); ?>
|
||||
<?php esc_html_e('Tax', 'wp-multisite-waas'); ?>
|
||||
</th>
|
||||
|
||||
<th style="width: 17%;">
|
||||
<?php _e('Total', 'wp-multisite-waas'); ?>
|
||||
<?php esc_html_e('Total', 'wp-multisite-waas'); ?>
|
||||
</th>
|
||||
|
||||
</tr>
|
||||
@@ -237,23 +237,23 @@ $has_tax_included = false;
|
||||
<tr class="item">
|
||||
|
||||
<td>
|
||||
<span class="font-weight: medium;"><?php echo $line_item->get_title(); ?></span>
|
||||
<span class="font-weight: medium;"><?php echo esc_html($line_item->get_title()); ?></span>
|
||||
<br>
|
||||
<small><?php echo $line_item->get_description(); ?></small>
|
||||
<small><?php echo esc_html($line_item->get_description()); ?></small>
|
||||
</td>
|
||||
|
||||
<td style="text-align: right;">
|
||||
<?php echo wu_format_currency($line_item->get_subtotal(), $payment->get_currency()); ?>
|
||||
<?php echo esc_html(wu_format_currency($line_item->get_subtotal(), $payment->get_currency())); ?>
|
||||
</td>
|
||||
|
||||
<td style="text-align: right;">
|
||||
<?php echo wu_format_currency($line_item->get_discount_total(), $payment->get_currency()); ?>
|
||||
<?php echo esc_html(wu_format_currency($line_item->get_discount_total(), $payment->get_currency())); ?>
|
||||
</td>
|
||||
|
||||
<td style="text-align: right;">
|
||||
<?php echo wu_format_currency($line_item->get_tax_total(), $payment->get_currency()); ?>
|
||||
<?php echo esc_html(wu_format_currency($line_item->get_tax_total(), $payment->get_currency())); ?>
|
||||
<br>
|
||||
<small><?php echo $line_item->get_tax_label(); ?> (<?php echo $line_item->get_tax_rate(); ?>%)</small>
|
||||
<small><?php echo esc_html($line_item->get_tax_label()); ?> (<?php echo esc_html($line_item->get_tax_rate()); ?>%)</small>
|
||||
<?php if ($line_item->get_tax_inclusive()) : ?>
|
||||
<?php $has_tax_included = true; ?>
|
||||
<small>*</small>
|
||||
@@ -261,7 +261,7 @@ $has_tax_included = false;
|
||||
</td>
|
||||
|
||||
<td style="text-align: right;">
|
||||
<?php echo wu_format_currency($line_item->get_total(), $payment->get_currency()); ?>
|
||||
<?php echo esc_html(wu_format_currency($line_item->get_total(), $payment->get_currency())); ?>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
@@ -271,11 +271,11 @@ $has_tax_included = false;
|
||||
<tr class="total">
|
||||
<?php if ($has_tax_included) : ?>
|
||||
<td style="text-align: left; font-weight: normal;">
|
||||
<small>* <?php _e('Tax included in price.', 'wp-multisite-waas'); ?></small>
|
||||
<small>* <?php esc_html_e('Tax included in price.', 'wp-multisite-waas'); ?></small>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
<td colspan='5'>
|
||||
<?php printf(__('Total: %s', 'wp-multisite-waas'), wu_format_currency($payment->get_total(), $payment->get_currency())); ?>
|
||||
<?php printf(esc_html__('Total: %s', 'wp-multisite-waas'), esc_html(wu_format_currency($payment->get_total(), $payment->get_currency()))); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -283,13 +283,13 @@ $has_tax_included = false;
|
||||
|
||||
<tr class="heading">
|
||||
<th colspan="5" style="text-align: left;">
|
||||
<?php _e('Payment Method', 'wp-multisite-waas'); ?>
|
||||
<?php esc_html_e('Payment Method', 'wp-multisite-waas'); ?>
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
<tr class="details">
|
||||
<td colspan="5">
|
||||
<?php echo $payment->get_payment_method(); ?>
|
||||
<?php echo esc_html($payment->get_payment_method()); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
Reference in New Issue
Block a user