Heray-Was-Here
Server : Apache
System : Linux vps37394.inmotionhosting.com 3.10.0-1160.119.1.vz7.224.4 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64
User : jasonp18 ( 1000)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/jasonp18/www/wp-content/plugins/strong-testimonials/assets/src/js/components/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/jasonp18/www/wp-content/plugins/strong-testimonials/assets/src/js/components/inspector.js
/**
 * WordPress dependencies
 */
const { __ } = wp.i18n;
const { Component, Fragment } = wp.element;
const { InspectorControls } = wp.blockEditor;
const { SelectControl, Button, PanelBody, PanelRow } = wp.components;

/**
 * Inspector controls
 */
export default class Inspector extends Component {
	constructor(props) {
		super(...arguments);
	}

	render() {
		const { attributes, setAttributes, onIdChange, selectOptions } = this.props;
		const { id, views, testimonials } = attributes;
		return (
			<Fragment>
				<InspectorControls>
					<PanelBody title={__('View Settings')} initialOpen={true}>
						{st_views.views.length === 0 && (
							<Fragment>
								<p>{__("You don't seem to have any views.")}</p>
								<Button
									href={
										st_views.adminURL +
										'edit.php?post_type=wpm-testimonial&page=testimonial-views&action=add'
									}
									target="_blank"
									isDefault
								>
									{__('Add New View')}
								</Button>
							</Fragment>
						)}

						{st_views.views.length > 0 && (
							<Fragment>
								<SelectControl
									label={__('Select View')}
									key={id}
									value={id}
									options={selectOptions}
									onChange={(value) => onIdChange(parseInt(value))}
								/>
								{id != 0 && (
									<Button
										target="_blank"
										href={
											st_views.adminURL +
											'edit.php?post_type=wpm-testimonial&page=testimonial-views&action=edit&id=' +
											id
										}
										isSecondary
									>
										{__('Edit View')}
									</Button>
								)}
							</Fragment>
						)}
					</PanelBody>
				</InspectorControls>
			</Fragment>
		);
	}
}

Hry