326 reputation
14
bio website magentacuda.wordpress.com
location
age
visits member for 1 year, 5 months
seen 20 hours ago

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.


20h
comment Proper way to add a button to the top menu of the media library?
I also have spent a lot of time on this problem. And in my opinion unlike most of WordPress, Media Library does not seem to have the actions and filters that would make it easy to modify. I ended up subclassing WP_Media_List_Table which is not ideal. But, maybe I am just not clever enough. I hope someone knows better as it would solve a major headache for me.
22h
comment Cant update my site!
Your site is on WordPress 3.6 - it is not good to skip over so many intermediate releases. WordPress says never skip more than one release. See 'Upgrading Across Multiple Versions' in codex.wordpress.org/…. So you need to do 3.8 as an itermediate step.
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.
Apr
12
comment How does routing on wordpress work?
I see from one of your previous questions that you are using the Pods plugin. This is a good example of the flexibility of WordPress. Pods does not use the builtin WordPress logic - query for posts and display posts using the loop. It replaces this with its own custom logic. It can do this because WordPress actions allows you to easily modify the default behavior of WordPress. And you can still use the all the capabilities of a very vast ecosystem built around WordPress.
Apr
12
comment How does routing on wordpress work?
@yeahman: I rather disagree with some of your judgements on wordpress - is a bit weird and not very flexible, very ugly approach, not a very portable approach. Although the builtin logic of wordpress would not be suitable for all kinds of website I think it much more flexible, portable and elegant than you can appreciate from working with it for only a little while. If you gain more experience with it I think you will find you can do much more than you seem to think. You really need to understand actions, filters, shortcodes, widgets, ... before you can pass a fair judgement.
Apr
12
comment How does routing on wordpress work?
May I suggests that you read about "the loop" which is the concept that you need to understand to know how WordPress works. Essential "the loop" displays an array of posts which is the result of query_posts. For non-admin URL requests WP is designed to show only posts and it takes custom programming to show something besides a post. Admin URL requests are different and these do not use "the loop" and show non posts things.
Apr
6
comment SQL query to remove first image in all posts
Has this been actually tested? The regex doesn't look right to me - what are you trying to match with "[img]" or "[.]*"?
Apr
6
comment wp_enqueue_scripts called twice?
try - error_log( print_r( debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS ), TRUE ) ); - to see how the calls are invoked
Apr
3
comment Page has a parent and $post->post_parent returns 0
"I have several pages with a parent." - What makes you believe that this is true?
Apr
3
comment Ajaxurl suddenly not defined
If you have the time, I would be interested in knowing if the change I suggested would also work. If you are too busy don't worry about it - I am just curious.
Apr
3
comment Ajaxurl suddenly not defined
403 forbidden was sent by the HTTP server so your PHP code did execute it just generated a bad URL.
Apr
3
comment Ajaxurl suddenly not defined
Try var ajaxurl = '<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>';
Apr
3
comment Get first post from wp_query
Try $connected->posts[0]->post_name - $connected is an WP_Query object which contains a posts array member.
Apr
2
comment How to show a post if was published less than two hours ago?
Why don't you just take the difference of the UNIX timestamps?
Apr
1
comment meta_compare not comparing whole integer
Should not 'meta_value' =>$i_rate, be 'meta_value_num' =>$i_rate,
Apr
1
comment Replace all of post's image URLs with upload directory URLs
content_save_pre is a filter. return result of preg_replace() which does not modify its argument.
Apr
1
comment Change Wordpress Shortcode added in to post
Yes, the [gallery ...] shortcode is actually never changed in the post_content but the gallery shortcode handler is replaced with one that just calls the wp-slideshow shortcode handler instead. I don't think it is a good idea to change the standard gallery shortcode. Also, see next answer for a more efficient way to do this.
Mar
30
comment Change Wordpress Shortcode added in to post
One additional thought: As most plugins are designed to work with the gallery shortcode directly, is there not some option setting for your plugin that you are overlooking that allows your plugin to do this?
Mar
30
awarded  Supporter
Mar
30
comment Change Wordpress Shortcode added in to post
Yes, very good ...