| 1 |
<?php |
| 2 |
/** |
| 3 |
* Friends 3rd Parties |
| 4 |
* |
| 5 |
* This contains the functions for working with third party plugins. |
| 6 |
* |
| 7 |
* @package Friends |
| 8 |
*/ |
| 9 |
|
| 10 |
namespace Friends; |
| 11 |
|
| 12 |
/** |
| 13 |
* This is the class for the Friends Plugin 3rd Party handling. |
| 14 |
* |
| 15 |
* @since 0.6 |
| 16 |
* |
| 17 |
* @package Friends |
| 18 |
* @author Alex Kirk |
| 19 |
*/ |
| 20 |
class Third_Parties { |
| 21 |
/** |
| 22 |
* Contains a reference to the Friends class. |
| 23 |
* |
| 24 |
* @var Friends |
| 25 |
*/ |
| 26 |
private $friends = null; |
| 27 |
|
| 28 |
/** |
| 29 |
* Constructor |
| 30 |
* |
| 31 |
* @param Friends $friends A reference to the Friends object. |
| 32 |
*/ |
| 33 |
public function __construct( Friends $friends ) { |
| 34 |
$this->friends = $friends; |
| 35 |
$this->register_hooks(); |
| 36 |
} |
| 37 |
|
| 38 |
/** |
| 39 |
* Register the WordPress hooks |
| 40 |
*/ |
| 41 |
private function register_hooks() { |
| 42 |
add_filter( 'wp_sweep_excluded_taxonomies', array( $this, 'wp_sweep_excluded_taxonomies' ) ); |
| 43 |
} |
| 44 |
|
| 45 |
/** |
| 46 |
* WP Sweep |
| 47 |
* Prevent WP Sweep from sweeping our taxonomies. |
| 48 |
* |
| 49 |
* @since 2.0 |
| 50 |
* |
| 51 |
* @param array $excluded_taxonomies list of taxonomies excluded from sweeping. |
| 52 |
* @return array |
| 53 |
*/ |
| 54 |
public function wp_sweep_excluded_taxonomies( $excluded_taxonomies ) { |
| 55 |
return array_merge( $excluded_taxonomies, array( User_Feed::TAXONOMY, Subscription::TAXONOMY ) ); |
| 56 |
} |
| 57 |
} |
| 58 |
|