@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | * Include plugin file if function is_plugin_active does not exist |
| 23 | 23 | */ |
| 24 | 24 | if (! function_exists('is_plugin_active')) { |
| 25 | - require_once(ABSPATH . '/wp-admin/includes/plugin.php'); |
|
| 25 | + require_once(ABSPATH . '/wp-admin/includes/plugin.php'); |
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | /** |
@@ -77,10 +77,10 @@ discard block |
||
| 77 | 77 | */ |
| 78 | 78 | public static function setup_settings_sections() { |
| 79 | 79 | /** |
| 80 | - * Setup arguments for settings sections and fields |
|
| 81 | - * |
|
| 82 | - * @see https://developer.wordpress.org/reference/functions/register_setting/ |
|
| 83 | - */ |
|
| 80 | + * Setup arguments for settings sections and fields |
|
| 81 | + * |
|
| 82 | + * @see https://developer.wordpress.org/reference/functions/register_setting/ |
|
| 83 | + */ |
|
| 84 | 84 | if ( is_admin() ) { |
| 85 | 85 | $arguments = array( |
| 86 | 86 | 'type' => 'string', |
@@ -486,8 +486,8 @@ discard block |
||
| 486 | 486 | ); |
| 487 | 487 | |
| 488 | 488 | /** |
| 489 | - * Setup arguments for sending only a single product |
|
| 490 | - */ |
|
| 489 | + * Setup arguments for sending only a single product |
|
| 490 | + */ |
|
| 491 | 491 | if ( isset( $id ) && '' !== $id ) { |
| 492 | 492 | $arguments = array( |
| 493 | 493 | 'status' => 'publish', |
@@ -631,8 +631,8 @@ discard block |
||
| 631 | 631 | */ |
| 632 | 632 | public static function algolia_woo_indexer_settings() { |
| 633 | 633 | /** |
| 634 | - * Verify that the user can access the settings page |
|
| 635 | - */ |
|
| 634 | + * Verify that the user can access the settings page |
|
| 635 | + */ |
|
| 636 | 636 | if ( ! current_user_can( 'manage_options' ) ) { |
| 637 | 637 | wp_die( esc_html__( 'Action not allowed.', 'algolia_woo_indexer_settings' ) ); |
| 638 | 638 | } |
@@ -18,64 +18,64 @@ |
||
| 18 | 18 | * Abort if this file is called directly |
| 19 | 19 | */ |
| 20 | 20 | if (! defined('ABSPATH')) { |
| 21 | - exit; |
|
| 21 | + exit; |
|
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | if (! class_exists('Algolia_Check_Requirements')) { |
| 25 | - /** |
|
| 26 | - * Check requirements for Algolia plugin |
|
| 27 | - */ |
|
| 28 | - class Algolia_Check_Requirements |
|
| 29 | - { |
|
| 25 | + /** |
|
| 26 | + * Check requirements for Algolia plugin |
|
| 27 | + */ |
|
| 28 | + class Algolia_Check_Requirements |
|
| 29 | + { |
|
| 30 | 30 | |
| 31 | - /** |
|
| 32 | - * Check for required PHP version. |
|
| 33 | - * |
|
| 34 | - * @return bool |
|
| 35 | - */ |
|
| 36 | - public static function algolia_php_version_check() |
|
| 37 | - { |
|
| 38 | - if (version_compare(PHP_VERSION, ALGOLIA_MIN_PHP_VERSION, '<')) { |
|
| 39 | - return false; |
|
| 40 | - } |
|
| 41 | - return true; |
|
| 42 | - } |
|
| 31 | + /** |
|
| 32 | + * Check for required PHP version. |
|
| 33 | + * |
|
| 34 | + * @return bool |
|
| 35 | + */ |
|
| 36 | + public static function algolia_php_version_check() |
|
| 37 | + { |
|
| 38 | + if (version_compare(PHP_VERSION, ALGOLIA_MIN_PHP_VERSION, '<')) { |
|
| 39 | + return false; |
|
| 40 | + } |
|
| 41 | + return true; |
|
| 42 | + } |
|
| 43 | 43 | |
| 44 | - /** |
|
| 45 | - * Check for required WordPress version. |
|
| 46 | - * |
|
| 47 | - * @return bool |
|
| 48 | - */ |
|
| 49 | - public static function algolia_wp_version_check() |
|
| 50 | - { |
|
| 51 | - if (version_compare($GLOBALS['wp_version'], ALGOLIA_MIN_WP_VERSION, '<')) { |
|
| 52 | - return false; |
|
| 53 | - } |
|
| 54 | - return true; |
|
| 55 | - } |
|
| 44 | + /** |
|
| 45 | + * Check for required WordPress version. |
|
| 46 | + * |
|
| 47 | + * @return bool |
|
| 48 | + */ |
|
| 49 | + public static function algolia_wp_version_check() |
|
| 50 | + { |
|
| 51 | + if (version_compare($GLOBALS['wp_version'], ALGOLIA_MIN_WP_VERSION, '<')) { |
|
| 52 | + return false; |
|
| 53 | + } |
|
| 54 | + return true; |
|
| 55 | + } |
|
| 56 | 56 | |
| 57 | - /** |
|
| 58 | - * Check that we have all of the required PHP extensions installed |
|
| 59 | - * |
|
| 60 | - * @return void |
|
| 61 | - */ |
|
| 62 | - public static function check_unmet_requirements() |
|
| 63 | - { |
|
| 64 | - if (! extension_loaded('mbstring')) { |
|
| 65 | - echo '<div class="error notice"> |
|
| 57 | + /** |
|
| 58 | + * Check that we have all of the required PHP extensions installed |
|
| 59 | + * |
|
| 60 | + * @return void |
|
| 61 | + */ |
|
| 62 | + public static function check_unmet_requirements() |
|
| 63 | + { |
|
| 64 | + if (! extension_loaded('mbstring')) { |
|
| 65 | + echo '<div class="error notice"> |
|
| 66 | 66 | <p>' . esc_html__('Algolia Woo Indexer requires the "mbstring" PHP extension to be enabled. Please contact your hosting provider.', 'algolia-woo-indexer') . '</p> |
| 67 | 67 | </div>'; |
| 68 | - } elseif (! function_exists('mb_ereg_replace')) { |
|
| 69 | - echo '<div class="error notice"> |
|
| 68 | + } elseif (! function_exists('mb_ereg_replace')) { |
|
| 69 | + echo '<div class="error notice"> |
|
| 70 | 70 | <p>' . esc_html__('Algolia Woo Indexer needs "mbregex" NOT to be disabled. Please contact your hosting provider.', 'algolia-woo-indexer') . '</p> |
| 71 | 71 | </div>'; |
| 72 | - } |
|
| 73 | - if (! extension_loaded('curl')) { |
|
| 74 | - echo '<div class="error notice"> |
|
| 72 | + } |
|
| 73 | + if (! extension_loaded('curl')) { |
|
| 74 | + echo '<div class="error notice"> |
|
| 75 | 75 | <p>' . esc_html__('Algolia Woo Indexer requires the "cURL" PHP extension to be enabled. Please contact your hosting provider.', 'algolia-woo-indexer') . '</p> |
| 76 | 76 | </div>'; |
| 77 | - return; |
|
| 78 | - } |
|
| 79 | - } |
|
| 77 | + return; |
|
| 78 | + } |
|
| 79 | + } |
|
| 80 | 80 | } |
| 81 | 81 | } |