Prep Plugin for release on WordPress.org (#23)
* Update translation text domain * 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. * Add Proper Build script * Use emojii flags * Fix i18n deprecation notice for translating too early * Put all scripts in footer and load async
This commit is contained in:
@ -38,8 +38,8 @@ class Payment_List_Table_Widget extends Base_List_Table {
|
||||
|
||||
parent::__construct(
|
||||
[
|
||||
'singular' => __('Payment', 'wp-ultimo'), // singular name of the listed records
|
||||
'plural' => __('Payments', 'wp-ultimo'), // plural name of the listed records
|
||||
'singular' => __('Payment', 'wp-multisite-waas'), // singular name of the listed records
|
||||
'plural' => __('Payments', 'wp-multisite-waas'), // plural name of the listed records
|
||||
'ajax' => true, // does this table support ajax?
|
||||
]
|
||||
);
|
||||
@ -101,7 +101,7 @@ class Payment_List_Table_Widget extends Base_List_Table {
|
||||
*
|
||||
* @since 2.0.0
|
||||
*
|
||||
* @param WP_Ultimo\Models\Payment $item Payment object.
|
||||
* @param \WP_Ultimo\Models\Payment $item Payment object.
|
||||
*/
|
||||
public function column_hash($item): string {
|
||||
|
||||
@ -112,8 +112,8 @@ class Payment_List_Table_Widget extends Base_List_Table {
|
||||
$code = sprintf('<a href="%s">%s</a>', wu_network_admin_url('wp-ultimo-edit-payment', $url_atts), $item->get_hash());
|
||||
|
||||
$actions = [
|
||||
'edit' => sprintf('<a href="%s">%s</a>', wu_network_admin_url('wp-ultimo-edit-payment', $url_atts), __('Edit', 'wp-ultimo')),
|
||||
'delete' => sprintf('<a href="%s">%s</a>', '', __('Delete', 'wp-ultimo')),
|
||||
'edit' => sprintf('<a href="%s">%s</a>', wu_network_admin_url('wp-ultimo-edit-payment', $url_atts), __('Edit', 'wp-multisite-waas')),
|
||||
'delete' => sprintf('<a href="%s">%s</a>', '', __('Delete', 'wp-multisite-waas')),
|
||||
];
|
||||
|
||||
$html = "<span class='wu-font-mono'><strong>{$code}</strong></span>";
|
||||
@ -126,7 +126,7 @@ class Payment_List_Table_Widget extends Base_List_Table {
|
||||
*
|
||||
* @since 2.0.0
|
||||
*
|
||||
* @param WP_Ultimo\Models\Payment $item Payment object.
|
||||
* @param \WP_Ultimo\Models\Payment $item Payment object.
|
||||
* @return string
|
||||
*/
|
||||
public function column_status($item) {
|
||||
@ -144,7 +144,7 @@ class Payment_List_Table_Widget extends Base_List_Table {
|
||||
*
|
||||
* @since 2.0.0
|
||||
*
|
||||
* @param WP_Ultimo\Models\Membership $item Membership object.
|
||||
* @param \WP_Ultimo\Models\Membership $item Membership object.
|
||||
* @return string
|
||||
*/
|
||||
public function column_customer($item) {
|
||||
@ -152,7 +152,7 @@ class Payment_List_Table_Widget extends Base_List_Table {
|
||||
$customer = $item->get_customer();
|
||||
|
||||
if ( ! $customer) {
|
||||
$not_found = __('No customer found', 'wp-ultimo');
|
||||
$not_found = __('No customer found', 'wp-multisite-waas');
|
||||
|
||||
return "<div class='wu-py-1 wu-px-2 wu-flex wu-flex-grow wu-rounded wu-items-center wu-border wu-border-solid wu-border-gray-300 wu-bg-gray-100 wu-relative wu-overflow-hidden'>
|
||||
<span class='dashicons dashicons-wu-block wu-text-gray-600 wu-px-1 wu-pr-3'> </span>
|
||||
@ -181,8 +181,6 @@ class Payment_List_Table_Widget extends Base_List_Table {
|
||||
|
||||
$id = $customer->get_id();
|
||||
|
||||
$email = $customer->get_email_address();
|
||||
|
||||
$customer_link = wu_network_admin_url('wp-ultimo-edit-customer', $url_atts);
|
||||
|
||||
$html = "<a href='{$customer_link}' class='wu-p-1 wu-flex wu-flex-grow wu-bg-gray-100 wu-rounded wu-items-center wu-border wu-border-solid wu-border-gray-300'>
|
||||
@ -200,7 +198,7 @@ class Payment_List_Table_Widget extends Base_List_Table {
|
||||
*
|
||||
* @since 2.0.0
|
||||
*
|
||||
* @param WP_Ultimo\Models\Payment $item Payment object.
|
||||
* @param \WP_Ultimo\Models\Payment $item Payment object.
|
||||
*/
|
||||
public function column_total($item): string {
|
||||
|
||||
@ -218,10 +216,10 @@ class Payment_List_Table_Widget extends Base_List_Table {
|
||||
public function get_columns() {
|
||||
|
||||
$columns = [
|
||||
'hash' => __('Ref.', 'wp-ultimo'),
|
||||
'customer' => __('Customer', 'wp-ultimo'),
|
||||
'total' => __('Total', 'wp-ultimo'),
|
||||
'date_created' => __('Created at', 'wp-ultimo'),
|
||||
'hash' => __('Ref.', 'wp-multisite-waas'),
|
||||
'customer' => __('Customer', 'wp-multisite-waas'),
|
||||
'total' => __('Total', 'wp-multisite-waas'),
|
||||
'date_created' => __('Created at', 'wp-multisite-waas'),
|
||||
];
|
||||
|
||||
return $columns;
|
||||
|
Reference in New Issue
Block a user