Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/custom-t.../inc
File: CTF_Settings.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Class CTF_Settings
[2] Fix | Delete
*
[3] Fix | Delete
* Creates organized settings from shortcode settings and settings
[4] Fix | Delete
* from the options table.
[5] Fix | Delete
*
[6] Fix | Delete
* Also responsible for creating transient names/feed ids based on
[7] Fix | Delete
* feed settings
[8] Fix | Delete
*
[9] Fix | Delete
* @since 2.0/5.0
[10] Fix | Delete
*/
[11] Fix | Delete
namespace TwitterFeed;
[12] Fix | Delete
use TwitterFeed\CtfFeed;
[13] Fix | Delete
use TwitterFeed\Builder\CTF_Feed_Saver;
[14] Fix | Delete
[15] Fix | Delete
if ( ! defined( 'ABSPATH' ) ) {
[16] Fix | Delete
die( '-1' );
[17] Fix | Delete
}
[18] Fix | Delete
[19] Fix | Delete
class CTF_Settings {
[20] Fix | Delete
/**
[21] Fix | Delete
* @var array
[22] Fix | Delete
*/
[23] Fix | Delete
protected $atts;
[24] Fix | Delete
[25] Fix | Delete
/**
[26] Fix | Delete
* @var array
[27] Fix | Delete
*/
[28] Fix | Delete
protected $db;
[29] Fix | Delete
[30] Fix | Delete
/**
[31] Fix | Delete
* @var array
[32] Fix | Delete
*/
[33] Fix | Delete
protected $settings;
[34] Fix | Delete
[35] Fix | Delete
/**
[36] Fix | Delete
* @var array
[37] Fix | Delete
*/
[38] Fix | Delete
protected $feed_type_and_terms;
[39] Fix | Delete
[40] Fix | Delete
/**
[41] Fix | Delete
* CTF_Settings constructor.
[42] Fix | Delete
*
[43] Fix | Delete
* Overwritten in the Pro version.
[44] Fix | Delete
*
[45] Fix | Delete
* @param array $atts shortcode settings
[46] Fix | Delete
* @param array $db settings from the wp_options table
[47] Fix | Delete
*/
[48] Fix | Delete
public function __construct( $atts, $db = null, $preview_settings = false ) {
[49] Fix | Delete
[50] Fix | Delete
$feed = new CtfFeed( $atts, null, null );
[51] Fix | Delete
$feed->setFeedOptions();
[52] Fix | Delete
[53] Fix | Delete
$bool_false = array(
[54] Fix | Delete
'includereplies',
[55] Fix | Delete
'masonry',
[56] Fix | Delete
'autoscroll',
[57] Fix | Delete
'disablelightbox',
[58] Fix | Delete
'carousel',
[59] Fix | Delete
'carouselautoplay',
[60] Fix | Delete
'carouselpag',
[61] Fix | Delete
'sslonly',
[62] Fix | Delete
'shorturls'
[63] Fix | Delete
);
[64] Fix | Delete
$feed->setStandardBoolOptions( $bool_false, false );
[65] Fix | Delete
$feed->setStandardBoolOptions( array( 'persistentcache', 'autores' ), true );
[66] Fix | Delete
$feed->setStandardTextOptions( 'carouselarrows', 'onhover' );
[67] Fix | Delete
$feed->setStandardTextOptions( 'carouselheight', 'tallest' );
[68] Fix | Delete
$feed->setStandardTextOptions( 'carouselcols', 1 );
[69] Fix | Delete
$feed->setStandardTextOptions( 'carouselmobilecols', 1 );
[70] Fix | Delete
$feed->setStandardTextOptions( 'carouseltime', 5000 );
[71] Fix | Delete
$feed->setStandardTextOptions( 'carouselloop', 'none' );
[72] Fix | Delete
$feed->setStandardTextOptions( 'masonrycols', 3 );
[73] Fix | Delete
$feed->setStandardTextOptions( 'masonrymobilecols', 1 );
[74] Fix | Delete
$feed->setStandardTextOptions( 'autoscrolldistance', '200' );
[75] Fix | Delete
$feed->setStandardTextOptions( 'textlength', 280 );
[76] Fix | Delete
$feed->setStandardTextOptions( 'maxmedia', 4 );
[77] Fix | Delete
$feed->setStandardTextOptions( 'imagecols', 'auto' );
[78] Fix | Delete
$feed->setStandardTextOptions( 'inreplytotext', 'In reply to' );
[79] Fix | Delete
$feed->setStandardTextOptions( array( 'includewords', 'excludewords' ) );
[80] Fix | Delete
$feed->setStandardTextOptions( array( 'includeanyall', 'excludeanyall' ), 'any' );
[81] Fix | Delete
$feed->setStandardTextOptions( 'filterandor', 'and' );
[82] Fix | Delete
[83] Fix | Delete
$feed->setDatabaseOnlyOptions( 'remove_by_id' );
[84] Fix | Delete
[85] Fix | Delete
$this->settings = $feed->feed_options;
[86] Fix | Delete
}
[87] Fix | Delete
[88] Fix | Delete
/**
[89] Fix | Delete
* @return array
[90] Fix | Delete
*
[91] Fix | Delete
* @since 2.0/5.0
[92] Fix | Delete
*/
[93] Fix | Delete
public function get_settings() {
[94] Fix | Delete
return $this->settings;
[95] Fix | Delete
}
[96] Fix | Delete
[97] Fix | Delete
public function get_feed_type_and_terms() {
[98] Fix | Delete
return $this->feed_type_and_terms;
[99] Fix | Delete
}
[100] Fix | Delete
[101] Fix | Delete
/**
[102] Fix | Delete
* Based on the settings related to retrieving post data from the API,
[103] Fix | Delete
* this setting is used to make sure all endpoints needed for the feed are
[104] Fix | Delete
* connected and stored for easily looping through when adding posts
[105] Fix | Delete
*
[106] Fix | Delete
* Overwritten in the Pro version.
[107] Fix | Delete
*
[108] Fix | Delete
* @since 2.0/5.0
[109] Fix | Delete
*/
[110] Fix | Delete
public function set_feed_type_and_terms() {
[111] Fix | Delete
$this->feed_type_and_terms = array();
[112] Fix | Delete
if ( ! empty( $this->settings['feed_types_and_terms'] ) ) {
[113] Fix | Delete
[114] Fix | Delete
foreach ( $this->settings['feed_types_and_terms'] as $type_then_term ) {
[115] Fix | Delete
switch ( $type_then_term[0] ) {
[116] Fix | Delete
case 'hometimeline':
[117] Fix | Delete
$this->feed_type_and_terms['hometimeline'][] = array(
[118] Fix | Delete
'term' => 'hometimeline',
[119] Fix | Delete
'params' => array()
[120] Fix | Delete
);
[121] Fix | Delete
break;
[122] Fix | Delete
case 'hashtag':
[123] Fix | Delete
$hashtag_str = isset( $type_then_term[1] ) ? $type_then_term[1] : '';
[124] Fix | Delete
$hashtag_str = str_replace( ',', ' OR ', $hashtag_str );
[125] Fix | Delete
[126] Fix | Delete
$this->feed_type_and_terms['search'][] = array(
[127] Fix | Delete
'term' => $hashtag_str,
[128] Fix | Delete
'params' => array()
[129] Fix | Delete
);
[130] Fix | Delete
break;
[131] Fix | Delete
default:
[132] Fix | Delete
$screenname = isset( $type_then_term[1] ) ? $type_then_term[1] : '';
[133] Fix | Delete
[134] Fix | Delete
$this->feed_type_and_terms['usertimeline'][] = array(
[135] Fix | Delete
'term' => $screenname,
[136] Fix | Delete
'params' => array()
[137] Fix | Delete
);
[138] Fix | Delete
break;
[139] Fix | Delete
}
[140] Fix | Delete
}
[141] Fix | Delete
} else {
[142] Fix | Delete
if ( ! empty( $this->settings['type'] ) ) {
[143] Fix | Delete
switch ( $this->settings['type'] ) {
[144] Fix | Delete
case 'hometimeline':
[145] Fix | Delete
$this->feed_type_and_terms['hometimeline'][] = array(
[146] Fix | Delete
'term' => 'hometimeline',
[147] Fix | Delete
'params' => array()
[148] Fix | Delete
);
[149] Fix | Delete
break;
[150] Fix | Delete
case 'hashtag':
[151] Fix | Delete
$hashtag_str = isset( $this->settings['hashtag_text'] ) ? $this->settings['hashtag_text'] : '';
[152] Fix | Delete
if ( empty( $hashtag_str ) ) {
[153] Fix | Delete
$hashtag_str = ( $this->settings['feed_term'] ) ? $this->settings['feed_term'] : '';
[154] Fix | Delete
}
[155] Fix | Delete
$hashtag_str = str_replace( ',', ' OR ', $hashtag_str );
[156] Fix | Delete
[157] Fix | Delete
$this->feed_type_and_terms['search'][] = array(
[158] Fix | Delete
'term' => $hashtag_str,
[159] Fix | Delete
'params' => array()
[160] Fix | Delete
);
[161] Fix | Delete
break;
[162] Fix | Delete
default:
[163] Fix | Delete
$screennames_str = isset( $this->settings['screenname'] ) ? $this->settings['screenname'] : $this->settings['usertimeline_text'];
[164] Fix | Delete
$screennames = explode( ',', $screennames_str );
[165] Fix | Delete
[166] Fix | Delete
foreach ( $screennames as $screenname ) {
[167] Fix | Delete
$this->feed_type_and_terms['usertimeline'][] = array(
[168] Fix | Delete
'term' => $screenname,
[169] Fix | Delete
'params' => array()
[170] Fix | Delete
);
[171] Fix | Delete
}
[172] Fix | Delete
break;
[173] Fix | Delete
}
[174] Fix | Delete
[175] Fix | Delete
}
[176] Fix | Delete
}
[177] Fix | Delete
}
[178] Fix | Delete
[179] Fix | Delete
public static function get_settings_by_feed_id( $feed_id, $preview_settings = false ) {
[180] Fix | Delete
if ( is_array( $preview_settings ) ) {
[181] Fix | Delete
return $preview_settings;
[182] Fix | Delete
}
[183] Fix | Delete
[184] Fix | Delete
if ( intval( $feed_id ) < 1 ) {
[185] Fix | Delete
return false;
[186] Fix | Delete
}
[187] Fix | Delete
[188] Fix | Delete
$feed_saver = new CTF_Feed_Saver( $feed_id );
[189] Fix | Delete
[190] Fix | Delete
return $feed_saver->get_feed_settings();
[191] Fix | Delete
}
[192] Fix | Delete
[193] Fix | Delete
/**
[194] Fix | Delete
* Filters out or converts allowed/disallowed shortcode settings
[195] Fix | Delete
*
[196] Fix | Delete
* @param $atts
[197] Fix | Delete
*
[198] Fix | Delete
* @return mixed
[199] Fix | Delete
* @since 2.0
[200] Fix | Delete
*/
[201] Fix | Delete
public static function filter_atts_for_legacy( $atts ) {
[202] Fix | Delete
if ( empty( $atts ) ) {
[203] Fix | Delete
$atts = array();
[204] Fix | Delete
}
[205] Fix | Delete
if ( ! empty( $atts['from_update'] ) ) {
[206] Fix | Delete
unset( $atts['from_update'] );
[207] Fix | Delete
return $atts;
[208] Fix | Delete
}
[209] Fix | Delete
$ctf_statuses = get_option( 'ctf_statuses', array() );
[210] Fix | Delete
$allowed_legacy_shortcode = array(
[211] Fix | Delete
'feed',
[212] Fix | Delete
'customizer',
[213] Fix | Delete
'doingcronupdate'
[214] Fix | Delete
);
[215] Fix | Delete
[216] Fix | Delete
if ( ! empty( $ctf_statuses['support_legacy_shortcode'] )
[217] Fix | Delete
&& empty( $atts['feed'] ) ) {
[218] Fix | Delete
[219] Fix | Delete
if ( is_array( $ctf_statuses['support_legacy_shortcode'] ) ) {
[220] Fix | Delete
$atts_diff = array_diff( $ctf_statuses['support_legacy_shortcode'], $atts );
[221] Fix | Delete
[222] Fix | Delete
foreach ( $atts_diff as $key => $value ) {
[223] Fix | Delete
if ( in_array( $key, $allowed_legacy_shortcode ) ) {
[224] Fix | Delete
unset( $atts_diff[ $key ] );
[225] Fix | Delete
}
[226] Fix | Delete
}
[227] Fix | Delete
if ( empty( $atts_diff ) ) {
[228] Fix | Delete
$atts['feed'] = 1;
[229] Fix | Delete
}
[230] Fix | Delete
}
[231] Fix | Delete
[232] Fix | Delete
if ( empty( $atts['feed'] ) ) {
[233] Fix | Delete
return $atts;
[234] Fix | Delete
}
[235] Fix | Delete
}
[236] Fix | Delete
[237] Fix | Delete
[238] Fix | Delete
foreach ( $atts as $key => $value ) {
[239] Fix | Delete
if ( ! in_array( $key, $allowed_legacy_shortcode ) ) {
[240] Fix | Delete
unset( $atts[ $key ] );
[241] Fix | Delete
}
[242] Fix | Delete
[243] Fix | Delete
}
[244] Fix | Delete
[245] Fix | Delete
return $atts;
[246] Fix | Delete
[247] Fix | Delete
}
[248] Fix | Delete
[249] Fix | Delete
/**
[250] Fix | Delete
* For one time update to capture existing legacy shortcode atts
[251] Fix | Delete
*
[252] Fix | Delete
* @param array $atts
[253] Fix | Delete
* @param array $db
[254] Fix | Delete
*
[255] Fix | Delete
* @return array
[256] Fix | Delete
*/
[257] Fix | Delete
public static function legacy_shortcode_atts( $atts, $db ) {
[258] Fix | Delete
$s_options = [
[259] Fix | Delete
'author',
[260] Fix | Delete
'avatar',
[261] Fix | Delete
'author_text',
[262] Fix | Delete
'text',
[263] Fix | Delete
'date',
[264] Fix | Delete
'actions',
[265] Fix | Delete
'linkbox',
[266] Fix | Delete
'media',
[267] Fix | Delete
'twittercards',
[268] Fix | Delete
'logo',
[269] Fix | Delete
'twitterlink'
[270] Fix | Delete
];
[271] Fix | Delete
[272] Fix | Delete
if( isset( $atts['exclude'] ) ){
[273] Fix | Delete
$exclude_attr = explode( ',', $atts['exclude'] );
[274] Fix | Delete
foreach ($s_options as $opt_name) {
[275] Fix | Delete
$opt_name_exc = 'include_' . $opt_name;
[276] Fix | Delete
$db[$opt_name_exc] = in_array( $opt_name, $exclude_attr ) ? false : true;
[277] Fix | Delete
}
[278] Fix | Delete
}
[279] Fix | Delete
[280] Fix | Delete
if( isset( $atts['include'] ) ){
[281] Fix | Delete
$include_attr = explode( ',', $atts['include'] );
[282] Fix | Delete
foreach ($s_options as $opt_name) {
[283] Fix | Delete
$opt_name_inc = 'include_' . $opt_name;
[284] Fix | Delete
$db[$opt_name_inc] = in_array( $opt_name, $include_attr ) ? true : false;
[285] Fix | Delete
}
[286] Fix | Delete
}
[287] Fix | Delete
[288] Fix | Delete
$settings = shortcode_atts(
[289] Fix | Delete
array(
[290] Fix | Delete
'ajax_theme' => isset( $db['ajax_theme'] ) ? $db['ajax_theme'] : false,
[291] Fix | Delete
'have_own_tokens' => isset( $db['have_own_tokens'] ) ? $db['have_own_tokens'] : '',
[292] Fix | Delete
'use_own_consumer' => isset( $db['use_own_consumer'] ) ? $db['use_own_consumer'] : '',
[293] Fix | Delete
'usertimeline_includereplies' => isset( $db['usertimeline_includereplies'] ) ? $db['usertimeline_includereplies'] : '',
[294] Fix | Delete
'hometimeline_includereplies' => isset( $db['hometimeline_includereplies'] ) ? $db['hometimeline_includereplies'] : '',
[295] Fix | Delete
'mentionstimeline_includereplies' => isset( $db['mentionstimeline_includereplies'] ) ? $db['mentionstimeline_includereplies'] : '',
[296] Fix | Delete
'usertimeline_includeretweets' => isset( $db['usertimeline_includeretweets'] ) ? $db['usertimeline_includeretweets'] : '',
[297] Fix | Delete
'hometimeline_includeretweets' => isset( $db['hometimeline_includeretweets'] ) ? $db['hometimeline_includeretweets'] : true,
[298] Fix | Delete
'mentionstimeline_includeretweets' => isset( $db['mentionstimeline_includeretweets'] ) ? $db['mentionstimeline_includeretweets'] : '',
[299] Fix | Delete
'tab' => isset( $db['tab'] ) ? $db['tab'] : 'configure',
[300] Fix | Delete
'consumer_key' => isset( $db['consumer_key'] ) ? $db['consumer_key'] : '',
[301] Fix | Delete
'consumer_secret' => isset( $db['consumer_secret'] ) ? $db['consumer_secret'] : '',
[302] Fix | Delete
'access_token' => isset( $db['access_token'] ) ? $db['access_token'] : '',
[303] Fix | Delete
'access_token_secret' => isset( $db['access_token_secret'] ) ? $db['access_token_secret'] : '',
[304] Fix | Delete
'type' => isset( $db['type'] ) ? $db['type'] : 'usertimeline',
[305] Fix | Delete
'usertimeline_text' => isset( $db['usertimeline_text'] ) ? $db['usertimeline_text'] : '',
[306] Fix | Delete
'hashtag_text' => isset( $db['search_text'] ) ? $db['search_text'] : '',
[307] Fix | Delete
'search_text' => isset( $db['search_text'] ) ? $db['search_text'] : '',
[308] Fix | Delete
'hashtag' => isset( $db['search_text'] ) ? $db['search_text'] : '',
[309] Fix | Delete
'search' => isset( $db['search_text'] ) ? $db['search_text'] : '',
[310] Fix | Delete
//'lists_id' => isset( $db['lists_id'] ) ? $db['lists_id'] : '',
[311] Fix | Delete
//'lists_owner' => isset( $db['lists_owner'] ) ? $db['lists_owner'] : '',
[312] Fix | Delete
'num' => isset( $db['num'] ) ? $db['num'] : '5',
[313] Fix | Delete
'lists_info' => isset( $db['lists_info'] ) ? $db['lists_info'] : '{}',
[314] Fix | Delete
'includereplies' => isset( $db['includereplies'] ) ? $db['includereplies'] : true,
[315] Fix | Delete
'includeretweets' => isset( $db['includeretweets'] ) ? $db['includeretweets'] : true,
[316] Fix | Delete
'width_mobile_no_fixed' => isset( $db['width_mobile_no_fixed'] ) ? $db['width_mobile_no_fixed'] : false,
[317] Fix | Delete
'include_replied_to' => isset( $db['include_replied_to'] ) ? $db['include_replied_to'] : true,
[318] Fix | Delete
'include_retweeter' => isset( $db['include_retweeter'] ) ? $db['include_retweeter'] : true,
[319] Fix | Delete
'include_author' => isset( $db['include_author'] ) ? $db['include_author'] : true,
[320] Fix | Delete
'include_avatar' => isset( $db['include_avatar'] ) ? $db['include_avatar'] : true,
[321] Fix | Delete
'include_author_text' => isset( $db['include_author_text'] ) ? $db['include_author_text'] : true,
[322] Fix | Delete
'include_text' => isset( $db['include_text'] ) ? $db['include_text'] : true,
[323] Fix | Delete
'include_date' => isset( $db['include_date'] ) ? $db['include_date'] : true,
[324] Fix | Delete
'include_actions' => isset( $db['include_actions'] ) ? $db['include_actions'] : true,
[325] Fix | Delete
'include_linkbox' => isset( $db['include_linkbox'] ) ? $db['include_linkbox'] : true,
[326] Fix | Delete
'include_media' => isset( $db['include_media'] ) ? $db['include_media'] : true,
[327] Fix | Delete
'include_twittercards' => isset( $db['include_twittercards'] ) ? $db['include_twittercards'] : true,
[328] Fix | Delete
'include_logo' => isset( $db['include_logo'] ) ? $db['include_logo'] : true,
[329] Fix | Delete
'include_twitterlink' => isset( $db['include_twitterlink'] ) ? $db['include_twitterlink'] : true,
[330] Fix | Delete
'creditctf' => isset( $db['creditctf'] ) ? $db['creditctf'] : false,
[331] Fix | Delete
'showbutton' => isset( $db['showbutton'] ) ? $db['showbutton'] : true,
[332] Fix | Delete
'showheader' => isset( $db['showheader'] ) ? $db['showheader'] : true,
[333] Fix | Delete
'persistentcache' => isset( $db['persistentcache'] ) ? $db['persistentcache'] : true,
[334] Fix | Delete
'selfreplies' => isset( $db['selfreplies'] ) ? $db['selfreplies'] : true,
[335] Fix | Delete
'autores' => isset( $db['autores'] ) ? $db['autores'] : true,
[336] Fix | Delete
'disableintents' => isset( $db['disableintents'] ) ? $db['disableintents'] : false,
[337] Fix | Delete
'customtemplates' => isset( $db['customtemplates'] ) ? $db['customtemplates'] : false,
[338] Fix | Delete
'shorturls' => isset( $db['shorturls'] ) ? $db['shorturls'] : false,
[339] Fix | Delete
'curlcards' => isset( $db['curlcards'] ) ? $db['curlcards'] : true,
[340] Fix | Delete
'sslonly' => isset( $db['sslonly'] ) ? $db['sslonly'] : false,
[341] Fix | Delete
'disablelightbox' => isset( $db['disablelightbox'] ) ? $db['disablelightbox'] : false,
[342] Fix | Delete
'masonry' => isset( $db['masonry'] ) ? $db['masonry'] : false,
[343] Fix | Delete
'carousel' => isset( $db['carousel'] ) ? $db['carousel'] : false,
[344] Fix | Delete
'carouselnavarrows' => isset( $db['carouselnavarrows'] ) ? $db['carouselnavarrows'] : true,
[345] Fix | Delete
'carouselpag' => isset( $db['carouselpag'] ) ? $db['carouselpag'] : false,
[346] Fix | Delete
'carouselautoplay' => isset( $db['carouselautoplay'] ) ? $db['carouselautoplay'] : false,
[347] Fix | Delete
'autoscroll' => isset( $db['autoscroll'] ) ? $db['autoscroll'] : true,
[348] Fix | Delete
'width' => isset( $db['width'] ) ? $db['width'] : '100',
[349] Fix | Delete
'width_unit' => isset( $db['width_unit'] ) ? $db['width_unit'] : '%',
[350] Fix | Delete
'height' => isset( $db['height'] ) ? $db['height'] : '',
[351] Fix | Delete
'height_unit' => isset( $db['height_unit'] ) ? $db['height_unit'] : '%',
[352] Fix | Delete
'class' => isset( $db['class'] ) ? $db['class'] : '',
[353] Fix | Delete
'layout' => isset( $db['layout'] ) ? $db['layout'] : 'list',
[354] Fix | Delete
'masonrycols' => isset( $db['masonrycols'] ) ? $db['masonrycols'] : '3',
[355] Fix | Delete
'masonrytabletcols' => isset( $db['masonrytabletcols'] ) ? $db['masonrytabletcols'] : '2',
[356] Fix | Delete
'masonrymobilecols' => isset( $db['masonrymobilecols'] ) ? $db['masonrymobilecols'] : '1',
[357] Fix | Delete
'carouselrows' => isset( $db['carouselrows'] ) ? $db['carouselrows'] : '1',
[358] Fix | Delete
'carouselcols' => isset( $db['carouselcols'] ) ? $db['carouselcols'] : '3',
[359] Fix | Delete
'carouseltabletcols' => isset( $db['carouseltabletcols'] ) ? $db['carouseltabletcols'] : '2',
[360] Fix | Delete
'carouselmobilecols' => isset( $db['carouselmobilecols'] ) ? $db['carouselmobilecols'] : '1',
[361] Fix | Delete
'carouselloop' => isset( $db['carouselloop'] ) ? $db['carouselloop'] : 'rewind',
[362] Fix | Delete
'carouselarrows' => isset( $db['carouselarrows'] ) ? $db['carouselarrows'] : 'onhover',
[363] Fix | Delete
'carouselheight' => isset( $db['carouselheight'] ) ? $db['carouselheight'] : 'tallest',
[364] Fix | Delete
'carouseltime' => isset( $db['carouseltime'] ) ? $db['carouseltime'] : '5000',
[365] Fix | Delete
'maxmedia' => isset( $db['maxmedia'] ) ? $db['maxmedia'] : '4',
[366] Fix | Delete
'imagecols' => isset( $db['imagecols'] ) ? $db['imagecols'] : 'auto',
[367] Fix | Delete
'autoscrolldistance' => isset( $db['autoscrolldistance'] ) ? $db['autoscrolldistance'] : '200',
[368] Fix | Delete
'includewords' => isset( $db['includewords'] ) ? $db['includewords'] : '',
[369] Fix | Delete
'excludewords' => isset( $db['excludewords'] ) ? $db['excludewords'] : '',
[370] Fix | Delete
'includeanyall' => isset( $db['includeanyall'] ) ? $db['includeanyall'] : 'any',
[371] Fix | Delete
'filterandor' => isset( $db['filterandor'] ) ? $db['filterandor'] : 'and',
[372] Fix | Delete
'excludeanyall' => isset( $db['excludeanyall'] ) ? $db['excludeanyall'] : 'any',
[373] Fix | Delete
'remove_by_id' => isset( $db['remove_by_id'] ) ? $db['remove_by_id'] : '',
[374] Fix | Delete
'custom_css' => isset( $db['custom_css'] ) ? $db['custom_css'] : '',
[375] Fix | Delete
'custom_js' => isset( $db['custom_js'] ) ? $db['custom_js'] : '',
[376] Fix | Delete
'request_method' => isset( $db['request_method'] ) ? $db['request_method'] : 'auto',
[377] Fix | Delete
'cron_cache_clear' => isset( $db['cron_cache_clear'] ) ? $db['cron_cache_clear'] : 'unset',
[378] Fix | Delete
'multiplier' => isset( $db['multiplier'] ) ? $db['multiplier'] : '1.25',
[379] Fix | Delete
'font_method' => isset( $db['font_method'] ) ? $db['font_method'] : 'svg',
[380] Fix | Delete
'include_media_placeholder' => isset( $db['include_media_placeholder'] ) ? $db['include_media_placeholder'] : true,
[381] Fix | Delete
'showbio' => isset( $db['showbio'] ) ? $db['showbio'] : true,
[382] Fix | Delete
'disablelinks' => isset( $db['disablelinks'] ) ? $db['disablelinks'] : false,
[383] Fix | Delete
'linktexttotwitter' => isset( $db['linktexttotwitter'] ) ? $db['linktexttotwitter'] : false,
[384] Fix | Delete
'bgcolor' => isset( $db['bgcolor'] ) ? $db['bgcolor'] : '#',
[385] Fix | Delete
'tweetbgcolor' => isset( $db['tweetbgcolor'] ) ? $db['tweetbgcolor'] : '#',
[386] Fix | Delete
'headertextcolor' => isset( $db['headertextcolor'] ) ? $db['headertextcolor'] : '#',
[387] Fix | Delete
'headertext' => isset( $db['headertext'] ) ? $db['headertext'] : '',
[388] Fix | Delete
'headersize' => isset( $db['headersize'] ) ? $db['headersize'] : 'small',
[389] Fix | Delete
'headerstyle' => isset( $db['headerstyle'] ) ? $db['headerstyle'] : 'standard',
[390] Fix | Delete
'headerbgcolor' => isset( $db['headerbgcolor'] ) ? $db['headerbgcolor'] : '#',
[391] Fix | Delete
'customheadertextcolor' => isset( $db['customheadertextcolor'] ) ? $db['customheadertextcolor'] : '#',
[392] Fix | Delete
'customheadertext' => isset( $db['customheadertext'] ) ? $db['customheadertext'] : __( 'We are on Twitter', 'custom-twitter-feeds' ),
[393] Fix | Delete
'customheadersize' => isset( $db['customheadersize'] ) ? $db['customheadersize'] : 'small',
[394] Fix | Delete
'timezone' => isset( $db['timezone'] ) ? $db['timezone'] : 'default',
[395] Fix | Delete
'dateformat' => isset( $db['dateformat'] ) ? $db['dateformat'] : '1',
[396] Fix | Delete
'datecustom' => isset( $db['datecustom'] ) ? $db['datecustom'] : '',
[397] Fix | Delete
'mtime' => isset( $db['mtime'] ) ? $db['mtime'] : 'm',
[398] Fix | Delete
'htime' => isset( $db['htime'] ) ? $db['htime'] : 'h',
[399] Fix | Delete
'nowtime' => isset( $db['nowtime'] ) ? $db['nowtime'] : 'now',
[400] Fix | Delete
'datetextsize' => isset( $db['datetextsize'] ) ? $db['datetextsize'] : 'inherit',
[401] Fix | Delete
'datetextweight' => isset( $db['datetextweight'] ) ? $db['datetextweight'] : 'inherit',
[402] Fix | Delete
'datetextcolor' => isset( $db['datetextcolor'] ) ? $db['datetextcolor'] : '#',
[403] Fix | Delete
'authortextcolor' => isset( $db['authortextcolor'] ) ? $db['authortextcolor'] : '#',
[404] Fix | Delete
'authortextsize' => isset( $db['authortextsize'] ) ? $db['authortextsize'] : 'inherit',
[405] Fix | Delete
'authortextweight' => isset( $db['authortextweight'] ) ? $db['authortextweight'] : 'inherit',
[406] Fix | Delete
'logosize' => isset( $db['logosize'] ) ? $db['logosize'] : 'inherit',
[407] Fix | Delete
'logocolor' => isset( $db['logocolor'] ) ? $db['logocolor'] : '#',
[408] Fix | Delete
'tweettextsize' => isset( $db['tweettextsize'] ) ? $db['tweettextsize'] : 'inherit',
[409] Fix | Delete
'tweettextweight' => isset( $db['tweettextweight'] ) ? $db['tweettextweight'] : 'inherit',
[410] Fix | Delete
'textcolor' => isset( $db['textcolor'] ) ? $db['textcolor'] : '#',
[411] Fix | Delete
'textlength' => isset( $db['textlength'] ) ? $db['textlength'] : '280',
[412] Fix | Delete
'retweetedtext' => isset( $db['retweetedtext'] ) ? $db['retweetedtext'] : __( 'Retweeted', 'custom-twitter-feeds' ),
[413] Fix | Delete
'linktextcolor' => isset( $db['linktextcolor'] ) ? $db['linktextcolor'] : '#',
[414] Fix | Delete
'quotedauthorsize' => isset( $db['quotedauthorsize'] ) ? $db['quotedauthorsize'] : 'inherit',
[415] Fix | Delete
'quotedauthorweight' => isset( $db['quotedauthorweight'] ) ? $db['quotedauthorweight'] : 'inherit',
[416] Fix | Delete
'iconsize' => isset( $db['iconsize'] ) ? $db['iconsize'] : 'inherit',
[417] Fix | Delete
'iconcolor' => isset( $db['iconcolor'] ) ? $db['iconcolor'] : '#',
[418] Fix | Delete
'viewtwitterlink' => isset( $db['viewtwitterlink'] ) ? $db['viewtwitterlink'] : true,
[419] Fix | Delete
'twitterlinktext' => isset( $db['twitterlinktext'] ) ? $db['twitterlinktext'] : 'Twitter',
[420] Fix | Delete
'buttoncolor' => isset( $db['buttoncolor'] ) ? $db['buttoncolor'] : '#',
[421] Fix | Delete
'buttonhovercolor' => isset( $db['buttonhovercolor'] ) ? $db['buttonhovercolor'] : '#',
[422] Fix | Delete
'buttontextcolor' => isset( $db['buttontextcolor'] ) ? $db['buttontextcolor'] : '#',
[423] Fix | Delete
'buttontext' => isset( $db['buttontext'] ) ? $db['buttontext'] : __( 'Load More', 'custom-twitter-feeds' ),
[424] Fix | Delete
'inreplytotext' => isset( $db['inreplytotext'] ) ? $db['inreplytotext'] : __( 'In Reply To', 'custom-twitter-feeds' ),
[425] Fix | Delete
'feedtemplate' => isset( $db['feedtemplate'] ) ? $db['feedtemplate'] : 'default',
[426] Fix | Delete
'cardstextsize' => isset( $db['cardstextsize'] ) ? $db['cardstextsize'] : 'inherit',
[427] Fix | Delete
'cardstextcolor' => isset( $db['cardstextcolor'] ) ? $db['cardstextcolor'] : '#',
[428] Fix | Delete
'colorpalette' => isset( $db['colorpalette'] ) ? $db['colorpalette'] : 'inherit',
[429] Fix | Delete
'custombgcolor' => isset( $db['custombgcolor'] ) ? $db['custombgcolor'] : '',
[430] Fix | Delete
'customaccentcolor' => isset( $db['customaccentcolor'] ) ? $db['customaccentcolor'] : '',
[431] Fix | Delete
'customtextcolor1' => isset( $db['customtextcolor1'] ) ? $db['customtextcolor1'] : '',
[432] Fix | Delete
'customtextcolor2' => isset( $db['customtextcolor2'] ) ? $db['customtextcolor2'] : '',
[433] Fix | Delete
'customlinkcolor' => isset( $db['customlinkcolor'] ) ? $db['customlinkcolor'] : '',
[434] Fix | Delete
'tweetpoststyle' => isset( $db['tweetpoststyle'] ) ? $db['tweetpoststyle'] : 'regular',
[435] Fix | Delete
'tweetbgcolor' => isset( $db['tweetbgcolor'] ) ? $db['tweetbgcolor'] : '#',
[436] Fix | Delete
'tweetcorners' => isset( $db['tweetcorners'] ) ? $db['tweetcorners'] : '0',
[437] Fix | Delete
'tweetboxshadow' => isset( $db['tweetboxshadow'] ) ? $db['tweetboxshadow'] : false,
[438] Fix | Delete
'tweetsepcolor' => isset( $db['tweetsepcolor'] ) ? $db['tweetsepcolor'] : '#ddd',
[439] Fix | Delete
'tweetsepsize' => isset( $db['tweetsepsize'] ) ? $db['tweetsepsize'] : '1',
[440] Fix | Delete
'tweetsepline' => isset( $db['tweetsepline'] ) ? $db['tweetsepline'] : true
[441] Fix | Delete
),
[442] Fix | Delete
$atts
[443] Fix | Delete
);
[444] Fix | Delete
[445] Fix | Delete
if ( $settings['type'] === 'search' ) {
[446] Fix | Delete
$settings['type'] = 'hashtag';
[447] Fix | Delete
if ( ! empty( $atts['hashtag'] ) ) {
[448] Fix | Delete
$settings['hashtag'] = $atts['hashtag'];
[449] Fix | Delete
$settings['search'] = $atts['hashtag'];
[450] Fix | Delete
$settings['hashtag_text'] = $atts['hashtag'];
[451] Fix | Delete
$settings['search_text'] = $atts['hashtag'];
[452] Fix | Delete
} else {
[453] Fix | Delete
$settings['hashtag'] = $settings['search'];
[454] Fix | Delete
}
[455] Fix | Delete
}
[456] Fix | Delete
$settings['num'] = (int) $settings['num'];
[457] Fix | Delete
[458] Fix | Delete
return $settings;
[459] Fix | Delete
[460] Fix | Delete
}
[461] Fix | Delete
[462] Fix | Delete
public static function get_public_db_settings_keys() {
[463] Fix | Delete
$public = array(
[464] Fix | Delete
'ajax_theme' => isset( $db['ajax_theme'] ) ? $db['ajax_theme'] : false,
[465] Fix | Delete
'have_own_tokens' => isset( $db['have_own_tokens'] ) ? $db['have_own_tokens'] : '',
[466] Fix | Delete
'use_own_consumer' => isset( $db['use_own_consumer'] ) ? $db['use_own_consumer'] : '',
[467] Fix | Delete
'usertimeline_includereplies' => isset( $db['usertimeline_includereplies'] ) ? $db['usertimeline_includereplies'] : '',
[468] Fix | Delete
'hometimeline_includereplies' => isset( $db['hometimeline_includereplies'] ) ? $db['hometimeline_includereplies'] : '',
[469] Fix | Delete
'mentionstimeline_includereplies' => isset( $db['mentionstimeline_includereplies'] ) ? $db['mentionstimeline_includereplies'] : '',
[470] Fix | Delete
'usertimeline_includeretweets' => isset( $db['usertimeline_includeretweets'] ) ? $db['usertimeline_includeretweets'] : '',
[471] Fix | Delete
'hometimeline_includeretweets' => isset( $db['hometimeline_includeretweets'] ) ? $db['hometimeline_includeretweets'] : true,
[472] Fix | Delete
'mentionstimeline_includeretweets' => isset( $db['mentionstimeline_includeretweets'] ) ? $db['mentionstimeline_includeretweets'] : '',
[473] Fix | Delete
'tab' => isset( $db['tab'] ) ? $db['tab'] : 'configure',
[474] Fix | Delete
'type' => isset( $db['type'] ) ? $db['type'] : 'usertimeline',
[475] Fix | Delete
'usertimeline_text' => isset( $db['usertimeline_text'] ) ? $db['usertimeline_text'] : '',
[476] Fix | Delete
'hashtag_text' => isset( $db['hashtag_text'] ) ? $db['hashtag_text'] : '',
[477] Fix | Delete
'search_text' => isset( $db['search_text'] ) ? $db['search_text'] : '',
[478] Fix | Delete
'lists_id' => isset( $db['lists_id'] ) ? $db['lists_id'] : '',
[479] Fix | Delete
'num' => isset( $db['num'] ) ? $db['num'] : '5',
[480] Fix | Delete
'lists_info' => isset( $db['lists_info'] ) ? $db['lists_info'] : '{}',
[481] Fix | Delete
'includereplies' => isset( $db['includereplies'] ) ? $db['includereplies'] : true,
[482] Fix | Delete
'includeretweets' => isset( $db['includeretweets'] ) ? $db['includeretweets'] : true,
[483] Fix | Delete
'width_mobile_no_fixed' => isset( $db['width_mobile_no_fixed'] ) ? $db['width_mobile_no_fixed'] : false,
[484] Fix | Delete
'include_replied_to' => isset( $db['include_replied_to'] ) ? $db['include_replied_to'] : true,
[485] Fix | Delete
'include_retweeter' => isset( $db['include_retweeter'] ) ? $db['include_retweeter'] : true,
[486] Fix | Delete
'include_author' => isset( $db['include_author'] ) ? $db['include_author'] : true,
[487] Fix | Delete
'include_avatar' => isset( $db['include_avatar'] ) ? $db['include_avatar'] : true,
[488] Fix | Delete
'include_author_text' => isset( $db['include_author_text'] ) ? $db['include_author_text'] : true,
[489] Fix | Delete
'include_text' => isset( $db['include_text'] ) ? $db['include_text'] : true,
[490] Fix | Delete
'include_date' => isset( $db['include_date'] ) ? $db['include_date'] : true,
[491] Fix | Delete
'include_actions' => isset( $db['include_actions'] ) ? $db['include_actions'] : true,
[492] Fix | Delete
'include_linkbox' => isset( $db['include_linkbox'] ) ? $db['include_linkbox'] : true,
[493] Fix | Delete
'include_media' => isset( $db['include_media'] ) ? $db['include_media'] : true,
[494] Fix | Delete
'include_twittercards' => isset( $db['include_twittercards'] ) ? $db['include_twittercards'] : true,
[495] Fix | Delete
'include_logo' => isset( $db['include_logo'] ) ? $db['include_logo'] : true,
[496] Fix | Delete
'include_twitterlink' => isset( $db['include_twitterlink'] ) ? $db['include_twitterlink'] : true,
[497] Fix | Delete
'creditctf' => isset( $db['creditctf'] ) ? $db['creditctf'] : false,
[498] Fix | Delete
'showbutton' => isset( $db['showbutton'] ) ? $db['showbutton'] : true,
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function