Project

General

Profile

Actions

Feature #11504

closed

Deprecate cets_EmbedRSS plugin

Added by Boone Gorges over 5 years ago. Updated about 5 years ago.

Status:
Resolved
Priority name:
Normal
Assignee:
Category name:
WordPress Plugins
Target version:
Start date:
2019-05-30
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Description

The cets_EmbedRSS plugin is network activated on the Commons, and appears to have been network activated since the Commons began in 2009.

The plugin has not been updated (aside from in-house updates) since it was introduced into our codebase in 2010. Most recently, see #11501.

The plugin appears to do two things:
1. It adds a `show_RSS` shortcode, which fetches a feed and displays recent items
2. It adds a TinyMCE button that makes it easy to create the shortcode

Given the plugin's extreme age and unmaintained status, I'd suggest that it should not be network activated. However, it shouldn't be removed for sites that are currently using the show_RSS shortcode. So we'd need to write a script that identifies the sites using shortcode, and activates the plugin on those sites.

If there are no objections, I'll move forward with this.


Related issues

Related to CUNY Academic Commons - Bug #11501: Error message when editing postResolved2019-05-29

Actions
Actions #1

Updated by Boone Gorges over 5 years ago

  • Related to Bug #11501: Error message when editing post added
Actions #2

Updated by Matt Gold over 5 years ago

No objections. Thanks, Boone.

Actions #3

Updated by Boone Gorges about 5 years ago

  • Status changed from New to Resolved
  • Target version changed from 1.16 to 1.15.9

This is now done. Here are the steps I took:

1. Collected URLs of sites using the shortcode:

global $wpdb;

$site_ids = $wpdb->get_col( "SELECT blog_id FROM $wpdb->blogs LIMIT 1000" );

foreach ( $site_ids as $site_id ) {
    $prefix = $wpdb->get_blog_prefix( $site_id );
    $count = $wpdb->get_var( "SELECT COUNT(*) FROM {$prefix}posts WHERE post_content LIKE '%[cetsEmbedRSS%'" );
    if ( $count ) {
        echo get_blog_option( $site_id, 'home' ) . "\n";
    }
}

(run in batches of 1000 so as not to crash things)

2. Turned results into a set of WP-CLI statements:

wp --url=tags.commons.gc.cuny.edu plugin activate cets_EmbedRSS  &&
wp --url=kevinreiss.commons.gc.cuny.edu plugin activate cets_EmbedRSS  &&
wp --url=gdonovan.commons.gc.cuny.edu plugin activate cets_EmbedRSS  &&
wp --url=connections.commons.gc.cuny.edu plugin activate cets_EmbedRSS  &&
wp --url=french.commons.gc.cuny.edu plugin activate cets_EmbedRSS  &&
wp --url=wandt.commons.gc.cuny.edu plugin activate cets_EmbedRSS  &&
wp --url=madlibrarian.commons.gc.cuny.edu plugin activate cets_EmbedRSS  &&
wp --url=erac.commons.gc.cuny.edu plugin activate cets_EmbedRSS  &&
wp --url=podcasting.commons.gc.cuny.edu plugin activate cets_EmbedRSS  &&
wp --url=deletestein.commons.gc.cuny.edu plugin activate cets_EmbedRSS  &&
wp --url=breakstuff.commons.gc.cuny.edu plugin activate cets_EmbedRSS  &&
wp --url=lagccnetworks.commons.gc.cuny.edu plugin activate cets_EmbedRSS  &&
wp --url=cunymathblog.commons.gc.cuny.edu plugin activate cets_EmbedRSS  &&
wp --url=fairuse.commons.gc.cuny.edu plugin activate cets_EmbedRSS  &&
wp --url=research-backup.commons.gc.cuny.edu plugin activate cets_EmbedRSS  &&
wp --url=teachlearn.commons.gc.cuny.edu plugin activate cets_EmbedRSS  &&
wp --url=digitalfellows.commons.gc.cuny.edu plugin activate cets_EmbedRSS  &&
wp --url=qcexperiential.commons.gc.cuny.edu plugin activate cets_EmbedRSS  &&
wp --url=gcdigitallab.commons.gc.cuny.edu plugin activate cets_EmbedRSS  &&
wp --url=annesialamb.commons.gc.cuny.edu plugin activate cets_EmbedRSS  &&
wp --url=testpage.commons.gc.cuny.edu plugin activate cets_EmbedRSS  &&
wp --url=hannahmiller.commons.gc.cuny.edu plugin activate cets_EmbedRSS  &&
wp --url=emanuelb.commons.gc.cuny.edu plugin activate cets_EmbedRSS  &&
wp --url=cunysustainability.commons.gc.cuny.edu plugin activate cets_EmbedRSS  &&
wp --url=aleksphd.commons.gc.cuny.edu plugin activate cets_EmbedRSS  &&
wp --url=bcarchives1.commons.gc.cuny.edu plugin activate cets_EmbedRSS  &&
wp --url=weather.commons.gc.cuny.edu plugin activate cets_EmbedRSS  &&
wp --url=dining.commons.gc.cuny.edu plugin activate cets_EmbedRSS

3. Network deactivated plugin, then activated on sites using the above.

4. Prevent plugin from being activated on new sites in the future. https://github.com/cuny-academic-commons/cac/commit/73c4ca222054bed9071fe1339364b5194ba349f0

Actions #4

Updated by Matt Gold about 5 years ago

Thank you, Boone

Actions

Also available in: Atom PDF