__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
<?php

namespace CarouselSlider\Modules\ImageCarousel;

use CarouselSlider\Abstracts\AbstractTemplate;

defined( 'ABSPATH' ) || exit;

/**
 * TemplateUrl class
 *
 * @package Modules/ImageCarousel
 */
class TemplateUrl extends AbstractTemplate {
	/**
	 * Get default image carousel settings
	 *
	 * @return array
	 */
	public static function get_default_settings(): array {
		return wp_parse_args(
			array(
				'_slide_type'              => 'image-carousel-url',
				// Image Carousel Settings.
				'_show_attachment_title'   => 'off',
				'_show_attachment_caption' => 'off',
				'_image_lightbox'          => 'on',
				'_image_target'            => '_self',
			),
			parent::get_default_settings()
		);
	}

	/**
	 * Create gallery image carousel with random images
	 *
	 * @param string $slider_title The slider title.
	 * @param array  $args Arguments.
	 *
	 * @return int The post ID on success. The value 0 on failure.
	 */
	public static function create( $slider_title = null, $args = [] ): int {
		$images = self::get_images();
		$images = array_slice( $images, 0, 10 );

		$_urls = array();
		foreach ( $images as $image ) {
			$_urls[] = array(
				'url'      => $image['image_src'],
				'title'    => $image['title'],
				'caption'  => $image['caption'],
				'alt'      => $image['alt_text'],
				'link_url' => $image['link_url'],
			);
		}

		if ( empty( $slider_title ) ) {
			$slider_title = 'URL Image Carousel with Dummy Data';
		}

		$default = self::get_default_settings();

		$default['_images_urls'] = $_urls;

		$data = wp_parse_args( $args, $default );

		$post_id = self::create_slider( $slider_title );

		if ( ! $post_id ) {
			return 0;
		}

		foreach ( $data as $meta_key => $meta_value ) {
			update_post_meta( $post_id, $meta_key, $meta_value );
		}

		return $post_id;
	}
}

Filemanager

Name Type Size Permission Actions
Admin.php File 8.62 KB 0775
ExternalImageItem.php File 2.17 KB 0775
Item.php File 2.84 KB 0775
Module.php File 2.38 KB 0775
Setting.php File 2.31 KB 0775
Template.php File 1.58 KB 0775
TemplateUrl.php File 1.76 KB 0775
UrlView.php File 1.54 KB 0775
View.php File 1.46 KB 0775
Filemanager