HEX
Server: LiteSpeed
System: Linux eko108.isimtescil.net 4.18.0-477.21.1.lve.1.el8.x86_64 #1 SMP Tue Sep 5 23:08:35 UTC 2023 x86_64
User: uyarreklamcomtr (11202)
PHP: 7.4.33
Disabled: opcache_get_status
Upload Files
File: /var/www/vhosts/uyarreklam.com.tr/httpdocs/attributes.tar
tab-panel.php000064400000001350151544143420007122 0ustar00<?php
declare( strict_types=1 );

use Automattic\WooCommerce\GoogleListingsAndAds\View\PHPView;

defined( 'ABSPATH' ) || exit;

/**
 * @var PHPView $this
 */

/**
 * @var array $form
 */
$form = $this->form

?>

<div id="gla_attributes" class="panel woocommerce_options_panel">
	<h2><?php esc_html_e( 'Product attributes', 'google-listings-and-ads' ); ?></h2>
	<p class="show_if_variable"><?php esc_html_e( 'As this is a variable product, you can add additional product attributes by going to Variations > Select one variation > Google for WooCommerce.', 'google-listings-and-ads' ); ?></p>
	<?php
	// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
	echo $this->render_partial( 'inputs/form', [ 'form' => $form ] );
	?>
</div>

variations-form.php000064400000003430151544143430010401 0ustar00<?php
declare( strict_types=1 );

use Automattic\WooCommerce\GoogleListingsAndAds\Admin\Input\SelectWithTextInput;
use Automattic\WooCommerce\GoogleListingsAndAds\View\PHPView;

defined( 'ABSPATH' ) || exit;

/**
 * @var PHPView $this
 */

/**
 * @var array $children
 */
$children = $this->children;
?>

<?php if ( $this->is_root ) : ?>
<div class="gla-metabox wc-metabox closed">
	<h3>
		<strong><?php esc_html_e( 'Google for WooCommerce', 'google-listings-and-ads' ); ?></strong>
		<div class="handlediv" aria-label="Click to toggle"></div>
	</h3>
	<div class="wc-metabox-content" style="display: none;">
	<?php endif; ?>
	<?php
	foreach ( $children as $form ) {
		if ( ! empty( $form['type'] ) ) {
			$form['wrapper_class'] =
				sprintf( '%s %s', $form['wrapper_class'] ?? '', 'form-row form-row-full' );

			if ( 'select-with-text-input' === $form['type'] && ! empty( $form['children'][ SelectWithTextInput::SELECT_INPUT_KEY ] ) && ! empty( $form['children'][ SelectWithTextInput::CUSTOM_INPUT_KEY ] ) ) {
				$form['children'][ SelectWithTextInput::SELECT_INPUT_KEY ]['wrapper_class'] =
					sprintf( '%s %s', $form['children'][ SelectWithTextInput::SELECT_INPUT_KEY ]['wrapper_class'] ?? '', 'form-row form-row-first' );

				$form['children'][ SelectWithTextInput::CUSTOM_INPUT_KEY ]['wrapper_class'] =
					sprintf( '%s %s', $form['children'][ SelectWithTextInput::CUSTOM_INPUT_KEY ]['wrapper_class'] ?? '', 'form-row form-row-last' );
			}

			// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
			echo $this->render_partial( 'inputs/form', [ 'form' => $form ] );
		} else {
			// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
			echo $this->render_partial( 'attributes/variations-form', $form );
		}
	}
	?>
	<?php if ( $this->is_root ) : ?>
	</div>
</div>
<?php endif; ?>
block.json000064400000001273151556470620006547 0ustar00{
    "$schema": "https://schemas.wp.org/trunk/block.json",
    "apiVersion": 2,
    "name": "woocommerce/product-attributes-field",
    "title": "Product attributes",
    "category": "widgets",
    "description": "The product attributes.",
    "keywords": ["products", "attributes"],
    "textdomain": "default",
    "attributes": {
        "name": {
            "type": "string",
            "__experimentalRole": "content"
        }
    },
    "supports": {
        "align": false,
        "html": false,
        "multiple": false,
        "reusable": false,
        "inserter": false,
        "lock": false,
        "__experimentalToolbar": false
    },
    "editorStyle": "file:./editor.css"
}
edit.js000064400000001160151556470620006040 0ustar00"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Edit=void 0;const element_1=require("@wordpress/element"),block_editor_1=require("@wordpress/block-editor"),core_data_1=require("@wordpress/core-data"),attributes_1=require("../../components/attributes/attributes");function Edit(){const[e,t]=(0,core_data_1.useEntityProp)("postType","product","attributes"),r=(0,core_data_1.useEntityId)("postType","product"),o=(0,block_editor_1.useBlockProps)();return(0,element_1.createElement)("div",{...o},(0,element_1.createElement)(attributes_1.Attributes,{productId:r,value:e,onChange:t}))}exports.Edit=Edit;index.js000064400000001135151556470620006224 0ustar00"use strict";var __importDefault=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.init=exports.settings=exports.name=exports.metadata=void 0;const utils_1=require("../../utils"),block_json_1=__importDefault(require("./block.json"));exports.metadata=block_json_1.default;const edit_1=require("./edit"),{name}=block_json_1.default;exports.name=name,exports.settings={example:{},edit:edit_1.Edit};const init=()=>(0,utils_1.initBlock)({name,metadata:block_json_1.default,settings:exports.settings});exports.init=init;