From 61cf0c0351cc7f8a267ec0887b97fa958e9efdae Mon Sep 17 00:00:00 2001 From: David Shanske Date: Sat, 4 Nov 2023 03:59:36 +0000 Subject: [PATCH 01/20] Remove remote endpoint support --- includes/class-indieauth-remote-authorize.php | 167 ------------------ indieauth.php | 39 +--- 2 files changed, 8 insertions(+), 198 deletions(-) delete mode 100755 includes/class-indieauth-remote-authorize.php diff --git a/includes/class-indieauth-remote-authorize.php b/includes/class-indieauth-remote-authorize.php deleted file mode 100755 index 49f632e..0000000 --- a/includes/class-indieauth-remote-authorize.php +++ /dev/null @@ -1,167 +0,0 @@ -register_settings(); - // Load the hooks for this class only if true. This allows for debugging of the functions - if ( true === $load ) { - add_action( 'admin_init', array( get_called_class(), 'admin_init' ) ); - $this->load(); - } - } - - public function register_settings() { - // Register Setting - register_setting( - 'indieauth', - 'indieauth_authorization_endpoint', // Setting Name - array( - 'type' => 'string', - 'description' => 'IndieAuth Authorization Endpoint', - 'sanitize_callback' => 'esc_url', - 'show_in_rest' => true, - ) - ); - // Register Setting - register_setting( - 'indieauth', - 'indieauth_token_endpoint', // Setting Name - array( - 'type' => 'string', - 'description' => 'IndieAuth Token Endpoint', - 'sanitize_callback' => 'esc_url', - 'show_in_rest' => true, - ) - ); - } - - public static function admin_init() { - $cls = get_called_class(); - $page = 'indieauth'; - - add_settings_section( - 'indieauth', - 'Remote IndieAuth Endpoint Settings', - array( $cls, 'auth_settings' ), - $page - ); - add_settings_field( - 'indieauth_authorization_endpoint', - __( 'Authorization Endpoint', 'indieauth' ), - array( $cls, 'endpoint_field' ), - $page, - 'indieauth', - array( - 'label_for' => 'indieauth_authorization_endpoint', - 'class' => 'widefat', - 'default' => '', - ) - ); - add_settings_field( - 'indieauth_token_endpoint', - __( 'Token Endpoint', 'indieauth' ), - array( $cls, 'endpoint_field' ), - $page, - 'indieauth', - array( - 'label_for' => 'indieauth_token_endpoint', - 'class' => 'widefat', - 'default' => '', - ) - ); - } - - public static function endpoint_field( $args ) { - printf( '