Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Font Library: Frontend #53650

Closed
wants to merge 15 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,36 @@
),
)
);

/*

Check failure on line 71 in lib/experimental/fonts/font-library/class-wp-rest-font-library-controller.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Whitespace found at end of line
* DO NOT MERGE: This is a temporary endpoint to allow testing googe fonts installation.
* See: https://github.com/WordPress/gutenberg/issues/52795
*/
register_rest_route(
$this->namespace,
'/' . $this->rest_base . '/google_fonts',
array(
array(
'methods' => WP_REST_Server::READABLE,
'callback' => array( $this, 'google_fonts' ),
'permission_callback' => array( $this, 'update_fonts_library_permissions_check' ),
),
)
);

Check failure on line 86 in lib/experimental/fonts/font-library/class-wp-rest-font-library-controller.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Functions must not contain multiple empty lines in a row; found 2 empty lines

}

/*

Check failure on line 90 in lib/experimental/fonts/font-library/class-wp-rest-font-library-controller.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Whitespace found at end of line
* DO NOT MERGE: This is a temporary endpoint to allow testing googe fonts installation.
* See: https://github.com/WordPress/gutenberg/issues/52795
*/
public function google_fonts() {

Check failure on line 94 in lib/experimental/fonts/font-library/class-wp-rest-font-library-controller.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

You must use "/**" style comments for a function comment
$file = file_get_contents(

Check warning on line 95 in lib/experimental/fonts/font-library/class-wp-rest-font-library-controller.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Equals sign not aligned with surrounding assignments; expected 6 spaces but found 1 space
path_join( dirname( __FILE__ ), 'google-fonts.json' )
);
$json_data = json_decode($file, true);

Check failure on line 98 in lib/experimental/fonts/font-library/class-wp-rest-font-library-controller.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Tabs must be used to indent lines; spaces are not allowed

Check failure on line 98 in lib/experimental/fonts/font-library/class-wp-rest-font-library-controller.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Expected 1 spaces after opening parenthesis; 0 found

Check failure on line 98 in lib/experimental/fonts/font-library/class-wp-rest-font-library-controller.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Expected 1 spaces before closing parenthesis; 0 found
return new WP_REST_Response($json_data, 200);

Check failure on line 99 in lib/experimental/fonts/font-library/class-wp-rest-font-library-controller.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Tabs must be used to indent lines; spaces are not allowed

Check failure on line 99 in lib/experimental/fonts/font-library/class-wp-rest-font-library-controller.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Expected 1 spaces after opening parenthesis; 0 found

Check failure on line 99 in lib/experimental/fonts/font-library/class-wp-rest-font-library-controller.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Expected 1 spaces before closing parenthesis; 0 found
}

/**
Expand Down
Loading
Loading