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:
@ -7,61 +7,48 @@
|
||||
?>
|
||||
<div class="wu-advanced-filters">
|
||||
<table class="widefat fixed striped wu-border-b" data-id="<?php echo esc_attr($page->get_current_section()); ?>">
|
||||
<thead>
|
||||
<thead>
|
||||
<tr>
|
||||
<?php if ($checks) : ?>
|
||||
<th class="check" style="width: 30px;"></th>
|
||||
<?php endif ?>
|
||||
<th class="item"><?php _e('Item', 'wp-ultimo'); ?></th>
|
||||
<th class="status" style="width: 40%;"><?php _e('Status', 'wp-ultimo'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($steps as $slug => $default) : ?>
|
||||
|
||||
<tr
|
||||
<?php echo ! $default['done'] ? 'data-content="' . esc_attr($slug) . '"' : ''; ?>
|
||||
<?php echo wu_array_to_html_attrs(wu_get_isset($default, 'html_attr', [])); ?>
|
||||
>
|
||||
|
||||
<?php if ($checks) : ?>
|
||||
<td>
|
||||
<?php if ( ! $default['done']) : ?>
|
||||
<input type="checkbox" name="default_content[<?php echo esc_attr($slug); ?>]" id="default_content_<?php echo esc_attr($slug); ?>" value="1" checked>
|
||||
<?php endif ?>
|
||||
</td>
|
||||
<th class="check" style="width: 30px;"></th>
|
||||
<?php endif ?>
|
||||
|
||||
<td>
|
||||
<label class="wu-font-semibold wu-text-gray-700" for="default_content_<?php echo esc_attr($slug); ?>">
|
||||
<?php echo $default['title']; ?>
|
||||
</label>
|
||||
<span class="wu-text-xs wu-block wu-mt-1">
|
||||
<?php echo $default['description']; ?>
|
||||
</span>
|
||||
</td>
|
||||
|
||||
<?php if ($default['done']) : ?>
|
||||
<td class="status">
|
||||
<span class="wu-text-green-600">
|
||||
<?php echo $default['completed'] ?? __('Completed!', 'wp-ultimo'); ?>
|
||||
</span>
|
||||
</td>
|
||||
<?php else : ?>
|
||||
<td class="status">
|
||||
<span><?php echo $default['pending']; ?></span>
|
||||
<div class="spinner"></div>
|
||||
<!-- <a style="display: none;" class="wu-no-underline wu-block help" href="<?php echo $default['help']; ?>" title="<?php esc_attr_e('Help', 'wp-ultimo'); ?>">
|
||||
<?php _e('Read More', 'wp-ultimo'); ?>
|
||||
<span class="dashicons-wu-help-with-circle"></span>
|
||||
</a> -->
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
||||
<th class="item"><?php esc_html_e('Item', 'wp-multisite-waas'); ?></th>
|
||||
<th class="status" style="width: 40%;"><?php esc_html_e('Status', 'wp-multisite-waas'); ?></th>
|
||||
</tr>
|
||||
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($steps as $slug => $default) : ?>
|
||||
<tr <?php echo ! $default['done'] ? 'data-content="' . esc_attr($slug) . '"' : ''; ?> <?php echo wu_array_to_html_attrs(wu_get_isset($default, 'html_attr', [])); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
|
||||
<?php if ($checks) : ?>
|
||||
<td>
|
||||
<?php if ( ! $default['done']) : ?>
|
||||
<input type="checkbox" name="default_content[<?php echo esc_attr($slug); ?>]" id="default_content_<?php echo esc_attr($slug); ?>" value="1" <?php checked(true, isset($default['checked']) ? $default['checked'] : false); ?>>
|
||||
<?php endif ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
<td>
|
||||
<label class="wu-font-semibold wu-text-gray-700" for="default_content_<?php echo esc_attr($slug); ?>">
|
||||
<?php echo esc_html($default['title']); ?>
|
||||
</label>
|
||||
<span class="wu-text-xs wu-block wu-mt-1">
|
||||
<?php echo esc_html($default['description']); ?>
|
||||
</span>
|
||||
</td>
|
||||
<?php if ($default['done']) : ?>
|
||||
<td class="status">
|
||||
<span class="wu-text-green-600">
|
||||
<?php echo esc_html($default['completed'] ?? __('Completed!', 'wp-multisite-waas')); ?>
|
||||
</span>
|
||||
</td>
|
||||
<?php else : ?>
|
||||
<td class="status">
|
||||
<span><?php echo esc_html($default['pending']); ?></span>
|
||||
<div class="spinner"></div>
|
||||
<!-- Removed the help link as it was not properly escaped -->
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
|
||||
</tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user