[wp-meta] [Making WordPress.org] #6394: Fix GitHub edit link on WP-CLI handbook

Making WordPress.org noreply at wordpress.org
Tue Sep 20 06:39:45 UTC 2022


#6394: Fix GitHub edit link on WP-CLI handbook
--------------------------------------+-----------------------
 Reporter:  danielbachhuber           |       Owner:  dd32
     Type:  defect (bug)              |      Status:  reopened
 Priority:  normal                    |   Milestone:
Component:  Make (Get Involved) / P2  |  Resolution:
 Keywords:  has-patch                 |
--------------------------------------+-----------------------

Comment (by dd32):

 > I think the cause is that action_wporg_cli_manifest_import() cron
 callback never updates the wporg_cli_markdown_source meta key when it
 changes.

 I've fixed this as a once-off wp shell job, I don't think this kind of
 thing happens enough to warrant fixing this specific handbook importer.

 {{{
 $ wp shell --url=https://make.wordpress.org/cli/handbook
 wp> global $wpdb;
 wp> $ids = $wpdb->get_results( "SELECT `post_id`, REPLACE( `meta_value`,
 '/blob/master/', '/blob/main/' ) as value FROM `$wpdb->postmeta` WHERE
 `meta_key` = 'wporg_cli_markdown_source' AND `meta_value` LIKE
 '%/blob/master/%'" );
 array(70) {
 ....
 wp> foreach ( $ids as $row ) { update_post_meta( $row->post_id,
 'wporg_cli_markdown_source', $row->value ); }
 }}}

-- 
Ticket URL: <https://meta.trac.wordpress.org/ticket/6394#comment:8>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list