Modifiedcontent
Forum Replies Created
-
Forum: Hacks
In reply to: Get latest posts from all sites across multisite networkI still haven’t had time to test anything. I am using this thread as a reminders/to do list.
The WordPress 4.6 upgrade has some stuff that might be useful, especially WP_Network_Query:
Multisite, now faster than ever
Cached and comprehensive site queries improve your network admin experience. The addition of WP_Site_Query and WP_Network_Query help craft advanced queries with less effort.
Forum: Hacks
In reply to: Get latest posts from all sites across multisite networkThanks LewisCowles! I am still trying to find time to try these very helpful code snippets. Will report back soon.
bcworkz had earlier mentioned ‘note that wp_get_sites() is being deprecated for get_sites()’, so I guess it should be:
... foreach ( get_sites() as $site ) : ...
How could you cache or store the result of this looping through all sites? With an expiration time? And then have the code check that stored result first before doing this looping?
Would that approach make sense or would I waste my time trying to figure that out?
Edit: Btw, what would the result of your code snippet above be? I guess it depends on how I define the output in ‘// do things per-site here’, but could I put the result into one variable thingy at the end? One storable/cachable “object”?
Forum: Plugins
In reply to: [DW Question & Answer] How to change the author link formatGreat. Thanks!
Forum: Hacks
In reply to: Get latest posts from all sites across multisite networkThanks for your response + insights bcworkz!
WDS Multisite Aggregate creates ‘a new site where all the most recent posts/pages/etc on a WordPress network may be collected’.
I don’t want a new site! I just need an efficient, best practice way to collect posts from all sites in the network.
The way WDS Multisite Aggregate does it is probably not that different from the messy function I currently use: ‘For performance reasons the number of posts is limited to a user configurable amount …’
Because each site’s posts has their own table, I don’t think there will ever be a simple way to do this …
But there should be a most efficient, WP approved way, probably in combination with caching and/or one added database table? I am not good enough at database queries to figure this out.
Why can’t you have one databse table where basic required data – post link, id, … – is collected every time a post is created on the network? Isn’t there something like that? Is that an index?
Leaving this to plugin writers we keep getting the same crappy code repackaged with “a new site to collect all your posts” and lots of irrelevant bells and whistles.
Forum: Hacks
In reply to: Get latest posts from all sites across multisite networkAny new developments on this?
Getting back to this now. Will try to test the code suggestions from earlier in this thread if I can find the time.
Forum: Plugins
In reply to: [DW Question & Answer] How to change the author link formatI see the mywebsite.com/questions/?user=username comes from User.php. To get the author_link format I want, I have to change this in function dwqa_get_author_link:
if ( $question_link ) { return add_query_arg( array( 'user' => urlencode( $user->user_login ) ), $question_link ); } else { return get_the_author_link( $user_id ); }
…to this:
if ( $question_link ) { return network_home_url() . $user->user_login; } else { return get_the_author_link( $user_id ); }
Can I do that with a filter?
Forum: Plugins
In reply to: [WordPress Infinite Scroll - Ajax Load More] Not loading on certain browsers?Thanks, that makes sense.
So you can’t use Ajax Security + caching? Or can I check Ajax Security again after clearing the cache?
Is there a way to make them play nice together?
I use Gator Cache and also CloudFlare on one site. Or do you mean browser caching?
Forum: Plugins
In reply to: [WordPress Infinite Scroll - Ajax Load More] Not loading on certain browsers?Thank you for your response. I have Ajax Security checked.
Forum: Themes and Templates
In reply to: [Emphaino] Infinite scroll?There is a whole explanation here:
https://www.billerickson.net/infinite-scroll-in-wordpress/
But it is unclear to me if that solution would work in any theme or how it connect with “the loop” in a custom theme.
Forum: Fixing WordPress
In reply to: Hack attempts – vulnerability/bug report?Can anyone explain technically how this is done? If it is not a post or a page, how does it become a link?
Is something like this definitely coming from the database? I haven’t been able to find it there yet.
I have already done all those WordPress hardening suggestions.
Forum: Fixing WordPress
In reply to: Hack attempts – vulnerability/bug report?According to the Wordfence scan one of my hacked sites is clean, but in the live traffic there appear “pages” (?) like this:
And then the link redirects to some usenet download page, where you can probably download more fun viruses etc.
I don’t see these “pages” under Pages or Posts and haven’t been able to find these links in the database either.
How are these things created? What vulnrability are they exploiting? How can I stop this?
I know, remove and reinstall everything, etc. I just want to understand what is going on.
Forum: Fixing WordPress
In reply to: Hack attempts – vulnerability/bug report?> To answer your question regarding dealing with added and modified files …
I understand that. What I don’t understand is how they can change/add files on the server when they are still failing to log in – I am still seeing failed login attempts in Sucuri, blocking the IP addresses via .htaccess.
What can and can’t they do? If they can add/modify files, does that necessarily mean they have access to the database?
After removing a few more files, Wordfence now says my sites are clean. I haven’t seen signs that they have reached the database – any way to check that for sure?
Thanks again!
Forum: Fixing WordPress
In reply to: Hack attempts – vulnerability/bug report?Thank you for the feedback @jeeni! I’ve added Wordfence – looks solid/helpful.
The damage seems limited. They are still trying to get in via login, although some files were modified/added. How does that work?
Some of the modified files were related to widgets. I never use widgets; any way to disable/shut down those?
Didn’t see anything targeting xmlrpc.php
Forum: Fixing WordPress
In reply to: Hack attempts – vulnerability/bug report?I sort of get that and I am doing all that stuff – maybe not with the panicky standard WP approach to any issue; reinstall everything with your wonderfull default theme etc.
I am going by the information Sucuri provides and what I can see myself on the server, but want to make sure I am not missing anything.
What are they targeting? Which weakness are they trying to exploit? What are they trying to achieve? Where should I expect damage?
Have other people seen this same pest? What are their experiences?
Forum: Hacks
In reply to: Get latest posts from all sites across multisite networkIs there now a more straightforward way to do this with the new WP_Site class in WordPress 4.5?