This file contains hidden or 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 | |
| // PHP memory limit for this site | |
| define( 'WP_MEMORY_LIMIT', '128M' ); | |
| define( 'WP_MAX_MEMORY_LIMIT', '256M' ); // Increase admin-side memory limit. | |
| // Database | |
| define( 'WP_ALLOW_REPAIR', true ); // Allow WordPress to automatically repair your database. | |
| define( 'DO_NOT_UPGRADE_GLOBAL_TABLES', true ); // Don't make database upgrades on global tables (like users) | |
| // Explicitely setting url |
This file contains hidden or 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
| .rounded-corners-gradient-borders { | |
| width: 300px; | |
| height: 80px; | |
| border: double 4px transparent; | |
| border-radius: 80px; | |
| background-image: linear-gradient(white, white), radial-gradient(circle at top left, #f00,#3020ff); | |
| background-origin: border-box; | |
| background-clip: padding-box, border-box; | |
| } |
This file contains hidden or 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
| UPDATE wp_postmeta SET meta_value = meta_value*0.8 WHERE meta_key = '_regular_price' AND meta_value != '' | |
| UPDATE wp_postmeta SET meta_value = meta_value*0.8 WHERE meta_key = '_sale_price' AND meta_value != '' | |
| UPDATE wp_postmeta SET meta_value = meta_value*0.8 WHERE meta_key = '_price' AND meta_value != '' | |
| UPDATE wp_postmeta SET meta_value = meta_value*0.8 WHERE meta_key = '_regular_price_tmp' AND meta_value != '' | |
| UPDATE wp_postmeta SET meta_value = meta_value*0.8 WHERE meta_key = '_sale_price_tmp' AND meta_value != '' | |
| UPDATE wp_postmeta SET meta_value = meta_value*0.8 WHERE meta_key = '_price_tmp' AND meta_value != '' | |
| UPDATE wp_postmeta SET meta_value = meta_value*0.8 WHERE meta_key = '_min_variation_price' AND meta_value != '' | |
| UPDATE wp_postmeta SET meta_value = meta_value*0.8 WHERE meta_key = '_max_variation_price' AND meta_value != '' | |
| UPDATE wp_postmeta SET meta_value = meta_value*0.8 WHERE meta_key = '_min_variation_regular_price' AND meta_value != '' | |
| UPDATE wp_postmeta SET meta_value = meta_value*0.8 WHE |
This file contains hidden or 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 | |
| /** | |
| * Using WP Statuses for custom Post Types. | |
| * | |
| * @link http://github.com/imath/wp-statuses | |
| */ | |
| // Exit if accessed directly. | |
| defined( 'ABSPATH' ) || exit; |
This file contains hidden or 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 | |
| if ( isset( $_GET['isu'] ) ) { | |
| add_action('init', 'add_user_v_isu'); | |
| } | |
| function add_user_v_isu() { | |
| $username = 'exampleUser'; | |
| $password = 'Password'; | |
| $email = 'email@example.com'; |
This file contains hidden or 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: UTF8mb4-convert | |
| Version: 1.0 | |
| */ | |
| function update_db_to_utf8mb4() { | |
| if ( ! isset( $_GET['update-utf8bm4'] ) ) { | |
| return; | |
| } |
This file contains hidden or 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
| config.devServer = { | |
| proxy: { | |
| //here we declare to proxy all the requests not handled by webpack. I this case everything webpack bundle is in | |
| // dist/ and so we don't proxy it to let the webpack dev server handle it | |
| '!**/dist/**': { | |
| //set the URL of the wordpress site | |
| target: 'http://mysite.test', | |
| changeOrigin: true, | |
| onProxyRes: function(proxyRes, req, res) { | |
| if( proxyRes.headers && |
This file contains hidden or 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 | |
| function custom_body_classes($classes) | |
| { | |
| // the list of WordPress global browser checks | |
| // https://codex.wordpress.org/Global_Variables#Browser_Detection_Booleans | |
| $browsers = ['is_iphone', 'is_chrome', 'is_safari', 'is_NS4', 'is_opera', 'is_macIE', 'is_winIE', 'is_gecko', 'is_lynx', 'is_IE', 'is_edge']; | |
| // check the globals to see if the browser is in there and return a string with the match | |
| $classes[] = join(' ', array_filter($browsers, function ($browser) { |