326 reputation
15
bio website magentacuda.wordpress.com
location
age
visits member for 1 year, 10 months
seen Aug 16 at 8:02

I am a retired Microsoft Excel VBA spreadsheet developer. As a pastime, I have been studying WordPress, PHP and MySQL. As exercises I have been writing WordPress plugins. My current project is a plugin for dynamically generated image galleries based on the “nggtags” shortcode of the original NextGEN Gallery.

I am a retired Microsoft Excel VBA spreadsheet developer. So, I am pretty much from the old school – pre Internet – of computer programming. I still think Microsoft Excel is one the best software development system ever made. However, I wanted to try something new. So, I was looking for an Internet technology to play around with. Since, WordPress is by far the dominant technology used on the server and is free it seem like the logical choice.


Sep
24
awarded  Autobiographer
Aug
16
comment Can a Child Category Have More than One Parent?
You are right and I am totally wrong. But, now I really don't understand why there must be a term_id and a term_taxonomy id. Anyway, I am truly sorry for causing you this trouble.
Aug
16
comment Can a Child Category Have More than One Parent?
May I see your actual insert statement?
Aug
15
comment Can a Child Category Have More than One Parent?
Of course term_taxonomy_ids are unique but two different term_taxonomy_ids may share the same term_id. Try changing your first 13 in your insert to a non-existent term_taxonomy_id leaving the second 13 the same and also change the parent to another existing parent.
Aug
15
comment Can a Child Category Have More than One Parent?
In other words, there is a reason why there is a term_id and term_taxonomy_id. Note that the wp_posts table only has an ID column so it really is structured differently.
Aug
15
comment Can a Child Category Have More than One Parent?
In a heirarchical taxonomy the same term can occur in multiple places. Consider the hierarchy on cars with first level - GM, Ford, Chrysler. At the second level they could each have the sub-category sedan, truck I.e., GM->sedan and Ford->sedan where "sedan" would be the same term but not the same taxonomy term. If you look at the structure of the WordPress databases there is a wp_terms and a wp_term_taxonomy table to allow for sharing of terms. Posts are structured different. It uses a single table with a post_parent field. Also, the sharing is in the same taxonomy.
Aug
15
comment Can a Child Category Have More than One Parent?
There is a subtlety that one needs to be careful about here. You must specify the child by taxonomy id because the same term may occur in multiple places in a hierarchical taxonomy. In other words, a term considered as a string can have multiple parents but that term actually is not one taxonomy item but corresponds to multiple taxonomy items with the same string value.
Aug
15
comment How do I delete all UNUSED images from my uploads directory?
If I may put my two cents in, for some kinds websites I think the problem can be solved empirically. For these sites webcrawlers are visiting every page on the site. From your server log get the list of urls of all visited pages. Parse these pages using DOMDocument and get all <img> elements and their srcs. The problem with this approach is if Javascript dynamically generates hrefs and srcs.
Aug
14
comment Executing Javascript in Plugin
The shortcode function should only return a string and not directly output anything. Your <script> elements are being directly outputted and would be emitted before the_content() output since the_content() buffers its output as it does filter processing (including shortcode processing) This is probably not the cause of your problem but it is not how WordPress intended for shortcodes to produce their output.
Aug
14
comment Custom MySQL Query for Post and Post Meta
Why do you want to use a custom MySQL query when the WordPress function get_post_custom($post_id) would do all the work for you once you have the $post_id. I am assuming your post_meta_data.* refers to data in the WordPress table and not a custom table of yours.
Aug
3
comment Remove Captions from Custom Gallery function.php
Also, could some other plugin be doing an additional add_shortcode( 'gallery', ... ) after yours and overriding yours. I really don't understand why setting captiontag = "" doesn't work unless I am reading the wrong source code. By the way what is your WordPress version number. I am looking at 3.9 source code.
Aug
3
comment Remove Captions from Custom Gallery function.php
Are there any "shortcode_atts_gallery" filters installed that could override your $attr argument to gallery_shortcode()? And why "in question marks" - that seems strange.
Aug
3
comment Remove Captions from Custom Gallery function.php
Why can't you just set captiontag=""?
Aug
3
comment The plugin generated XXX characters of unexpected output…help?
There must be more to this plugin. Where is the plugin header? Where is single-product.php? This error is usually caused by outputting very early in the WordPress processing before WordPress has sent the HTTP headers. The code given does not seem to output anything so I think the error is somewhere else.
Aug
3
comment The plugin generated XXX characters of unexpected output…help?
Forgive me if this is a stupid question but do you have a <?php at the very start.
Aug
3
revised Wp_editor bug with foreach()?
added 53 characters in body
Aug
3
answered Wp_editor bug with foreach()?
Aug
2
comment Wp_editor bug with foreach()?
I may partially understand what is happening - the wp_editor sets its height in two different ways 1) using the value of 'textarea_rows' or 2) using a value from the cookie 'TinyMCE_content_size' which apparently the wp_editor is storing on the client browser. Can you use 'inspect element' and tell me if the textarea element has style.height set in 'px' units. That would come from the cookie. I still don't understand why these two values are not in sync. The cookie has precedence.
Aug
2
comment Wp_editor bug with foreach()?
Is the number of textarea_rows equal to the default 20 for everything but the first editor? Can you refer me to your previous research. I just looked at the source of wp_editor() and it seems that your code should have worked as intended.
Apr
12
comment How does routing on wordpress work?
If your website requires custom programming on most of its pages then probably WordPress is not the right choice. I myself personally like the approach taken by concrete5 but find WordPress more viable because of its vast ecosystem - it probably has the largest collection plugins by far (of course some of those are just plain junk). Certainly, "the loop" logic shows its blogging origins but WordPress has evolved to be much more capable but it isn't a generic framework. If your requirements does not match "the loop" logic you are probably better off with something else.