stefthoen / twitterfeed Goto Github PK
View Code? Open in Web Editor NEWWordPress Twitter feed plugin for developers
WordPress Twitter feed plugin for developers
All classes are now in one big Twitterfeed
namespace. Would be nice to use folder structure and PSR-4 to set sub namespaces.
Or include the /vendor
dir in the repo.
get_formatted_time_since_creation ofzo.
Hey, getting to that code review as you asked. :)
bbtf()
function seems is out of place. The name is not descriptive and it just passes call through.$twitter_error
seems to miss $this->
here and there.build_tweets_list()
is bulky. if/else should typically be early returns instead and count of nesting should be minimal.Need to find away around this, because it can happen when a low-volume Twitter feed returns less tweets than requested. Either cache the tweets in de WP database, or find out if there's a way for the Twitter API to return tweets older than a week. Probably should use WP transients.
Perhaps remove the Twitter_Error class and use the WP_Error class directly.
And use getters and setters.
When I try to activate v0.4, I get this error:
Warning: require_once(vendor/autoload.php): failed to open stream: No such file or directory in <PATH>/web/app/plugins/bb-twitterfeed/bb-twitterfeed.php on line 30
Fatal error: require_once(): Failed opening required 'vendor/autoload.php' (include_path='.:') in <PATH>/web/app/plugins/bb-twitterfeed/bb-twitterfeed.php on line 30
Off course the fix should be performing composer dump-autoload
, but ... (see next comment)
Right now we output the errors directly to screen. Need to save to log or something: http://code.tutsplus.com/tutorials/wordpress-error-handling-with-wp_error-class-i--cms-21120
Use WordPress transients to save tweets temporarily to the database so we don't have to use the Twitter API that frequently.
Mustache_Engine
) door ze als parameter mee te geven aan constructors of methods (dependency injection)Use the README.
Right now I only have the render()
method on the Template_Engine
Interface. It's bad practice to add a constructor to the interface in which I can use the view paths as a parameter, so what else can I try?
In an earlier version I used ACF for my API settings. The upgrade to v0.4 / v0.5 makes it a lot less visually attractive. It's a minor detail off course, but it could be as simple as using a similar HTML structure or some default WP classes, I guess?
Example of my own ACF implementation:
https://www.dropbox.com/s/o4kyq1bipdmk6mq/Schermafdruk%202017-01-12%2013.35.49.png?dl=0
Example of the current BB-Twitterfeed solution:
https://www.dropbox.com/s/kogfnl5hs8c2yn5/Schermafdruk%202017-01-12%2013.39.50.png?dl=0
Maybe better to get the correct profile image url in the constructor.
http://code.tutsplus.com/series/creating-custom-wordpress-administration-pages--cms-1062
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.