Changeset 14712
- Timestamp:
- 03/13/2026 05:27:24 PM (6 weeks ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-abilities
- Files:
-
- 6 edited
-
class-autoloader.php (modified) (1 diff)
-
plugins/plugin-directory/resources/class-plugin-check-guide.php (modified) (1 diff)
-
plugins/plugin-directory/resources/class-reserved-slugs.php (modified) (1 diff)
-
plugins/plugin-directory/tools/class-get-plugin-status.php (modified) (5 diffs)
-
plugins/plugin-directory/tools/class-validate-readme.php (modified) (1 diff)
-
wporg-abilities.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-abilities/class-autoloader.php
r14703 r14712 58 58 * Loads a class if it starts with `$this->prefix`. 59 59 * 60 * @param string $class The class to be loaded.60 * @param string $class_name The class to be loaded. 61 61 */ 62 public function load( $class ) {63 if ( strpos( $class , $this->prefix . self::NS_SEPARATOR ) !== 0 ) {62 public function load( $class_name ) { 63 if ( strpos( $class_name, $this->prefix . self::NS_SEPARATOR ) !== 0 ) { 64 64 return; 65 65 } 66 66 67 67 // Strip prefix from the start (ala PSR-4). 68 $class = substr( $class , $this->prefix_length + 1 );68 $class = substr( $class_name, $this->prefix_length + 1 ); 69 69 $class = strtolower( $class ); 70 70 $file = ''; -
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-abilities/plugins/plugin-directory/resources/class-plugin-check-guide.php
r14703 r14712 108 108 - A clean PCP report speeds up the review process significantly 109 109 - More info: https://wordpress.org/plugins/plugin-check/ 110 MD, 110 MD 111 , 111 112 'mimeType' => 'text/markdown', 112 113 ), -
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-abilities/plugins/plugin-directory/resources/class-reserved-slugs.php
r14709 r14712 5 5 * @package WordPressdotorg\Abilities\Plugins\Plugin_Directory\Resources 6 6 */ 7 8 // phpcs:disable WordPress.WP.CapitalPDangit.MisspelledInText -- Lowercase "wordpress" is intentional (slugs). 7 9 8 10 declare( strict_types = 1 ); -
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-abilities/plugins/plugin-directory/tools/class-get-plugin-status.php
r14710 r14712 35 35 'type' => 'object', 36 36 'properties' => array( 37 'plugin_slug' => array(37 'plugin_slug' => array( 38 38 'type' => 'string', 39 39 'description' => 'The plugin slug as assigned during submission.', … … 109 109 'mcp' => array( 'type' => 'tool' ), 110 110 'annotations' => array( 111 'readonly' => true,112 'idempotent' => true,113 'destructive' => false,111 'readonly' => true, 112 'idempotent' => true, 113 'destructive' => false, 114 114 ), 115 115 ), … … 167 167 */ 168 168 private static function get_plugin_post( string $slug ): ?\WP_Post { 169 $posts = get_posts( array( 170 'post_type' => 'plugin', 171 'name' => $slug, 172 'post_status' => 'any', 173 'author' => get_current_user_id(), 174 'numberposts' => 1, 175 ) ); 169 $posts = get_posts( 170 array( 171 'post_type' => 'plugin', 172 'name' => $slug, 173 'post_status' => 'any', 174 'author' => get_current_user_id(), 175 'numberposts' => 1, 176 ) 177 ); 176 178 177 179 return $posts[0] ?? null; … … 213 215 $reason = get_post_meta( $post->ID, '_rejection_reason', true ); 214 216 if ( $reason ) { 215 $reasons = class_exists( Template::class ) ? Template::get_rejection_reasons() : array();217 $reasons = class_exists( Template::class ) ? Template::get_rejection_reasons() : array(); 216 218 $data['rejection_reason'] = $reasons[ $reason ] ?? $reason; 217 219 } … … 292 294 $feedback[] = array( 293 295 'from' => 'customer' === $thread->type ? 'author' : 'reviewer', 296 // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase -- HelpScout API property. 294 297 'date' => $thread->createdAt ?? '', 295 298 'body' => $body, -
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-abilities/plugins/plugin-directory/tools/class-validate-readme.php
r14711 r14712 68 68 'mcp' => array( 'type' => 'tool' ), 69 69 'annotations' => array( 70 'readonly' => true,71 'idempotent' => true,72 'destructive' => false,70 'readonly' => true, 71 'idempotent' => true, 72 'destructive' => false, 73 73 ), 74 74 ), -
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-abilities/wporg-abilities.php
r14703 r14712 38 38 McpAdapter::instance(); 39 39 40 $ action= defined( 'WP_CLI' ) && constant( 'WP_CLI' ) ? 'init' : 'rest_api_init';40 $hook = defined( 'WP_CLI' ) && constant( 'WP_CLI' ) ? 'init' : 'rest_api_init'; 41 41 42 add_action( $ action, array( Registrar::class, 'init' ) );42 add_action( $hook, array( Registrar::class, 'init' ) ); 43 43 add_action( 'mcp_adapter_init', array( MCP_Server::class, 'register' ) ); 44 44 add_filter( 'mcp_adapter_create_default_server', '__return_false' );
Note: See TracChangeset
for help on using the changeset viewer.