[wp-xmlrpc] Loosing text in more tag
Joseph Scott
joseph at randomnetworks.com
Thu May 1 18:11:20 GMT 2008
On May 1, 2008, at 11:25 AM, Vladimir Yushko wrote:
>> I haven't seen that style of <!--more--> used, can you point to code
>> or docs where that's out lined?
>
> You can see about tag here:
> http://codex.wordpress.org/Customizing_the_Read_More
Ahh, I'd read that page, but missed the section on "Having a custom
text for each post".
>> For getting posts (metaWeblog.getPost) the XML-RPC code doesn't do
>> any parsing of the post content, it populates the returning struct
>> via the existing WordPress function calls.
>
> I known. Perhaps need to look on difference between
> wp_get_single_post and
> get_post functions. If I am using tag more then xml-rpc method returns
> content divided by two parts without tag.
After looking at this a bit more, I don't think there's anything in
the current APIs to address this issue. The actual tag isn't
provided in any of the fields (by design) and it's parsed out when
creating a new post or editing one via XML-RPC. That's what the
mt_text_more field is for.
The case where I see this being issue would be:
1 - User creates new post in wp-admin which includes <!--more My
Custom String Here -->
2 - User fetches the post via XML-RPC
3 - XML-RPC in WordPress has no knowledge of the 'My Custom String
Here' part, so that essentially is lost
This isn't an issue for posts created via XML-RPC because there's no
way to set the 'My Custom String Here' part in the first place.
Solution wise it seems that a new field (more_text?) would be
needed. This field would include the 'My Custom String Here' text
via metaWeblog.getPost and would be used in the <!--more--> tag when
set via metaWeblog.newPost/editPost. This puts some extra work on
the blog client as well, to join and parse things out correctly.
Does that seem like a reasonable option? I'd like to hear feedback
from some of the other blog clients out there on this as well.
Also, the custom read more feature doesn't appear to work in -trunk
right now. Need to figure out what's going on there before we worry
about making it work via XML-RPC :-)
--
Joseph Scott
joseph at randomnetworks.com
http://joseph.randomnetworks.com/
More information about the wp-xmlrpc
mailing list