wp-load.php redeclares classes

I am trying to load WordPress options within a standalone PHP file. The file is located in /wp-content/plugins/plugin-name/file.php. I have used the following to open wp-load.php: if (file_exists(‘../../../wp-load.php’)) { require_once (‘../../../wp-load.php’); } Doing so outputs the following error: Fatal error: Cannot redeclare some_plugin_function() (previously declared in /var/www/vhosts/domain.com/httpdocs/wp-content/plugins/plugin-name/class-frontend.php:5) in /var/www/vhosts/domain.com/httpdocs/wp-content/plugins/plugin-name/class-frontend.php on line 12 Removing all code from class-frontend.php does solve the issue, but of course I need that file. class-frontend.php is not called within the standalone PHP file so am unsure why this is happening. Source: https://wordpress.stackexchange.com/feeds

How to change the output of gallery shortcode

I would like to add the media description as a data-attribute to each image of the gallery. All the other answers favour the solution to copy the whole code from media.php to functions.php and change it there. But isn’t there a more intelligent way? It’s way to much code duplication in order to change one single line of code! Source: https://wordpress.stackexchange.com/feeds

Can multiple custom post types share a custom taxonomy?

I’m considering rebuilding a drupal site in wordpress and am still wrapping my head around the differences between the systems – particularly cck/fields and custom content types and the different ways to use taxonomy. I would like to know if two custom content types can share one custom taxonomy. In drupal I can limit the posting of a particular content type to a group of users and then that posting can have taxonomy that is only shared with one or more other content types (but not all types). Leaving the…

Web Design Weekly #82

Headlines Trent Walton The awesome website, The Great Discontent interviews the amazing Texas-based designer, Trent Walton. The interview covers an array of topics and should leave you ready to build amazing things with your friends. (thegreatdiscontent.com) Checkboxes that kill your product In the currently shipping version, Firefox ships with many options that will render the browser unusable to most people, right in the main settings UI. (limi.net) Unsupportable Promises (meyerweb.com) Support this newsletter by becoming a member for the price of a coffee → Articles Animations with Sass and @while…

Disallow google/other email plus and dot tricks when registering?

A user registered with my WordPress blog as « bob.smith+bc@gmail.com » (for example). I’m fine with that. However, if the user comes back with « bob.smith+bc2@gmail.com », I want to stop him for registering again, and maybe politely remind him that he’s already registered with the « same » gmail address. Is there a plugin that does this? Same question for things like « bob.smith@gmail.com » and « b.ob.smith@gmail.com » (using extra dots in the email address, which gmail recognizes as the same address). I realize people can easily get free no-registration-required email addresses, so this won’t stop someone from…

Connect external web app to wordpress

We have a web app that will allow users to edit their videos; and add intros, outros, and watermarks. Once the user already done on their video. We need to provide an option to post or syndicate their video as a draft on their WordPress site. Our plan is to create a WordPress plugin that the user needs to install on their WordPress site. But our problem are the following: How can we authenticate our web app to the user’s WordPress page? Looking int HTTP API most of the options…

Web Design Weekly #81

Headlines Browser Diet A definitive front-end performance guide put together by a group of highly talented individuals from companies like Google, Opera and Twitter. This great resource will no doubt become a ‘go-to’ source for getting your site in shape. (browserdiet.com) Prevue – a free concept sharing app The app is an easy and elegant way for designers to share concepts with their clients. The whole interface is designed to make your work look amazing – add your own logo, upload your designs and start getting feedback! (prevue.it) Hot in…

How to disable WordPress from creating thumbnails?

I’ve been looking around the net for a long time on how to disable WordPress from creating multiple thumbnails. I’ve seen in most tutorials to set all the images to 0 in the media section. I have done that, but going to my uploads folder and it still creates multiple images. I can’t find any solution for this. The reason I want this is to save space on my host account. Source: https://wordpress.stackexchange.com/feeds