Multiple plugins using the same OAuth class issues

Your code probably looks like this: class OAuthSignatureMethod_HMAC_SHA1 { … } It should look like this: if( ! class_exists( ‘OAuthSignatureMethod_HMAC_SHA1’ ) ) : class OAuthSignatureMethod_HMAC_SHA1 { … } endif; This is more a PHP issue than a WordPress issue, but if multiple plug-ins include or require files that declare the same class with the same … Read more

How to use static flattr buttons

If I understand you correctly, you want to add the Flattr button to your posts but instead of using the Flattr JavaScript API you just want the button image to be saved on your server and go to your Flattr page when clicked. I have embedded a working example into this answer and will provide … Read more

How to improve WordPress search

WordPress › Relevanssi – A Better Search « WordPress Plugins Key features: Search results sorted in the order of relevance, not by date. Fuzzy matching: match partial words, if complete words don’t match. Find documents matching either just one search term (OR query) or require all words to appear (AND query). Search for phrases with … Read more

Adding Scripts in the Admin Area

Instead of hooking into admin_print_scripts only, you should hook into your specific page slug which is appended to admin_print_scripts-. (note trailing hyphen). The reference page you linked to shows this, but you seem to be omitting the $page concatenation to admin_print_scripts-. eg: $page = add_theme_page( ‘Options’, ‘Options’, ‘edit_theme_options’, ‘options-panel’, ‘topf_admin_options_markup’ ); add_action( “admin_print_scripts-$page”, ‘enqueue_my_admin_scripts’ ); … Read more

Have Plugin Handle Specific URLs

There are two different things happening here. I’ll start with your second example, as that’s easier. Most shopping carts, in your example WP-Ecommerce, create placeholder pages with a shortcode for things like the cart page and checkout page. All they’re doing to handle that is creating a shortcode function and inserting it on a page, … Read more

Creating a wordpress plugin where users can override templates

You have to write it yourself. Check out the way WP e-commerce does it: First, the function to “register” the theme files. function wpsc_register_theme_file( $file_name ) { global $wpec_theme_files; if ( !in_array( $file_name, (array)$wpec_theme_files ) ) $wpec_theme_files[] = $file_name; } And then the function to find a theme file: /** * Checks the active theme … Read more

An Unexpected HTTP Error occurred during the API request

Use the following function to debug the HTTP API request, you will get to know the actual reason why the HTTP API request is failing. Paste the following code in your theme’s function.php. function dump_http_response( $response, $type, $transport, $args, $url ) { if ( is_admin() && $type == “response” ) { echo ‘<span style=”color: #f00;”>’; … Read more