--- a/prodigy-commerce/admin/class-prodigy-admin-attributes-list.php
+++ b/prodigy-commerce/admin/class-prodigy-admin-attributes-list.php
@@ -1,7 +1,11 @@
<?php
-
namespace ProdigyAdmin;
+
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
use ProdigyIncludesContentProdigy_Request_Maker;
use ProdigyIncludesHelpersProdigy_Template;
use ProdigyIncludesModelsProdigy_Attribute_Taxonomies;
@@ -141,8 +145,8 @@
public function add_prodigy_attributes_menu() {
add_submenu_page(
'edit.php?post_type=' . Prodigy::get_prodigy_product_type(),
- __( 'Prodigy Attributes', 'prodigy' ),
- __( 'Attributes', 'prodigy' ),
+ __( 'Prodigy Attributes', 'prodigy-commerce' ),
+ __( 'Attributes', 'prodigy-commerce' ),
'edit_pages',
self::ATTRIBUTES_PAGE,
array( $this, 'get_attributes_page' )
--- a/prodigy-commerce/admin/class-prodigy-admin-categories-list.php
+++ b/prodigy-commerce/admin/class-prodigy-admin-categories-list.php
@@ -1,7 +1,10 @@
<?php
-
namespace ProdigyAdmin;
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
use ProdigyIncludesContentProdigy_Request_Maker;
use ProdigyIncludesHelpersProdigy_Parameters;
use ProdigyIncludesHelpersProdigy_Template;
@@ -165,8 +168,8 @@
add_submenu_page(
'edit.php?post_type=' . Prodigy::get_prodigy_product_type(),
- __( 'Prodigy Categories', 'prodigy' ),
- __( 'Categories', 'prodigy' ),
+ __( 'Prodigy Categories', 'prodigy-commerce' ),
+ __( 'Categories', 'prodigy-commerce' ),
'edit_pages',
self::PRODIGY_CATEGORIES_PAGE,
array( $this, 'get_categories_page' )
--- a/prodigy-commerce/admin/class-prodigy-admin-form-field.php
+++ b/prodigy-commerce/admin/class-prodigy-admin-form-field.php
@@ -185,7 +185,7 @@
foreach ( $field['options'] as $k => $v ) {
if ( is_array( $v ) ) {
$label = $v['label'] ?? '';
- $html .= sprintf( '<optgroup label="%s">', $label );
+ $html .= sprintf( '<optgroup label="%s">', esc_attr( $label ) );
if ( isset( $v['options'] ) ) {
foreach ( $v['options'] as $kk => $vv ) {
$selected = $kk === $field['value'];
--- a/prodigy-commerce/admin/class-prodigy-admin-notices.php
+++ b/prodigy-commerce/admin/class-prodigy-admin-notices.php
@@ -1,7 +1,10 @@
<?php
-
namespace ProdigyAdmin;
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
use ProdigyIncludesProdigy;
/**
--- a/prodigy-commerce/admin/class-prodigy-admin-products-list.php
+++ b/prodigy-commerce/admin/class-prodigy-admin-products-list.php
@@ -1,7 +1,11 @@
<?php
-
namespace ProdigyAdmin;
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+
use ProdigyIncludesContentProdigy_Api_Client;
use ProdigyIncludesContentProdigy_Request_Maker;
use ProdigyIncludesDemoExceptionProdigy_Demo_Content_Exception;
@@ -101,8 +105,8 @@
add_submenu_page(
'',
- __( 'Prodigy Products', 'prodigy' ),
- __( 'Products list', 'prodigy' ),
+ __( 'Prodigy Products', 'prodigy-commerce' ),
+ __( 'Products list', 'prodigy-commerce' ),
'edit_pages',
self::PRODIGY_PRODUCTS_PAGE,
array( $this, 'get_products_page' )
--- a/prodigy-commerce/admin/class-prodigy-admin-settings.php
+++ b/prodigy-commerce/admin/class-prodigy-admin-settings.php
@@ -1,7 +1,10 @@
<?php
-
namespace ProdigyAdmin;
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
use ProdigyIncludesContentProdigy_Api_Client;
use ProdigyIncludesContentProdigy_Request_Maker;
use ProdigyIncludesDemoExceptionProdigy_Demo_Content_Exception;
@@ -200,7 +203,7 @@
$subdomain = Prodigy_Url_Helper::get_hs_store_subdomain();
if ( empty( $subdomain ) ) {
- wp_send_json_error( esc_html__( 'No connection', 'prodigy' ), WP_Http::UNPROCESSABLE_ENTITY );
+ wp_send_json_error( esc_html__( 'No connection', 'prodigy-commerce' ), WP_Http::UNPROCESSABLE_ENTITY );
}
$request_store = Prodigy_Request_Maker::get_instance()->do_get_platform_info();
@@ -216,7 +219,7 @@
$data['pg_domain_hosted_system'] = get_option( 'pg_domain_hosted_system' );
$data['pg_url_domain_hosted_system'] = esc_url( Prodigy_Url_Helper::get_url_home() );
- $data['message'] = esc_html__( 'Data updated successfully', 'prodigy' );
+ $data['message'] = esc_html__( 'Data updated successfully', 'prodigy-commerce' );
wp_send_json_success( $data );
} else {
$errors = Prodigy_Request_Maker::get_instance()->get_list_errors( $request_store );
@@ -233,8 +236,8 @@
public function add_prodigy_settings_menu(): void {
$menu_setting_page = add_submenu_page(
'edit.php?post_type=' . Prodigy::get_prodigy_product_type(),
- esc_html__( 'Prodigy Settings', 'prodigy' ),
- esc_html__( 'Settings', 'prodigy' ),
+ esc_html__( 'Prodigy Settings', 'prodigy-commerce' ),
+ esc_html__( 'Settings', 'prodigy-commerce' ),
'edit_pages',
self::SETTINGS_PAGE,
array( $this, 'display_page' )
@@ -268,7 +271,7 @@
$request_page = isset( $_GET['page'] ) ? sanitize_text_field( wp_unslash( $_GET['page'] ) ) : '';
if ( ! empty( $_POST ) && $request_page === self::SETTINGS_PAGE ) {
if ( $this->save_fields() ) {
- Prodigy_Admin_Notification::display_success( esc_html__( 'Your settings have been saved', 'prodigy' ) );
+ Prodigy_Admin_Notification::display_success( esc_html__( 'Your settings have been saved', 'prodigy-commerce' ) );
}
}
}
@@ -380,7 +383,7 @@
* @return void
*/
public static function redirect_to_settings( string $tab ): void {
- Prodigy_Admin_Notification::display_success( esc_html__( 'Your settings have been saved', 'prodigy' ) );
+ Prodigy_Admin_Notification::display_success( esc_html__( 'Your settings have been saved', 'prodigy-commerce' ) );
$admin_url = prodigy_get_admin_url(
'edit.php',
array(
@@ -442,7 +445,7 @@
$page = get_post( $page_id );
if ( ! empty( $page ) && ( $page->post_status === 'publish' || $page->post_status === 'draft' ) ) {
$page_title = $page->post_title ?? '';
- return array( $page_id => "$page_title ($page_id)" );
+ return array( $page_id => esc_html( $page_title ) . ' (' . (int) $page_id . ')' );
}
return array();
@@ -463,22 +466,22 @@
return array(
self::ACTION_GENERAL => array(
- 'title' => esc_html__( 'General', 'prodigy' ),
+ 'title' => esc_html__( 'General', 'prodigy-commerce' ),
'template' => array(
'is_connected' => (bool) get_option( Prodigy_Admin_Setup_Wizard::OPTION_STORE_KEY ),
'domain_hosted_system' => get_option( 'pg_domain_hosted_system', 'Store name domain hosted' ),
),
),
self::ACTION_PRODUCTS => array(
- 'title' => esc_html__( 'Products', 'prodigy' ),
+ 'title' => esc_html__( 'Products', 'prodigy-commerce' ),
'fields' => array(
array(
'type' => 'section_title',
- 'label' => esc_html__( 'Shop pages', 'prodigy' ),
+ 'label' => esc_html__( 'Shop pages', 'prodigy-commerce' ),
'id' => 'prodigy_shop_section_title',
),
array(
- 'label' => esc_html__( 'Shop page', 'prodigy' ),
+ 'label' => esc_html__( 'Shop page', 'prodigy-commerce' ),
'type' => 'dropdown',
'id' => 'prodigy_shop_page_id',
'class' => 'prodigy-init-page-select',
@@ -486,7 +489,7 @@
'options' => $shop_page_option,
),
array(
- 'label' => esc_html__( 'Customize Product page URL', 'prodigy' ),
+ 'label' => esc_html__( 'Customize Product page URL', 'prodigy-commerce' ),
'type' => 'text',
'class' => 'prodigy-type-slug-js',
'id' => 'pg_product_type_slug',
@@ -494,7 +497,7 @@
'placeholder' => Prodigy::get_prodigy_product_type(),
),
array(
- 'label' => esc_html__( 'Customize Category page URL', 'prodigy' ),
+ 'label' => esc_html__( 'Customize Category page URL', 'prodigy-commerce' ),
'type' => 'text',
'class' => 'prodigy-type-slug-js',
'id' => 'pg_category_type_slug',
@@ -502,7 +505,7 @@
'placeholder' => Prodigy::get_prodigy_category_type(),
),
array(
- 'label' => esc_html__( 'Customize Tag page URL', 'prodigy' ),
+ 'label' => esc_html__( 'Customize Tag page URL', 'prodigy-commerce' ),
'type' => 'text',
'class' => 'prodigy-type-slug-js',
'id' => 'pg_tag_type_slug',
@@ -510,34 +513,34 @@
'placeholder' => Prodigy::get_prodigy_tag_type(),
),
array(
- 'label' => esc_html__( 'Add to cart behaviour', 'prodigy' ),
+ 'label' => esc_html__( 'Add to cart behaviour', 'prodigy-commerce' ),
'type' => 'radio',
'class' => 'prodigy-main-radio',
'id' => 'pg_add_cart_behaviour',
'options' => array(
'redirect_to_cart' => esc_html__(
'Redirect to the cart page after successful addition',
- 'prodigy'
+ 'prodigy-commerce'
),
'current_page' => esc_html__(
'Update cart widget and remain on current page',
- 'prodigy'
+ 'prodigy-commerce'
),
),
),
array(
- 'label' => esc_html__( 'Cart expiration time', 'prodigy' ),
+ 'label' => esc_html__( 'Cart expiration time', 'prodigy-commerce' ),
'type' => 'dropdown',
'class' => 'prodigy-plugin-settings__select mb-12 expiration-time-js',
'id' => 'pg_cart_expiration_time',
'options' => array(
- '1' => esc_html__( '1 hour', 'prodigy' ),
- '5' => esc_html__( '5 hour', 'prodigy' ),
- '24' => esc_html__( '24 hour', 'prodigy' ),
- '48' => esc_html__( '48 hour', 'prodigy' ),
- '168' => esc_html__( '1 week (168h)', 'prodigy' ),
- '672' => esc_html__( '4 weeks (672h)', 'prodigy' ),
- 'custom' => esc_html__( 'Custom value', 'prodigy' ),
+ '1' => esc_html__( '1 hour', 'prodigy-commerce' ),
+ '5' => esc_html__( '5 hour', 'prodigy-commerce' ),
+ '24' => esc_html__( '24 hour', 'prodigy-commerce' ),
+ '48' => esc_html__( '48 hour', 'prodigy-commerce' ),
+ '168' => esc_html__( '1 week (168h)', 'prodigy-commerce' ),
+ '672' => esc_html__( '4 weeks (672h)', 'prodigy-commerce' ),
+ 'custom' => esc_html__( 'Custom value', 'prodigy-commerce' ),
),
'fields' => array(
array(
@@ -545,47 +548,47 @@
'type' => 'text',
'class' => 'prodigy-plugin-settings__input expiration-custom-js hidden',
'id' => 'pg_custom_expiration_time',
- 'placeholder' => esc_attr__( 'from 1h to 9999h', 'prodigy' ),
+ 'placeholder' => esc_attr__( 'from 1h to 9999h', 'prodigy-commerce' ),
),
),
),
array(
'type' => 'section_title',
- 'label' => esc_html__( 'Reviews', 'prodigy' ),
+ 'label' => esc_html__( 'Reviews', 'prodigy-commerce' ),
'id' => 'prodigy_reviews_section_title',
),
array(
- 'label' => esc_html__( 'Enable reviews', 'prodigy' ),
- 'text' => esc_html__( 'Enable product reviews', 'prodigy' ),
+ 'label' => esc_html__( 'Enable reviews', 'prodigy-commerce' ),
+ 'text' => esc_html__( 'Enable product reviews', 'prodigy-commerce' ),
'type' => 'checkbox',
'class' => 'main-checkbox__input',
'id' => 'pg_product_review',
),
array(
- 'label' => esc_html__( 'Product ratings', 'prodigy' ),
- 'text' => esc_html__( 'Enable star rating on reviews', 'prodigy' ),
+ 'label' => esc_html__( 'Product ratings', 'prodigy-commerce' ),
+ 'text' => esc_html__( 'Enable star rating on reviews', 'prodigy-commerce' ),
'type' => 'checkbox',
'class' => 'main-checkbox__input',
'id' => 'pg_product_rating',
),
array(
- 'label' => esc_html__( 'Captcha comments', 'prodigy' ),
- 'text' => esc_html__( 'Enable captcha comments', 'prodigy' ),
+ 'label' => esc_html__( 'Captcha comments', 'prodigy-commerce' ),
+ 'text' => esc_html__( 'Enable captcha comments', 'prodigy-commerce' ),
'type' => 'checkbox',
'class' => 'main-checkbox__input captcha-launch-js',
'id' => 'pg_captcha_launch',
),
array(
- 'label' => esc_html__( 'Captcha site key', 'prodigy' ),
+ 'label' => esc_html__( 'Captcha site key', 'prodigy-commerce' ),
'type' => 'text',
'wrapper-class' => 'captcha-block-js',
'id' => 'pg_captcha_site_key',
),
array(
- 'label' => esc_html__( 'Captcha secret key', 'prodigy' ),
+ 'label' => esc_html__( 'Captcha secret key', 'prodigy-commerce' ),
'description' => esc_html__(
'Please make sure you accurately copy and paste the Captcha site key and secret key into the fields above',
- 'prodigy'
+ 'prodigy-commerce'
),
'type' => 'text',
'wrapper-class' => 'captcha-block-js',
@@ -594,32 +597,32 @@
),
),
self::ACTION_CACHE => array(
- 'title' => esc_html__( 'Cache', 'prodigy' ),
+ 'title' => esc_html__( 'Cache', 'prodigy-commerce' ),
'fields' => array(
array(
'type' => 'section_title',
- 'label' => esc_html__( 'Plugin cache', 'prodigy' ),
+ 'label' => esc_html__( 'Plugin cache', 'prodigy-commerce' ),
'id' => 'prodigy_cache_section_title',
),
array(
- 'label' => esc_html__( 'Enable caching', 'prodigy' ),
- 'text' => esc_html__( 'Enable caching', 'prodigy' ),
+ 'label' => esc_html__( 'Enable caching', 'prodigy-commerce' ),
+ 'text' => esc_html__( 'Enable caching', 'prodigy-commerce' ),
'type' => 'checkbox',
'class' => 'main-checkbox__input',
'id' => Prodigy_Cache::CACHE_STATE_OPTION,
),
array(
- 'label' => esc_html__( 'Cache expiration time', 'prodigy' ),
+ 'label' => esc_html__( 'Cache expiration time', 'prodigy-commerce' ),
'type' => 'dropdown',
'class' => 'prodigy-plugin-settings__select mb-12 pg-cache-expiration-time-js ',
'id' => Prodigy_Cache::EXPIRATION_TIME_OPTION,
'options' => array(
- '60' => esc_html__( '1 minute', 'prodigy' ),
- '300' => esc_html__( '5 minutes', 'prodigy' ),
- '900' => esc_html__( '15 minutes', 'prodigy' ),
- '1800' => esc_html__( '30 minutes', 'prodigy' ),
- '3600' => esc_html__( '1 hour', 'prodigy' ),
- 'custom' => esc_html__( 'Custom value', 'prodigy' ),
+ '60' => esc_html__( '1 minute', 'prodigy-commerce' ),
+ '300' => esc_html__( '5 minutes', 'prodigy-commerce' ),
+ '900' => esc_html__( '15 minutes', 'prodigy-commerce' ),
+ '1800' => esc_html__( '30 minutes', 'prodigy-commerce' ),
+ '3600' => esc_html__( '1 hour', 'prodigy-commerce' ),
+ 'custom' => esc_html__( 'Custom value', 'prodigy-commerce' ),
),
'value' => get_option( Prodigy_Cache::EXPIRATION_TIME_OPTION ),
'fields' => array(
@@ -628,22 +631,22 @@
'type' => 'text',
'class' => 'prodigy-plugin-settings__input pg-cache-expiration-custom-js hidden',
'id' => Prodigy_Cache::CUSTOM_EXPIRATION_TIME_OPTION,
- 'placeholder' => esc_attr__( 'from 1h to 9999h', 'prodigy' ),
+ 'placeholder' => esc_attr__( 'from 1h to 9999h', 'prodigy-commerce' ),
),
),
),
),
),
self::ACTION_PAGES => array(
- 'title' => esc_html__( 'Pages', 'prodigy' ),
+ 'title' => esc_html__( 'Pages', 'prodigy-commerce' ),
'fields' => array(
array(
'type' => 'section_title',
- 'label' => esc_html__( 'Pages setup', 'prodigy' ),
+ 'label' => esc_html__( 'Pages setup', 'prodigy-commerce' ),
'id' => 'prodigy_pages_section_title',
),
array(
- 'label' => esc_html__( 'Cart page', 'prodigy' ),
+ 'label' => esc_html__( 'Cart page', 'prodigy-commerce' ),
'type' => 'dropdown',
'class' => 'prodigy-init-page-select',
'id' => 'prodigy_cart_page_id',
@@ -651,7 +654,7 @@
'options' => $cart_page_option,
),
array(
- 'label' => esc_html__( 'Thank you page', 'prodigy' ),
+ 'label' => esc_html__( 'Thank you page', 'prodigy-commerce' ),
'type' => 'dropdown',
'class' => 'prodigy-init-page-select',
'id' => 'prodigy_thank_page_id',
@@ -661,16 +664,16 @@
),
),
self::ACTION_APPS => array(
- 'title' => esc_html__( 'Apps', 'prodigy' ),
+ 'title' => esc_html__( 'Apps', 'prodigy-commerce' ),
'fields' => array(
array(
'type' => 'section_title',
- 'label' => esc_html__( 'Google Analytics', 'prodigy' ),
+ 'label' => esc_html__( 'Google Analytics', 'prodigy-commerce' ),
'id' => 'prodigy_apps_section_title',
),
array(
- 'label' => esc_html__( 'Enable GA', 'prodigy' ),
- 'text' => esc_html__( 'Enable Google Analytics', 'prodigy' ),
+ 'label' => esc_html__( 'Enable GA', 'prodigy-commerce' ),
+ 'text' => esc_html__( 'Enable Google Analytics', 'prodigy-commerce' ),
'type' => 'checkbox',
'class' => 'main-checkbox__input',
'id' => 'pg_enable_google_analytics',
--- a/prodigy-commerce/admin/class-prodigy-admin-setup-wizard.php
+++ b/prodigy-commerce/admin/class-prodigy-admin-setup-wizard.php
@@ -166,13 +166,13 @@
*/
private function initialize_properties(): void {
$this->page_header_steps = array(
- 1 => __( 'Connection', 'prodigy' ),
- 2 => __( 'Demo Content', 'prodigy' ),
+ 1 => __( 'Connection', 'prodigy-commerce' ),
+ 2 => __( 'Demo Content', 'prodigy-commerce' ),
);
$this->page_header_content = array(
- 1 => __( 'Data Synchronization', 'prodigy' ),
- 2 => __( 'Prodigy Demo Content', 'prodigy' ),
+ 1 => __( 'Data Synchronization', 'prodigy-commerce' ),
+ 2 => __( 'Prodigy Demo Content', 'prodigy-commerce' ),
);
}
@@ -240,8 +240,8 @@
private function load_stored_data(): void {
$this->is_connected = get_option( self::OPTION_STORE_KEY );
$this->saved_step = get_option( self::OPTION_STEP_WIZARD, self::DEFAULT_STEP );
- $this->domain_hosted_system = get_option( self::OPTION_DOMAIN_HOSTED_SYSTEM, __( 'Store name domain hosted', 'prodigy' ) );
- $this->url_domain_hosted_system = get_option( self::OPTION_URL_DOMAIN_HOSTED_SYSTEM, __( 'Store url domain hosted', 'prodigy' ) );
+ $this->domain_hosted_system = get_option( self::OPTION_DOMAIN_HOSTED_SYSTEM, __( 'Store name domain hosted', 'prodigy-commerce' ) );
+ $this->url_domain_hosted_system = get_option( self::OPTION_URL_DOMAIN_HOSTED_SYSTEM, __( 'Store url domain hosted', 'prodigy-commerce' ) );
$this->is_created_products = $this->is_created_products();
$this->is_created_categories = $this->is_created_categories();
$this->set_step();
--- a/prodigy-commerce/admin/class-prodigy-admin-wizard.php
+++ b/prodigy-commerce/admin/class-prodigy-admin-wizard.php
@@ -51,7 +51,7 @@
check_ajax_referer( 'prodigyajax-nonce', 'nonce_code' );
if ( ! current_user_can( 'manage_options' ) ) {
- wp_send_json_error( __( 'You don't have access', 'prodigy' ), 403 );
+ wp_send_json_error( __( 'You don't have access', 'prodigy-commerce' ), 403 );
}
update_option( 'pg_indicator_sync_content', 'no' );
@@ -65,7 +65,7 @@
check_ajax_referer( 'prodigyajax-nonce', 'nonce_code' );
if ( ! current_user_can( 'manage_options' ) ) {
- wp_send_json_error( __( 'You don't have access', 'prodigy' ), 403 );
+ wp_send_json_error( __( 'You don't have access', 'prodigy-commerce' ), 403 );
}
update_option( 'pg_indicator_sync_content', 'yes' );
@@ -93,7 +93,7 @@
$is_nonce = check_ajax_referer( 'prodigyajax-nonce', 'nonce_code' );
if ( $is_nonce && ! current_user_can( 'manage_options' ) ) {
- wp_send_json_error( __( 'You don't have access', 'prodigy' ), 403 );
+ wp_send_json_error( __( 'You don't have access', 'prodigy-commerce' ), 403 );
}
$settings_name = Prodigy_Parameters::get_parameter( $_SERVER, 'settings_name' );
$settings_val = Prodigy_Parameters::get_parameter( $_SERVER, 'settings_val' );
--- a/prodigy-commerce/admin/class-prodigy-admin.php
+++ b/prodigy-commerce/admin/class-prodigy-admin.php
@@ -1,13 +1,11 @@
<?php
-/**
- * The admin-specific functionality of the plugin.
- *
- * @version 1.0.0
- * @package prodigy/admin
- */
-
namespace ProdigyAdmin;
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+
use ProdigyIncludesContentProdigy_Request_Maker;
use ProdigyIncludesFrontendCart_Error_Handler;
use ProdigyincludesmodelsProdigy_Order;
--- a/prodigy-commerce/admin/partials/prodigy-admin-attributes-list.php
+++ b/prodigy-commerce/admin/partials/prodigy-admin-attributes-list.php
@@ -6,7 +6,7 @@
<div class="prodigy-products-list">
<div class="prodigy-products-list-header">
<h1 class="prodigy-products-list-header__title">
- <?php esc_html_e( 'Attributes', 'prodigy' ); ?>
+ <?php esc_html_e( 'Attributes', 'prodigy-commerce' ); ?>
<span class="in-grey-blue-500 opacity-05"><?php echo ! empty( $count ) ? esc_attr( $count ) : 0; ?></span>
</h1>
<div class="prodigy-products-list__sort d-flex flex-column flex-md-row justify-content-md-between align-items-md-end align-items-start">
@@ -17,15 +17,15 @@
target="_blank"
>
<span class="icon icon-external font-18 mr-4"></span>
- <?php esc_html_e( 'View the Attributes on Prodigy', 'prodigy' ); ?>
+ <?php esc_html_e( 'View the Attributes on Prodigy', 'prodigy-commerce' ); ?>
</a>
</div>
<div class="prodigy-products-list-header__search mt-12">
<input type="search" class="admin-attributes-search-js"
value="<?php echo esc_attr( $search ?? '' ); ?>"
- placeholder="<?php esc_attr_e( 'Search by Name', 'prodigy' ); ?>">
+ placeholder="<?php esc_attr_e( 'Search by Name', 'prodigy-commerce' ); ?>">
<input type="submit" class="button admin-submit-attributes-search-js"
- value="<?php esc_attr_e( 'Search', 'prodigy' ); ?>">
+ value="<?php esc_attr_e( 'Search', 'prodigy-commerce' ); ?>">
</div>
</div>
</div>
@@ -34,31 +34,31 @@
<tr>
<th class="prodigy-manage-column prodigy-hidden-cell">
<span>
- <?php esc_html_e( 'ID', 'prodigy' ); ?>
+ <?php esc_html_e( 'ID', 'prodigy-commerce' ); ?>
</span>
</th>
<th class="prodigy-manage-column prodigy-syncstatus-cell prodigy-hidden-cell text-nowrap">
<span>
- <?php esc_html_e( 'Sync Status', 'prodigy' ); ?>
+ <?php esc_html_e( 'Sync Status', 'prodigy-commerce' ); ?>
</span>
</th>
<th class="prodigy-manage-column sortable <?php echo ! empty( $sort ) ? esc_attr( $sort ) : ''; ?> prodigy-primary-cell pl-20"
data-sort="name">
<span class="prodigy-primary-cell__txt-mobile">
- <?php esc_html_e( 'Name', 'prodigy' ); ?>
+ <?php esc_html_e( 'Name', 'prodigy-commerce' ); ?>
</span>
<a class="prodigy-primary-cell__txt pl-0">
- <span><?php esc_html_e( 'Name', 'prodigy' ); ?></span>
+ <span><?php esc_html_e( 'Name', 'prodigy-commerce' ); ?></span>
<span class="sorting-indicator"></span>
</a>
</th>
<th class="prodigy-manage-column prodigy-hidden-cell">
<span>
- <?php esc_html_e( 'Attribute Values', 'prodigy' ); ?>
+ <?php esc_html_e( 'Attribute Values', 'prodigy-commerce' ); ?>
</span>
</th>
<th class="prodigy-manage-column sortable <?php echo ! empty( $count ) ? esc_attr( $count ) : 0; ?> prodigy-hidden-cell">
- <span><?php esc_html_e( 'Products', 'prodigy' ); ?></span>
+ <span><?php esc_html_e( 'Products', 'prodigy-commerce' ); ?></span>
</th>
</tr>
</thead>
@@ -73,14 +73,14 @@
<div class="d-flex flex-nowrap justify-content-start align-items-center">
<span class="prodigy-syncstatus__synced d-inline-block"></span>
<span class="prodigy-syncstatus__synced-txt ml-16">
- <?php esc_html_e( 'Synced', 'prodigy' ); ?>
+ <?php esc_html_e( 'Synced', 'prodigy-commerce' ); ?>
</span>
</div>
<?php else : ?>
<div class="d-flex flex-nowrap justify-content-start align-items-center">
<span class="prodigy-syncstatus__not-synced d-inline-block"></span>
<span class="prodigy-syncstatus__not-synced-txt ml-16">
- <?php esc_html_e( 'Not Synced', 'prodigy' ); ?>
+ <?php esc_html_e( 'Not Synced', 'prodigy-commerce' ); ?>
</span>
</div>
<?php endif; ?>
@@ -88,7 +88,7 @@
<td class="prodigy-primary-cell pl-20">
<h3 class="prodigy-products-list-item__title min-height-auto mb-4"><?php echo esc_attr( $attribute['attributes']['name'] ); ?></h3>
<button class="prodigy-primary-cell__btn"
- aria-label="<?php esc_attr_e( 'Details', 'prodigy' ); ?>">
+ aria-label="<?php esc_attr_e( 'Details', 'prodigy-commerce' ); ?>">
<span class="icon icon-arrow-down"></span>
</button>
<div class="prodigy-products-list-item__links d-flex">
@@ -97,14 +97,14 @@
target="_blank"
href="<?php echo esc_url( PRODIGY_PROTOCOL_DOMAIN . Prodigy_Url_Helper::get_hs_store_subdomain() . '.' . PRODIGY_CHECKOUT_DOMAIN ); ?>/products/attributes/<?php echo esc_attr( $attribute['id'] ); ?>"
>
- <?php esc_html_e( 'Edit on Prodigy', 'prodigy' ); ?>
+ <?php esc_html_e( 'Edit on Prodigy', 'prodigy-commerce' ); ?>
</a>
</div>
<div class="prodigy-primary-cell__mobile-content">
<table>
<tr>
<td class="pl-0 pt-4 pb-4 pr-16">
- <?php esc_html_e( 'Values', 'prodigy' ); ?>
+ <?php esc_html_e( 'Values', 'prodigy-commerce' ); ?>
</td>
<td class="pt-4 pb-4 pl-4"><?php echo esc_attr( implode( ', ', $attribute['attributes']['option-values'] ) ); ?></td>
</tr>
@@ -113,21 +113,21 @@
<div class="d-flex flex-nowrap justify-content-start align-items-center">
<span class="prodigy-syncstatus__synced d-inline-block pr-16"></span>
<span class="prodigy-syncstatus__synced-txt">
- <?php esc_html_e( 'Synced', 'prodigy' ); ?>
+ <?php esc_html_e( 'Synced', 'prodigy-commerce' ); ?>
</span>
</div>
<?php else : ?>
<div class="d-flex flex-nowrap justify-content-start align-items-center">
<span class="prodigy-syncstatus__not-synced d-inline-block pr-16"></span>
<span class="prodigy-syncstatus__not-synced-txt">
- <?php esc_html_e( 'Not Synced', 'prodigy' ); ?>
+ <?php esc_html_e( 'Not Synced', 'prodigy-commerce' ); ?>
</span>
</div>
<?php endif; ?>
</tr>
<tr>
<td class="pl-0 pt-4 pb-4 pr-16">
- <?php esc_html_e( 'Products', 'prodigy' ); ?>
+ <?php esc_html_e( 'Products', 'prodigy-commerce' ); ?>
</td>
<td class="pt-4 pb-4 pl-4"><?php echo esc_attr( $attribute['attributes']['products-quantity'] ); ?></td>
</tr>
--- a/prodigy-commerce/admin/partials/prodigy-admin-categories-list.php
+++ b/prodigy-commerce/admin/partials/prodigy-admin-categories-list.php
@@ -1,4 +1,5 @@
-<?php use ProdigyIncludesHelpersProdigy_Url_Helper;
+<?php use ProdigyIncludesHelpersProdigy_Formatting;
+use ProdigyIncludesHelpersProdigy_Url_Helper;
defined( 'ABSPATH' ) || exit; ?>
<?php
@@ -13,10 +14,10 @@
if ( empty( $current_category['depth'] ) ) {
$page = '<tr class="prodigy-products-list-item"><td class="prodigy-products-list-item__category prodigy-primary-cell">' .
'<h3 class="prodigy-products-list-item__title min-height-auto mb-4">' . esc_attr( $current_category['name'] ) . '</h3>' .
- '<button class="prodigy-primary-cell__btn" aria-label="' . __( 'Details', 'prodigy' ) . '"><span class="icon icon-arrow-down"></span></button>' .
- '<div class="prodigy-products-list-item__links d-flex"><a class="d-block prodigy-products-list-item__link" target="_blank" href="' . $edit_url . '">' . __( 'Edit on Prodigy', 'prodigy' ) . '</a></div>' .
+ '<button class="prodigy-primary-cell__btn" aria-label="' . __( 'Details', 'prodigy-commerce' ) . '"><span class="icon icon-arrow-down"></span></button>' .
+ '<div class="prodigy-products-list-item__links d-flex"><a class="d-block prodigy-products-list-item__link" target="_blank" href="' . $edit_url . '">' . __( 'Edit on Prodigy', 'prodigy-commerce' ) . '</a></div>' .
'<div class="prodigy-primary-cell__mobile-content"><table>' .
- '<tr><td class="pl-0 pt-4 pb-4 pr-16">' . __( 'Product', 'prodigy' ) . '</td><td class="pt-4 pb-4 pl-4">' . esc_attr( $current_category['products-count'] ) . '</td></tr><tr>';
+ '<tr><td class="pl-0 pt-4 pb-4 pr-16">' . __( 'Product', 'prodigy-commerce' ) . '</td><td class="pt-4 pb-4 pl-4">' . esc_attr( $current_category['products-count'] ) . '</td></tr><tr>';
$page .= '<td class="pl-0 pt-4 pb-4 pr-16">';
if ( $current_category['is_synced'] ) {
@@ -27,9 +28,9 @@
$page .= '<td class="pt-4 pb-4 pl-4">';
if ( $current_category['is_synced'] ) {
- $page .= '<td class="pt-4 pb-4 pl-4"><span class="prodigy-syncstatus__synced-txt d-inline-block">' . __( 'Synced', 'prodigy' ) . '</span>';
+ $page .= '<td class="pt-4 pb-4 pl-4"><span class="prodigy-syncstatus__synced-txt d-inline-block">' . __( 'Synced', 'prodigy-commerce' ) . '</span>';
} else {
- $page .= '<span class="prodigy-syncstatus__not-synced-txt d-inline-block">' . __( 'Not Synced', 'prodigy' ) . '</span>';
+ $page .= '<span class="prodigy-syncstatus__not-synced-txt d-inline-block">' . __( 'Not Synced', 'prodigy-commerce' ) . '</span>';
}
$page .= '</td>';
$page .= '</tr><tr><td class="pl-0 pt-4 pb-4 pr-16">Date</td><td class="pt-4 pb-4 pl-4">' . esc_html( gmdate( 'Y-m-d H:i', strtotime( esc_attr( $current_category['created-at'] ) ) ) ) . '</td></tr>' .
@@ -44,10 +45,10 @@
}
$page .= '<h3 class="prodigy-products-list-item__title min-height-auto mb-4">' . esc_attr( $current_category['name'] ) . '</h3>' .
- '<button class="prodigy-primary-cell__btn" aria-label="' . __( 'Details', 'prodigy' ) . '"><span class="icon icon-arrow-down"></span></button>' .
- '<div class="prodigy-products-list-item__links d-flex"><a class="d-block prodigy-products-list-item__link" target="_blank" href="' . esc_url( $edit_url ) . '">' . __( 'Edit on Prodigy', 'prodigy' ) . '</a></div>' .
+ '<button class="prodigy-primary-cell__btn" aria-label="' . __( 'Details', 'prodigy-commerce' ) . '"><span class="icon icon-arrow-down"></span></button>' .
+ '<div class="prodigy-products-list-item__links d-flex"><a class="d-block prodigy-products-list-item__link" target="_blank" href="' . esc_url( $edit_url ) . '">' . __( 'Edit on Prodigy', 'prodigy-commerce' ) . '</a></div>' .
'<div class="prodigy-primary-cell__mobile-content"><table>' .
- '<tr><td class="pl-0 pt-4 pb-4 pr-16">' . __( 'Product', 'prodigy' ) . '</td><td class="pt-4 pb-4 pl-4">' . esc_attr( $current_category['products-count'] ) . '</td></tr>' .
+ '<tr><td class="pl-0 pt-4 pb-4 pr-16">' . __( 'Product', 'prodigy-commerce' ) . '</td><td class="pt-4 pb-4 pl-4">' . esc_attr( $current_category['products-count'] ) . '</td></tr>' .
'<tr><td class="pl-0 pt-4 pb-4 pr-16">';
if ( $current_category['is_synced'] ) {
$page .= '<span class="prodigy-syncstatus__synced d-inline-block"></span>';
@@ -56,26 +57,26 @@
}
if ( $current_category['is_synced'] ) {
- $page .= '<td class="pt-4 pb-4 pl-4"><span class="prodigy-syncstatus__synced-txt d-inline-block">' . __( 'Synced', 'prodigy' ) . '</span>';
+ $page .= '<td class="pt-4 pb-4 pl-4"><span class="prodigy-syncstatus__synced-txt d-inline-block">' . __( 'Synced', 'prodigy-commerce' ) . '</span>';
} else {
- $page .= '<span class="prodigy-syncstatus__not-synced-txt d-inline-block">' . __( 'Not Synced', 'prodigy' ) . '</span>';
+ $page .= '<span class="prodigy-syncstatus__not-synced-txt d-inline-block">' . __( 'Not Synced', 'prodigy-commerce' ) . '</span>';
}
$page .= '</td><td class="pt-4 pb-4 pl-4"></td></tr>' .
- '<tr><td class="pl-0 pt-4 pb-4 pr-16">' . __( 'Date', 'prodigy' ) . '</td><td class="pt-4 pb-4 pl-4">' . esc_html( gmdate( 'Y-m-d H:i', strtotime( esc_attr( $current_category['created-at'] ) ) ) ) . '</td></tr>' .
+ '<tr><td class="pl-0 pt-4 pb-4 pr-16">' . __( 'Date', 'prodigy-commerce' ) . '</td><td class="pt-4 pb-4 pl-4">' . esc_html( gmdate( 'Y-m-d H:i', strtotime( esc_attr( $current_category['created-at'] ) ) ) ) . '</td></tr>' .
'</table></div>' .
'</td><td class="prodigy-hidden-cell">';
}
if ( $current_category['is_synced'] ) {
$page .= '<p class="prodigy-syncstatus__synced-wrap d-flex justify-content-start align-items-center">' .
- '<span class="prodigy-syncstatus__synced d-inline-block"></span><span class="pl-16">' . __( 'Synced', 'prodigy' ) . '</span></p>';
+ '<span class="prodigy-syncstatus__synced d-inline-block"></span><span class="pl-16">' . __( 'Synced', 'prodigy-commerce' ) . '</span></p>';
} else {
$page .= '<p class="prodigy-syncstatus__not-synced-wrap d-flex justify-content-start flex-nowrap align-items-center">' .
- '<span class="prodigy-syncstatus__not-synced d-inline-block pr-4"></span><span class="pl-4">' . __( 'Not Synced', 'prodigy' ) . '</span></p>';
+ '<span class="prodigy-syncstatus__not-synced d-inline-block pr-4"></span><span class="pl-4">' . __( 'Not Synced', 'prodigy-commerce' ) . '</span></p>';
}
$page .= '</td><td class="prodigy-hidden-cell"></div>' . esc_attr( $current_category['id'] ) . '</td><td class="prodigy-hidden-cell">' . esc_attr( $current_category['products-count'] ) . '</td><td class="prodigy-hidden-cell">' . esc_html( gmdate( 'Y-m-d H:i', strtotime( esc_attr( $current_category['created-at'] ) ) ) ) . '</td></tr>';
- echo $page;
+ echo wp_kses( $page, Prodigy_Formatting::get_allowed_html() );
foreach ( $categories as $category ) {
print_list( $category['category'], $category['children'] );
@@ -87,7 +88,7 @@
<div class="prodigy-products-list">
<div class="prodigy-products-list-header">
<h1 class="prodigy-products-list-header__title">
- <?php esc_html_e( 'Categories', 'prodigy' ); ?>
+ <?php esc_html_e( 'Categories', 'prodigy-commerce' ); ?>
<span class="in-grey-blue-500 opacity-05"><?php echo esc_attr( ! empty( $count ) ? $count : 0 ); ?></span>
</h1>
<div class="prodigy-products-list__sort d-flex flex-column flex-md-row justify-content-md-between align-items-md-end align-items-start">
@@ -97,7 +98,7 @@
href="<?php echo esc_url( PRODIGY_PROTOCOL_DOMAIN . Prodigy_Url_Helper::get_hs_store_subdomain() . '.' . PRODIGY_CHECKOUT_DOMAIN . '/products/categories/' ); ?>"
>
<span class="icon icon-external font-18 mr-4"></span>
- <?php esc_html_e( 'View the Categories on Prodigy', 'prodigy' ); ?>
+ <?php esc_html_e( 'View the Categories on Prodigy', 'prodigy-commerce' ); ?>
</a>
</div>
<div class="prodigy-products-list-header__search mt-12">
@@ -114,29 +115,29 @@
<tr>
<th class="prodigy-manage-column sortable desc prodigy-primary-cell pl-20">
<span class="prodigy-primary-cell__txt-mobile ml-12">
- <?php esc_html_e( 'Items', 'prodigy' ); ?>
+ <?php esc_html_e( 'Items', 'prodigy-commerce' ); ?>
</span>
<span class="prodigy-primary-cell__txt">
- <span><?php esc_html_e( 'Title', 'prodigy' ); ?></span>
+ <span><?php esc_html_e( 'Title', 'prodigy-commerce' ); ?></span>
</span>
</th>
<th class="prodigy-manage-column prodigy-syncstatus-cell prodigy-hidden-cell">
<span>
- <?php esc_html_e( 'Sync Status', 'prodigy' ); ?>
+ <?php esc_html_e( 'Sync Status', 'prodigy-commerce' ); ?>
</span>
</th>
<th class="prodigy-manage-column prodigy-hidden-cell">
<span>
- <?php esc_html_e( 'ID', 'prodigy' ); ?>
+ <?php esc_html_e( 'ID', 'prodigy-commerce' ); ?>
</span>
</th>
<th class="prodigy-manage-column prodigy-hidden-cell">
<span>
- <?php esc_html_e( 'Products', 'prodigy' ); ?>
+ <?php esc_html_e( 'Products', 'prodigy-commerce' ); ?>
</span>
</th>
<th class="prodigy-hidden-cell">
- <?php esc_html_e( 'Created Date', 'prodigy' ); ?>
+ <?php esc_html_e( 'Created Date', 'prodigy-commerce' ); ?>
</th>
</tr>
</thead>
--- a/prodigy-commerce/admin/partials/prodigy-admin-products-list.php
+++ b/prodigy-commerce/admin/partials/prodigy-admin-products-list.php
@@ -10,7 +10,7 @@
<div class="prodigy-products-list">
<div class="prodigy-products-list-header">
<h1 class="prodigy-products-list-header__title">
- <?php esc_html_e( 'Products', 'prodigy' ); ?>
+ <?php esc_html_e( 'Products', 'prodigy-commerce' ); ?>
<span class="in-grey-blue-500 opacity-05"><?php echo ! empty( $count ) ? esc_attr( $count ) : 0; ?></span>
</h1>
<div class="prodigy-products-list__sort d-flex flex-column flex-md-row justify-content-md-between align-items-md-end align-items-start">
@@ -21,16 +21,16 @@
>
<span class="icon icon-sync font-18 mr-4"></span>
<span class="icon icon-rotate font-18 mr-4"></span>
- <?php esc_html_e( 'Sync with Prodigy', 'prodigy' ); ?>
+ <?php esc_html_e( 'Sync with Prodigy', 'prodigy-commerce' ); ?>
<span
id="products-list-item-link-popup"
tabIndex="0"
role="button"
- aria-label="<?php esc_attr_e( 'More information', 'prodigy' ); ?>"
+ aria-label="<?php esc_attr_e( 'More information', 'prodigy-commerce' ); ?>"
class="icon icon-info font-18 ml-4 prodigy-tooltip"
>
<span class="prodigy-tooltip__message">
- <?php esc_html_e( 'Synchronize all the data related to the Products, Categories and Attributes', 'prodigy' ); ?>
+ <?php esc_html_e( 'Synchronize all the data related to the Products, Categories and Attributes', 'prodigy-commerce' ); ?>
</span>
</span>
</button>
@@ -40,14 +40,14 @@
target="_blank"
>
<span class="icon icon-external font-18 mr-4"></span>
- <?php esc_html_e( 'View Products on Prodigy', 'prodigy' ); ?>
+ <?php esc_html_e( 'View Products on Prodigy', 'prodigy-commerce' ); ?>
</a>
</div>
<div class="prodigy-products-list-header__search mt-12">
<input type="search" class="admin-product-search-js"
value="<?php echo esc_attr( $search ?? '' ); ?>"
- placeholder="<?php esc_attr_e( 'Search by Title', 'prodigy' ); ?>">
- <input type="submit" class="button admin-submit-product-search-js" value="<?php esc_attr_e( 'Search', 'prodigy' ); ?>">
+ placeholder="<?php esc_attr_e( 'Search by Title', 'prodigy-commerce' ); ?>">
+ <input type="submit" class="button admin-submit-product-search-js" value="<?php esc_attr_e( 'Search', 'prodigy-commerce' ); ?>">
</div>
</div>
</div>
@@ -56,36 +56,36 @@
<tr>
<th class="prodigy-products-list-item__image-head">
<span class="visually-hidden">
- <?php esc_html_e( 'Image', 'prodigy' ); ?>
+ <?php esc_html_e( 'Image', 'prodigy-commerce' ); ?>
</span>
</th>
<th class="prodigy-manage-column sortable <?php echo ! empty( $sort ) ? esc_attr( $sort ) : ''; ?> prodigy-primary-cell"
data-sort="name">
<span class="prodigy-primary-cell__txt-mobile ml-12">
- <?php esc_html_e( 'Items', 'prodigy' ); ?>
+ <?php esc_html_e( 'Items', 'prodigy-commerce' ); ?>
</span>
<a class="prodigy-primary-cell__txt" href="#">
<span>
- <?php esc_html_e( 'Title', 'prodigy' ); ?>
+ <?php esc_html_e( 'Title', 'prodigy-commerce' ); ?>
</span>
<span class="sorting-indicator"></span>
</a>
</th>
<th class="prodigy-manage-column prodigy-syncstatus-cell prodigy-hidden-cell">
<span>
- <?php esc_html_e( 'Sync Status', 'prodigy' ); ?>
+ <?php esc_html_e( 'Sync Status', 'prodigy-commerce' ); ?>
</span>
</th>
<th class="prodigy-manage-column prodigy-hidden-cell">
<span>
- <?php esc_html_e( 'SKU', 'prodigy' ); ?>
+ <?php esc_html_e( 'SKU', 'prodigy-commerce' ); ?>
</span>
</th>
<th class="prodigy-manage-column sortable <?php echo ! empty( $sort ) ? esc_attr( $sort ) : ''; ?> prodigy-hidden-cell"
data-sort="id">
<a href="#">
<span>
- <?php esc_html_e( 'ID', 'prodigy' ); ?>
+ <?php esc_html_e( 'ID', 'prodigy-commerce' ); ?>
</span>
<span class="sorting-indicator"></span>
</a>
@@ -94,19 +94,19 @@
data-sort="price">
<a href="#">
<span>
- <?php esc_html_e( 'Price', 'prodigy' ); ?>
+ <?php esc_html_e( 'Price', 'prodigy-commerce' ); ?>
</span>
<span class="sorting-indicator"></span>
</a>
</th>
<th class="prodigy-hidden-cell">
- <?php esc_html_e( 'Categories', 'prodigy' ); ?>
+ <?php esc_html_e( 'Categories', 'prodigy-commerce' ); ?>
</th>
<th class="prodigy-manage-column sortable <?php echo ! empty( $sort ) ? esc_attr( $sort ) : ''; ?> prodigy-hidden-cell"
data-sort="created_at">
<a href="#">
<span>
- <?php esc_html_e( 'Created Date', 'prodigy' ); ?>
+ <?php esc_html_e( 'Created Date', 'prodigy-commerce' ); ?>
</span>
<span class="sorting-indicator"></span>
</a>
@@ -138,13 +138,13 @@
<button type="button" class="toggle-row">
<span class="screen-reader-text">
- <?php esc_html_e( 'Show more details', 'prodigy' ); ?>
+ <?php esc_html_e( 'Show more details', 'prodigy-commerce' ); ?>
</span>
</button>
</td>
<td class="prodigy-primary-cell">
<h3 class="prodigy-products-list-item__title "><?php echo esc_attr( $attributes['name'] ); ?></h3>
- <button class="prodigy-primary-cell__btn" aria-label="<?php esc_attr_e( 'Details', 'prodigy' ); ?>">
+ <button class="prodigy-primary-cell__btn" aria-label="<?php esc_attr_e( 'Details', 'prodigy-commerce' ); ?>">
<span class="icon icon-arrow-down"></span>
</button>
<div class="prodigy-products-list-item__links">
@@ -154,7 +154,7 @@
href="<?php echo esc_url( get_permalink( $local_product->post_id ) ); ?>"
target="_blank"
>
- <?php esc_html_e( 'View Details', 'prodigy' ); ?>
+ <?php esc_html_e( 'View Details', 'prodigy-commerce' ); ?>
</a>
<?php endif; ?>
@@ -163,19 +163,19 @@
target="_blank"
href="<?php echo esc_url( PRODIGY_PROTOCOL_DOMAIN . Prodigy_Url_Helper::get_hs_store_subdomain() . '.' . PRODIGY_CHECKOUT_DOMAIN ); ?>/products/<?php echo esc_attr( $product['id'] ); ?>"
>
- <?php esc_html_e( 'Edit on Prodigy', 'prodigy' ); ?>
+ <?php esc_html_e( 'Edit on Prodigy', 'prodigy-commerce' ); ?>
</a>
</div>
<div class="prodigy-primary-cell__mobile-content">
<div class="prodigy-products-list-item__links flex-wrap d-flex">
<a class="d-block prodigy-products-list-item__link prodigy-products-list-item__link--show-separator" href="">
- <?php esc_html_e( 'View Details', 'prodigy' ); ?>
+ <?php esc_html_e( 'View Details', 'prodigy-commerce' ); ?>
</a>
<a
class="d-block prodigy-products-list-item__link prodigy-products-list-item__link--show-separator"
href="<?php echo esc_url( PRODIGY_PROTOCOL_DOMAIN . Prodigy_Url_Helper::get_hs_store_subdomain() . '.' . PRODIGY_CHECKOUT_DOMAIN ); ?>/products/<?php echo esc_attr( $product['id'] ); ?>"
>
- <?php esc_html_e( 'Edit on Prodigy', 'prodigy' ); ?>
+ <?php esc_html_e( 'Edit on Prodigy', 'prodigy-commerce' ); ?>
</a>
</div>
<table>
@@ -190,18 +190,18 @@
<td class="pt-4 pb-4 pl-4">
<?php if ( isset( $local_product->post_id ) ) : ?>
<span class="prodigy-syncstatus__synced-txt d-inline-block">
- <?php esc_html_e( 'Synced', 'prodigy' ); ?>
+ <?php esc_html_e( 'Synced', 'prodigy-commerce' ); ?>
</span>
<?php else : ?>
<span class="prodigy-syncstatus__not-synced-txt d-inline-block">
- <?php esc_html_e( 'Not Synced', 'prodigy' ); ?>
+ <?php esc_html_e( 'Not Synced', 'prodigy-commerce' ); ?>
</span>
<?php endif; ?>
</td>
</tr>
<tr>
<td class="pl-0 pt-4 pb-4 pr-16">
- <?php esc_html_e( 'ID', 'prodigy' ); ?>
+ <?php esc_html_e( 'ID', 'prodigy-commerce' ); ?>
</td>
<td class="pt-4 pb-4 pl-4"><?php echo esc_attr( $product['id'] ); ?></td>
</tr>
@@ -211,13 +211,13 @@
<tr>
<td class="pl-0 pt-4 pb-4 pr-16">
- <?php esc_html_e( 'Categories', 'prodigy' ); ?>
+ <?php esc_html_e( 'Categories', 'prodigy-commerce' ); ?>
</td>
<td class="pt-4 pb-4 pl-4"><?php echo esc_attr( $attributes['categories-list'] ); ?></td>
</tr>
<tr>
<td class="pl-0 pt-4 pb-4 pr-16">
- <?php esc_html_e( 'Created Date', 'prodigy' ); ?>
+ <?php esc_html_e( 'Created Date', 'prodigy-commerce' ); ?>
</td>
<td class="pt-4 pb-4 pl-4"><?php echo esc_html( gmdate( 'Y-m-d H:i', strtotime( esc_attr( $attributes['created-at'] ) ) ) ); ?></td>
</tr>
@@ -229,14 +229,14 @@
<p class="prodigy-syncstatus__synced-wrap d-flex justify-content-start align-items-center">
<span class="prodigy-syncstatus__synced d-inline-block"></span>
<span class="pl-16">
- <?php esc_html_e( 'Synced', 'prodigy' ); ?>
+ <?php esc_html_e( 'Synced', 'prodigy-commerce' ); ?>
</span>
</p>
<?php else : ?>
<p class="prodigy-syncstatus__not-synced-wrap d-flex justify-content-start flex-nowrap align-items-center">
<span class="prodigy-syncstatus__not-synced d-inline-block pr-4"></span>
<span class="pl-4">
- <?php esc_html_e( 'Not Synced', 'prodigy' ); ?>
+ <?php esc_html_e( 'Not Synced', 'prodigy-commerce' ); ?>
</span>
</p>
<?php endif; ?>
--- a/prodigy-commerce/admin/partials/prodigy-admin-settings-page.php
+++ b/prodigy-commerce/admin/partials/prodigy-admin-settings-page.php
@@ -17,23 +17,23 @@
?>
<div class="prodigy-admin-wrap prodigy-admin-custom-template">
- <h1 class="wp-heading-inline"><?php esc_html_e( 'Settings', 'prodigy' ); ?></h1>
+ <h1 class="wp-heading-inline"><?php esc_html_e( 'Settings', 'prodigy-commerce' ); ?></h1>
<div class="prodigy-main-container">
<div class="prodigy-main-alert prodigy-main-alert--red" style="display: none">
<p class="font-12 mb-0">
<?php
esc_html_e(
'The store is disconnected. You need to paste API key for synchronize.',
- 'prodigy'
+ 'prodigy-commerce'
)
?>
</p>
<i class="prodigy-main-alert__close icon icon-close"></i>
</div>
<div class="prodigy-main-alert prodigy-main-alert--red" style="display: none">
- <p class="font-12 mb-0"><?php esc_html_e( 'The store is deleted on Prodigy hosted system.', 'prodigy' ); ?>
+ <p class="font-12 mb-0"><?php esc_html_e( 'The store is deleted on Prodigy hosted system.', 'prodigy-commerce' ); ?>
<a href="#" class="prodigy-main-link">
- <?php esc_html_e( 'See more details on Prodigy hosted system.', 'prodigy' ); ?>
+ <?php esc_html_e( 'See more details on Prodigy hosted system.', 'prodigy-commerce' ); ?>
</a></p>
<i class="prodigy-main-alert__close icon icon-close"></i>
</div>
@@ -79,13 +79,13 @@
<div class="modal-content">
<div class="prodigy-plugin-settings__modal-body modal-body">
<h4 class="prodigy-plugin-settings__subtitle font-20">
- <?php esc_html_e( 'You have an Unsaved Settings', 'prodigy' ); ?>
+ <?php esc_html_e( 'You have an Unsaved Settings', 'prodigy-commerce' ); ?>
</h4>
<p class="mb-0">
<?php
esc_html_e(
'Are you sure you want to leave this page without saving it?',
- 'prodigy'
+ 'prodigy-commerce'
)
?>
</p>
@@ -93,7 +93,7 @@
<?php
esc_html_e(
'If you leave this page, all unsaved changes will be lost.',
- 'prodigy'
+ 'prodigy-commerce'
)
?>
</p>
@@ -105,9 +105,9 @@
<input
class="prodigy-button-link mr-20 close-setting-popup"
type="button"
- value="<?php esc_attr_e( 'Leave without saving', 'prodigy' ); ?>"
+ value="<?php esc_attr_e( 'Leave without saving', 'prodigy-commerce' ); ?>"
/>
- <input class="prodigy-main-button prodigy-main-button--grey-dark settings-button-save" type="submit" value="<?php esc_attr_e( 'Save and Leave', 'prodigy' ); ?>"/>
+ <input class="prodigy-main-button prodigy-main-button--grey-dark settings-button-save" type="submit" value="<?php esc_attr_e( 'Save and Leave', 'prodigy-commerce' ); ?>"/>
</div>
</div>
</div>
--- a/prodigy-commerce/admin/partials/settings/general-settings.php
+++ b/prodigy-commerce/admin/partials/settings/general-settings.php
@@ -1,20 +1,20 @@
<?php
-/**
- * @var bool $is_connected
- * @var string $domain_hosted_system
- */
+
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
use ProdigyIncludesHelpersProdigy_Url_Helper;
?>
<div id="general" class="prodigy-admin-custom-template">
- <h4 class="prodigy-plugin-settings__subtitle"><?php esc_html_e( 'Setup wizard', 'prodigy' ); ?></h4>
+ <h4 class="prodigy-plugin-settings__subtitle"><?php esc_html_e( 'Setup wizard', 'prodigy-commerce' ); ?></h4>
<p>
<?php
esc_html_e(
'If you need to access the setup wizard again, please click on the button below.',
- 'prodigy'
+ 'prodigy-commerce'
);
$nonce = wp_create_nonce( 'wizard-form' );
$url = admin_url( 'index.php?page=prodigy-setup&step=1&_wpnonce=' . $nonce );
@@ -23,59 +23,59 @@
<div class="d-flex mb-8">
<a class="button button-primary button-large setup-to-wizard-js" href="<?php echo esc_url( $url ); ?>">
- <?php esc_html_e( 'Setup Wizard', 'prodigy' ); ?>
+ <?php esc_html_e( 'Setup Wizard', 'prodigy-commerce' ); ?>
</a>
</div>
<div class="d-flex align-items-center">
<h4 class="prodigy-plugin-settings__subtitle">
- <?php esc_html_e( 'API synchronization status', 'prodigy' ); ?>
+ <?php esc_html_e( 'API synchronization status', 'prodigy-commerce' ); ?>
</h4>
<?php if ( $is_connected ) : ?>
- <span class="prodigy-pill ml-16 prodigy-pill--green"><?php esc_html_e( 'Connected', 'prodigy' ); ?></span>
+ <span class="prodigy-pill ml-16 prodigy-pill--green"><?php esc_html_e( 'Connected', 'prodigy-commerce' ); ?></span>
<?php else : ?>
- <span class="prodigy-pill ml-16"><?php esc_html_e( 'Not connected', 'prodigy' ); ?></span>
+ <span class="prodigy-pill ml-16"><?php esc_html_e( 'Not connected', 'prodigy-commerce' ); ?></span>
<?php endif; ?>
</div>
<?php if ( $is_connected ) : ?>
<div>
<div class="d-flex mb-8">
<span class="button button-primary button-large update-store-js">
- <?php esc_html_e( 'Update Store', 'prodigy' ); ?>
+ <?php esc_html_e( 'Update Store', 'prodigy-commerce' ); ?>
</span>
<span class="font-300" hidden="hidden">
- <?php esc_html_e( 'Data successfully updated', 'prodigy' ); ?>
+ <?php esc_html_e( 'Data successfully updated', 'prodigy-commerce' ); ?>
</span>
</div>
<div class="d-flex mb-8">
<span class="width-100 mr-20" style="flex-shrink: 0">
- <?php esc_html_e( 'Store name', 'prodigy' ); ?>
+ <?php esc_html_e( 'Store name', 'prodigy-commerce' ); ?>
</span>
<span class="font-700 name-store-js"><?php echo esc_attr( $domain_hosted_system ); ?></span>
</div>
<div class="d-flex mb-8">
<span class="width-100 mr-20" style="flex-shrink: 0">
- <?php esc_html_e( 'Subdomain', 'prodigy' ); ?>
+ <?php esc_html_e( 'Subdomain', 'prodigy-commerce' ); ?>
</span>
<span class="font-700 subdomen-store-js" style="overflow-wrap: anywhere;word-break: break-word;">
<?php echo esc_url( Prodigy_Url_Helper::get_url_home() ); ?>
</span>
</div>
<div class="d-flex mb-8">
- <span class="width-100 mr-20" style="flex-shrink: 0"><?php esc_html_e( 'Country', 'prodigy' ); ?></span>
- <span class="font-700"><?php esc_html_e( 'United States', 'prodigy' ); ?></span>
+ <span class="width-100 mr-20" style="flex-shrink: 0"><?php esc_html_e( 'Country', 'prodigy-commerce' ); ?></span>
+ <span class="font-700"><?php esc_html_e( 'United States', 'prodigy-commerce' ); ?></span>
</div>
<div class="d-flex mb-8">
- <span class="width-100 mr-20" style="flex-shrink: 0"><?php esc_html_e( 'Currency', 'prodigy' ); ?></span>
- <span class="font-700"><?php esc_html_e( 'United States dollar ($)', 'prodigy' ); ?></span>
+ <span class="width-100 mr-20" style="flex-shrink: 0"><?php esc_html_e( 'Currency', 'prodigy-commerce' ); ?></span>
+ <span class="font-700"><?php esc_html_e( 'United States dollar ($)', 'prodigy-commerce' ); ?></span>
</div>
</div>
<?php endif; ?>
<div>
<h4 class="prodigy-plugin-settings__subtitle">
- <?php esc_html_e( 'Synchronization', 'prodigy' ); ?>
+ <?php esc_html_e( 'Synchronization', 'prodigy-commerce' ); ?>
</h4>
<p>
- <?php esc_html_e( 'Synchronize all the data related to the Products, Categories and Attributes.', 'prodigy' ); ?>
+ <?php esc_html_e( 'Synchronize all the data related to the Products, Categories and Attributes.', 'prodigy-commerce' ); ?>
</p>
@@ -84,27 +84,27 @@
>
<span class="icon icon-sync font-18 mr-4"></span>
<span class="icon icon-rotate font-18 mr-4"></span>
- <?php esc_html_e( 'Sync with Prodigy', 'prodigy' ); ?>
+ <?php esc_html_e( 'Sync with Prodigy', 'prodigy-commerce' ); ?>
<span
id="products-list-item-link-popup"
tabIndex="0"
role="button"
- aria-label="<?php esc_html_e( 'More information', 'prodigy' ); ?>"
+ aria-label="<?php esc_html_e( 'More information', 'prodigy-commerce' ); ?>"
class="icon icon-info font-18 ml-4 prodigy-tooltip"
>
<span class="prodigy-tooltip__message">
- <?php esc_html_e( 'Synchronize all the data related to the Products, Categories and Attributes', 'prodigy' ); ?>
+ <?php esc_html_e( 'Synchronize all the data related to the Products, Categories and Attributes', 'prodigy-commerce' ); ?>
</span>
</button>
</div>
<div>
<h4 class="prodigy-plugin-settings__subtitle">
- <?php esc_html_e( 'Plugin cache', 'prodigy' ); ?>
+ <?php esc_html_e( 'Plugin cache', 'prodigy-commerce' ); ?>
</h4>
<button class="button button-primary d-flex align-items-center pg-clear-cache-js">
- <?php esc_html_e( 'Clear Cache', 'prodigy' ); ?>
+ <?php esc_html_e( 'Clear Cache', 'prodigy-commerce' ); ?>
</button>
</div>
</div>
--- a/prodigy-commerce/admin/partials/settings/tab-settings.php
+++ b/prodigy-commerce/admin/partials/settings/tab-settings.php
@@ -1,14 +1,22 @@
+<?php
+
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+?>
+
<div id="<?php echo esc_html( $current_tab ); ?>" class="prodigy_settings__wrapper">
<form action="#" method="post" class="form" id="<?php echo esc_html( $current_tab ); ?>-form">
<?php
$form_field = new ProdigyAdminProdigy_Admin_Form_Field( array( 'wrap' => true ) );
foreach ( $fields as $field ) {
- echo $form_field->display_field( $field );
+ echo wp_kses( $form_field->display_field( $field ), ProdigyIncludesHelpersProdigy_Formatting::get_allowed_html() );
}
?>
<?php wp_nonce_field( 'admin-settings' ); ?>
<button type="submit" class="button button-primary">
- <?php esc_html_e( 'Save Changes', 'prodigy' ); ?>
+ <?php esc_html_e( 'Save Changes', 'prodigy-commerce' ); ?>
</button>
</form>
</div>
--- a/prodigy-commerce/admin/partials/wizard/prodigy-wizard-footer-page.php
+++ b/prodigy-commerce/admin/partials/wizard/prodigy-wizard-footer-page.php
@@ -6,28 +6,28 @@
<div class="d-none">
<img
src="<?php echo esc_url( Prodigy::plugin_url() . '/' . PRODIGY_WIZARD_PATH . '/images/logo.svg' ); ?>"
- alt="<?php esc_attr_e( 'Prodigy', 'prodigy' ); ?>" class="logo"
+ alt="<?php esc_attr_e( 'Prodigy', 'prodigy-commerce' ); ?>" class="logo"
/>
<ul class="steps">
<li class="step step--active step--next-disabled">
- <?php esc_html_e( 'Connection', 'prodigy' ); ?>
+ <?php esc_html_e( 'Connection', 'prodigy-commerce' ); ?>
</li>
<li class="step">
- <?php esc_html_e( 'Demo Content', 'prodigy' ); ?>
+ <?php esc_html_e( 'Demo Content', 'prodigy-commerce' ); ?>
</li>
</ul>
<div class="form">
<div class="form__header">
<h1 class="form__title">
- <?php esc_html_e( 'Data Synchronization', 'prodigy' ); ?>
+ <?php esc_html_e( 'Data Synchronization', 'prodigy-commerce' ); ?>
</h1>
<a href="http://prodigy:8888/wp-admin/" class="link-wizard d-none d-md-block">
- <?php esc_html_e( 'Back to Dashboard', 'prodigy' ); ?>
+ <?php esc_html_e( 'Back to Dashboard', 'prodigy-commerce' ); ?>
</a>
</div>
<div class="form__txt-wrp">
<span class="form__txt">
- <?php esc_html_e( 'Connect your WP Plugin with the Prodigy Cloud Platform:', 'prodigy' ); ?>
+ <?php esc_html_e( 'Connect your WP Plugin with the Prodigy Cloud Platform:', 'prodigy-commerce' ); ?>
</span>
</div>
<div>
@@ -40,7 +40,7 @@
fill="#FFFFFF" />
</g>
</svg>
- <span><?php esc_html_e( 'Connect', 'prodigy' ); ?></span>
+ <span><?php esc_html_e( 'Connect', 'prodigy-commerce' ); ?></span>
</button>
</div>
</div>
@@ -49,52 +49,52 @@
<div class="d-none">
<img
src="<?php echo esc_url( Prodigy::plugin_url() . '/' . PRODIGY_WIZARD_PATH . '/images/logo.svg' ); ?>"
- alt="<?php esc_attr_e( 'Prodigy', 'prodigy' ); ?>" class="logo"
+ alt="<?php esc_attr_e( 'Prodigy', 'prodigy-commerce' ); ?>" class="logo"
/>
<ul class="steps">
<li class="step step--active step--next-disabled">
- <?php esc_html_e( 'Connection', 'prodigy' ); ?>
+ <?php esc_html_e( 'Connection', 'prodigy-commerce' ); ?>
</li>
<li class="step">
- <?php esc_html_e( 'Demo Content', 'prodigy' ); ?>
+ <?php esc_html_e( 'Demo Content', 'prodigy-commerce' ); ?>
</li>
</ul>
<div class="form">
<div class="form__header">
<h1 class="form__title">
- <?php esc_html_e( 'Data Synchronization', 'prodigy' ); ?>
+ <?php esc_html_e( 'Data Synchronization', 'prodigy-commerce' ); ?>
</h1>
<a href="http://prodigy:8888/wp-admin/" class="link-wizard d-none d-md-block">
- <?php esc_html_e( 'Back to Dashboard', 'prodigy' ); ?>
+ <?php esc_html_e( 'Back to Dashboard', 'prodigy-commerce' ); ?>
</a>
</div>
<div class="form__txt-wrp">
<span class="form__txt">
- <?php esc_html_e( 'Connect your WP Plugin with the Prodigy Cloud Platform:', 'prodigy' ); ?>
+ <?php esc_html_e( 'Connect your WP Plugin with the Prodigy Cloud Platform:', 'prodigy-commerce' ); ?>
</span>
<span class="wp-connect-state pill">
- <?php esc_html_e( 'Connected', 'prodigy' ); ?>
+ <?php esc_html_e( 'Connected', 'prodigy-commerce' ); ?>
</span>
</div>
<div class="font__card-outline">
<div class="store-info">
<div class="store-info__inner">
<span class="sto