Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin Check Fixes for FooGallery Pro #263

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -448,10 +448,10 @@ function display_foogrid_notice() {
?>
<div class="notice error">
<p>
<strong><?php _e('FooGrid Extension Redundant!', 'foogallery'); ?></strong><br/>
<?php _e('You have both FooGallery PRO and the FooGrid extension activated. FooGallery PRO includes the Grid PRO gallery template, which makes the FooGrid extension redundant.', 'foogallery'); ?>
<strong><?php esc_html_e('FooGrid Extension Redundant!', 'foogallery'); ?></strong><br/>
<?php esc_html_e('You have both FooGallery PRO and the FooGrid extension activated. FooGallery PRO includes the Grid PRO gallery template, which makes the FooGrid extension redundant.', 'foogallery'); ?>
<br/>
<?php _e('Please edit all galleries that use the FooGrid gallery template and change them to use the Grid PRO gallery template. Once this is done, you can delete the FooGrid extension.', 'foogallery'); ?>
<?php esc_html_e('Please edit all galleries that use the FooGrid gallery template and change them to use the Grid PRO gallery template. Once this is done, you can delete the FooGrid extension.', 'foogallery'); ?>
<br/>
</p>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,10 +319,10 @@ function display_polaroid_notice() {
?>
<div class="notice error">
<p>
<strong><?php _e('Polaroid Extension Redundant!', 'foogallery'); ?></strong><br/>
<?php _e('You have both FooGallery PRO and the old Polaroid extension activated. FooGallery PRO includes the Polaroid PRO gallery template, which makes the free Polaroid extension redundant.', 'foogallery'); ?>
<strong><?php esc_html_e('Polaroid Extension Redundant!', 'foogallery'); ?></strong><br/>
<?php esc_html_e('You have both FooGallery PRO and the old Polaroid extension activated. FooGallery PRO includes the Polaroid PRO gallery template, which makes the free Polaroid extension redundant.', 'foogallery'); ?>
<br/>
<?php _e('Please edit all galleries that use the old Polaroid gallery template and change them to use the Polaroid PRO gallery template. Once this is done, you can delete the free Polaroid extension.', 'foogallery'); ?>
<?php esc_html_e('Please edit all galleries that use the old Polaroid gallery template and change them to use the Polaroid PRO gallery template. Once this is done, you can delete the free Polaroid extension.', 'foogallery'); ?>
<br/>
</p>
</div>
Expand Down
28 changes: 14 additions & 14 deletions pro/includes/class-foogallery-pro-bulk-copy.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function ajax_bulk_copy_run() {
$result = $this->run_bulk_copy( $foogallery_id, $settings, $destination, $galleries );
?>
<div class="foogallery_bulk_copy_result"><?php echo $result; ?></div>
<button class="button button-primary button-large" id="foogallery_bulk_copy_start"><?php _e( 'Start Another Bulk Copy', 'foogallery' ); ?></button>
<button class="button button-primary button-large" id="foogallery_bulk_copy_start"><?php esc_html_e( 'Start Another Bulk Copy', 'foogallery' ); ?></button>
<?php wp_nonce_field( 'foogallery_bulk_copy_start', 'foogallery_bulk_copy_start_nonce', false ); ?>
<span class="foogallery_bulk_copy_spinner spinner"></span><?php
}
Expand Down Expand Up @@ -157,7 +157,7 @@ public function output_bulk_copy_form($foogallery_id, $settings = false, $destin
<table class="foogallery-metabox-settings">
<tr class="foogallery_template_field">
<th>
<label><?php _e('Which Settings?', 'foogallery'); ?></label>
<label><?php esc_html_e('Which Settings?', 'foogallery'); ?></label>
<span data-balloon-length="large" data-balloon-pos="right" data-balloon="Choose which settings you wish to bulk copy to other galleries."><i class="dashicons dashicons-editor-help"></i></span>
</th>
<td>
Expand All @@ -166,22 +166,22 @@ public function output_bulk_copy_form($foogallery_id, $settings = false, $destin
<?php } ?>
<div class="foogallery_metabox_field-radio">
<input <?php echo (array_key_exists(FOOGALLERY_META_SETTINGS, $settings) ? 'checked="checked"' : ''); ?> type="checkbox" name="foogallery_bulk_copy[settings][<?php echo FOOGALLERY_META_SETTINGS; ?>]" id="FooGalleryBulkCopy_Settings_Template" value="<?php echo FOOGALLERY_META_SETTINGS; ?>">
<label for="FooGalleryBulkCopy_Settings_Template"><?php _e('Gallery Template & Settings', 'foogallery'); ?></label><br>
<label for="FooGalleryBulkCopy_Settings_Template"><?php esc_html_e('Gallery Template & Settings', 'foogallery'); ?></label><br>

<input <?php echo (array_key_exists(FOOGALLERY_META_RETINA, $settings) ? 'checked="checked"' : ''); ?> type="checkbox" name="foogallery_bulk_copy[settings][<?php echo FOOGALLERY_META_RETINA; ?>]" id="FooGalleryBulkCopy_Settings_Retina" value="<?php echo FOOGALLERY_META_RETINA; ?>">
<label for="FooGalleryBulkCopy_Settings_Retina"><?php _e('Retina Settings', 'foogallery'); ?></label><br>
<label for="FooGalleryBulkCopy_Settings_Retina"><?php esc_html_e('Retina Settings', 'foogallery'); ?></label><br>

<input <?php echo (array_key_exists(FOOGALLERY_META_SORT, $settings) ? 'checked="checked"' : ''); ?> type="checkbox" name="foogallery_bulk_copy[settings][<?php echo FOOGALLERY_META_SORT; ?>]" id="FooGalleryBulkCopy_Settings_Sorting" value="<?php echo FOOGALLERY_META_SORT; ?>">
<label for="FooGalleryBulkCopy_Settings_Sorting"><?php _e('Sorting Settings', 'foogallery'); ?></label><br>
<label for="FooGalleryBulkCopy_Settings_Sorting"><?php esc_html_e('Sorting Settings', 'foogallery'); ?></label><br>

<input <?php echo (array_key_exists(FOOGALLERY_META_CUSTOM_CSS, $settings) ? 'checked="checked"' : ''); ?> type="checkbox" name="foogallery_bulk_copy[settings][<?php echo FOOGALLERY_META_CUSTOM_CSS; ?>]" id="FooGalleryBulkCopy_Settings_CustomCSS" value="<?php echo FOOGALLERY_META_CUSTOM_CSS; ?>">
<label for="FooGalleryBulkCopy_Settings_CustomCSS"><?php _e('Custom CSS', 'foogallery'); ?></label>
<label for="FooGalleryBulkCopy_Settings_CustomCSS"><?php esc_html_e('Custom CSS', 'foogallery'); ?></label>
</div>
</td>
</tr>
<tr class="foogallery_template_field">
<th>
<label for="FooGallerySettings_default_lightbox"><?php _e('Destination', 'foogallery'); ?></label>
<label for="FooGallerySettings_default_lightbox"><?php esc_html_e('Destination', 'foogallery'); ?></label>
<span data-balloon-length="large" data-balloon-pos="right" data-balloon="Choose which galleries you want to copy the settings to."><i class="dashicons dashicons-editor-help"></i></span>
</th>
<td>
Expand All @@ -190,16 +190,16 @@ public function output_bulk_copy_form($foogallery_id, $settings = false, $destin
<?php } ?>
<div class="foogallery_metabox_field-radio">
<input <?php echo ('all' === $destination ? 'checked="checked"' : ''); ?> type="radio" name="foogallery_bulk_copy[destination]" id="FooGalleryBulkCopy_Destination_All" value="all">
<label for="FooGalleryBulkCopy_Destination_All"><?php _e('All Galleries', 'foogallery'); ?></label><br>
<label for="FooGalleryBulkCopy_Destination_All"><?php esc_html_e('All Galleries', 'foogallery'); ?></label><br>

<input <?php echo ('custom' === $destination ? 'checked="checked"' : ''); ?> type="radio" name="foogallery_bulk_copy[destination]" id="FooGalleryBulkCopy_Destination_Custom" value="custom">
<label for="FooGalleryBulkCopy_Destination_Custom"><?php _e('Custom Selection', 'foogallery'); ?></label><br>
<label for="FooGalleryBulkCopy_Destination_Custom"><?php esc_html_e('Custom Selection', 'foogallery'); ?></label><br>
</div>
</td>
</tr>
<tr class="foogallery_template_field">
<th>
<label for="FooGallerySettings_default_lightbox"><?php _e('Select the galleries', 'foogallery'); ?></label>
<label for="FooGallerySettings_default_lightbox"><?php esc_html_e('Select the galleries', 'foogallery'); ?></label>
</th>
<td>
<?php if ( array_key_exists( 'gallery', $errors ) ) {?><div class="foogallery_bulk_copy_error"><?php echo $errors['gallery']; ?></div><?php } ?>
Expand All @@ -217,11 +217,11 @@ public function output_bulk_copy_form($foogallery_id, $settings = false, $destin
</table>
<p>
<input type="hidden" name="foogallery_bulk_copy[foogallery]" value="<?php echo $foogallery_id; ?>" />
<button class="button button-primary button-large" id="foogallery_bulk_copy_run"><?php _e( 'Run Bulk Copy', 'foogallery' ); ?></button>
<button class="button button-primary button-large" id="foogallery_bulk_copy_run"><?php esc_html_e( 'Run Bulk Copy', 'foogallery' ); ?></button>
<span class="foogallery_bulk_copy_spinner spinner"></span>
<?php if ( count ($errors) > 0 ) { ?>
<br />
<div class="foogallery_bulk_copy_error"><?php _e('The bulk copy could not be run, due to errors. Please see above and correct the errors before continuing.', 'foogallery'); ?></div>
<div class="foogallery_bulk_copy_error"><?php esc_html_e('The bulk copy could not be run, due to errors. Please see above and correct the errors before continuing.', 'foogallery'); ?></div>
<?php } ?>
<?php wp_nonce_field( 'foogallery_bulk_copy_run', 'foogallery_bulk_copy_run_nonce', false ); ?>
</p>
Expand Down Expand Up @@ -346,11 +346,11 @@ function render_gallery_bulk_copy_metabox( $post ) {
});
</script>
<div>
<p class="foogallery-help"><?php _e('You can bulk copy the settings from this gallery to other galleries in a few easy steps. To get started, click the button below. Please be sure to save your gallery before you start the copy, as only the saved settings stored in the database will be copied across.', 'foogallery'); ?></p>
<p class="foogallery-help"><?php esc_html_e('You can bulk copy the settings from this gallery to other galleries in a few easy steps. To get started, click the button below. Please be sure to save your gallery before you start the copy, as only the saved settings stored in the database will be copied across.', 'foogallery'); ?></p>
</div>
<br/>
<div id="foogallery_bulk_copy_container">
<button class="button button-primary button-large" id="foogallery_bulk_copy_start"><?php _e( 'Start Bulk Copy', 'foogallery' ); ?></button>
<button class="button button-primary button-large" id="foogallery_bulk_copy_start"><?php esc_html_e( 'Start Bulk Copy', 'foogallery' ); ?></button>
<?php wp_nonce_field( 'foogallery_bulk_copy_start', 'foogallery_bulk_copy_start_nonce', false ); ?>
<span class="foogallery_bulk_copy_spinner spinner"></span>
</div>
Expand Down
8 changes: 4 additions & 4 deletions pro/includes/class-foogallery-pro-bulk-management.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function __construct() {
function add_bulk_button( $foogallery ) {
?>
<button type="button" class="button button-primary button-large alignright bulk_media_management">
<?php _e( 'Bulk Taxonomy Manager', 'foogallery' ); ?>
<?php esc_html_e( 'Bulk Taxonomy Manager', 'foogallery' ); ?>
</button>
<?php
}
Expand Down Expand Up @@ -57,7 +57,7 @@ public function render_bulk_modal() {
<div class="media-modal-content">
<div class="media-frame wp-core-ui">
<div class="foogallery-bulk-management-modal-title">
<h1><?php _e('Bulk Taxonomy Manager', 'foogallery'); ?></h1>
<h1><?php esc_html_e('Bulk Taxonomy Manager', 'foogallery'); ?></h1>
<select class="foogallery-bulk-management-select-taxonomy">
<?php
$taxonomy_objects = get_object_taxonomies( 'attachment', 'objects' );
Expand All @@ -66,7 +66,7 @@ public function render_bulk_modal() {
}
?>
</select>
<a class="foogallery-bulk-management-modal-reload button" href="#" style="display: none;"><span style="padding-top: 4px;" class="dashicons dashicons-update"></span> <?php _e('Reload', 'foogallery'); ?></a>
<a class="foogallery-bulk-management-modal-reload button" href="#" style="display: none;"><span style="padding-top: 4px;" class="dashicons dashicons-update"></span> <?php esc_html_e('Reload', 'foogallery'); ?></a>
</div>
<div class="foogallery-bulk-management-modal-container not-loaded">
<div class="spinner is-active"></div>
Expand All @@ -76,7 +76,7 @@ public function render_bulk_modal() {
<div class="media-toolbar-primary">
<a href="#"
class="foogallery-bulk-management-modal-close button button-large button-secondary"
title="<?php esc_attr_e('Close', 'foogallery'); ?>"><?php _e('Close', 'foogallery'); ?></a>
title="<?php esc_attr_e('Close', 'foogallery'); ?>"><?php esc_html_e('Close', 'foogallery'); ?></a>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion pro/includes/class-foogallery-pro-buttons.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public function override_buttons_from_product( $attachment, $product ) {
public function add_button_fields_to_product() {
?>
<p>
<?php _e('You can override the buttons shown for this product within the gallery.', 'foogallery '); ?>
<?php esc_html_e('You can override the buttons shown for this product within the gallery.', 'foogallery '); ?>
</p>
<?php

Expand Down
Loading