Comments (1)
The current logic uses get_permalink( $id ) to determine the permalink.
- When passed a post ID, get_permalink calls get_post() to access the post.
- It then checks the post_type to determine how to create the permalink - returning the correct format for "page", "attachment" and any registered post type that's not
_builtin
Everything else is treated as a "post" using the permalink_structure
option.
get_permalink() invokes the 'pre_post_link' filter first ( incorrectly documented as 'Only applies to posts with post_type of 'post' ). This filter hook is not normally implemented, so the permalink structure to be used is unchanged.
And just at the end of the function it invokes the "post_link" filter, also not normally implemented.
Conclusion
We could consider implementing the "post_link" filter to null out the result when the post type is not registered. But I don't think it's necessary.
I might raise a WordPress TRAC on the docblock for 'pre_post_link' though.
from oik.
Related Issues (20)
- oik/address block - wrong description in block.json HOT 1
- Add support for lazy loading images `loading="lazy"` HOT 2
- Change bw_follow_me to support `font=svg` to replace `font=dashicons` or `font=genericons` HOT 7
- Google Maps block doesn't work in blocks.wp-a2z.org HOT 4
- bw_table excerpt field processing doesn't render blocks HOT 1
- Unexpected JavaScript shown in snippet for the [bw_power] shortcode
- [bw_wpadmin] not wrapped in any div/span tag so gets flowed inline
- wp-pompey.org.uk - Fatal error: Uncaught Error: Class 'OIK_SVG_icons' not found HOT 2
- oik/shortcodes block - SelectControl is enormous HOT 3
- Shortcodes not expanded in `term_description` HOT 5
- Default `show_in_nav_menus` to false if not set HOT 1
- Warning on oik options > plugins Add new HOT 1
- bw_get_posts() - Add support for post_name attr HOT 2
- [bw_pages] - dynamic blocks not being rendered HOT 1
- Update to the latest @wordpress/scripts package and rework as required HOT 5
- Warning: Invalid DOM property `fill-rule`. Did you mean `fillRule` ? HOT 2
- Contact form: add additional fields such as telephone HOT 25
- Blocks not registered in oik downloaded from WordPress.org HOT 1
- Memory exhausted while running PHPUnit tests for oik on s.b/wordpress HOT 1
- Consider making [bw_accordion] front end more accessible 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 oik.