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:
@ -17,7 +17,7 @@
|
||||
|
||||
if ( ! defined('ABSPATH')) {
|
||||
exit; // Exit if accessed directly
|
||||
} // end if;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@ -78,7 +78,7 @@ if ( ! defined('ABSPATH')) {
|
||||
|
||||
<tr style="">
|
||||
<td style=" text-align: center;">
|
||||
<p style="font-family: <?php echo $template_settings['footer_font']; ?>; font-size: 12px; line-height: 1.6m; color: <?php echo $template_settings['footer_color']; ?>; font-weight: normal; margin: 0 0 10px; padding: 0; text-align: <?php echo $template_settings['footer_align']; ?>">
|
||||
<p style="font-family: <?php echo $template_settings['footer_font']; ?>; font-size: 12px; line-height: 1.6em; color: <?php echo $template_settings['footer_color']; ?>; font-weight: normal; margin: 0 0 10px; padding: 0; text-align: <?php echo $template_settings['footer_align']; ?>">
|
||||
<?php echo $template_settings['footer_text']; ?>
|
||||
</p>
|
||||
</td>
|
||||
@ -89,7 +89,7 @@ if ( ! defined('ABSPATH')) {
|
||||
<?php if ($template_settings['display_company_address']) : ?>
|
||||
<tr style="">
|
||||
<td style=" text-align: center;">
|
||||
<p style="font-family: <?php echo $template_settings['footer_font']; ?>; font-size: 12px; line-height: 1.6m; color: <?php echo $template_settings['footer_color']; ?>; font-weight: normal; margin: 0 0 10px; padding: 0; text-align: <?php echo $template_settings['footer_align']; ?>">
|
||||
<p style="font-family: <?php echo $template_settings['footer_font']; ?>; font-size: 12px; line-height: 1.6em; color: <?php echo $template_settings['footer_color']; ?>; font-weight: normal; margin: 0 0 10px; padding: 0; text-align: <?php echo $template_settings['footer_align']; ?>">
|
||||
<strong><?php echo wu_get_setting('company_name'); ?></strong><br>
|
||||
<?php echo nl2br(wu_get_setting('company_address', [])); ?>
|
||||
</p>
|
||||
@ -99,7 +99,7 @@ if ( ! defined('ABSPATH')) {
|
||||
|
||||
<tr style="">
|
||||
<td style=" text-align: center;">
|
||||
<p style="font-family: <?php echo $template_settings['footer_font']; ?>; font-size: 12px; line-height: 1.6m; color: <?php echo $template_settings['footer_color']; ?>; font-weight: normal; margin: 0 0 10px; padding: 0; text-align: <?php echo $template_settings['footer_align']; ?>">
|
||||
<p style="font-family: <?php echo $template_settings['footer_font']; ?>; font-size: 12px; line-height: 1.6em; color: <?php echo $template_settings['footer_color']; ?>; font-weight: normal; margin: 0 0 10px; padding: 0; text-align: <?php echo $template_settings['footer_align']; ?>">
|
||||
<a href="<?php echo $site_url; ?>" style="line-height: 1.6em; color: #999999; margin: 0; padding: 0;">
|
||||
<?php echo esc_attr($site_name); ?>
|
||||
</a>
|
||||
|
@ -9,61 +9,61 @@
|
||||
|
||||
<?php if ($targets) : ?>
|
||||
|
||||
<ul class="wu-widget-list">
|
||||
<ul class="wu-widget-list">
|
||||
|
||||
<?php foreach ($targets as $target_key => $target) : ?>
|
||||
<?php foreach ($targets as $target_key => $target) : ?>
|
||||
|
||||
<li class="wu-p-2 wu-m-0 wu-border-t wu-border-l-0 wu-border-r-0 wu-border-b-0 wu-border-gray-200 wu-border-solid">
|
||||
<li class="wu-p-2 wu-m-0 wu-border-t wu-border-l-0 wu-border-r-0 wu-border-b-0 wu-border-gray-200 wu-border-solid">
|
||||
|
||||
<a title="<?php echo $target['display_name']; ?>" href='<?php echo $target['link']; ?>' class='<?php echo $modal_class; ?> wu-table-card wu-text-gray-700 wu-p-2 wu-flex wu-flex-grow wu-rounded wu-items-center wu-border wu-border-solid wu-border-gray-300 wu-no-underline'>
|
||||
<a title="<?php echo esc_attr($target['display_name']); ?>" href='<?php echo esc_url($target['link']); ?>' class='<?php echo esc_attr($modal_class); ?> wu-table-card wu-text-gray-700 wu-p-2 wu-flex wu-flex-grow wu-rounded wu-items-center wu-border wu-border-solid wu-border-gray-300 wu-no-underline'>
|
||||
|
||||
<div class="wu-flex wu-relative wu-h-6 wu-w-6 wu-rounded-full wu-ring-2 wu-mx-4 wu-my-2 wu-box-border wu-ring-white wu-bg-gray-300 wu-items-center wu-justify-center">
|
||||
<div class="wu-flex wu-relative wu-h-6 wu-w-6 wu-rounded-full wu-ring-2 wu-mx-4 wu-my-2 wu-box-border wu-ring-white wu-bg-gray-300 wu-items-center wu-justify-center">
|
||||
|
||||
<?php echo $target['avatar']; ?>
|
||||
<?php echo wp_kses_post($target['avatar']); ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='wu-pl-2'>
|
||||
<div class='wu-pl-2'>
|
||||
|
||||
<strong class='wu-block'><?php echo $target['display_name']; ?><small class='wu-font-normal'> (#<?php echo $target['id']; ?>)</small></strong>
|
||||
<strong class='wu-block'><?php echo esc_html($target['display_name']); ?><small class='wu-font-normal'> (#<?php echo intval($target['id']); ?>)</small></strong>
|
||||
|
||||
<small><?php echo $target['description']; ?></small>
|
||||
<small><?php echo wp_kses_post($target['description']); ?></small>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</a>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
</li>
|
||||
|
||||
<?php endforeach; ?>
|
||||
<?php endforeach; ?>
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
<ul class="wu-widget-list">
|
||||
<ul class="wu-widget-list">
|
||||
|
||||
<li class="wu-p-2 wu-m-0 wu-border-t wu-border-l-0 wu-border-r-0 wu-border-b-0 wu-border-gray-400 wu-border-solid">
|
||||
<li class="wu-p-2 wu-m-0 wu-border-t wu-border-l-0 wu-border-r-0 wu-border-b-0 wu-border-gray-400 wu-border-solid">
|
||||
|
||||
<div class="wu-p-2 wu-mr-1 wu-flex wu-rounded wu-items-center wu-border wu-border-solid wu-border-gray-300 wu-bg-white wu-relative wu-overflow-hidden">
|
||||
<div class="wu-p-2 wu-mr-1 wu-flex wu-rounded wu-items-center wu-border wu-border-solid wu-border-gray-300 wu-bg-white wu-relative wu-overflow-hidden">
|
||||
|
||||
<span class='dashicons dashicons-wu-block wu-text-gray-600 wu-px-1 wu-pr-3'> </span>
|
||||
<span class='dashicons dashicons-wu-block wu-text-gray-600 wu-px-1 wu-pr-3'> </span>
|
||||
|
||||
<div class=''>
|
||||
<div class=''>
|
||||
|
||||
<span class='wu-block wu-py-3 wu-text-gray-600 wu-text-2xs wu-font-bold wu-uppercase'>
|
||||
|
||||
<?php echo esc_html(__('No Targets', 'wp-ultimo')); ?>
|
||||
<?php echo esc_html(__('No Targets', 'wp-multisite-waas')); ?>
|
||||
|
||||
</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
|
Reference in New Issue
Block a user