hberberoglu / wp-favorite-posts Goto Github PK
View Code? Open in Web Editor NEWThis WordPress plugin allows visitors to add favorite posts.
Home Page: http://wordpress.org/plugins/wp-favorite-posts
This WordPress plugin allows visitors to add favorite posts.
Home Page: http://wordpress.org/plugins/wp-favorite-posts
The function get_currentuserinfo()
has been deprecated and replaced by wp_get_current_user()
Please update wp-favorite-posts.php:396
Would it be possible to extend the features to include also Pages?
Notice: get_usermeta is deprecated since version 3.0! Use get_user_meta() instead. in /data/vhosts/backpacker.dc-dev.com/httpdocs/wp/wp-includes/functions.php on line 2900
update_usermeta deprecated as well
When using wp-favorite-posts plugin with php v7.1 I am getting a fatal error upon clicking to favorite a post..."Uncaught Error: [] operator not supported for strings". Any ideas?
The plugin has worked perfectly for us for the past year but recently it's stopped working. We use it to favorite video posts on our site and compile a favorites list. The favorites list is now blank. Nothing is being listed although the data is available. When we favorite something and check the list, the "Clear favorites" link no longer displays so it works to some extent, just doesn't output anything. I'm thinking it may be the latest Wordpress update (4.2.2).
your <div class="navigation">
is inside the ul.
can u please fix this?
GET http://www.domain.com/mysys/style/content-di.js
<script type="text/javascript" src="/mysys/style/content-di.js"></script>Fail to load Resource:404 NOT FUND!
http://wordpress.org/support/topic/plugin-wp-favorite-posts-make-it-more-automatic
Add favorite link automaticly below or above post option to admin page...
register_sidebar_widget and register_widget_control functions have been retired.
We love this plugin!
However, in browsers other than Firefox, clicking on the Add to Favorite button makes the button disappear on the ajax refresh - if you refresh the page, the action has happened successfully, but the button disappears on click - see below:
Before click:
Any help you can offer will be greatly appreciated!
Hello! The plugin settings I removed the reload by adding \ removing, but at the first removal occurs reload the page. With further deletions, there is no reboot.
With what it can be connected and how to fix it?
In this file, this sentence is hard coded: "Your favorites will be here". So it can't be translated by extensions.
Misbehaving Shortcode Output
The shortcode [wp-favorite-posts] displays output outside of defined content areas in some circumstances. As an example, when using Beaver Builder the favourites list displays outside of the content loop.
The fix is to use the output buffer.
Replace this code in wp-favorite-posts.php:
function wpfp_shortcode_func() {
wpfp_list_favorite_posts();
}
add_shortcode('wp-favorite-posts', 'wpfp_shortcode_func');
With this code:
function wpfp_shortcode_func() {
// Add next line
ob_start();
wpfp_list_favorite_posts();
// Add next line
return ob_get_clean();
}
add_shortcode('wp-favorite-posts', 'wpfp_shortcode_func');
Thumbnail Feature
Would be nice to display thumbnails next to the list items in the favourite links.
Replace the following code in wpfp-page-template.php:
echo "<ul>";
while ( have_posts() ) : the_post();
echo "<li><a href='".get_permalink()."' title='". get_the_title() ."'>" . get_the_title() . "</a> ";
wpfp_remove_favorite_link(get_the_ID());
echo "</li>";
endwhile;
echo "</ul>";
With this code (this also makes the list item width 90%):
echo "<ul>";
while ( have_posts() ) : the_post();
// Add next if block
if ( has_post_thumbnail() ) {
// $thumbnail = get_the_post_thumbnail( get_the_ID(), array( 100,100), array( 'class' => 'alignleft' ) );
$thumbnail = get_the_post_thumbnail( get_the_ID(), array( 100,100) );
} else {
$thumbnail = '';
}
// Modify next echo statement
echo "<li style='display:block;width:90%;'><a href='".get_permalink()."' title='". get_the_title() ."'>$thumbnail " . get_the_title() . "</a> ";
wpfp_remove_favorite_link(get_the_ID());
echo "</li>";
endwhile;
echo "</ul>";
The thumbnail addition was code change was crafted for a specific need. Would be good to add options in the settings page to set a default image to use where no feature image is set, to set the image dimensions, and to set image alignment.
More
I'm considering to add a method to share the favourites list by email or to social networks. Will update if I make the change.
I have a problem with wpfp_link() function and PHP 8.0:
PHP Fatal error: Uncaught Error: Attempt to modify property "ID" on null in /wp-content/plugins/wp-favorite-posts/wp-favorite-posts.php:152 Stack trace: #0 /wp-content/plugins/wp-favorite-posts/wp-favorite-posts.php(80): wpfp_link() #1 /wp-content/plugins/wp-favorite-posts/wp-favorite-posts.php(57): wpfp_add_favorite() #2 /wp-includes/class-wp-hook.php(303): wp_favorite_posts() #3 /wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters() #4 /wp-includes/plugin.php(470): WP_Hook->do_action() #5 /wp-settings.php(600): do_action() #6 /wp-config.php(96): require_once('/home/...') #7 /wp-load.php(50): require_once('/home/...') #8 /wp-blog-header.php(13): require_once('/home/...') #9 /index.php(17): require('/home/...') #10 {main} thrown in /wp-content/plugins/wp-favorite-posts/wp-favorite-posts.php on line 152
Common feature request by support forum
http://wordpress.org/support/topic/send-an-email-to-author-when-i-add-to-favorites-his-post
Is should be 1.5.9 goal :)
When installed on an nginx site the plugin displays the content of the page
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.