Comments (5)
I'll take a look at the wordpress.org thread and get it included in the plugin. Thanks!
from insert-pages.
Thanks again! This will be included in the next release. Please note that I changed the parameters to the filter:
a97a2a2
from insert-pages.
FYI next version (3.0) includes a change to the insert_pages_wrap_content filter; the second parameter is now a WP_Post object instead of an array of WP_Post objects.
a9893fa
Let me know if this causes any problems for you.
from insert-pages.
I was already thinking whether there is a case where there might be more than one post in that array ;)
Thanks for pointing out! Is there a due date for the next release? I will fix my code appropriately.
Just an idea: keep calling the old filter with an array as parameter and introduce a new filter that will be called with the single WP_Post as parameter. That way people will be able to adapt their code successively and when you at a later point remove the "old" filter the old code doesn't get called anymore but nothing breaks codewise due to the changed parameter.
I think that's the way I would introduce this change ;)
from insert-pages.
Thanks for the tips, I should have thought this through better before implementing :)
I think I'm going to proceed with changing the filter and apologize for breaking backwards compatibility. Version 3.0 with the change should be out some time today.
If we see a need for the plugin returning multiple pages in the future, I think I'd like to introduce a filter that modifies the WP_Query lookup (so you can throw more than just a slug or id into the page parameter).
Future changes won't break existing hooks, so I'll definitely be more careful about backwards compatibility.
from insert-pages.
Related Issues (20)
- How to access plugin via Gutenberg editor HOT 1
- Some Issues... HOT 1
- Many script files appeared HOT 2
- could i insert the post content as post status as draft? HOT 1
- page settings printed at end of WP page HOT 1
- Adding shortcode in function.php hook HOT 4
- WordPress V5.7 JQuery HOT 2
- Insert Pages-Editor-Dialog breaks Frontend-Tinymce HOT 3
- A couple of Problems HOT 2
- Embed page exceeds content width in mobile HOT 1
- Page in theme nav bar not working in 3.7.0 HOT 3
- Wrong page inserted HOT 3
- Some kind of conflict with page editing options HOT 1
- ReferenceError: Can't find variable: QTags HOT 2
- [Improvement] - Be Able to add an insert page on a not published page
- WordPress update 6.3.2 HOT 4
- Insert page with content='all' displays footnotes when there are none HOT 3
- Add option "title + content" to display setting HOT 3
- Automatically update slug HOT 1
- [improvement] - add custom post type templates from plugins, not just theme / theme-compat HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from insert-pages.