Comments (4)
So I just added the code below for a temp fix to wphelphub.com.com
if ( 'post-new.php' === $pagenow ) {
return;
}
// Store post content for raw usage
$post_content = $post->post_content;
if ( empty( $post_content ) ) :
return;
endif;
There is a wrong commit to your branch but I had that reverted.
If the code looks good (works fine in wphelphub.com) feel free to use it
from helphub.
Since we are having Display Settings
meta box only on posts, I suggest we can use save_post_post
action hook instead of save_post
as it runs on import, post/page edit form, xmlrpc, or post by email.
Also instead of /in addition to checking it with $pagenow
we can leverage third parameter of save_post
action hook $update
which is true if it is an existing post being updated or new.
And then the final check for empty content empty( $post_content )
from helphub.
@Kenshino I am adding you code to my branch. Perhaps, we look into the save_post_post
after we merge the actual issue. Lets make sure we keep it in mind.
from helphub.
Fixed with #38
from helphub.
Related Issues (20)
- Table listing on WordPress Version page
- Outdated HTTP API link HOT 2
- Incorrect apostrophe in Developer docs on Custom Meta Box under Adding Meta Boxes HOT 2
- Incorrect Heartbeat interval duration range HOT 2
- Plugin handbook shortcode example code is incorrect HOT 1
- Plugin Handbook custom meta boxes incorrect AJAX server side code HOT 1
- Wrong robots.txt in Settings Reading Screen since Version 5.3 HOT 2
- Move version.txt to HelpHub
- LAMP-based wordpress blog failed to install ssl, somebody help!!! HOT 1
- Adding troubleshooting & tips information of sending mail
- Obsolete information in Appearance Menus Screen post HOT 2
- Discussion settings blocklist and moderation list don't mention user agent string HOT 1
- Jump links contain superflous unicode characters HOT 7
- Improve request to Giving WordPress Its Own Directory HOT 3
- Redirect Codex page "WP_DEBUG" to HelpHub HOT 2
- Using Caddy to Give WordPress Its Own Directory HOT 1
- New Page: How to move WordPress site from HTTP to HTTPS HOT 2
- Move page:
- Typo in "Displaying Custom Header" HOT 2
- 404 broken links in Related section of Audio & Video Shortcodes posts 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 helphub.