PluginProbe
ActivityPub / 8.0.2
ActivityPub v8.0.2
9.3.1 9.3.0 9.2.2 9.2.1 9.2.0 9.1.0 9.0.2 9.0.1 9.0.0 8.3.0 8.2.1 8.2.0 8.1.1 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.2.0 1.3.0 2.0.0 2.0.1 2.1.0 2.1.1 All 160 releases
← All changes | activitypub.php +10 -22 8.3.08.0.2 View file →
@@ -2,9 +2,9 @@
2 2 /**
3 3 * Plugin Name: ActivityPub
4 4 * Plugin URI: https://github.com/Automattic/wordpress-activitypub
5 5 * Description: The ActivityPub protocol is a decentralized social networking protocol based upon the ActivityStreams 2.0 data format.
6 - * Version: 8.3.0
6 + * Version: 8.0.2
7 7 * Author: Matthias Pfefferle & Automattic
8 8 * Author URI: https://automattic.com/
9 9 * License: MIT
10 10 * License URI: http://opensource.org/licenses/MIT
@@ -16,9 +16,9 @@
16 16 */
17 17
18 18 namespace Activitypub;
19 19
20 -\define( 'ACTIVITYPUB_PLUGIN_VERSION', '8.3.0' );
20 +\define( 'ACTIVITYPUB_PLUGIN_VERSION', '8.0.2' );
21 21
22 22 // Plugin related constants.
23 23 \define( 'ACTIVITYPUB_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
24 24 \define( 'ACTIVITYPUB_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
@@ -52,24 +52,16 @@
52 52 Rest\Server::init();
53 53 ( new Rest\Actors_Controller() )->register_routes();
54 54 ( new Rest\Actors_Inbox_Controller() )->register_routes();
55 55 ( new Rest\Admin\Actions_Controller() )->register_routes();
56 - ( new Rest\Admin\Statistics_Controller() )->register_routes();
57 56 ( new Rest\Application_Controller() )->register_routes();
58 - ( new Rest\Stats_Image_Controller() )->register_routes();
59 57 ( new Rest\Collections_Controller() )->register_routes();
60 58 ( new Rest\Comments_Controller() )->register_routes();
61 59 ( new Rest\Followers_Controller() )->register_routes();
62 60 ( new Rest\Following_Controller() )->register_routes();
63 - ( new Rest\Liked_Controller() )->register_routes();
64 61 ( new Rest\Inbox_Controller() )->register_routes();
65 62 ( new Rest\Interaction_Controller() )->register_routes();
66 63 ( new Rest\Moderators_Controller() )->register_routes();
67 - if ( \get_option( 'activitypub_api', false ) ) {
68 - ( new Rest\OAuth\Authorization_Controller() )->register_routes();
69 - ( new Rest\OAuth\Clients_Controller() )->register_routes();
70 - ( new Rest\OAuth\Token_Controller() )->register_routes();
71 - }
72 64 ( new Rest\Outbox_Controller() )->register_routes();
73 65 ( new Rest\Post_Controller() )->register_routes();
74 66 ( new Rest\Replies_Controller() )->register_routes();
75 67 ( new Rest\Webfinger_Controller() )->register_routes();
@@ -77,9 +69,8 @@
77 69 // Load NodeInfo endpoints only if blog is public.
78 70 if ( is_blog_public() ) {
79 71 ( new Rest\Nodeinfo_Controller() )->register_routes();
80 72 }
81 - ( new Rest\Proxy_Controller() )->register_routes();
82 73 }
83 74 \add_action( 'rest_api_init', __NAMESPACE__ . '\rest_init' );
84 75
85 76 /**
@@ -91,11 +82,8 @@
91 82 \add_action( 'init', array( __NAMESPACE__ . '\Cache', 'init' ) );
92 83 \add_action( 'init', array( __NAMESPACE__ . '\Comment', 'init' ) );
93 84 \add_action( 'init', array( __NAMESPACE__ . '\Dispatcher', 'init' ) );
94 85 \add_action( 'init', array( __NAMESPACE__ . '\Embed', 'init' ) );
95 - if ( \get_option( 'activitypub_api', false ) ) {
96 - \add_action( 'init', array( __NAMESPACE__ . '\Event_Stream', 'init' ) );
97 - }
98 86 \add_action( 'init', array( __NAMESPACE__ . '\Handler', 'init' ) );
99 87 \add_action( 'init', array( __NAMESPACE__ . '\Hashtag', 'init' ) );
100 88 \add_action( 'init', array( __NAMESPACE__ . '\Link', 'init' ) );
101 89 \add_action( 'init', array( __NAMESPACE__ . '\Mailer', 'init' ) );
@@ -108,12 +96,8 @@
108 96 // Priority 0 ensures Scheduler hooks are registered before Migration (priority 1) runs.
109 97 \add_action( 'init', array( __NAMESPACE__ . '\Scheduler', 'init' ), 0 );
110 98 \add_action( 'init', array( __NAMESPACE__ . '\Search', 'init' ) );
111 99 \add_action( 'init', array( __NAMESPACE__ . '\Signature', 'init' ) );
112 - // Only load OAuth Server if the ActivityPub API is enabled.
113 - if ( \get_option( 'activitypub_api', false ) ) {
114 - \add_action( 'init', array( __NAMESPACE__ . '\OAuth\Server', 'init' ) );
115 - }
116 100
117 101 if ( site_supports_blocks() ) {
118 102 \add_action( 'init', array( __NAMESPACE__ . '\Blocks', 'init' ) );
119 103 }
@@ -129,8 +113,16 @@
129 113 if ( \file_exists( $loader_file ) && \is_readable( $loader_file ) ) {
130 114 require_once $loader_file;
131 115 }
132 116 }
117 +
118 + if ( \defined( 'WP_DEBUG' ) && WP_DEBUG ) {
119 + $debug_file = __DIR__ . '/includes/debug.php';
120 + if ( \file_exists( $debug_file ) && \is_readable( $debug_file ) ) {
121 + require_once $debug_file;
122 + Debug::init();
123 + }
124 + }
133 125 }
134 126 \add_action( 'plugins_loaded', __NAMESPACE__ . '\plugin_init' );
135 127
136 128 /**
@@ -148,9 +140,8 @@
148 140 \add_action( 'admin_init', array( __NAMESPACE__ . '\WP_Admin\Blog_Settings_Fields', 'init' ) );
149 141 \add_action( 'admin_init', array( __NAMESPACE__ . '\WP_Admin\Health_Check', 'init' ) );
150 142 \add_action( 'admin_init', array( __NAMESPACE__ . '\WP_Admin\Settings', 'init' ) );
151 143 \add_action( 'admin_init', array( __NAMESPACE__ . '\WP_Admin\Settings_Fields', 'init' ) );
152 - \add_action( 'admin_init', array( __NAMESPACE__ . '\WP_Admin\Dashboard', 'init' ) );
153 144 \add_action( 'admin_init', array( __NAMESPACE__ . '\WP_Admin\User_Settings_Fields', 'init' ) );
154 145 \add_action( 'admin_init', array( __NAMESPACE__ . '\WP_Admin\Welcome_Fields', 'init' ) );
155 146
156 147 if ( defined( 'WP_LOAD_IMPORTERS' ) && WP_LOAD_IMPORTERS ) {
@@ -176,7 +167,4 @@
176 167 // Check for CLI env, to add the CLI commands.
177 168 if ( defined( 'WP_CLI' ) && WP_CLI ) {
178 169 Cli::register();
179 170 }
180 -
181 -// Register OAuth login form handler early (before wp-login.php processes).
182 -\add_action( 'login_form_activitypub_authorize', array( __NAMESPACE__ . '\OAuth\Server', 'login_form_authorize' ) );