Ticket #1101: 1101.2.patch
File 1101.2.patch, 804 bytes (added by , 10 years ago) |
---|
-
wporg-rosetta-roles.php
40 40 public function __construct() { 41 41 parent::__construct(); 42 42 $this->add_filter( 'pre_can_user', array( 'args' => 2, 'priority' => 9 ) ); 43 $this->add_action( 'project_created' ); 44 $this->add_action( 'project_saved' ); 43 45 } 44 46 45 47 /** … … 347 349 } 348 350 349 351 /** 352 * Removes all of the project ids from the cache. 353 * 354 */ 355 public function clear_project_cache() { 356 $projects = $this->get_all_projects(); 357 358 foreach ( $projects as $project ) { 359 $cache_key = 'project:' . $project->id . ':childs'; 360 wp_cache_delete( $cache_key, $this->cache_group ); 361 } 362 } 363 364 /** 350 365 * Extracts project ID and locale slug from object type and ID. 351 366 * 352 367 * @param string $object_type Current object type.