Making WordPress.org

Changeset 13241


Ignore:
Timestamp:
02/22/2024 07:43:58 AM (4 months ago)
Author:
dd32
Message:

Plugin Directory: API: Prepare to include the Plugin dependencies in the update api.

See #7483, #6921.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/jobs/class-api-update-updater.php

    r11840 r13241  
    6868        }
    6969
     70        $requires_plugins = get_post_meta( $post->ID, 'requires_plugins', true );
     71
    7072        $data = array(
    71             'plugin_id'       => $post->ID,
    72             'plugin_slug'     => $post->post_name,
    73             'available'       => 'publish' === $post->post_status || 'disabled' === $post->post_status,
    74             'version'         => get_post_meta( $post->ID, 'version', true ),
    75             'stable_tag'      => get_post_meta( $post->ID, 'stable_tag', true ),
    76             'plugin_name'     => strip_tags( get_post_meta( $post->ID, 'header_name', true ) ),
    77             'plugin_name_san' => sanitize_title_with_dashes( strip_tags( get_post_meta( $post->ID, 'header_name', true ) ) ),
    78             'plugin_author'   => strip_tags( get_post_meta( $post->ID, 'header_author', true ) ),
    79             'tested'          => get_post_meta( $post->ID, 'tested', true ),
    80             'requires'        => get_post_meta( $post->ID, 'requires', true ),
    81             'requires_php'    => get_post_meta( $post->ID, 'requires_php', true ),
    82             'upgrade_notice'  => '',
    83             'assets'          => serialize( self::get_plugin_assets( $post ) ),
    84             'last_updated'    => $post->post_modified,
     73            'plugin_id'        => $post->ID,
     74            'plugin_slug'      => $post->post_name,
     75            'available'        => 'publish'      === $post->post_status || 'disabled' === $post->post_status,
     76            'version'          => get_post_meta( $post->ID, 'version', true ),
     77            'stable_tag'       => get_post_meta( $post->ID, 'stable_tag', true ),
     78            'plugin_name'      => strip_tags( get_post_meta( $post->ID, 'header_name', true ) ),
     79            'plugin_name_san'  => sanitize_title_with_dashes( strip_tags( get_post_meta( $post->ID, 'header_name', true ) ) ),
     80            'plugin_author'    => strip_tags( get_post_meta( $post->ID, 'header_author', true ) ),
     81            'tested'           => get_post_meta( $post->ID, 'tested', true ),
     82            'requires'         => get_post_meta( $post->ID, 'requires', true ),
     83            'requires_php'     => get_post_meta( $post->ID, 'requires_php', true ),
     84            'requires_plugins' => $requires_plugins ? serialize( get_post_meta( $post->ID, 'requires_plugins', true ) ) : '',
     85            'upgrade_notice'   => '',
     86            'assets'           => serialize( self::get_plugin_assets( $post ) ),
     87            'last_updated'     => $post->post_modified,
    8588        );
    8689        $upgrade_notice = get_post_meta( $post->ID, 'upgrade_notice', true );
     
    177180  `requires` varchar(128) NOT NULL DEFAULT '',
    178181  `requires_php` varchar(128) NOT NULL DEFAULT '',
     182  `requires_plugins` text NOT NULL DEFAULT '',
    179183  `upgrade_notice` text,
    180184  `assets` text NOT NULL DEFAULT '',
Note: See TracChangeset for help on using the changeset viewer.