View difference between Paste ID: fe375d1 and
SHOW:
|
|
- or go back to the newest paste.
1 | - | |
1 | + | // For Donncha's Sitewide Tags plugin: Populate tags blog with all posts made before the plugin was added |
2 | // Working version | |
3 | $posts = $wpdb->get_col( "SELECT ID FROM $wpdb->posts WHERE post_status = 'publish'" ); | |
4 | if ( !empty($posts) ) { | |
5 | foreach ( $posts as $post ) { | |
6 | if($post != 1 && $post != 2) | |
7 | sitewide_tags_post($post, get_post($post)); | |
8 | } | |
9 | } |