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

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/wp-conte.../plugins/custom-t.../inc/Admin
File: CTF_Support.php
$value = $key === 'time' ? date( 'Y-m-d H:i:s', $value ) : $value;
[500] Fix | Delete
$output .= $key . ': ' . $value . "</br>";
[501] Fix | Delete
}
[502] Fix | Delete
$output .= '</br></br>';
[503] Fix | Delete
}
[504] Fix | Delete
$output .= '</br>';
[505] Fix | Delete
[506] Fix | Delete
$output .= '## UPDATE NOTES: ## </br>';
[507] Fix | Delete
[508] Fix | Delete
[509] Fix | Delete
$ctf_statuses_option = get_option( 'ctf_statuses', array() );
[510] Fix | Delete
if ( ! empty( $ctf_statuses_option['first_cron_update'] ) ) {
[511] Fix | Delete
$output .= 'First Cron Update: '. date( 'Y-m-d H:i:s', $ctf_statuses_option['first_cron_update'] ) .' ' . ($ctf_statuses_option['first_cron_update'] - time()) / HOUR_IN_SECONDS . ' hours';
[512] Fix | Delete
$output .= "</br>";
[513] Fix | Delete
}
[514] Fix | Delete
if ( ! empty($ctf_statuses_option['smash_twitter_cron']['last_update_process_time']) ) {
[515] Fix | Delete
$output .= 'Last Update: '. date( 'Y-m-d H:i:s', $ctf_statuses_option['smash_twitter_cron']['last_update_process_time'] ) . '';
[516] Fix | Delete
}
[517] Fix | Delete
[518] Fix | Delete
[519] Fix | Delete
$output .= "</br></br>";
[520] Fix | Delete
[521] Fix | Delete
return $output;
[522] Fix | Delete
}
[523] Fix | Delete
[524] Fix | Delete
/**
[525] Fix | Delete
* Get Reports
[526] Fix | Delete
*
[527] Fix | Delete
* @since 6.0
[528] Fix | Delete
*
[529] Fix | Delete
* @return string
[530] Fix | Delete
*/
[531] Fix | Delete
public static function get_cron_report() {
[532] Fix | Delete
$output = '## Cron Cache Report: ## </br>';
[533] Fix | Delete
$cron_report = get_option( 'ctf_cron_report', array() );
[534] Fix | Delete
if ( ! empty( $cron_report ) ) {
[535] Fix | Delete
$output .= 'Time Ran: ' . esc_html( $cron_report['notes']['time_ran'] );
[536] Fix | Delete
$output .= '</br>';
[537] Fix | Delete
$output .= 'Found Feeds: ' . esc_html( $cron_report['notes']['num_found_transients'] );
[538] Fix | Delete
$output .= '</br>';
[539] Fix | Delete
$output .= '</br>';
[540] Fix | Delete
[541] Fix | Delete
foreach ( $cron_report as $key => $value ) {
[542] Fix | Delete
if ( $key !== 'notes' ) {
[543] Fix | Delete
$output .= esc_html( $key ) . ':';
[544] Fix | Delete
$output .= '</br>';
[545] Fix | Delete
if ( ! empty( $value['last_retrieve'] ) ) {
[546] Fix | Delete
$output .= 'Last Retrieve: ' . esc_html( $value['last_retrieve'] );
[547] Fix | Delete
$output .= '</br>';
[548] Fix | Delete
}
[549] Fix | Delete
if ( ! empty( $value['did_update'] ) ) {
[550] Fix | Delete
$output .= 'Did Update: ' . esc_html( $value['did_update'] );
[551] Fix | Delete
}
[552] Fix | Delete
$output .= '</br>';
[553] Fix | Delete
$output .= '</br>';
[554] Fix | Delete
}
[555] Fix | Delete
}
[556] Fix | Delete
} else {
[557] Fix | Delete
$output .= 'No Cron Report </br></br>';
[558] Fix | Delete
}
[559] Fix | Delete
[560] Fix | Delete
$cron = _get_cron_array();
[561] Fix | Delete
foreach ( $cron as $key => $data ) {
[562] Fix | Delete
$is_target = false;
[563] Fix | Delete
foreach ( $data as $key2 => $val ) {
[564] Fix | Delete
if ( strpos( $key2, 'ctf' ) !== false || strpos( $key2, 'twitter' ) !== false ) {
[565] Fix | Delete
$is_target = true;
[566] Fix | Delete
$output .= esc_html( $key2 );
[567] Fix | Delete
$output .= '</br>';
[568] Fix | Delete
}
[569] Fix | Delete
}
[570] Fix | Delete
if ( $is_target ) {
[571] Fix | Delete
$output .= esc_html( date( 'Y-m-d H:i:s', $key ) );
[572] Fix | Delete
$output .= '</br>';
[573] Fix | Delete
$output .= esc_html( 'Next Scheduled: ' . round( ( (int) $key - time() ) / 60 ) . ' minutes' );
[574] Fix | Delete
$output .= '</br>';
[575] Fix | Delete
$output .= '</br>';
[576] Fix | Delete
}
[577] Fix | Delete
}
[578] Fix | Delete
[579] Fix | Delete
return $output;
[580] Fix | Delete
}
[581] Fix | Delete
[582] Fix | Delete
/**
[583] Fix | Delete
* Get Image Resizing Info
[584] Fix | Delete
*
[585] Fix | Delete
* @since 2.0
[586] Fix | Delete
*
[587] Fix | Delete
* @return string
[588] Fix | Delete
*/
[589] Fix | Delete
public static function get_image_resizing_info() {
[590] Fix | Delete
[591] Fix | Delete
return '';
[592] Fix | Delete
}
[593] Fix | Delete
[594] Fix | Delete
/**
[595] Fix | Delete
* Get Posts Table Info
[596] Fix | Delete
*
[597] Fix | Delete
* @since 2.0
[598] Fix | Delete
*
[599] Fix | Delete
* @return string
[600] Fix | Delete
*/
[601] Fix | Delete
public static function get_posts_table_info() {
[602] Fix | Delete
return '';
[603] Fix | Delete
$output = "## POSTS: ## </br>";
[604] Fix | Delete
[605] Fix | Delete
global $wpdb;
[606] Fix | Delete
$table_name = esc_sql( $wpdb->prefix . CTF_POSTS_TABLE );
[607] Fix | Delete
$feeds_posts_table_name = esc_sql( $wpdb->prefix . CTF_FEEDS_POSTS_TABLE );
[608] Fix | Delete
[609] Fix | Delete
if ( $wpdb->get_var( "show tables like '$feeds_posts_table_name'" ) != $feeds_posts_table_name ) {
[610] Fix | Delete
$output .= 'no feeds posts table' . "</br>";
[611] Fix | Delete
} else {
[612] Fix | Delete
$last_result = $wpdb->get_results( "SELECT * FROM $feeds_posts_table_name ORDER BY id DESC LIMIT 1;" );
[613] Fix | Delete
if ( is_array( $last_result ) && isset( $last_result[0] ) ) {
[614] Fix | Delete
$output .= '## FEEDS POSTS TABLE ##' . "</br>";
[615] Fix | Delete
foreach ( $last_result as $column ) {
[616] Fix | Delete
foreach ( $column as $key => $value ) {
[617] Fix | Delete
$output .= $key . ': ' . esc_html( $value ) . "</br>";;
[618] Fix | Delete
}
[619] Fix | Delete
}
[620] Fix | Delete
} else {
[621] Fix | Delete
$output .= 'feeds posts has no rows';
[622] Fix | Delete
$output .= "</br>";
[623] Fix | Delete
}
[624] Fix | Delete
}
[625] Fix | Delete
$output .= "</br>";
[626] Fix | Delete
if ( $wpdb->get_var( "show tables like '$table_name'" ) != $table_name ) {
[627] Fix | Delete
$output .= 'no posts table' . "</br>";
[628] Fix | Delete
} else {
[629] Fix | Delete
$last_result = $wpdb->get_results( "SELECT * FROM $table_name ORDER BY id DESC LIMIT 1;" );
[630] Fix | Delete
if ( is_array( $last_result ) && isset( $last_result[0] ) ) {
[631] Fix | Delete
$output .= '## POSTS TABLE ##';
[632] Fix | Delete
$output .= "</br>";
[633] Fix | Delete
foreach ( $last_result as $column ) {
[634] Fix | Delete
foreach ( $column as $key => $value ) {
[635] Fix | Delete
$output .= $key . ': ' . esc_html( $value ) . "</br>";;
[636] Fix | Delete
}
[637] Fix | Delete
}
[638] Fix | Delete
} else {
[639] Fix | Delete
$output .= 'posts has no rows' . "</br>";
[640] Fix | Delete
}
[641] Fix | Delete
}
[642] Fix | Delete
$output .= "</br>";
[643] Fix | Delete
[644] Fix | Delete
return $output;
[645] Fix | Delete
}
[646] Fix | Delete
[647] Fix | Delete
/**
[648] Fix | Delete
* SBI Get Errors Info
[649] Fix | Delete
*
[650] Fix | Delete
* @since 2.0
[651] Fix | Delete
*
[652] Fix | Delete
* @return string
[653] Fix | Delete
*/
[654] Fix | Delete
public static function get_errors_info() {
[655] Fix | Delete
$errors = get_option( 'ctf_errors', array() );
[656] Fix | Delete
$output = "## ERRORS: ##" . "</br>";
[657] Fix | Delete
if ( ! CTF_DOING_SMASH_TWITTER ) {
[658] Fix | Delete
if ( ! empty( $errors ) ) {
[659] Fix | Delete
foreach ( $errors as $error ) {
[660] Fix | Delete
$output .= esc_html( $error ) . "</br>";
[661] Fix | Delete
}
[662] Fix | Delete
} else {
[663] Fix | Delete
$output .= "No Error Information Stored</br>";
[664] Fix | Delete
}
[665] Fix | Delete
} else {
[666] Fix | Delete
$ctf_statuses_option = get_option( 'ctf_statuses', array() );
[667] Fix | Delete
if ( ! empty( $ctf_statuses_option['smash_twitter']['error_log'] ) ) {
[668] Fix | Delete
$reversed = array_reverse( $ctf_statuses_option['smash_twitter']['error_log'] );
[669] Fix | Delete
foreach ( $reversed as $error ) :
[670] Fix | Delete
$output .= $error . "</br>";
[671] Fix | Delete
endforeach;
[672] Fix | Delete
}
[673] Fix | Delete
}
[674] Fix | Delete
[675] Fix | Delete
[676] Fix | Delete
return $output;
[677] Fix | Delete
}
[678] Fix | Delete
[679] Fix | Delete
/**
[680] Fix | Delete
* Get Action Logs Info
[681] Fix | Delete
*
[682] Fix | Delete
* @since 2.0
[683] Fix | Delete
*
[684] Fix | Delete
* @return string
[685] Fix | Delete
*/
[686] Fix | Delete
public static function get_action_logs_info() {
[687] Fix | Delete
$output = "## ACTION LOG ##" . "</br>";
[688] Fix | Delete
global $sb_instagram_posts_manager;
[689] Fix | Delete
[690] Fix | Delete
$actions = $sb_instagram_posts_manager->get_action_log();
[691] Fix | Delete
if ( ! empty( $actions ) ) :
[692] Fix | Delete
foreach ( $actions as $action ) :
[693] Fix | Delete
$output .= strip_tags($action) . "</br>";
[694] Fix | Delete
endforeach;
[695] Fix | Delete
endif;
[696] Fix | Delete
$output .= "</br>";
[697] Fix | Delete
[698] Fix | Delete
return $output;
[699] Fix | Delete
}
[700] Fix | Delete
[701] Fix | Delete
[702] Fix | Delete
[703] Fix | Delete
/**
[704] Fix | Delete
* SBI Get Support URL
[705] Fix | Delete
*
[706] Fix | Delete
* @since 2.0
[707] Fix | Delete
*
[708] Fix | Delete
* @return string $url
[709] Fix | Delete
*/
[710] Fix | Delete
public function get_support_url() {
[711] Fix | Delete
$url = 'https://smashballoon.com/custom-twitter-feeds/support/';
[712] Fix | Delete
$license_type = ctf_is_pro_version() ? 'pro' : 'free';
[713] Fix | Delete
[714] Fix | Delete
$args = array();
[715] Fix | Delete
$license_key = false;
[716] Fix | Delete
if ( $license_key ) {
[717] Fix | Delete
$license_key = ctf_encrypt_decrypt( 'encrypt', $license_key );
[718] Fix | Delete
$args['license'] = $license_key;
[719] Fix | Delete
}
[720] Fix | Delete
[721] Fix | Delete
$args['license_type'] = $license_type;
[722] Fix | Delete
$args['version'] = CTF_VERSION;
[723] Fix | Delete
$url = add_query_arg( $args, $url );
[724] Fix | Delete
return $url;
[725] Fix | Delete
}
[726] Fix | Delete
[727] Fix | Delete
/**
[728] Fix | Delete
* SBI Export Feed Settings JSON
[729] Fix | Delete
*
[730] Fix | Delete
* @since 2.0
[731] Fix | Delete
*
[732] Fix | Delete
* @return CTF_Response
[733] Fix | Delete
*/
[734] Fix | Delete
public function ctf_export_settings_json() {
[735] Fix | Delete
\TwitterFeed\Builder\CTF_Feed_Builder::check_privilege();
[736] Fix | Delete
[737] Fix | Delete
if ( ! isset( $_GET['feed_id'] ) ) {
[738] Fix | Delete
return;
[739] Fix | Delete
}
[740] Fix | Delete
$feed_id = filter_var( $_GET['feed_id'], FILTER_SANITIZE_NUMBER_INT );
[741] Fix | Delete
$feed = CTF_Feed_Saver_Manager::get_export_json( $feed_id );
[742] Fix | Delete
$feed_info = CTF_Db::feeds_query( array('id' => $feed_id) );
[743] Fix | Delete
$feed_name = strtolower( $feed_info[0]['feed_name'] );
[744] Fix | Delete
$filename = 'ctf-feed-' . $feed_name . '.json';
[745] Fix | Delete
// Creates a new csv file and store it in tmp directory
[746] Fix | Delete
$file = fopen( '/tmp/' . $filename, 'w' );
[747] Fix | Delete
fwrite($file, $feed);
[748] Fix | Delete
fclose($file);
[749] Fix | Delete
// output headers so that the file is downloaded rather than displayed
[750] Fix | Delete
header( "Content-type: application/json" );
[751] Fix | Delete
header( "Content-disposition: attachment; filename = " . $filename );
[752] Fix | Delete
readfile( "/tmp/" . $filename );
[753] Fix | Delete
exit;
[754] Fix | Delete
}
[755] Fix | Delete
[756] Fix | Delete
/**
[757] Fix | Delete
* SBI Get Whitespace
[758] Fix | Delete
*
[759] Fix | Delete
* @since 2.0
[760] Fix | Delete
*
[761] Fix | Delete
* @param int $times
[762] Fix | Delete
*
[763] Fix | Delete
* @return string
[764] Fix | Delete
*/
[765] Fix | Delete
public static function get_whitespace( $times ) {
[766] Fix | Delete
return str_repeat('&nbsp;', $times );
[767] Fix | Delete
}
[768] Fix | Delete
[769] Fix | Delete
/**
[770] Fix | Delete
* Extensions Manager Page View Template
[771] Fix | Delete
*
[772] Fix | Delete
* @since 2.0
[773] Fix | Delete
*/
[774] Fix | Delete
public function support_page(){
[775] Fix | Delete
return CTF_View::render( 'support.index' );
[776] Fix | Delete
}
[777] Fix | Delete
}
[778] Fix | Delete
[779] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function