This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule build/.* manifest.php [L,QSA,NC] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Woocommerce image sizes in API | |
*/ | |
$f = function ( WP_REST_Response $response, WC_Data $data ) { | |
if ( $data instanceof WC_Product ) { | |
$data = $response->get_data(); | |
if ( isset( $data['images'] ) ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$codes = []; | |
$idx1 = '23456789'; | |
$idx2 = 'BCDFGHJKPQRSTVWXYZ'; | |
while (($c = count($codes)) < 40000) { | |
$code = ''; | |
while (strlen($code) < 8) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteRule .* - [E=SLIM_MODE:development] | |
#RewriteRule .* - [E=SLIM_MODE:testing] | |
#RewriteRule .* - [E=SLIM_MODE:production] | |
# Filename-based cache busting | |
# strip timestamp from file. | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.+)\.(\d+)\.(less|s?css|cur|gif|ico|jpe?g|js|png|svgz?|webp)$ $1.$3 [NC] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
mb_internal_encoding('UTF-8'); | |
$detect = 'auto, ISO-8859-1, ISO-8859-15, ISO-8859-2, UTF-7'; | |
mb_detect_order($detect); | |
header('Content-type: text/html;charset=UTF-8'); | |
mb_http_output("UTF-8"); | |
ob_start("mb_output_handler"); | |
$text = filter_input(INPUT_GET, 'text') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @param string $url | |
* @param string $select | |
* @param string $table | |
* @param string $slug_column | |
* @param string $id_column | |
* @param string $parent_column | |
* @param bool $strict |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO OFF | |
setLocal EnableDelayedExpansion | |
:DETECT_PHP | |
CALL php --version > nul 2>&1 && GOTO:DETECT_COMPOSER || GOTO:INSTALL_PHP | |
:DETECT_COMPOSER | |
CALL composer --version > nul 2>&1 && GOTO:INSTALL_DEPENDENCIES|| GOTO:INSTALL_COMPOSER | |
:INSTALL_DEPENDENCIES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* configuration should have a prefix */ | |
update configuration set value = 0 where name = 'PS_SSL_ENABLED'; | |
update configuration set value = 0 where name = 'PS_REWRITING_SETTINGS'; | |
update configuration set value = 0 where name = 'PS_CANONICAL_REDIRECT'; | |
update configuration set value = 0 where name = 'PS_HTACCESS_DISABLE_MULTIVIEWS'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// linux fix for domains that arent resolved yet (/~username/) | |
if ($_SERVER['DOCUMENT_ROOT'] == '/var/www/html' && | |
preg_match('@^/~[a-z0-9]+/@i', $_SERVER['REQUEST_URI']) && | |
basename(__DIR__) == 'public_html' | |
) { | |
$_SERVER['DOCUMENT_ROOT'] = realpath(__DIR__); | |
} |