diff options
Diffstat (limited to 'plugins/jetpack/modules/theme-tools/featured-content.php')
-rw-r--r-- | plugins/jetpack/modules/theme-tools/featured-content.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/plugins/jetpack/modules/theme-tools/featured-content.php b/plugins/jetpack/modules/theme-tools/featured-content.php index 58986835..7fdfa70c 100644 --- a/plugins/jetpack/modules/theme-tools/featured-content.php +++ b/plugins/jetpack/modules/theme-tools/featured-content.php @@ -641,4 +641,17 @@ class Featured_Content { Featured_Content::setup(); +/** + * Adds the featured content plugin to the set of files for which action + * handlers should be copied when the theme context is loaded by the REST API. + * + * @param array $copy_dirs Copy paths with actions to be copied + * @return array Copy paths with featured content plugin + */ +function wpcom_rest_api_featured_content_copy_plugin_actions( $copy_dirs ) { + $copy_dirs[] = __FILE__; + return $copy_dirs; +} +add_action( 'restapi_theme_action_copy_dirs', 'wpcom_rest_api_featured_content_copy_plugin_actions' ); + } // end if ( ! class_exists( 'Featured_Content' ) && isset( $GLOBALS['pagenow'] ) && 'plugins.php' !== $GLOBALS['pagenow'] ) { |