| @@ -39,11 +39,9 @@ | ||
| 39 | 39 | * |
| 40 | 40 | * @return array|string |
| 41 | 41 | */ |
| 42 | 42 | public static function POST() { // phpcs:ignore |
| 43 | - $post = wp_unslash( $_POST ); // phpcs:ignore | |
| 44 | - | |
| 45 | - return $post; | |
| 43 | + return wp_unslash( $_POST ); // phpcs:ignore | |
| 46 | 44 | } |
| 47 | 45 | |
| 48 | 46 | /** |
| 49 | 47 | * GET PHP GET |
| @@ -50,11 +48,9 @@ | ||
| 50 | 48 | * |
| 51 | 49 | * @return array|string |
| 52 | 50 | */ |
| 53 | 51 | public static function GET() { // phpcs:ignore |
| 54 | - $get = wp_unslash( $_GET ); // phpcs:ignore | |
| 55 | - | |
| 56 | - return $get; | |
| 52 | + return wp_unslash( $_GET ); // phpcs:ignore | |
| 57 | 53 | } |
| 58 | 54 | |
| 59 | 55 | /** |
| 60 | 56 | * Include variables |
| @@ -229,21 +225,8 @@ | ||
| 229 | 225 | return self::get_is_plugin_active( 'classic-editor/classic-editor.php' ); |
| 230 | 226 | } |
| 231 | 227 | |
| 232 | 228 | /** |
| 233 | - * Check if Disable Gutenberg plugin is active. | |
| 234 | - * | |
| 235 | - * @return bool | |
| 236 | - */ | |
| 237 | - public static function is_disable_gutenberg_plugin_active() { | |
| 238 | - if ( ! function_exists( 'is_plugin_active' ) ) { | |
| 239 | - include_once ABSPATH . 'wp-admin/includes/plugin.php'; | |
| 240 | - } | |
| 241 | - | |
| 242 | - return self::get_is_plugin_active( 'disable-gutenberg/disable-gutenberg.php' ); | |
| 243 | - } | |
| 244 | - | |
| 245 | - /** | |
| 246 | 229 | * If the Lasso Pro plugin is installed, return true. Otherwise, return false |
| 247 | 230 | */ |
| 248 | 231 | public static function is_lasso_pro_installed() { |
| 249 | 232 | return self::get_is_plugin_active( 'lasso/affiliate-plugin.php' ); |
| @@ -943,10 +926,10 @@ | ||
| 943 | 926 | * @param string $post_name Post name. |
| 944 | 927 | */ |
| 945 | 928 | public static function lasso_unique_post_name( $post_id, $post_name ) { |
| 946 | 929 | if ( intval( $post_id ) > 0 && ! empty( $post_name ) && self::the_slug_exists( $post_name, $post_id ) ) { |
| 947 | - $post_name = rtrim( $post_name, '-link' ); // ? Fix the issue adding multiple "-link" string to the end. | |
| 948 | - $post_name = wp_unique_post_slug( $post_name, $post_id, 'publish', Constant::LASSO_POST_TYPE, 0 ); | |
| 930 | + $post_name .= '-link'; | |
| 931 | + $post_name = wp_unique_post_slug( $post_name, $post_id, 'publish', Constant::LASSO_POST_TYPE, 0 ); | |
| 949 | 932 | } |
| 950 | 933 | |
| 951 | 934 | return $post_name; |
| 952 | 935 | } |
| @@ -1459,36 +1442,6 @@ | ||
| 1459 | 1442 | 'AED' => 'AED', |
| 1460 | 1443 | ); |
| 1461 | 1444 | |
| 1462 | 1445 | return isset( $currencies[ $iso ] ) ? $currencies[ $iso ] : $result; |
| 1463 | - } | |
| 1464 | - | |
| 1465 | - /** | |
| 1466 | - * Check using WP classic editor | |
| 1467 | - * | |
| 1468 | - * @return bool | |
| 1469 | - */ | |
| 1470 | - public static function is_classic_editor() { | |
| 1471 | - return self::is_classic_editor_plugin_active() || self::is_disable_gutenberg_plugin_active(); | |
| 1472 | - } | |
| 1473 | - | |
| 1474 | - /** | |
| 1475 | - * Escape string prevent SQL injection | |
| 1476 | - * | |
| 1477 | - * @param string $keyword Keyword. | |
| 1478 | - * @param bool $search_from_after Option to check search string from end of string. | |
| 1479 | - * @return string | |
| 1480 | - */ | |
| 1481 | - public static function esc_like_query( $keyword, $search_from_after = false ) { | |
| 1482 | - global $wpdb; | |
| 1483 | - | |
| 1484 | - $wild = '%'; | |
| 1485 | - if ( $search_from_after ) { | |
| 1486 | - $query = $wpdb->esc_like( $keyword ) . $wild; | |
| 1487 | - } else { | |
| 1488 | - $query = $wild . $wpdb->esc_like( $keyword ) . $wild; | |
| 1489 | - } | |
| 1490 | - | |
| 1491 | - $query = str_replace( ' ', '%', $query ); | |
| 1492 | - return $query; | |
| 1493 | 1446 | } |
| 1494 | 1447 | } |