Johan Steen
Forum Replies Created
-
Guys,
I’ve just checked in version 1.8.6 of the plugin which fixes the post snippets button in the HTML editor for WordPress 3.3. The update should be available in a few minutes.
Cheers,
JohanConfirmed. And thanks for the report.
I’ll update the plugin to make it compatible with the HTML editor in WP3.3.I tested the snippet you posted and everything worked fine. So to be able to give you an idea of what the problem might be, I’d need to know a bit more about your environment, like WordPress version and other things that might be relevant.
Cheers,
JohanA quick fix is to remove/comment out this line of code from the plugin:
$paypal_btn .= '<img alt="" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1" />';which should be line 183 on the current version (v1.4.9.6). Perhaps I should add a filter for the entire generated HTML for the donation button so one can make changes like this that survives plugin updates.
That should be the correct way to do what you want.
Cheers,
JohanForum: Plugins
In reply to: [Post Snippets - Custom WordPress Code Snippets Customizer] PHP in snippet?@yasaf
Unfortunately not. I squeeze in time working on these plugins between jobs, so I wouldn’t dare making an estimate, as it all depends on how my regular job schedule evolves.The insert snippet window is on the roadmap to be both consolidated between visual and html view as well as updated by the time Post Snippets reach v2. No time schedule for that though.
Cheers,
JohanYes, to execute a shortcode contained in that meta field, update the code above to look like this
<?php if (get_post_meta($post->ID, 'details', true) != "") { ?> <div class="block101"><?php echo do_shortcode( get_post_meta($post->ID, 'details', true) ); ?></div> <?php } ?>do_shortcode() is a native WP function, that you can use to execute shortcodes in text blocks if it doesn’t do it by itself. Handy function to use now and then. π
Hi again,
I suppose it’s the More Field plugin you are referring to. I haven’t tried that plugin, but as far as I understand, it creates meta fields that you then output in your template by echoing out the meta?
In that case, just wrap the meta data in a do_shortcode while echoing.
it would be something like:
echo do_shortcode( $meta );
(replace $meta with how you retrieve the more fields data.) And the shortcodes you have added to the more fields should then be executed.Cheers,
JohanHi,
I’m not sure what you refer to with more fiels, could you please be a but more specific of what you are looking for?
Cheers,
JohanWhen the donator arrives at PayPal’s page where they enter the amount, the plugin can’t access and update that amount after they have submitted.
Cheers,
JohanHey,
I just wanted to let you know that I’ve now updated the plugin to v1.8.2 which can handle enclosed shortcodes. When having text enclosed between the shortcode tags, that text is now available by using {content} in your snippet. The {content] variable is automatically assigned so don’t set it in your variables field.
Cheers,
JohanHi,
Ah, I see you want to use an enclosing shortcode. At the moment the plugin only supports creating self-closing shortcodes. ie it supports [shortcode attri=””] but not [shortcode attri=””]content[/shortcode].
Supporting enclosing shortcodes would probably be useful though, so thanks for bringing it up. I’ll see if I can include it for the next update.
Cheers,
JohanForum: Plugins
In reply to: [Donations via PayPal] [Plugin: PayPal Donations] center the button@kmexpert:
No, it shouldn’t matter, but to be on the safe side, add it last in your CSS file.Cheers,
JohanScratch the above. I actually managed to replicate your problem on my win machine now. Nothing to do with the os/browser.
I messed around with the js code you had posted above, and I noticed that on some places the escaping of quotes are \\” instead of \”.And as soon as I entered a \” directly into a snippet it confuses the JS engine as it then believes the string has ended prematurely. In your snippet, are the snippets written with escaping, ie. \”, or has this happened on the way?