*Technical Support *!
Version: 0.5.8
Author: codelyfe@gmail.com
Author URI: https://codelyfe.github.io
Text Domain: LightWRSSFeed
License: GPLv2
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Network: True
Copyright 2018 - 2022 Randal C. Burger
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
// DISPLAY NOTICE
function display_custom_admin_notice1337() {
?>
'eliterssfeed_widget',
'description' => __( 'Made by an 1337 so the world can easily share an ( RSS FEED )', 'LightWRSSFeed' )
)
);
load_plugin_textdomain( 'LightWRSSFeed', false, basename( dirname( __FILE__ ) ) . '/languages' );
}
/**
* Front-end display of widget.
*
* @see WP_Widget::widget()
*
* @param array $args Widget arguments.
* @param array $instance Saved values from database.
*/
public function widget( $args, $instance ) {
extract( $args );
// 1
$title = apply_filters( 'widget_title', $instance['title'] ); // Default WP Title
// 0
$message = $instance['message']; // Null
// 1
$rssurl = $instance['rssurl']; // RSS Url
// 1
$rsstitle = $instance['rsstitle']; // RSS Title
// 1
$socialbtntwitterhashtag = $instance['socialbtntwitterhashtag']; // Twitter Hashtag
// 1
$twittertext = $instance['twittertext']; // Twitter Text
// 1
$adspace = $instance['adspace']; // Null
// 1
$postcount = $instance['postcount']; // Post Count
// 1
$tcolor = $instance['tcolor']; // Title Color
// 1
$tfsize = $instance['tfsize']; // Title Font Size
// 1
$dcolor = $instance['dcolor']; // Date Color
// 1
$dfsize = $instance['dfsize']; // Date Font Size
// 1
$tff = $instance['tff'];
// 1
$dff = $instance['dff'];
// 1
$frssf = $instance['frssf'];
// 1
$are4 = $instance['are4'];
// 1
$are5 = $instance['are5'];
// 1
$are6 = $instance['are6'];
// 1
$are7 = $instance['are7'];
// 1
$are8 = $instance['are8'];
// 1
$are9 = $instance['are9'];
// 1
$are10 = $instance['are10'];
// 1
$are11 = $instance['are11'];
// 1
$xx00 = $instance['xx00'];
// 1
$xx01 = $instance['xx01'];
// 1
$xx02 = $instance['xx02'];
// 1
$xx03 = $instance['xx03'];
// 1
$xx04 = $instance['xx04'];
// 1
$xx05 = $instance['xx05'];
// 1
$xx06 = $instance['xx06'];
// 1
$xx007 = $instance['xx007'];
// 1
$hidedate = $instance['hidedate']; // Hide Date
// 1
$brad = $instance['brad'];
// 1
$aff = $instance['aff']; // Aff.
// 1
$affl = $instance['affl']; // Aff. Link
// 1
$affh = $instance['affh']; // Aff. Img Height
// 1
$affw = $instance['affw']; // Aff. Img Width
// 1
$pageURL = $instance['pageURL']; // Disqus Setting:
// 1
$pageIDENTIFIER = $instance['pageIDENTIFIER']; // Disqus Setting:
// 1
$embedJS = $instance['embedJS']; // Disqus Setting:
//1
echo $before_widget;
//
// WP TITLE
//
if ( $title ) { echo $before_title . $title . $after_title; }
//
// WidgetWP - Start
//
//
// RSS TITLE
//
echo ''.$rsstitle.' ';
//
//echo ' ';
//89//////////////////////////////////////////////////////////////////////
if($xx00 == null){ echo ' '; }
//
else{ echo ' '; }
//89//////////////////////////////////////////////////////////////////////
echo ' ';
//77//////////////////////////////////////////////////////////////////////
echo' Full RSS Feed ';
//77//////////////////////////////////////////////////////////////////////
//
//22//////////////////////////////////////////////////////////////////////
$rss = new DOMDocument();
$rss->load(''.$rssurl.'');
$feed = array();
foreach ($rss->getElementsByTagName('item') as $node) {
$item = array (
'title' => $node->getElementsByTagName('title')->item(0)->nodeValue,
'desc' => $node->getElementsByTagName('description')->item(0)->nodeValue,
'link' => $node->getElementsByTagName('link')->item(0)->nodeValue,
'date' => $node->getElementsByTagName('pubDate')->item(0)->nodeValue,
);
array_push($feed, $item);
}
$limit = $postcount;
for($x=0;$x<$limit;$x++) {
$title = str_replace(' & ', ' & ', $feed[$x]['title']);
$link = $feed[$x]['link'];
$description = $feed[$x]['desc'];
$date = date('l F d, Y', strtotime($feed[$x]['date']));
echo ' ';
//22//////////////////////////////////////////////////////////////////////
$socialStyle = '
text-decoration: none;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0), 0 1px 2px rgba(0, 0, 0, 0);
border: 1px solid rgba(204, 204, 204, 0);
border-bottom-color: rgba(179, 179, 179, 0);
background-color: rgba(245, 245, 245, 0);
background-image: linear-gradient(to bottom,rgba(255, 255, 255, 0),rgba(230, 230, 230, 0));
';
$btn2nd = 'btn btn-secondary';
if ($are11 == "colored") {
//==//////////////////////////////////////////////////////////////////////
echo '';
//
//==//////////////////////////////////////////////////////////////////////
echo '';
//
//00///////////////////////////////////////////////////////////////////////
if($xx007 == 'YES'){
echo ''.$description.'';
}
elseif($xx007 == 'NO'){
echo '';
}
else{
echo '';
}
//00//////////////////////////////////////////////////////////////////////
echo ' ';
echo ' ';
}
else {
$iconstyle0214 = "
text-decoration: none;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0), 0 1px 2px rgba(0, 0, 0, 0);
border: 1px solid rgba(204, 204, 204, 0);
border-bottom-color: rgba(179, 179, 179, 0);
background-color: rgba(245, 245, 245, 0);
background-image: linear-gradient(to bottom,rgba(255, 255, 255, 0),rgba(230, 230, 230, 0));
";
echo '';
//
echo ''.$title.' ';
//
echo 'Posted on '.$date.' ';
//000//////////////////////////////////////////////////////////////////////
if($xx007 == 'YES'){
echo ''.$description.'';
}
elseif($xx007 == 'NO'){
echo '';
}
else{
echo '';
}
//000//////////////////////////////////////////////////////////////////////
echo ' ';
echo ' ';
}
}
// WidgetWP
echo $after_widget;
echo '
Please enable JavaScript to view the comments powered by Disqus.
';
//
$qrurl = 'https://chart.googleapis.com/chart?cht=qr&chl=http%3A%2F%2F';
//
echo '';
//
echo ' ';
//
echo ' ';
//
switch ($are10) {
case "h1":
echo '<'.$are10.' style="color:'.$are8.';">'.$are9.''.$are10.'>';
break;
case "h2":
echo '<'.$are10.' style="color:'.$are8.';">'.$are9.''.$are10.'>';;
break;
case "h3":
echo '<'.$are10.' style="color:'.$are8.';">'.$are9.''.$are10.'>';
break;
default:
echo ''.$are9.'
';
}
//
echo ' ';
//
}
/**
* Sanitize widget form values as they are saved.
*
* @see WP_Widget::update()
*
* @param array $new_instance Values just sent to be saved.
* @param array $old_instance Previously saved values from database.
*
* @return array Updated safe values to be saved.
*/
public function update( $new_instance, $old_instance ) {
$instance = $old_instance;
// 1
$instance['title'] = strip_tags( $new_instance['title'] );
// 0
$instance['message'] = strip_tags( $new_instance['message'] );
// 1
$instance['rssurl'] = strip_tags( $new_instance['rssurl'] );
// 1
$instance['rsstitle'] = strip_tags( $new_instance['rsstitle'] );
// 1
$instance['socialbtntwitterhashtag'] = strip_tags( $new_instance['socialbtntwitterhashtag'] );
// 1
$instance['twittertext'] = strip_tags( $new_instance['twittertext'] );
// 1
$instance['postcount'] = strip_tags( $new_instance['postcount'] );
// 1
$instance['tcolor'] = strip_tags( $new_instance['tcolor'] );
// 1
$instance['tfsize'] = strip_tags( $new_instance['tfsize'] );
// 1
$instance['dcolor'] = strip_tags( $new_instance['dcolor'] );
// 1
$instance['dfsize'] = strip_tags( $new_instance['dfsize'] );
// 1
$instance['dff'] = strip_tags( $new_instance['dff'] );
// 1
$instance['tff'] = strip_tags( $new_instance['tff'] );
// 1
$instance['frssf'] = strip_tags( $new_instance['frssf'] );
// 1
$instance['are4'] = strip_tags( $new_instance['are4'] );
// 1
$instance['are5'] = strip_tags( $new_instance['are5'] );
// 1
$instance['are6'] = strip_tags( $new_instance['are6'] );
// 0
$instance['are7'] = strip_tags( $new_instance['are7'] );
// 0
$instance['are8'] = strip_tags( $new_instance['are8'] );
// 0
$instance['are9'] = strip_tags( $new_instance['are9'] );
// 0
$instance['are10'] = strip_tags( $new_instance['are10'] );
//
$instance['are11'] = strip_tags( $new_instance['are11'] );
//
$instance['xx00'] = strip_tags( $new_instance['xx00'] );
//
$instance['xx01'] = strip_tags( $new_instance['xx01'] );
//
$instance['xx02'] = strip_tags( $new_instance['xx02'] );
//
$instance['xx03'] = strip_tags( $new_instance['xx03'] );
//
$instance['xx04'] = strip_tags( $new_instance['xx04'] );
//
$instance['xx05'] = strip_tags( $new_instance['xx05'] );
//
$instance['xx06'] = strip_tags( $new_instance['xx06'] );
//
$instance['xx007'] = strip_tags( $new_instance['xx007'] );
//
$instance['hidedate'] = strip_tags( $new_instance['hidedate'] );
//
$instance['brad'] = strip_tags( $new_instance['brad'] );
//
$instance['aff'] = strip_tags( $new_instance['aff'] );
//
$instance['affl'] = strip_tags( $new_instance['affl'] );
//
$instance['affh'] = strip_tags( $new_instance['affh'] );
//
$instance['affw'] = strip_tags( $new_instance['affw'] );
//
$instance['pageIDENTIFIER'] = strip_tags( $new_instance['pageIDENTIFIER'] );
//
$instance['pageURL'] = strip_tags( $new_instance['pageURL'] );
//
$instance['embedJS'] = strip_tags( $new_instance['embedJS'] );
return $instance;
}
/**
* Back-end widget form.
*
* @see WP_Widget::form()
*
* @param array $instance Previously saved values from database.
*/
function wp_enqueue_style( $handle, $src = 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css', $deps = array(), $ver = false, $media = 'all' ) {
_wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );
$wp_styles = wp_styles();
if ( $src ) {
$_handle = explode('?', $handle);
$wp_styles->add( $_handle[0], $src, $deps, $ver, $media );
}
$wp_styles->enqueue( $handle );
}
public function form( $instance ) {
// 1
$title = esc_attr( $instance['title'] );
// 0
$message = esc_attr( $instance['message'] );
// 1
$rssurl = esc_attr( $instance['rssurl'] );
// 1
$rsstitle = esc_attr( $instance['rsstitle'] );
// 1
$socialbtntwitterhashtag = esc_attr( $instance['socialbtntwitterhashtag'] );
// 1
$twittertext = esc_attr( $instance['twittertext'] );
// 1
$postcount = esc_attr( $instance['postcount'] );
// 1
$tcolor = esc_attr( $instance['tcolor'] );
// 1
$tfsize = esc_attr( $instance['tfsize'] );
// 1
$dcolor = esc_attr( $instance['dcolor'] );
// 1
$dfsize = esc_attr( $instance['dfsize'] );
// 1
$dff = esc_attr( $instance['dff'] );
// 1
$tff = esc_attr( $instance['tff'] );
// 1
$frssf = esc_attr( $instance['frssf'] );
// 1
$are4 = esc_attr( $instance['are4'] );
// 1
$are5 = esc_attr( $instance['are5'] );
// 1
$are6 = esc_attr( $instance['are6'] );
// 0
$are7 = esc_attr( $instance['are7'] );
// 0
$are8 = esc_attr( $instance['are8'] );
// 0
$are9 = esc_attr( $instance['are9'] );
//
$are10 = esc_attr( $instance['are10'] );
//
$are11 = esc_attr( $instance['are11'] );
//
$xx00 = esc_attr( $instance['xx00'] );
//
$xx01 = esc_attr( $instance['xx01'] );
//
$xx02 = esc_attr( $instance['xx02'] );
//
$xx03 = esc_attr( $instance['xx03'] );
//
$xx04 = esc_attr( $instance['xx04'] );
//
$xx05 = esc_attr( $instance['xx05'] );
//
$xx06 = esc_attr( $instance['xx06'] );
//
$xx007 = esc_attr( $instance['xx007'] );
//
$hidedate = esc_attr( $instance['hidedate'] );
//
$brad = esc_attr( $instance['brad'] );
//
$aff = esc_attr( $instance['aff'] );
//
$affl = esc_attr( $instance['affl'] );
//
$affw = esc_attr( $instance['affw'] );
//
$affh = esc_attr( $instance['affh'] );
//
$pageIDENTIFIER = esc_attr( $instance['pageIDENTIFIER'] );
//
$pageURL = esc_attr( $instance['pageURL'] );
//
$embedJS = esc_attr( $instance['embedJS'] );
?>
'; ?>
FREE TECH SUPPORTGet Help Today!
Consider a $1 Donation!My Paypal Check Us Out!
WP DEFAULT TITLE
RSS FEED SETTINGS
RSS LOGO SETTINGS
RSS FEED TITLE SETTINGS
RSS FEED DATE SETTINGS
RSS FEED BUTTON SETTINGS
TWITTER SETTINGS
SOCIAL ICONS SETTINGS
Press "Save" to Preview
';
//
echo ''; echo ' '; echo ' ';
//
echo ''; echo ' '; echo ' ';
//
echo ''; echo ' '; echo ' ';
//
echo ''; echo ' '; echo ' ';
//
echo '';
echo ' ';
echo ' ';
echo ' ';
//
//echo ''.$title.' ';
//
//echo 'Posted on '.$date.' ';
//
//echo ' ';
} else {
echo '';
echo ' ';
echo ' ';
echo ' ';
//
//echo ''.$title.' ';
//
//echo 'Posted on '.$date.' ';
//
//echo ' ';
}
?>
EXPERIMENTAL: USE AT OWN RISK!
OTHER SETTINGS
AFFILIATE SETTINGS
DISQUS COMMENT SETTINGS
Find Your Code Here ( We only need the embed.js url for this to work )
Dont forget to sign up for Disqus (FREE)(With ADs)
QR CODE SETTINGS
Press "Save" to Preview
';
//
echo ' ';
//
echo ' ';
//
switch ($are10) {
case "h1":
echo '<'.$are10.' style="color:'.$are8.';">'.$are9.''.$are10.'>';
break;
case "h2":
echo '<'.$are10.' style="color:'.$are8.';">'.$are9.''.$are10.'>';;
break;
case "h3":
echo '<'.$are10.' style="color:'.$are8.';">'.$are9.''.$are10.'>';
break;
default:
echo ''.$are9.'
';
}
//
echo '';
//
?>