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
SELECT SETVAL((SELECT PG_GET_SERIAL_SEQUENCE('"table"', 'id')), (SELECT (MAX("id") + 1) FROM "table"), FALSE); |
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 | |
global $wpdb; | |
$duplicates = $wpdb->get_results("SELECT PM1.meta_id, PM1.post_id, PM1.meta_key, PM1.meta_value, PM2.meta_id, PM2.post_id, PM2.meta_key, PM2.meta_value | |
FROM {$wpdb->postmeta} PM1, {$wpdb->postmeta} PM2 | |
WHERE | |
PM1.meta_id > PM2.meta_id | |
AND PM1.post_id = PM2.post_id | |
AND PM1.meta_value = PM2.meta_value | |
AND PM1.meta_key = PM2.meta_key |
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
SELECT PM1.meta_id, PM1.post_id, PM1.meta_key, PM1.meta_value, PM2.meta_id, PM2.post_id, PM2.meta_key, PM2.meta_value | |
FROM wp_postmeta PM1, wp_postmeta PM2 | |
WHERE | |
PM1.meta_id > PM2.meta_id | |
AND PM1.post_id = PM2.post_id | |
AND PM1.meta_value = PM2.meta_value | |
AND PM1.meta_key = PM2.meta_key | |
-- AND PM1.meta_key = '_wp_attachment_image_alt' | |
ORDER BY PM1.post_id ASC LIMIT 1000 OFFSET 0 |
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: Hierarchical Pages | |
Version: 1.6.1 | |
Plugin URI: http://www.wlindley.com/website/hierpage/ | |
Description: Adds sidebar widgets to display a context-based list of "nearby" pages, and to display nested categories. | |
Author: William Lindley | |
Author URI: http://www.wlindley.com/ | |
Text Domain: hierarchical-pages | |
License: GPL2 |
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
"scripts": { | |
"build:dev": [ | |
"composer install", | |
"@artisan:build", | |
"@assets:build" | |
], | |
"build:prod": [ | |
"composer install --no-interaction --prefer-dist --optimize-autoloader", | |
"@artisan:build", | |
"@assets:build" |
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 | |
new \WP_Query([ | |
'post_type' => ['post', 'page'], | |
'posts_per_page' => -1, | |
'lang' => '', | |
'fields' => 'ids', | |
'tax_query' => [ | |
[ | |
'taxonomy' => 'language', |
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
certbot certificates |
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
# Install PHP via Homebrew | |
brew install [email protected] | |
# Install Xdebug via Pecl | |
pecl install xdebug | |
# Enable Xdebug in php.ini | |
nano /usr/local/etc/php/7.4/php.ini | |
# Add this to php.ini |
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
npx sb@next init | |
npx sb init --builder webpack5 -f |
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
./vendor/bin/phpmd ./ html cleancode,codesize,controversial,design,naming,unusedcode --exclude vendor/ --reportfile report.html |
NewerOlder