k1sul1 / k1kit Goto Github PK
View Code? Open in Web Editor NEWStuff for WordPress. WIP.
License: MIT License
Stuff for WordPress. WIP.
License: MIT License
function content($content = null) {
if (!$content) {
$content = get_the_content();
}
return apply_filters("the_content", $content);
}
https://core.trac.wordpress.org/browser/tags/5.2/src/wp-includes/default-filters.php#L172
There's "few" filters attached to the_content. do_blocks
is the issue, I don't know what in it, and I don't really care, since it's an obfuscated piece of shit. I tried searching for tickets on Trac, but surprise surprise, didn't find any.
The issue might happen when you use \k1\content inside a foreach loop inside a Gutenberg block. PHP runs out of memory, no matter how much you give it.
The problem disappears when I get rid of the apply_filters, and instead add the filter functions manually:
// $content = \do_blocks($content);
$content = \wptexturize($content);
$content = \convert_smilies($content);
$content = \wpautop($content);
$content = \shortcode_unautop($content);
$content = \prepend_attachment($content);
$content = \wp_make_content_images_responsive($content);
return $content;
Until this is fixed (and I doubt that will ever happen), I can't use the_content filter. I do want autop, shortcode_unautop and so on, so I guess I'll just hardcode them for now.
This contains quite a bit of raw SQL, and I wrote most of this stuff in a day, from memory. Prepared statements are used where possible, but that's not always possible.
Case in point: startIndexing
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.