From 112c14fde3702e659c1a3d940da334dc17e81382 Mon Sep 17 00:00:00 2001 From: Andrey Savchenko Date: Mon, 6 Apr 2015 10:19:57 +0300 Subject: [PATCH] Added events class for Yoast plugins --- src/class-laps.php | 6 +++--- src/class-yoast-events.php | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 3 deletions(-) create mode 100644 src/class-yoast-events.php diff --git a/src/class-laps.php b/src/class-laps.php index 5fede45..8754f1b 100644 --- a/src/class-laps.php +++ b/src/class-laps.php @@ -162,13 +162,13 @@ class Laps { } /** - * When theme is done possibly add theme-specific events. + * When theme is done possibly add vendor-specific events. */ static function after_setup_theme() { - foreach ( array( 'THA', 'Hybrid', 'Genesis', 'Thematic' ) as $theme ) { + foreach ( array( 'THA', 'Hybrid', 'Genesis', 'Thematic', 'Yoast' ) as $vendor ) { - $class = "Rarst\\Laps\\{$theme}_Events"; + $class = "Rarst\\Laps\\{$vendor}_Events"; /** @var Laps_Events $events */ $events = new $class; self::add_events( $events->get() ); diff --git a/src/class-yoast-events.php b/src/class-yoast-events.php new file mode 100644 index 0000000..7f7da7f --- /dev/null +++ b/src/class-yoast-events.php @@ -0,0 +1,38 @@ + 'WP SEO head hook', + 'category' => 'plugin', + ); + + $stops['wpseo_head'][100] = array( + 'action' => 'stop', + 'event' => 'WP SEO head hook', + 'category' => 'plugin', + ); + + return $stops; + } +}