timjh
Forum Replies Created
-
Forum: Plugins
In reply to: [OS DataHub Maps] markerfile.txt download issueIs your markers string syntax correct? Please show!
Forum: Plugins
In reply to: [OS DataHub Maps] markerfile.txt download issuePerhaps switch to using “markers” instead of “markerfile”? Although the plugin documentation clearly says that, in the markers attribute, “Labels, if present, must be simple text.”, I have had success including
<a>tags that use single quotes instead of double quotes for the link’s attributes.In your example,
markers="TL81063051;<a href='http://trailmanco.wwwnl1-lr5.supercp.com/england/east/essex-extras/hadleigh/' rel='nofollow ugc'>Hadleigh</a>"WordPress parses a shortcode incorrectly if an attribute includes double-quotes, whether or not you try to escape them. But single quotes seem to get through OK.
Forum: Plugins
In reply to: [OS DataHub Maps] Undefined variable: default_optionsThanks! I’m also getting the following message, which I think stems from a call to wp_add_inline_script at line 351 in osmap-script.php
wp_add_inline_script was called incorrectly. Do not pass
<script>tags towp_add_inline_script(). Please see Debugging in WordPress for more information. (This message was added in version 4.5.0.) in /var/www/sib2/wp-includes/functions.php on line 5229- This reply was modified 5 years, 7 months ago by timjh.
Sorry, guys, please ignore – no error here. The status and lists fields are there, but suppressed by a CSS “display:none” that was supposed to be targeting the name fields that I didn’t want to use. I’m guessing that something has changed in the HTML generated by the shortcode. Easily fixed.
Forum: Plugins
In reply to: [Automatic Alternative Text] I think I am doing something wrong.I have shared your frustration, but got there in the end. I hope this helps:
– You can use either of the two keys.
– You may be getting the endpoint wrong. It should look something like “https://uksouth.api.cognitive.microsoft.com/vision/v1.0”. Read the final comments of this thread (ignore the bit about editing the plugin – it’s not necessary): https://wordpress.org/support/topic/endpoint-for-uksouth/
- This reply was modified 7 years, 2 months ago by timjh.
Forum: Plugins
In reply to: [Automatic Alternative Text] Endpoint for uksouth@jakept Thanks for your explanation and for sorting this out. I was waiting for the update before replying, but I’ve seen no sign of it yet. However, I’ve updated my endpoint setting as you suggested and reverted to the original plugin. I can confirm that it all works as expected.
Forum: Plugins
In reply to: [Automatic Alternative Text] Endpoint for uksouthOliver,
The “trigger” is simply the uploading of a new image to the Media Library. There’s no way (as the plugin stands at the moment) to generate the alt text for an image already in the library.
BTW, just to be sure that you have got the Request URL exactly right, the trick that got me to the right answer was to use the “API Testing console” that is linked from the Microsoft page that you referenced. There you can see exactly what is sent to the API and what comes back. All I did then was to hack the plugin code to match it.
Good luck!
TimForum: Plugins
In reply to: [Nested Pages] Hiding pages in the menuThanks for your quick reply, which explains everything perfectly.
The plugin is absolutely brilliant, by the way. I had tried to code something similar myself, so I appreciate the difficulty of what you have achieved. But perhaps you could consider a small amendment to the instructions to refer to the “Menu Options” button, for the benefit of unadventurous idiots like me who don’t click every button in sight?
Forum: Plugins
In reply to: [Permalinks Customizer] Deletes first character of permalink on initial saveSorry – I switched to using Permalink Manager Lite for other reasons, so am not in a position to test Permalink Customizer now.
Forum: Plugins
In reply to: [Permalinks Customizer] Deletes first character of permalink on initial saveAfter a little more experimentation, I find that using %postname%/” gives rise to a different error. Instead of dropping the first character, I get a “/” added at the end of the permalink, which disappears if I clear the permalink and Update again. It’s still an error, but not quite so annoying, since browsing to a URL with or without a trailing slash works whether or not the permalink has one.
Forum: Plugins
In reply to: [Permalinks Customizer] Deletes first character of permalink on initial saveI had exactly the same problem, but it went away when I used “%postname%/” instead of “%postname%” for Pages in the Customizer’s Permalink Settings. That final “/” appears to be crucial!
Thanks for the quick fix. Not a huge issue, I know, but it had me scratching at my few remaining hairs for a while!
Forum: Plugins
In reply to: Get post tags in a widget on a single post pageI had the same problem just now. The following worked for me:
wp_get_object_terms($post->ID, 'post_tag', 'fields=names')
returns a string array of the tag names associated with the post object $post.If you want the tag slugs, it’s not so simple. I did this:
$tags = wp_get_object_terms($post->ID, 'post_tag', 'fields=all'); foreach ($tags as $tag) { $slugs[] = $tag->slug; }to make $slugs a string array of the slugs.