Making WordPress.org

Changeset 14765


Ignore:
Timestamp:
03/27/2026 08:41:11 AM (6 days ago)
Author:
dd32
Message:

Plugin Directory: Admin: Add ElasticSearch index metabox and status tool.

Adds a new metabox on plugin admin edit screens showing current ES status, to allow plugin reviewers to confirm that a plugin is indeed in the search index.

Adds a new plugin admin tool to allow bulk-query of the ES index to verify the contents is correct (Note: It should be, this is just to validate that).

Adds an ability to reindex plugins, by touching metadata / firing Jetpack sync actions, in the rare event it becomes out of sync.
This would likely only occur due to downtime on WordPress.org/WordPress.com, or when we cause Jetpack sync to not work.

See #8210

Location:
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-customizations.php

    r14744 r14765  
    7373        add_action( 'wp_ajax_plugin-svn-sync', array( __NAMESPACE__ . '\Metabox\Review_Tools', 'svn_sync' ) );
    7474        add_action( 'wp_ajax_plugin-set-reviewer', array( __NAMESPACE__ . '\Metabox\Reviewer', 'xhr_set_reviewer' ) );
     75        add_action( 'wp_ajax_plugin-elasticsearch', array( __NAMESPACE__ . '\Metabox\Elasticsearch', 'ajax_response' ) );
     76        add_action( 'wp_ajax_plugin-elasticsearch-reindex', array( __NAMESPACE__ . '\Metabox\Elasticsearch', 'ajax_reindex' ) );
    7577
    7678        add_action( 'save_post', array( __NAMESPACE__ . '\Metabox\Release_Confirmation', 'save_post' ) );
     
    785787        }
    786788
     789        add_meta_box(
     790            'plugin-elasticsearch',
     791            __( 'ElasticSearch Index', 'wporg-plugins' ),
     792            array( __NAMESPACE__ . '\Metabox\Elasticsearch', 'display' ),
     793            'plugin', 'normal', 'low'
     794        );
     795
    787796        // Remove unnecessary metaboxes.
    788797        remove_meta_box( 'commentsdiv', 'plugin', 'normal' );
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php

    r14734 r14765  
    44use WordPressdotorg\Plugin_Directory\Admin\Customizations;
    55use WordPressdotorg\Plugin_Directory\Tools;
    6 use WordPressdotorg\Plugin_Directory\Admin\Tools\{ Author_Cards, Stats_Report, Upload_Token };
     6use WordPressdotorg\Plugin_Directory\Admin\Tools\{ Author_Cards, Elasticsearch_Status, Stats_Report, Upload_Token };
    77use WordPressdotorg\Plugin_Directory\Tools\Helpscout;
    88
     
    112112            Customizations::instance();
    113113            Author_Cards::instance();
     114            Elasticsearch_Status::instance();
    114115            Stats_Report::instance();
    115116            Upload_Token::instance();
Note: See TracChangeset for help on using the changeset viewer.