| @@ -11,8 +11,9 @@ | ||
| 11 | 11 | |
| 12 | 12 | require_once __DIR__ . '/blogroll-item/blogroll-item.php'; |
| 13 | 13 | |
| 14 | 14 | use Automattic\Jetpack\Blocks; |
| 15 | +use Automattic\Jetpack\Status\Request; | |
| 15 | 16 | use Jetpack_Gutenberg; |
| 16 | 17 | |
| 17 | 18 | /** |
| 18 | 19 | * Registers the block for use in Gutenberg |
| @@ -58,9 +59,9 @@ | ||
| 58 | 59 | $content |
| 59 | 60 | </form> |
| 60 | 61 | HTML; |
| 61 | 62 | |
| 62 | - $blogroll_content = $is_wpcom && jetpack_is_frontend() ? $form_content : $content; | |
| 63 | + $blogroll_content = $is_wpcom && Request::is_frontend() ? $form_content : $content; | |
| 63 | 64 | |
| 64 | 65 | return sprintf( |
| 65 | 66 | '<div class="%1$s">%2$s</div>', |
| 66 | 67 | esc_attr( Blocks::classes( FEATURE_NAME, $attr ) ), |
| @@ -84,27 +85,30 @@ | ||
| 84 | 85 | 'schema' => array( |
| 85 | 86 | 'items' => array( |
| 86 | 87 | 'type' => 'object', |
| 87 | 88 | 'properties' => array( |
| 88 | - 'id' => array( | |
| 89 | + 'id' => array( | |
| 89 | 90 | 'type' => 'string', |
| 90 | 91 | 'format' => 'text-field', |
| 91 | 92 | ), |
| 92 | - 'name' => array( | |
| 93 | + 'name' => array( | |
| 93 | 94 | 'type' => 'string', |
| 94 | 95 | 'format' => 'text-field', |
| 95 | 96 | ), |
| 96 | - 'icon' => array( | |
| 97 | + 'icon' => array( | |
| 97 | 98 | 'type' => 'string', |
| 98 | 99 | 'format' => 'uri', |
| 99 | 100 | ), |
| 100 | - 'url' => array( | |
| 101 | + 'url' => array( | |
| 101 | 102 | 'type' => 'string', |
| 102 | 103 | 'format' => 'uri', |
| 103 | 104 | ), |
| 104 | - 'description' => array( | |
| 105 | + 'description' => array( | |
| 105 | 106 | 'type' => 'string', |
| 106 | 107 | 'format' => 'text-field', |
| 108 | + ), | |
| 109 | + 'is_non_wpcom_site' => array( | |
| 110 | + 'type' => 'boolean', | |
| 107 | 111 | ), |
| 108 | 112 | ), |
| 109 | 113 | ), |
| 110 | 114 | ), |