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
wp term list persons_categories --format=table | |
wp term list persons_categories --format=csv > persons_categories.csv | |
wp term list persons_categories --format=json |
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
wp eval ' | |
$post_id = 53972; // ID | |
$post_type = get_post_type($post_id); | |
$taxonomies = get_object_taxonomies($post_type); | |
foreach ($taxonomies as $tax) { | |
$terms = get_the_terms($post_id, $tax); | |
echo "Taxonomía: $tax\n"; | |
if (!empty($terms)) { | |
foreach ($terms as $term) { | |
echo "- {$term->name} (ID: {$term->term_id})\n"; |
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
wp eval 'print_r( get_object_taxonomies("person") );' |
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
expr $(tr -cd ',' < no-index.txt | wc -c) + 1 |
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 | |
// Force translate WooCommerce | |
add_filter('gettext', function($translated, $text, $domain) { | |
if ($domain === 'woocommerce') { | |
$translations = [ | |
'Billing details' => 'Detalles de facturación', | |
'First name' => 'Nombre', | |
'Last name' => 'Apellido', | |
'Company name' => 'Nombre de la empresa', | |
'Country / Region' => 'País / Región', |
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
SELECT | |
p.ID, | |
p.post_title, | |
p.post_status, | |
CONCAT(u.option_value, '/', p.post_name, '/') AS permalink | |
FROM | |
wp_posts p | |
JOIN | |
wp_options u | |
ON u.option_name = 'siteurl' |
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
export default class EventEmitter | |
{ | |
constructor() | |
{ | |
this.callbacks = {} | |
this.callbacks.base = {} | |
} | |
on(_names, callback) | |
{ |
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
SELECT | |
p.ID, | |
p.post_title, | |
CONCAT(o.option_value, '/', p.post_name, '/') AS permalink | |
FROM | |
wp_posts p | |
JOIN | |
wp_options o ON o.option_name = 'siteurl' | |
JOIN | |
wp_term_relationships tr ON p.ID = tr.object_id |
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
https://www.datos.gov.co/en/ | |
https://datosabiertos.esri.co/ | |
https://datosabiertos.bogota.gov.co/dataset | |
https://datos.icde.gov.co/ |
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
SELECT p.ID, p.post_title, p.post_date | |
FROM wp_posts p | |
LEFT JOIN wp_term_relationships tr ON p.ID = tr.object_id | |
LEFT JOIN wp_term_taxonomy tt ON tr.term_taxonomy_id = tt.term_taxonomy_id AND tt.taxonomy = 'category' | |
WHERE p.post_type = 'post' | |
AND p.post_status = 'publish' | |
AND tt.term_taxonomy_id IS NULL; |