WP_REST_Global_Styles_Controller::get_available_actions() – Get the link relations available for the post and current user.

You appear to be a bot. Output may be restricted

Description

Get the link relations available for the post and current user.

Usage

$array = WP_REST_Global_Styles_Controller::get_available_actions();

Parameters

Returns

array List of link relations.

Source

File name: wordpress/wp-includes/rest-api/endpoints/class-wp-rest-global-styles-controller.php
Lines:

1 to 10 of 10
  protected function get_available_actions() {
    $rels = array();

    $post_type = get_post_type_object( $this->post_type );
    if ( current_user_can( $post_type->cap->publish_posts ) ) {
      $rels[] = 'https://api.w.org/action-publish';
    }

    return $rels;
  }
 

 View on GitHub View on Trac