Commit realizado el 12:13:52 08-04-2024

This commit is contained in:
Pagina Web Monito
2024-04-08 12:13:55 -04:00
commit 0c33094de9
7815 changed files with 1365694 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
<?php
/**
* Field Interface.
*
* @link https://github.com/googleforcreators/web-stories-wp
*
* @copyright 2020 Google LLC
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
*/
declare(strict_types = 1);
namespace Google\Web_Stories\Interfaces;
/**
* Interface Field.
*/
interface Field {
/**
* Whether to display the field.
*
* @since 1.5.0
*/
public function show(): bool;
/**
* Label for current field.
*
* @since 1.5.0
*/
public function label(): string;
/**
* Whether the field is hidden.
*
* @since 1.5.0
*/
public function hidden(): bool;
}

View File

@@ -0,0 +1,91 @@
<?php
/**
* Field State Interface
*
* Renderer fields will change state based on view types.
*
* @link https://github.com/googleforcreators/web-stories-wp
*
* @copyright 2020 Google LLC
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
*/
declare(strict_types = 1);
namespace Google\Web_Stories\Interfaces;
/**
* Interface FieldState.
*/
interface FieldState {
/**
* Get title field along with its state for
* current view type.
*
* @since 1.5.0
*
* @return Field
*/
public function title();
/**
* Get excerpt field along with its state for
* current view type.
*
* @since 1.5.0
*
* @return Field
*/
public function excerpt();
/**
* Get image alignment field along with its state for
* current view type.
*
* @since 1.5.0
*
* @return Field
*/
public function image_alignment();
/**
* Get author field along with its state for
* current view type.
*
* @since 1.5.0
*
* @return Field
*/
public function author();
/**
* Get date field along with its state for
* current view type.
*
* @since 1.5.0
*
* @return Field
*/
public function date();
/**
* Get archive link field along with its state for
* current view type.
*
* @since 1.5.0
*
* @return Field
*/
public function archive_link();
/**
* Get sharp corner field along with its state for
* current view type.
*
* @since 1.5.0
*
* @return Field
*/
public function sharp_corners();
}

View File

@@ -0,0 +1,30 @@
<?php
/**
* Field State Factory Interface
*
* Factory for field state types.
*
* @link https://github.com/googleforcreators/web-stories-wp
*
* @copyright 2021 Google LLC
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
*/
declare(strict_types = 1);
namespace Google\Web_Stories\Interfaces;
/**
* Interface FieldState.
*/
interface FieldStateFactory {
/**
* Get field state by title.
*
* @since 1.5.0
*
* @return FieldState
*/
public function get_field();
}

View File

@@ -0,0 +1,42 @@
<?php
/**
* Migration Interface.
*
* @link https://github.com/googleforcreators/web-stories-wp
*
* @copyright 2020 Google LLC
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
*/
/**
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
declare(strict_types = 1);
namespace Google\Web_Stories\Interfaces;
/**
* Interface Migration
*/
interface Migration {
/**
* Migrate
*
* @since 1.7.0
*/
public function migrate(): void;
}

View File

@@ -0,0 +1,51 @@
<?php
/**
* Interface Product_Query
*
* @link https://github.com/googleforcreators/web-stories-wp
*
* @copyright 2022 Google LLC
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
*/
/**
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
declare(strict_types = 1);
namespace Google\Web_Stories\Interfaces;
use Google\Web_Stories\Shopping\Product;
use WP_Error;
/**
* Interface Product_Query.
*/
interface Product_Query {
/**
* Get products by search term.
*
* @since 1.21.0
*
* @param string $search_term Search term.
* @param int $page Number of page for paginated requests.
* @param int $per_page Number of products to be fetched.
* @param string $orderby Sort collection by product attribute.
* @param string $order Order sort attribute ascending or descending.
* @return array{products: array<Product>, has_next_page: bool}|WP_Error
*/
public function get_search( string $search_term, int $page = 1, int $per_page = 100, string $orderby = 'date', string $order = 'desc' );
}

View File

@@ -0,0 +1,64 @@
<?php
/**
* Renderer Interface.
*
* Stories renderers should conform to this interface,
*
* @link https://github.com/googleforcreators/web-stories-wp
*
* @copyright 2020 Google LLC
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
*/
/**
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
declare(strict_types = 1);
namespace Google\Web_Stories\Interfaces;
/**
* Interface Renderer.
*/
interface Renderer {
/**
* Initial actions to setup the renderer like,
* adding hooks and setting up states.
*
* @since 1.5.0
*/
public function init(): void;
/**
* Render the markup for story.
*
* @since 1.5.0
*
* @param array<string,mixed> $args Array of rendering related arguments.
* @return string Rendering markup.
*/
public function render( array $args = [] ): string;
/**
* Render a single story markup.
*
* @since 1.5.0
*
* @return mixed
*/
public function render_single_story_content();
}