Project

General

Profile

Actions

Feature #2260

closed

Hide Google Calendar Plugin

Added by Sarah Morgano over 11 years ago. Updated over 11 years ago.

Status:
Resolved
Priority name:
Normal
Assignee:
Dominic Giglio
Category name:
WordPress (misc)
Target version:
Start date:
2012-11-16
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Description

The Google Calendar plugin currently active on the Commons is no longer valid, though it is in use by some of our members, as of April 2012, Google no longer provides the API key necessary to make this work. Can you please leave this as an active plugin on the site, but hide it from the list of searchable plugins?


Related issues

Related to CUNY Academic Commons - Bug #2029: CForms errorResolvedDominic Giglio2012-08-08

Actions
Related to CUNY Academic Commons - Feature #2261: Plugin Request: Google Calendar EventsResolvedDominic Giglio2012-11-16

Actions
Actions #1

Updated by Boone Gorges over 11 years ago

  • Assignee changed from Boone Gorges to Dominic Giglio

Dom - same technique as cforms :)

Actions #2

Updated by Dominic Giglio over 11 years ago

Consider it done.

Actions #3

Updated by Dominic Giglio over 11 years ago

Boone,

I've linked this issue with the associated plugin hiding and Google Calendar related issues.

I've updated the hiding function to be a little more flexible incase we want to hide additional plugins in the future:

/**
 * Prevent specific plugins from being activated on the Commons.
 * To add additional plugins simply add their paths the the $dissabled_plugins
 * array.
 */
function cac_hide_plugins( $plugins ) {
  $dissabled_plugins = array(
    'cforms/cforms.php',
    'wpng-calendar/wpng-calendar.php'
  );

  foreach ( $dissabled_plugins as $dissabled_plugin )
    if ( array_key_exists( $dissabled_plugin, $plugins ) )
      unset( $plugins[$dissabled_plugin] );

    return $plugins;
}
add_filter( 'all_plugins', 'cac_hide_plugins' );

I haven't pushed this code to the repo yet incase you notice something I've missed that may cause problems. I'm leaving all these issues open for now, so we have a chance to discuss after the CBox release but before the 1.4.11 release.

Actions #4

Updated by Boone Gorges over 11 years ago

Dom, this technique looks great. If it's working on your local, go ahead and commit it as a fix for this ticket and the CForms ticket.

Actions #5

Updated by Dominic Giglio over 11 years ago

  • Status changed from New to Resolved
Actions

Also available in: Atom PDF