HEX
Server: Apache
System:
User: ()
PHP: 7.4.33
Disabled: system,passthru,shell_exec,exec,proc_close,proc_open,proc_get_status,proc_nice,proc_terminate,highlight_file,escapeshellcmd,pclose,debugger_off,debugger_on,leak,listen,define_syslog_variables,ftp_exec,posix_uname,posix_getpwuid,get_current_user,getmyuid,getmygid,apache_child_terminate,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,escapeshellarg,myshellexec,escapeshellarg,disk_free_space,disk_total_space,show_source,dl,symlink,listen,syslog,php_ini_scanned_files,inurl,apache_setenv,closelog,rar_open,bzopen,bzread,bzwrite,shellcode,show_source,apache_get_modules,apache_get_version,apache_note,openlog,crack_check,crack_closedict,pcntl_exec,ini_alter,backtick,cmd,virtual,getservbyport,myshellexec,hypot,pg_host,phpini,link,readlink,syslog,id,ftok,posix_access,error_log,sym,php_u,psockopen,apache_child_k_closedict,crack_getlastmessage,crack_opendict,php_ini,ini_restore,popen,curl_multi_exec,php_uname
Upload Files
File: /home/homework/www/kurs3/wp-content/plugins/jetpack/extensions/blocks/rating-star/rating-star.php
<?php
/**
 * Star Rating Block.
 *
 * @since 8.0.0
 *
 * @package Jetpack
 */

namespace Automattic\Jetpack\Extensions\Rating_Star;

use Automattic\Jetpack\Blocks;
use Jetpack_Gutenberg;

const FEATURE_NAME = 'rating-star';
const BLOCK_NAME   = 'jetpack/' . FEATURE_NAME;

// Load generic function definitions.
require_once __DIR__ . '/rating-meta.php';

/**
 * Registers the block for use in Gutenberg
 * This is done via an action so that we can disable
 * registration if we need to.
 */
function register_block() {
	Blocks::jetpack_register_block(
		BLOCK_NAME,
		array(
			'render_callback' => __NAMESPACE__ . '\render_block',
			'attributes'      => array(
				'rating'      => array(
					'type'    => 'number',
					'default' => 1,
				),
				'maxRating'   => array(
					'type'    => 'number',
					'default' => 5,
				),
				'color'       => array(
					'type' => 'string',
				),
				'ratingStyle' => array(
					'type'    => 'string',
					'default' => 'star',
				),
				'className'   => array(
					'type' => 'string',
				),
				'align'       => array(
					'type'    => 'string',
					'default' => 'left',
				),
			),
		)
	);
}
add_action( 'init', __NAMESPACE__ . '\register_block' );

/**
 * Dynamic rendering of the block.
 *
 * @param array $attributes Array containing the block attributes.
 *
 * @return string
 */
function render_block( $attributes ) {
	// Tell Jetpack to load the assets registered via jetpack_register_block.
	Jetpack_Gutenberg::load_assets_as_required( FEATURE_NAME );

	return jetpack_rating_meta_render_block( $attributes );
}

/**
 * Older versions of AMP (0.6.2) are unable to render the markup, so we hide it
 * Newer versions of AMP (1.4.1+) seem OK, but need the screen-reader text hidden
 */
function amp_add_inline_css() {
	if ( defined( 'AMP__VERSION' ) && version_compare( AMP__VERSION, '1.4.1', '>=' ) ) {
		echo '.wp-block-jetpack-rating-star span.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal; }';
	} else {
		echo '.wp-block-jetpack-rating-star span:not([aria-hidden="true"]) { display: none; }';
	}
}
add_action( 'amp_post_template_css', __NAMESPACE__ . '\amp_add_inline_css', 11 );