From 0e738f15435419f74e411cfdb87adb1595a02f5e Mon Sep 17 00:00:00 2001 From: Josh Betz <j@joshbetz.com> Date: Fri, 28 Mar 2014 16:40:25 -0500 Subject: [PATCH] Syndication: Add syn_after_site_form action You can now add fields to any form by hooking in to syn_after_site_form. --- includes/class-syndication-wp-rest-client.php | 3 ++- includes/class-syndication-wp-rss-client.php | 3 ++- includes/class-syndication-wp-xml-client.php | 2 ++ includes/class-syndication-wp-xmlrpc-client.php | 1 + 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/includes/class-syndication-wp-rest-client.php b/includes/class-syndication-wp-rest-client.php index b78f513..a253847 100644 --- a/includes/class-syndication-wp-rest-client.php +++ b/includes/class-syndication-wp-rest-client.php @@ -236,6 +236,7 @@ class Syndication_WP_REST_Client implements Syndication_Client { <?php + do_action( 'syn_after_site_form', $site ); } public static function save_settings( $site_ID ) { @@ -257,4 +258,4 @@ class Syndication_WP_REST_Client implements Syndication_Client { { // TODO: Implement get_posts() method. } -} \ No newline at end of file +} diff --git a/includes/class-syndication-wp-rss-client.php b/includes/class-syndication-wp-rss-client.php index fd3b4a5..cb89325 100644 --- a/includes/class-syndication-wp-rss-client.php +++ b/includes/class-syndication-wp-rss-client.php @@ -137,6 +137,7 @@ class Syndication_WP_RSS_Client extends SimplePie implements Syndication_Client <?php + do_action( 'syn_after_site_form', $site ); } public static function save_settings( $site_ID ) { @@ -185,4 +186,4 @@ class Syndication_WP_RSS_Client extends SimplePie implements Syndication_Client } -} \ No newline at end of file +} diff --git a/includes/class-syndication-wp-xml-client.php b/includes/class-syndication-wp-xml-client.php index 07475d3..8a5d7c0 100644 --- a/includes/class-syndication-wp-xml-client.php +++ b/includes/class-syndication-wp-xml-client.php @@ -649,6 +649,8 @@ class Syndication_WP_XML_Client implements Syndication_Client { <?php endforeach; endif; + + do_action( 'syn_after_site_form', $site ); } /** diff --git a/includes/class-syndication-wp-xmlrpc-client.php b/includes/class-syndication-wp-xmlrpc-client.php index d35862d..50bfa61 100644 --- a/includes/class-syndication-wp-xmlrpc-client.php +++ b/includes/class-syndication-wp-xmlrpc-client.php @@ -385,6 +385,7 @@ class Syndication_WP_XMLRPC_Client extends WP_HTTP_IXR_Client implements Syndica <?php + do_action( 'syn_after_site_form', $site ); } public static function save_settings( $site_ID ) { -- GitLab