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 ' | |
| $field_groups = acf_get_field_groups(["post_type" => "person"]); | |
| foreach ($field_groups as $group) { | |
| echo "Grupo: {$group["title"]} (key: {$group["key"]})\n"; | |
| $fields = acf_get_fields($group["key"]); | |
| if ($fields) { | |
| foreach ($fields as $field) { | |
| echo " - {$field["label"]} ({$field["name"]}) tipo: {$field["type"]}\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 ' | |
| $posts = get_posts([ | |
| "post_type" => "person", | |
| "posts_per_page" => 500, | |
| "fields" => "ids" | |
| ]); | |
| $keys = []; | |
| foreach ($posts as $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
| 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 |