Edit File by line
/home/zeestwma/ajeebong.../wp-conte.../plugins/revslide.../includes
File: data.class.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* @author ThemePunch <info@themepunch.com>
[2] Fix | Delete
* @link https://www.themepunch.com/
[3] Fix | Delete
* @copyright 2024 ThemePunch
[4] Fix | Delete
*/
[5] Fix | Delete
[6] Fix | Delete
if(!defined('ABSPATH')) exit();
[7] Fix | Delete
[8] Fix | Delete
define('RS_T', ' ');
[9] Fix | Delete
define('RS_T2', ' ');
[10] Fix | Delete
define('RS_T3', ' ');
[11] Fix | Delete
define('RS_T4', ' ');
[12] Fix | Delete
define('RS_T5', ' ');
[13] Fix | Delete
define('RS_T6', ' ');
[14] Fix | Delete
define('RS_T7', ' ');
[15] Fix | Delete
define('RS_T8', ' ');
[16] Fix | Delete
define('RS_T9', ' ');
[17] Fix | Delete
define('RS_T10', ' ');
[18] Fix | Delete
define('RS_T11', ' ');
[19] Fix | Delete
[20] Fix | Delete
class RevSliderData {
[21] Fix | Delete
[22] Fix | Delete
const CACHE_GROUP = 'revslider';
[23] Fix | Delete
const CACHE_NS_KEY = 'revslider_namespace_key';
[24] Fix | Delete
[25] Fix | Delete
public $css;
[26] Fix | Delete
[27] Fix | Delete
/**
[28] Fix | Delete
* wp cache does not support group delete
[29] Fix | Delete
* this var hold the num to generate unique keys
[30] Fix | Delete
* when data changed - key increased and invalidate old data
[31] Fix | Delete
* @var int
[32] Fix | Delete
*/
[33] Fix | Delete
protected $_cache_ns_key;
[34] Fix | Delete
/**
[35] Fix | Delete
* @var array hold revslider tables names
[36] Fix | Delete
*/
[37] Fix | Delete
protected $_rs_tables;
[38] Fix | Delete
/**
[39] Fix | Delete
* @var string
[40] Fix | Delete
*/
[41] Fix | Delete
protected $_rs_tables_pattern;
[42] Fix | Delete
[43] Fix | Delete
public function __construct()
[44] Fix | Delete
{
[45] Fix | Delete
$this->_rs_tables = RevSliderGlobals::instance()->get_rs_tables();
[46] Fix | Delete
$this->_rs_tables_pattern = "/^\s*(insert|update|replace|delete).+(".implode('|', $this->_rs_tables).")/i";
[47] Fix | Delete
[48] Fix | Delete
$this->_cache_ns_key = wp_cache_get(self::CACHE_NS_KEY, self::CACHE_GROUP);
[49] Fix | Delete
if (false === $this->_cache_ns_key) {
[50] Fix | Delete
$this->_cache_ns_key = 1;
[51] Fix | Delete
wp_cache_set(self::CACHE_NS_KEY, $this->_cache_ns_key, self::CACHE_GROUP);
[52] Fix | Delete
}
[53] Fix | Delete
[54] Fix | Delete
$query_filter = RevSliderGlobals::instance()->get('rs_data_query_fiter');
[55] Fix | Delete
if (!$query_filter) {
[56] Fix | Delete
add_filter('query', array($this, 'add_query_fiter'), 10, 1);
[57] Fix | Delete
RevSliderGlobals::instance()->add('rs_data_query_fiter', true);
[58] Fix | Delete
}
[59] Fix | Delete
}
[60] Fix | Delete
[61] Fix | Delete
/**
[62] Fix | Delete
* invalidate group cache if we modify rs data
[63] Fix | Delete
* @param string $sql
[64] Fix | Delete
* @return string
[65] Fix | Delete
*/
[66] Fix | Delete
public function add_query_fiter($sql)
[67] Fix | Delete
{
[68] Fix | Delete
if (preg_match($this->_rs_tables_pattern, $sql)) {
[69] Fix | Delete
$this->invalidate_group_cache();
[70] Fix | Delete
}
[71] Fix | Delete
return $sql;
[72] Fix | Delete
}
[73] Fix | Delete
[74] Fix | Delete
/**
[75] Fix | Delete
* invalidate group keys by increase namespace key
[76] Fix | Delete
*/
[77] Fix | Delete
public function invalidate_group_cache()
[78] Fix | Delete
{
[79] Fix | Delete
$this->_cache_ns_key += 1;
[80] Fix | Delete
wp_cache_set(self::CACHE_NS_KEY, $this->_cache_ns_key, self::CACHE_GROUP);
[81] Fix | Delete
}
[82] Fix | Delete
[83] Fix | Delete
/**
[84] Fix | Delete
* @param string $fname cache key name ( usually function name )
[85] Fix | Delete
* @param mixed $data additional cache key data ( usually functions parameters )
[86] Fix | Delete
* @return string
[87] Fix | Delete
*/
[88] Fix | Delete
public function get_wp_cache_key($fname, $data){
[89] Fix | Delete
return sprintf('%s_%s_%s_%s', get_class($this), $fname, $this->_cache_ns_key, md5(serialize($data)));
[90] Fix | Delete
}
[91] Fix | Delete
[92] Fix | Delete
/**
[93] Fix | Delete
* try to load cached result
[94] Fix | Delete
*
[95] Fix | Delete
* @param string $method
[96] Fix | Delete
* @param array $args
[97] Fix | Delete
* @return mixed
[98] Fix | Delete
*/
[99] Fix | Delete
public function get_wp_cache($method, $args = array())
[100] Fix | Delete
{
[101] Fix | Delete
if (!is_array($args)) $args = array($args);
[102] Fix | Delete
//disable cache for admin
[103] Fix | Delete
if (is_admin()) return call_user_func_array(array($this, $method), $args);
[104] Fix | Delete
[105] Fix | Delete
$cache_key = $this->get_wp_cache_key($method, $args);
[106] Fix | Delete
$data = wp_cache_get($cache_key, self::CACHE_GROUP);
[107] Fix | Delete
if (false === $data) {
[108] Fix | Delete
$data = call_user_func_array(array($this, $method), $args);
[109] Fix | Delete
wp_cache_set($cache_key, $data, self::CACHE_GROUP);
[110] Fix | Delete
}
[111] Fix | Delete
[112] Fix | Delete
return $data;
[113] Fix | Delete
}
[114] Fix | Delete
[115] Fix | Delete
/**
[116] Fix | Delete
* clear cached value
[117] Fix | Delete
*
[118] Fix | Delete
* @param string $method
[119] Fix | Delete
* @param array $args
[120] Fix | Delete
*/
[121] Fix | Delete
public function delete_wp_cache($method, $args = array())
[122] Fix | Delete
{
[123] Fix | Delete
if (!is_array($args)) $args = array($args);
[124] Fix | Delete
[125] Fix | Delete
$cache_key = $this->get_wp_cache_key($method, $args);
[126] Fix | Delete
wp_cache_delete($cache_key, self::CACHE_GROUP);
[127] Fix | Delete
}
[128] Fix | Delete
[129] Fix | Delete
/**
[130] Fix | Delete
* flush all cache
[131] Fix | Delete
*/
[132] Fix | Delete
public function flush_wp_cache()
[133] Fix | Delete
{
[134] Fix | Delete
wp_cache_flush();
[135] Fix | Delete
}
[136] Fix | Delete
[137] Fix | Delete
/**
[138] Fix | Delete
* get cache attempt of _get_font_familys
[139] Fix | Delete
* @return mixed
[140] Fix | Delete
*/
[141] Fix | Delete
public function get_font_familys(){
[142] Fix | Delete
return $this->get_wp_cache('_get_font_familys');
[143] Fix | Delete
}
[144] Fix | Delete
[145] Fix | Delete
/**
[146] Fix | Delete
* get all font family types
[147] Fix | Delete
* before: RevSliderOperations::getArrFontFamilys()
[148] Fix | Delete
*/
[149] Fix | Delete
protected function _get_font_familys(){
[150] Fix | Delete
$fonts = array();
[151] Fix | Delete
[152] Fix | Delete
//add custom added fonts
[153] Fix | Delete
$gs = $this->get_global_settings();
[154] Fix | Delete
$cfl = $this->get_val($gs, 'customFontList', array());
[155] Fix | Delete
[156] Fix | Delete
if(!empty($cfl) && is_array($cfl)){
[157] Fix | Delete
foreach($cfl as $_cfl){
[158] Fix | Delete
$fonts[] = array(
[159] Fix | Delete
'type' => 'custom',
[160] Fix | Delete
'version' => __('Custom Fonts', 'revslider'),
[161] Fix | Delete
'url' => $this->get_val($_cfl, 'url'),
[162] Fix | Delete
'frontend' => $this->_truefalse($this->get_val($_cfl, 'frontend', false)),
[163] Fix | Delete
'backend' => $this->_truefalse($this->get_val($_cfl, 'backend', true)),
[164] Fix | Delete
'label' => $this->get_val($_cfl, 'family'),
[165] Fix | Delete
'variants' => explode(',', $this->get_val($_cfl, 'weights')),
[166] Fix | Delete
);
[167] Fix | Delete
}
[168] Fix | Delete
}
[169] Fix | Delete
[170] Fix | Delete
//Web Safe Fonts
[171] Fix | Delete
// GOOGLE Loaded Fonts
[172] Fix | Delete
$fonts[] = array('type' => 'websafe', 'version' => __('Loaded Google Fonts', 'revslider'), 'label' => 'Dont Show Me');
[173] Fix | Delete
[174] Fix | Delete
//Serif Fonts
[175] Fix | Delete
$fonts[] = array('type' => 'websafe', 'version' => __('Serif Fonts', 'revslider'), 'label' => 'Georgia, serif');
[176] Fix | Delete
$fonts[] = array('type' => 'websafe', 'version' => __('Serif Fonts', 'revslider'), 'label' => '\'Palatino Linotype\', \'Book Antiqua\', Palatino, serif');
[177] Fix | Delete
$fonts[] = array('type' => 'websafe', 'version' => __('Serif Fonts', 'revslider'), 'label' => '\'Times New Roman\', Times, serif');
[178] Fix | Delete
[179] Fix | Delete
//Sans-Serif Fonts
[180] Fix | Delete
$fonts[] = array('type' => 'websafe', 'version' => __('Sans-Serif Fonts', 'revslider'), 'label' => 'Arial, Helvetica, sans-serif');
[181] Fix | Delete
$fonts[] = array('type' => 'websafe', 'version' => __('Sans-Serif Fonts', 'revslider'), 'label' => '\'Arial Black\', Gadget, sans-serif');
[182] Fix | Delete
$fonts[] = array('type' => 'websafe', 'version' => __('Sans-Serif Fonts', 'revslider'), 'label' => '\'Comic Sans MS\', cursive, sans-serif');
[183] Fix | Delete
$fonts[] = array('type' => 'websafe', 'version' => __('Sans-Serif Fonts', 'revslider'), 'label' => 'Impact, Charcoal, sans-serif');
[184] Fix | Delete
$fonts[] = array('type' => 'websafe', 'version' => __('Sans-Serif Fonts', 'revslider'), 'label' => '\'Lucida Sans Unicode\', \'Lucida Grande\', sans-serif');
[185] Fix | Delete
$fonts[] = array('type' => 'websafe', 'version' => __('Sans-Serif Fonts', 'revslider'), 'label' => 'Tahoma, Geneva, sans-serif');
[186] Fix | Delete
$fonts[] = array('type' => 'websafe', 'version' => __('Sans-Serif Fonts', 'revslider'), 'label' => '\'Trebuchet MS\', Helvetica, sans-serif');
[187] Fix | Delete
$fonts[] = array('type' => 'websafe', 'version' => __('Sans-Serif Fonts', 'revslider'), 'label' => 'Verdana, Geneva, sans-serif');
[188] Fix | Delete
[189] Fix | Delete
//Monospace Fonts
[190] Fix | Delete
$fonts[] = array('type' => 'websafe', 'version' => __('Monospace Fonts', 'revslider'), 'label' => '\'Courier New\', Courier, monospace');
[191] Fix | Delete
$fonts[] = array('type' => 'websafe', 'version' => __('Monospace Fonts', 'revslider'), 'label' => '\'Lucida Console\', Monaco, monospace');
[192] Fix | Delete
[193] Fix | Delete
[194] Fix | Delete
//push all variants to the websafe fonts
[195] Fix | Delete
foreach($fonts as $f => $font){
[196] Fix | Delete
if(!empty($cfl) && is_array($cfl) && $font['type'] === 'custom') continue; //already manually added before on these
[197] Fix | Delete
[198] Fix | Delete
$font[$f]['variants'] = array('100', '100italic', '200', '200italic', '300', '300italic', '400', '400italic', '500', '500italic', '600', '600italic', '700', '700italic', '800', '800italic', '900', '900italic');
[199] Fix | Delete
}
[200] Fix | Delete
[201] Fix | Delete
include(RS_PLUGIN_PATH . 'includes/googlefonts.php');
[202] Fix | Delete
[203] Fix | Delete
foreach($googlefonts as $f => $val){
[204] Fix | Delete
$fonts[] = array('type' => 'googlefont', 'version' => __('Google Fonts', 'revslider'), 'label' => $f, 'variants' => $val['variants'], 'subsets' => $val['subsets'], 'category' => $val['category']);
[205] Fix | Delete
}
[206] Fix | Delete
[207] Fix | Delete
return apply_filters('revslider_data_get_font_familys', apply_filters('revslider_operations_getArrFontFamilys', $fonts));
[208] Fix | Delete
}
[209] Fix | Delete
[210] Fix | Delete
/**
[211] Fix | Delete
* get animations array
[212] Fix | Delete
* @before: RevSliderOperations::getArrAnimations();
[213] Fix | Delete
*/
[214] Fix | Delete
public function get_animations(){
[215] Fix | Delete
return $this->get_custom_animations_full_pre('in');
[216] Fix | Delete
}
[217] Fix | Delete
[218] Fix | Delete
/**
[219] Fix | Delete
* get "end" animations array
[220] Fix | Delete
* @before: RevSliderOperations::getArrEndAnimations();
[221] Fix | Delete
*/
[222] Fix | Delete
public function get_end_animations(){
[223] Fix | Delete
return $this->get_custom_animations_full_pre('out');
[224] Fix | Delete
}
[225] Fix | Delete
[226] Fix | Delete
public function get_loop_animations(){
[227] Fix | Delete
return $this->get_custom_animations_full_pre('loop');
[228] Fix | Delete
}
[229] Fix | Delete
[230] Fix | Delete
/**
[231] Fix | Delete
* get the version 5 animations only, if available
[232] Fix | Delete
**/
[233] Fix | Delete
public function get_animations_v5(){
[234] Fix | Delete
global $SR_GLOBALS;
[235] Fix | Delete
$custom = array();
[236] Fix | Delete
$temp = array();
[237] Fix | Delete
$sort = array();
[238] Fix | Delete
[239] Fix | Delete
$this->fill_animations();
[240] Fix | Delete
[241] Fix | Delete
foreach($SR_GLOBALS['animations'] as $value){
[242] Fix | Delete
$type = $this->get_val($value, array('params', 'type'), '');
[243] Fix | Delete
if(!in_array($type, array('customout', 'customin'))) continue;
[244] Fix | Delete
[245] Fix | Delete
$settings = $this->get_val($value, 'settings', '');
[246] Fix | Delete
$type = $this->get_val($value, 'type', '');
[247] Fix | Delete
if($type == '' && $settings == ''){
[248] Fix | Delete
$temp[$value['id']] = $value;
[249] Fix | Delete
$temp[$value['id']]['id'] = $value['id'];
[250] Fix | Delete
$sort[$value['id']] = $value['handle'];
[251] Fix | Delete
}
[252] Fix | Delete
}
[253] Fix | Delete
if(!empty($sort)){
[254] Fix | Delete
asort($sort);
[255] Fix | Delete
foreach ($sort as $k => $v){
[256] Fix | Delete
$custom[$k] = $temp[$k];
[257] Fix | Delete
}
[258] Fix | Delete
}
[259] Fix | Delete
[260] Fix | Delete
return $custom;
[261] Fix | Delete
}
[262] Fix | Delete
[263] Fix | Delete
/**
[264] Fix | Delete
* get custom animations
[265] Fix | Delete
* @before: RevSliderOperations::getCustomAnimationsFullPre()
[266] Fix | Delete
*/
[267] Fix | Delete
public function get_custom_animations_full_pre($pre = 'in'){
[268] Fix | Delete
global $SR_GLOBALS;
[269] Fix | Delete
$custom = array();
[270] Fix | Delete
$temp = array();
[271] Fix | Delete
$sort = array();
[272] Fix | Delete
[273] Fix | Delete
$this->fill_animations();
[274] Fix | Delete
[275] Fix | Delete
foreach($SR_GLOBALS['animations'] as $value){
[276] Fix | Delete
$settings = $this->get_val($value, 'settings', '');
[277] Fix | Delete
$type = $this->get_val($value, 'type', '');
[278] Fix | Delete
if($type == '' && $settings == '' || $type == $pre){
[279] Fix | Delete
$temp[$value['id']] = $value;
[280] Fix | Delete
$temp[$value['id']]['id'] = $value['id'];
[281] Fix | Delete
$sort[$value['id']] = $value['handle'];
[282] Fix | Delete
}
[283] Fix | Delete
[284] Fix | Delete
if($settings == 'in' && $pre == 'in' || $settings == 'out' && $pre == 'out' || $settings == 'loop' && $pre == 'loop'){
[285] Fix | Delete
$temp[$value['id']] = $value['params'];
[286] Fix | Delete
$temp[$value['id']]['settings'] = $settings;
[287] Fix | Delete
$temp[$value['id']]['id'] = $value['id'];
[288] Fix | Delete
$sort[$value['id']] = $value['handle'];
[289] Fix | Delete
}
[290] Fix | Delete
}
[291] Fix | Delete
if(!empty($sort)){
[292] Fix | Delete
asort($sort);
[293] Fix | Delete
foreach($sort as $k => $v){
[294] Fix | Delete
$custom[$k] = $temp[$k];
[295] Fix | Delete
}
[296] Fix | Delete
}
[297] Fix | Delete
[298] Fix | Delete
return $custom;
[299] Fix | Delete
}
[300] Fix | Delete
[301] Fix | Delete
/**
[302] Fix | Delete
* Fetch all Custom Animations only one time
[303] Fix | Delete
* @since: 5.2.4
[304] Fix | Delete
* @before: RevSliderOperations::fillAnimations();
[305] Fix | Delete
**/
[306] Fix | Delete
public function fill_animations(){
[307] Fix | Delete
global $SR_GLOBALS;
[308] Fix | Delete
if(empty($SR_GLOBALS['animations'])){
[309] Fix | Delete
global $wpdb;
[310] Fix | Delete
[311] Fix | Delete
$result = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . RevSliderFront::TABLE_LAYER_ANIMATIONS, ARRAY_A);
[312] Fix | Delete
$SR_GLOBALS['animations'] = (!empty($result)) ? $result : array();
[313] Fix | Delete
[314] Fix | Delete
if(!empty($SR_GLOBALS['animations'])){
[315] Fix | Delete
foreach($SR_GLOBALS['animations'] as $ak => $av){
[316] Fix | Delete
$SR_GLOBALS['animations'][$ak]['params'] = json_decode(str_replace("'", '"', $av['params']), true);
[317] Fix | Delete
}
[318] Fix | Delete
}
[319] Fix | Delete
[320] Fix | Delete
if(!empty($SR_GLOBALS['animations'])){
[321] Fix | Delete
array_walk_recursive($SR_GLOBALS['animations'], array('RevSliderData', 'force_to_boolean'));
[322] Fix | Delete
}
[323] Fix | Delete
}
[324] Fix | Delete
}
[325] Fix | Delete
[326] Fix | Delete
/**
[327] Fix | Delete
* make sure that all false and true are really boolean
[328] Fix | Delete
**/
[329] Fix | Delete
public static function force_to_boolean(&$a, $b){
[330] Fix | Delete
$a = ($a === 'false') ? false : $a;
[331] Fix | Delete
$a = ($a === 'true') ? true : $a;
[332] Fix | Delete
$b = ($b === 'false') ? false : $b;
[333] Fix | Delete
$b = ($b === 'true') ? true : $b;
[334] Fix | Delete
}
[335] Fix | Delete
[336] Fix | Delete
/**
[337] Fix | Delete
* get contents of the css table as an array
[338] Fix | Delete
* before: RevSliderOperations::getCaptionsContentArray();
[339] Fix | Delete
*/
[340] Fix | Delete
public function get_captions_array($handle = false){
[341] Fix | Delete
$css = RevSliderGlobals::instance()->get('RevSliderCssParser');
[342] Fix | Delete
if(empty($this->css)){
[343] Fix | Delete
$this->fill_css();
[344] Fix | Delete
}
[345] Fix | Delete
[346] Fix | Delete
return $css->db_array_to_array($this->css, $handle);
[347] Fix | Delete
}
[348] Fix | Delete
[349] Fix | Delete
/**
[350] Fix | Delete
* Fetch all Custom CSS only one time
[351] Fix | Delete
* @since: 5.2.4
[352] Fix | Delete
* before: RevSliderOperations::fillCSS();
[353] Fix | Delete
**/
[354] Fix | Delete
public function fill_css(){
[355] Fix | Delete
if(empty($this->css)){
[356] Fix | Delete
global $wpdb;
[357] Fix | Delete
[358] Fix | Delete
$css_data = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . RevSliderFront::TABLE_CSS, ARRAY_A);
[359] Fix | Delete
$this->css = (!empty($css_data)) ? $css_data : array();
[360] Fix | Delete
}
[361] Fix | Delete
}
[362] Fix | Delete
[363] Fix | Delete
/**
[364] Fix | Delete
* Get all images sizes + custom added sizes
[365] Fix | Delete
* @before: RevSliderBase::get_all_image_sizes($type);
[366] Fix | Delete
*/
[367] Fix | Delete
public function get_all_image_sizes($type = 'gallery'){
[368] Fix | Delete
$custom_sizes = array();
[369] Fix | Delete
[370] Fix | Delete
switch($type){
[371] Fix | Delete
case 'flickr':
[372] Fix | Delete
$custom_sizes = array(
[373] Fix | Delete
'original' => __('Original', 'revslider'),
[374] Fix | Delete
'large' => __('Large', 'revslider'),
[375] Fix | Delete
'large-square' => __('Large Square', 'revslider'),
[376] Fix | Delete
'medium' => __('Medium', 'revslider'),
[377] Fix | Delete
'medium-800' => __('Medium 800', 'revslider'),
[378] Fix | Delete
'medium-640' => __('Medium 640', 'revslider'),
[379] Fix | Delete
'small' => __('Small', 'revslider'),
[380] Fix | Delete
'small-320' => __('Small 320', 'revslider'),
[381] Fix | Delete
'thumbnail' => __('Thumbnail', 'revslider'),
[382] Fix | Delete
'square' => __('Square', 'revslider'),
[383] Fix | Delete
);
[384] Fix | Delete
break;
[385] Fix | Delete
case 'instagram':
[386] Fix | Delete
$custom_sizes = array(
[387] Fix | Delete
'standard_resolution' => __('Standard Resolution', 'revslider'),
[388] Fix | Delete
'thumbnail' => __('Thumbnail', 'revslider'),
[389] Fix | Delete
'low_resolution' => __('Low Resolution', 'revslider'),
[390] Fix | Delete
'original_size' => __('Original Size', 'revslider'),
[391] Fix | Delete
'large' => __('Large Size', 'revslider'),
[392] Fix | Delete
);
[393] Fix | Delete
break;
[394] Fix | Delete
case 'facebook':
[395] Fix | Delete
$custom_sizes = array(
[396] Fix | Delete
'full' => __('Original Size', 'revslider'),
[397] Fix | Delete
'thumbnail' => __('Thumbnail', 'revslider'),
[398] Fix | Delete
);
[399] Fix | Delete
break;
[400] Fix | Delete
case 'youtube':
[401] Fix | Delete
$custom_sizes = array(
[402] Fix | Delete
'high' => __('High', 'revslider'),
[403] Fix | Delete
'medium' => __('Medium', 'revslider'),
[404] Fix | Delete
'default' => __('Default', 'revslider'),
[405] Fix | Delete
'standard' => __('Standard', 'revslider'),
[406] Fix | Delete
'maxres' => __('Max. Res.', 'revslider'),
[407] Fix | Delete
);
[408] Fix | Delete
break;
[409] Fix | Delete
case 'vimeo':
[410] Fix | Delete
$custom_sizes = array(
[411] Fix | Delete
'thumbnail_large' => __('Large', 'revslider'),
[412] Fix | Delete
'thumbnail_medium' => __('Medium', 'revslider'),
[413] Fix | Delete
'thumbnail_small' => __('Small', 'revslider'),
[414] Fix | Delete
);
[415] Fix | Delete
break;
[416] Fix | Delete
case 'gallery':
[417] Fix | Delete
default:
[418] Fix | Delete
$added_image_sizes = get_intermediate_image_sizes();
[419] Fix | Delete
if(!empty($added_image_sizes) && is_array($added_image_sizes)){
[420] Fix | Delete
foreach($added_image_sizes as $key => $img_size_handle){
[421] Fix | Delete
$custom_sizes[$img_size_handle] = ucwords(str_replace('_', ' ', $img_size_handle));
[422] Fix | Delete
}
[423] Fix | Delete
}
[424] Fix | Delete
$img_orig_sources = array(
[425] Fix | Delete
'full' => __('Original Size', 'revslider'),
[426] Fix | Delete
'thumbnail' => __('Thumbnail', 'revslider'),
[427] Fix | Delete
'medium' => __('Medium', 'revslider'),
[428] Fix | Delete
'large' => __('Large', 'revslider'),
[429] Fix | Delete
);
[430] Fix | Delete
$custom_sizes = array_merge($img_orig_sources, $custom_sizes);
[431] Fix | Delete
break;
[432] Fix | Delete
}
[433] Fix | Delete
[434] Fix | Delete
return $custom_sizes;
[435] Fix | Delete
}
[436] Fix | Delete
[437] Fix | Delete
/**
[438] Fix | Delete
* get the default layer animations
[439] Fix | Delete
**/
[440] Fix | Delete
public function get_layer_animations($raw = false){
[441] Fix | Delete
$custom_in = $this->get_animations();
[442] Fix | Delete
$custom_out = $this->get_end_animations();
[443] Fix | Delete
$custom_loop = $this->get_loop_animations();
[444] Fix | Delete
[445] Fix | Delete
$in = '{
[446] Fix | Delete
"custom":{"group":"Custom","custom":true,"transitions":' .
[447] Fix | Delete
json_encode($custom_in)
[448] Fix | Delete
. '},
[449] Fix | Delete
"blck":{
[450] Fix | Delete
"group":"Block Transitions (SFX)",
[451] Fix | Delete
"transitions":{
[452] Fix | Delete
"blockfromleft":{"name":"Block from Left","frame_0":{"transform":{"opacity":0}},"frame_1":{"transform":{"opacity":1},"sfx":{"effect":"blocktoright","color":"#ffffff"},"timeline":{"ease":"power4.inOut","speed":1200}}},
[453] Fix | Delete
"blockfromright":{"name":"Block from Right","frame_0":{"transform":{"opacity":0}},"frame_1":{"transform":{"opacity":1},"sfx":{"effect":"blocktoleft","color":"#ffffff"},"timeline":{"ease":"power4.inOut","speed":1200}}},
[454] Fix | Delete
"blockfromtop":{"name":"Block from Top","frame_0":{"transform":{"opacity":0}},"frame_1":{"transform":{"opacity":1},"sfx":{"effect":"blocktobottom","color":"#ffffff"},"timeline":{"ease":"power4.inOut","speed":1200}}},
[455] Fix | Delete
"blockfrombottom":{"name":"Block from Bottom","frame_0":{"transform":{"opacity":0}},"frame_1":{"transform":{"opacity":1},"sfx":{"effect":"blocktotop","color":"#ffffff"},"timeline":{"ease":"power4.inOut","speed":1200}}}
[456] Fix | Delete
}
[457] Fix | Delete
},
[458] Fix | Delete
"lettran":{
[459] Fix | Delete
"group":"Letter Transitions",
[460] Fix | Delete
"transitions":{
[461] Fix | Delete
"LettersFlyInFromLeft":{"name":"Letters Fly In From Left","frame_0":{"transform":{"opacity":1},"chars":{"use":true,"x":"-105%","opacity":"0","rotationZ":"-90deg"},"mask":{"use":true}},"frame_1":{"timeline":{"speed":1200},"transform":{"opacity":1},"chars":{"ease":"power4.inOut","use":true,"direction":"backward","delay":10,"x":0,"opacity":1,"rotationZ":"0deg"},"mask":{"use":true}}},
[462] Fix | Delete
"LettersFlyInFromRight":{"name":"Letters Fly In From Right","frame_0":{"transform":{"opacity":1},"chars":{"use":true,"x":"105%","opacity":"1","rotationY":"45deg","rotationZ":"90deg"},"mask":{"use":true}},"frame_1":{"timeline":{"speed":1200},"transform":{"opacity":1},"chars":{"ease":"power4.inOut","use":true,"direction":"forward","delay":10,"x":0,"opacity":1,"rotationY":0,"rotationZ":"0deg"},"mask":{"use":true}}},
[463] Fix | Delete
"LettersFlyInFromTop":{"name":"Letters Fly In From Top","frame_0":{"transform":{"opacity":1},"chars":{"use":true,"y":"-100%","opacity":"0","rotationZ":"35deg"},"mask":{"use":true}},"frame_1":{"timeline":{"speed":1200},"transform":{"opacity":1},"chars":{"ease":"power4.inOut","use":true,"direction":"forward","delay":10,"y":0,"opacity":1,"rotationZ":"0deg"},"mask":{"use":true}}},
[464] Fix | Delete
"LettersFlyInFromBottom":{"name":"Letters Fly In From Bottom","frame_0":{"transform":{"opacity":1},"chars":{"use":true,"y":"100%","opacity":"0","rotationZ":"-35deg"},"mask":{"use":true}},"frame_1":{"timeline":{"speed":1200},"transform":{"opacity":1},"chars":{"ease":"power4.inOut","use":true,"direction":"forward","delay":10,"y":0,"opacity":1,"rotationZ":"0deg"},"mask":{"use":true}}},
[465] Fix | Delete
"LetterFlipFromTop":{"name":"Letter Flip From Top","frame_0":{"transform":{"opacity":1},"chars":{"use":true,"opacity":0,"rotationX":"90deg","y":"0","originZ":"-50"}},"frame_1":{"timeline":{"speed":1750},"chars":{"use":true,"opacity":1,"rotationX":0,"delay":10,"originZ":"-50","ease":"power4.inOut"}}},
[466] Fix | Delete
"LetterFlipFromBottom":{"name":"Letter Flip From Bottom","frame_0":{"transform":{"opacity":1},"chars":{"use":true,"opacity":0,"rotationX":"-90deg","y":"0","originZ":"-50"}},"frame_1":{"timeline":{"speed":1750},"chars":{"use":true,"opacity":1,"rotationX":0,"delay":10,"originZ":"-50","ease":"power4.inOut"}}},
[467] Fix | Delete
"FlipAndLetterCycle":{"name":"Letter Flip Cycle","frame_0":{"transform":{"opacity":0,"rotationX":"70deg","y":"0","originZ":"-50"},"chars":{"use":true,"opacity":0,"y":"[-100||100]"}},"frame_1":{"timeline":{"speed":1750,"ease":"power4.inOut"},"transform":{"opacity":1,"originZ":"-50","rotationX":0},"chars":{"use":true,"direction":"middletoedge","opacity":1,"y":0,"delay":10,"ease":"power4.inOut"}}}
[468] Fix | Delete
}
[469] Fix | Delete
},
[470] Fix | Delete
"masktrans":{
[471] Fix | Delete
"group":"Masked Transitions",
[472] Fix | Delete
"transitions":{
[473] Fix | Delete
"MaskedZoomOut":{"name":"Masked Zoom Out","frame_0":{"transform":{"opacity":0,"scaleX":2,"scaleY":2},"mask":{"use":true}},"frame_1":{"timeline":{"speed":1000,"ease":"power2.out"},"mask":{"use":true},"transform":{"opacity":1,"scaleX":1,"scaleY":1}}},
[474] Fix | Delete
"SlideMaskFromBottom":{"name":"Slide From Bottom","frame_0":{"transform":{"opacity":0,"y":"100%"},"mask":{"use":true}},"frame_1":{"timeline":{"speed":1200,"ease":"power3.inOut"},"mask":{"use":true,"y":0},"transform":{"opacity":1,"y":0}}},
[475] Fix | Delete
"SlideMaskFromLeft":{"name":"Slide From Left","frame_0":{"transform":{"opacity":0,"x":"-100%"},"mask":{"use":true}},"frame_1":{"timeline":{"speed":1000,"ease":"power3.inOut"},"mask":{"use":true},"transform":{"opacity":1,"x":0}}},
[476] Fix | Delete
"SlideMaskFromRight":{"name":"Slide From Right","frame_0":{"transform":{"opacity":0,"x":"100%"},"mask":{"use":true}},"frame_1":{"timeline":{"speed":1000,"ease":"power3.inOut"},"mask":{"use":true},"transform":{"opacity":1,"x":0}}},
[477] Fix | Delete
"SlideMaskFromTop":{"name":"Slide From Top","frame_0":{"transform":{"opacity":0,"y":"-100%"},"mask":{"use":true}},"frame_1":{"timeline":{"speed":1200,"ease":"power3.inOut"},"mask":{"use":true},"transform":{"opacity":1,"y":0}}},
[478] Fix | Delete
"SmoothMaskFromRight":{"name":"Smooth Mask From Right","frame_0":{"transform":{"opacity":1,"x":"-175%"},"mask":{"use":true,"x":"100%"}},"frame_1":{"timeline":{"speed":1000,"ease":"power3.out"},"mask":{"use":true,"x":0},"transform":{"opacity":1,"x":0}}},
[479] Fix | Delete
"SmoothMaskFromLeft":{"name":"Smooth Mask From Left","frame_0":{"transform":{"opacity":1,"x":"175%"},"mask":{"use":true,"x":"-100%"}},"frame_1":{"timeline":{"speed":1000,"ease":"power3.out"},"mask":{"use":true,"x":0},"transform":{"opacity":1,"x":0}}}
[480] Fix | Delete
}
[481] Fix | Delete
},
[482] Fix | Delete
"popup":{
[483] Fix | Delete
"group":"Pop Ups",
[484] Fix | Delete
"transitions":{
[485] Fix | Delete
"PopUpBack":{"name":"Pop Up Back","frame_0":{"transform":{"opacity":0,"rotationY":"360deg"}},"frame_1":{"timeline":{"speed":500,"ease":"back.out"},"transform":{"opacity":1,"rotationY":0}}},
[486] Fix | Delete
"PopUpSmooth":{"name":"Pop Up Smooth","frame_0":{"transform":{"opacity":0,"scaleX":0.9,"scaleY":0.9}},"frame_1":{"timeline":{"speed":1000,"ease":"power3.inOut"},"transform":{"opacity":1,"scaleX":1,"scaleY":1}}},
[487] Fix | Delete
"SmoothPopUp_One":{"name":"Smooth Pop Up v.1","frame_0":{"transform":{"opacity":0,"scaleX":0.8,"scaleY":0.8}},"frame_1":{"timeline":{"speed":1000,"ease":"power4.out"},"transform":{"opacity":1,"scaleX":1,"scaleY":1}}},
[488] Fix | Delete
"SmoothPopUp_Two":{"name":"Smooth Pop Up v.2","frame_0":{"transform":{"opacity":0,"scaleX":0.9,"scaleY":0.9}},"frame_1":{"timeline":{"speed":1000,"ease":"power2.inOut"},"transform":{"opacity":1,"scaleX":1,"scaleY":1}}}
[489] Fix | Delete
}
[490] Fix | Delete
},
[491] Fix | Delete
"rotate":{
[492] Fix | Delete
"group":"Rotations",
[493] Fix | Delete
"transitions":{
[494] Fix | Delete
"RotateInFromBottom":{"name":"Rotate In From Bottom","frame_0":{"transform":{"opacity":0,"rotationZ":"70deg","y":"bottom","scaleY":2,"scaleX":2}},"frame_1":{"timeline":{"speed":1000,"ease":"power3.inOut"},"transform":{"opacity":1,"y":0,"rotationZ":0,"scaleX":1,"scaleY":1}}},
[495] Fix | Delete
"RotateInFormZero":{"name":"Rotate In From Bottom v2.","frame_0":{"transform":{"opacity":1,"rotationY":"-20deg","rotationX":"-20deg","y":"200%","scaleY":2,"scaleX":2}},"frame_1":{"timeline":{"speed":1000,"ease":"power3.out"},"transform":{"opacity":1,"y":0,"rotationZ":0,"rotationY":0,"scaleX":1,"scaleY":1}}},
[496] Fix | Delete
"FlipFromTop":{"name":"Flip From Top","frame_0":{"transform":{"opacity":0,"rotationX":"70deg","y":"0","originZ":"-50"}},"frame_1":{"timeline":{"speed":1750,"ease":"power4.inOut"},"transform":{"opacity":1,"originZ":"-50","rotationX":0}}},
[497] Fix | Delete
"FlipFromBottom":{"name":"Flip From Bottom","frame_0":{"transform":{"opacity":0,"rotationX":"-70deg","y":"0","originZ":"-50"}},"frame_1":{"timeline":{"speed":1750,"ease":"power4.inOut"},"transform":{"opacity":1,"rotationX":0,"originZ":"-50"}}}
[498] Fix | Delete
}
[499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function