SELECT * FROM table_name WHERE column_name LIKE '%ا%' OR column_name LIKE '%آ%';
SELECT * FROM table_name WHERE column_name REGEXP '[اآ]';
SELECT * FROM table_name WHERE REPLACE(column_name, 'آ', 'ا') LIKE '%ا%';
<?php | |
// Remove Image Classes | |
// using function to add class to `the_post_thumbnail()` | |
// https://wordpress.stackexchange.com/questions/102158/add-class-name-to-post-thumbnail | |
add_filter('wp_get_attachment_image_attributes','filter_the_post_thumbnail_remove_class'); | |
function filter_the_post_thumbnail_remove_class($attr) { | |
if(is_admin() || wp_doing_ajax()) { | |
return $attr; |
<?php | |
// https://github.com/woocommerce/woocommerce/issues/27673 | |
add_action('plugins_loaded', function(){ | |
remove_action( 'woocommerce_order_status_pending', 'wc_update_coupon_usage_counts'); | |
}); | |
//add_filter( 'woocommerce_hold_stock_for_checkout', function() { return false; } ); | |
function woo_set_coupon_hold_minutes( $mins ) { |
SELECT * FROM table_name WHERE column_name LIKE '%ا%' OR column_name LIKE '%آ%';
SELECT * FROM table_name WHERE column_name REGEXP '[اآ]';
SELECT * FROM table_name WHERE REPLACE(column_name, 'آ', 'ا') LIKE '%ا%';
<?php | |
// Hook the appropriate WordPress action | |
add_action('init', 'prevent_wp_login'); | |
function prevent_wp_login() { | |
// WP tracks the current page - global the variable to access it | |
global $pagenow; | |
// Check if a $_GET['action'] is set, and if so, load it into $action variable | |
$action = (isset($_GET['action'])) ? $_GET['action'] : ''; |
<?php | |
// connect to FTP server | |
$ftp_server = "80....."; | |
$ftp_conn = ftp_connect($ftp_server) or die("Could not connect to $ftp_server"); | |
// login | |
if (@ftp_login($ftp_conn, "user", "pass")) | |
{ | |
echo "Connection established."; | |
} |
# Block executables | |
<FilesMatch "\.(php|phtml|php3|php4|php5|pl|py|jsp|asp|html|htm|shtml|sh|cgi|suspected)$"> | |
deny from all | |
</FilesMatch> |
<?php | |
add_action( 'woocommerce_thankyou', 'ecommercehints_create_user_account_after_payment', 10, 1 ); | |
function ecommercehints_create_user_account_after_payment( $order_id ) { | |
// If user is logged in, do nothing because they already have an account | |
if( is_user_logged_in() ) return; | |
// Get the newly created order | |
$order = wc_get_order( $order_id ); |
<?php | |
/*$users = include WPMU_PLUGIN_DIR .'/wp_users.php'; | |
foreach($users as $user) { | |
$ID = $user['ID']; | |
$user_login = $user['user_login']; | |
echo $ID.'|'.$user_login.'|Done'; | |
<!DOCTYPE html> | |
<html lang="fa"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> | |
<title>زوم با Transform Scale</title> | |
<style> | |
body, html { | |
margin: 0; | |
padding: 0; |
<?php | |
add_filter('http_request_args', 'bal_http_request_args', 100, 1); | |
function bal_http_request_args($r) //called on line 237 | |
{ | |
$r['timeout'] = 15; | |
return $r; | |
} | |