From f95b77069d1ed0615d4e1904572de9ea084429e7 Mon Sep 17 00:00:00 2001 From: Thomas Whyles Date: Mon, 16 Jan 2017 14:31:26 +0000 Subject: [PATCH 1/3] Added some customisation hooks to the authorize template Filter Hooks - json_oauth1.theme.authorize.show_avatar - json_oauth1.theme.authorize.title - json_oauth1.theme.authorize.description Action Hooks - json_oauth1.theme.authorize.before_login_info - json_oauth1.theme.authorize.after_login_info --- theme/oauth1-authorize.php | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/theme/oauth1-authorize.php b/theme/oauth1-authorize.php index 7a51306..6518061 100644 --- a/theme/oauth1-authorize.php +++ b/theme/oauth1-authorize.php @@ -10,6 +10,11 @@ $url = site_url( 'wp-login.php?action=oauth1_authorize', 'login_post' ); $url = add_query_arg( 'oauth_token', $token_key, $url ); +// Filterable Prefs +$pref_show_avatar = apply_filters( 'json_oauth1.theme.authorize.show_avatar', true, $consumer ); +$pref_title = apply_filters( 'json_oauth1.theme.authorize.title', sprintf( __('Connect %1$s'), $consumer->post_title ), $consumer ); +$pref_description = apply_filters( 'json_oauth1.theme.authorize.description', sprintf( __( '%1$s,
"%2$s" would like to connect to %3$s.' ), $current_user->user_login, $consumer->post_title, get_bloginfo( 'name' ) ), $consumer ); + ?>