[ Avaa Bypassed ]




Upload:

Command:

www-data@3.141.193.189: ~ $
<?php
/**
 * Adding extra functions for the gallery.
 *
 * @package automattic/jetpack
 */

use Automattic\Jetpack\Assets;

/**
 * Renders extra controls in the Gallery Settings section of the new media UI.
 */
class Jetpack_Gallery_Settings {
	/**
	 * Available gallery types.
	 *
	 * @var array
	 */
	public $gallery_types;

	/**
	 * The constructor.
	 */
	public function __construct() {
		add_action( 'admin_init', array( $this, 'admin_init' ) );
	}

	/**
	 * Initialize the admin resources.
	 */
	public function admin_init() {
		/**
		 * Filter the available gallery types.
		 *
		 * @module shortcodes, tiled-gallery
		 *
		 * @since 2.5.1
		 *
		 * @param array $value Array of the default thumbnail grid gallery type. Default array contains one key, ‘default’.
		 */
		$this->gallery_types = apply_filters( 'jetpack_gallery_types', array( 'default' => __( 'Thumbnail Grid', 'jetpack' ) ) );

		// Enqueue the media UI only if needed.
		if ( is_countable( $this->gallery_types ) && count( $this->gallery_types ) > 1 ) {
			add_action( 'wp_enqueue_media', array( $this, 'wp_enqueue_media' ) );
			add_action( 'print_media_templates', array( $this, 'print_media_templates' ) );
		}
		// Add Slideshow and Galleries functionality to core's media gallery widget.
		add_filter( 'widget_media_gallery_instance_schema', array( $this, 'core_media_widget_compat' ) );
	}

	/**
	 * Updates the schema of the core gallery widget so we can save the
	 * fields that we add to Gallery Widgets, like `type` and `conditions`
	 *
	 * @param array $schema The current schema for the core gallery widget.
	 * @return array  the updated schema
	 */
	public function core_media_widget_compat( $schema ) {
		$schema['type'] = array(
			'type'        => 'string',
			'enum'        => array_keys( $this->gallery_types ),
			'description' => __( 'Type of gallery.', 'jetpack' ),
			'default'     => 'default',
		);
		return $schema;
	}

	/**
	 * Registers/enqueues the gallery settings admin js.
	 */
	public function wp_enqueue_media() {
		if ( ! wp_script_is( 'jetpack-gallery-settings', 'registered' ) ) {
			/**
			 * This only happens if we're not in Jetpack, but on WPCOM instead.
			 * This is the correct path for WPCOM.
			 */
			wp_register_script(
				'jetpack-gallery-settings',
				Assets::get_file_url_for_environment( '_inc/build/gallery-settings.min.js', '_inc/gallery-settings.js' ),
				array( 'jquery', 'media-views' ),
				'20121225',
				false
			);
		}

		wp_enqueue_script( 'jetpack-gallery-settings' );
	}

	/**
	 * Outputs a view template which can be used with wp.media.template
	 */
	public function print_media_templates() {
		/**
		 * Filter the default gallery type.
		 *
		 * @module tiled-gallery
		 *
		 * @since 2.5.1
		 *
		 * @param string $value A string of the gallery type. Default is ‘default’.
		 */
		$default_gallery_type = apply_filters( 'jetpack_default_gallery_type', 'default' );

		?>
		<script type="text/html" id="tmpl-jetpack-gallery-settings">
			<label class="setting">
				<span><?php esc_html_e( 'Type', 'jetpack' ); ?></span>
				<select class="type" name="type" data-setting="type">
					<?php foreach ( $this->gallery_types as $value => $caption ) : ?>
						<option value="<?php echo esc_attr( $value ); ?>" <?php selected( $value, $default_gallery_type ); ?>><?php echo esc_html( $caption ); ?></option>
					<?php endforeach; ?>
				</select>
			</label>
		</script>
		<?php
	}
}
new Jetpack_Gallery_Settings();

Filemanager

Name Type Size Permission Actions
3rd-party Folder 0777
_inc Folder 0777
css Folder 0777
extensions Folder 0777
images Folder 0777
jetpack_vendor Folder 0777
json-endpoints Folder 0777
modules Folder 0777
sal Folder 0777
src Folder 0777
vendor Folder 0777
views Folder 0777
CHANGELOG.md File 562.84 KB 0777
LICENSE.txt File 17.98 KB 0777
SECURITY.md File 2.45 KB 0777
class-jetpack-connection-status.php File 728 B 0777
class-jetpack-connection-widget.php File 3.27 KB 0777
class-jetpack-gallery-settings.php File 3.38 KB 0777
class-jetpack-pre-connection-jitms.php File 5.77 KB 0777
class-jetpack-recommendations-banner.php File 9.08 KB 0777
class-jetpack-stats-dashboard-widget.php File 7.77 KB 0777
class-jetpack-wizard-banner.php File 214 B 0777
class-jetpack-xmlrpc-methods.php File 8.33 KB 0777
class.frame-nonce-preview.php File 3.22 KB 0777
class.jetpack-admin.php File 20.11 KB 0777
class.jetpack-affiliate.php File 205 B 0777
class.jetpack-autoupdate.php File 9.74 KB 0777
class.jetpack-bbpress-json-api.compat.php File 220 B 0777
class.jetpack-boost-modules.php File 1.23 KB 0777
class.jetpack-cli.php File 71.41 KB 0777
class.jetpack-client-server.php File 2.79 KB 0777
class.jetpack-connection-banner.php File 13.8 KB 0777
class.jetpack-data.php File 275 B 0777
class.jetpack-gutenberg.php File 41.16 KB 0777
class.jetpack-heartbeat.php File 4.55 KB 0777
class.jetpack-idc.php File 351 B 0777
class.jetpack-modules-list-table.php File 14.79 KB 0777
class.jetpack-network-sites-list-table.php File 5.93 KB 0777
class.jetpack-network.php File 21.03 KB 0777
class.jetpack-plan.php File 4.09 KB 0777
class.jetpack-post-images.php File 31.98 KB 0777
class.jetpack-twitter-cards.php File 12.92 KB 0777
class.jetpack-user-agent.php File 25.84 KB 0777
class.jetpack.php File 228.13 KB 0777
class.json-api-endpoints.php File 82.39 KB 0777
class.json-api.php File 33.34 KB 0777
class.photon.php File 1.74 KB 0777
composer.json File 3.84 KB 0777
enhanced-open-graph.php File 4.35 KB 0777
functions.compat.php File 4.1 KB 0777
functions.cookies.php File 2.04 KB 0777
functions.global.php File 15.08 KB 0777
functions.is-mobile.php File 2.47 KB 0777
functions.opengraph.php File 17.72 KB 0777
functions.photon.php File 3.04 KB 0777
jetpack.php File 8.24 KB 0777
json-api-config.php File 338 B 0777
json-endpoints.php File 6.92 KB 0777
load-jetpack.php File 3.39 KB 0777
locales.php File 324 B 0777
readme.txt File 26.87 KB 0777
uninstall.php File 1.59 KB 0777
wpml-config.xml File 1.26 KB 0777