Skip to content

Commit

Permalink
Add todos
Browse files Browse the repository at this point in the history
  • Loading branch information
jsnmoon committed Oct 22, 2021
1 parent e7bab4b commit 78a7aa6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion projects/packages/search/src/class-helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,7 @@ public static function get_max_offset() {
* @return bool
*/
public static function is_valid_locale( $locale ) {
// TODO: Replace JETPACK__GLOTPRESS_LOCALES_PATH.
if ( ! class_exists( 'GP_Locales' ) ) {
if ( defined( 'JETPACK__GLOTPRESS_LOCALES_PATH' ) && file_exists( JETPACK__GLOTPRESS_LOCALES_PATH ) ) {
require JETPACK__GLOTPRESS_LOCALES_PATH;
Expand All @@ -713,6 +714,8 @@ public static function is_valid_locale( $locale ) {
* @return string $script_version Version number.
*/
public static function get_asset_version( $file ) {
// TODO: Replace Jetpack:: invocation.
// TODO: Replace JETPACK__PLUGIN_DIR and JETPACK__VERSION.
return Jetpack::is_development_version() && file_exists( JETPACK__PLUGIN_DIR . $file )
? filemtime( JETPACK__PLUGIN_DIR . $file )
: JETPACK__VERSION;
Expand Down Expand Up @@ -862,7 +865,7 @@ public static function generate_initial_javascript_state() {
'postsPerPage' => $posts_per_page,
'siteId' => class_exists( 'Jetpack' ) && method_exists( 'Jetpack', 'get_option' ) ? Jetpack::get_option( 'id' ) : get_current_blog_id(),
'postTypes' => $post_type_labels,
'webpackPublicPath' => plugins_url( '_inc/build/instant-search/', JETPACK__PLUGIN_FILE ),
'webpackPublicPath' => plugins_url( '/', __DIR__ . '/build' ),
'isPhotonEnabled' => ( $is_wpcom || $is_jetpack_photon_enabled ) && ! $is_private_site,

// config values related to private site support.
Expand Down

0 comments on commit 78a7aa6

Please sign in to comment.