You could use a custom field for a post which is saved via XMLRPC by using the action hook xmlrpc_publish_post
. wpse_from_xmlrpc()
could than check this custom field.
<?php
add_action( 'xmlrpc_publish_post', 'add_xmlrpc_postmeta' );
function add_xmlrpc_postmeta( $post_id ){
update_post_meta( $post_id, 'send-by-xmlrpc', 1 );
}
function wpse_from_xmlrpc( $post_id ){
$xmlrpc = get_post_meta( $post_id, 'send-by-xmlrpc', true );
if( $xmlrpc == 1 )
return true;
return false;
}
?>
More information on this hook can be found in wp-includes/post.php
Related Posts:
- Does blocking xmlrpc.php affect pinging update services like pingomatic
- Manage multiple wordpress installs (Best Practice)
- Visual Studio SignTool.exe Not Found
- How can I set a draft page as parent without publishing?
- Display a post’s publish date from 2112
- WordPress plugin to publish to multiple remote WordPress blogs
- I can’t preview post’s change once they are published
- Publish post when edit post form submitted with enter/return pressed on keyboard
- How to make scheduled post preview visible to anyone?
- Scheduled Posts and wp-cron – Why don’t scheduled posts publish if too old?
- Why does publish_{custom-post-type} fire on update?
- Show recent published posts
- How to unpublish a page and still keep a draft?
- get_terms on save_post hook
- Save and Publish button not working after installing SSL
- Disable “preview changes” button
- Posting via HTTP requests?
- Can we have private drafts?
- Update post meta on bulk edit / update
- Can’t schedule post for another time
- modify post meta data remotely without xmlrpc
- publish_post called too early
- Custom save button shows ‘Are you sure you want to…’ dialog
- Get publish post link?
- Call specific plugin update
- Controlled publishing in WordPress
- Change the text of the publish button to Save
- problem with publish date not always appearing [duplicate]
- What is happening to make my Update/Publish button disabled?
- What is the reason for the new_to_publish hook not working?
- After I publish a post where does it go
- Should you manually ping new WordPress posts?
- Authors should not publish
- How to add custom status to quick edit
- I need to modify drafts using custom data from database and then publish it
- How to show or hide a post based on meta_value selection?
- i am making text changes on my page show in preview not on live site, why? [closed]
- Is WordPress “publish” atomic?
- How to move post process to background
- How does redirect work when publish date changes and date in url changes?
- Gutenberg publish date datepicker
- How Google Indexer should only index published pages
- Publish and go to page [duplicate]
- Publish Post Action Not Working
- Is it normal for a scheduled post to say “Missed Schedule”
- Showing the next post’s title, even if it’s an unpublished post
- Force Publish Future (Scheduled) Posts Immediately [duplicate]
- Can’t publish posts, Jetpack won’t connect, empty notification emails to my inbox [closed]
- Duplicate post on publish
- How is it possible to use a very reduced version of WordPress?
- Problems in updating a self-developed plugin
- When i save or publish a post setting reset wp
- Fatal Error: Allowed Memory Size of 134217728 Bytes Exhausted (CodeIgniter + XML-RPC)
- Best way to eliminate xmlrpc.php?
- SSO / authentication integration with external ‘directory service’
- How can I delay the publishing of a page or post?
- WordPress as XML-RPC client?
- How to HIDE everything in PUBLISH metabox except Move to Trash & PUBLISH button
- add action only on post publish – not update
- How to prevent posts from being published too close to each other?
- Hide permalink and preview button and link on custom post
- How can I make it so the Add New Post page has Visibility set to Private by default?
- How to validate XML-RPC post creation and cancel when needed?
- Is there a way to get protected meta fields through any of the available built-in WordPress APIs? (xmlrpc, wp-json)
- Is it possible to Schedule Attachments in WordPress?
- InDesign to WordPress workflow
- Elegant way to include only published posts with get_objects_in_term()?
- How to call a REST endpoint when a post is published?
- Prevent publishing the post before setting a featured image?
- How to enable wpautop for XMLRPC content
- How can I make post fields required in WordPress?
- xmlrpc_enabled filter not called
- Set default custom post type for XML-RPC
- custom XMLRPC method plus authentication of user & WooCommerce order
- Extending xml rpc – best practice
- How do I know if my site is using the xmlrpc.php file?
- Post publish only hook?
- Publish pending article from front end with a button?
- How to add a “publish” link to the quick actions
- X-Pingback and XMLRPC
- How can I add a jQuery OnClick event to the Publish posts button?
- How to let authors revise other authors drafts, but keep them from publishing?
- Customize users’ capabilities to change a custom post’s post status
- How to limit user to publish post per day and per role?
- PHP XMLRPC for WordPress: Adding meta tags and description
- XML-RPC: Add category to post data
- Store source permalink on XMLRPC calls
- wp.getUsersBlogs XMLRPC Brute Force Attack/Vulnerability
- Most efficient way to insert a post outside WordPress?
- How to access the post meta of a post that has just been published?
- How to programmatically create a connection with [Plugin: Posts 2 Posts] on cpt publish?
- How to show an error message after publishing a post?
- How Enable XML-RPC in WP 4.8.2
- Disable links in header (feeds and such)
- XMLRPC and Underscored custom fields
- When a user creates a post (pending), send a confirmation link that allows them to publish
- Editing Screen: Make Update or Publish Button Follow The Page
- How to change post status in hook?
- In what sequence are the hooks fired when a post is “published”?
- Is it possible to work on localhost but have the upload folder linked remotly for dev?