Create Array from data in the OPTIONS table

$all_options = wp_load_alloptions(); $plugin_order_options = array(); foreach( $all_options as $name => $value ) { if(stristr($name, ‘plugin_order_’)) $plugin_order_options[$name] = $value; } print_r($plugin_order_options); In plain English: We load all WP options in $all_options. We copy options from $all_options to $plugin_order_options if their name contains plugin_order_. We print $plugin_order_options. We scratch our head, unhappy with the size of … Read more

Content-single.php inside my plugin

In case anyone will want to do this, this is what worked for me: In my single-my_custom_post_type.php I replaced this line: get_template_part(‘content’, get_post_format()); With this one: include ‘content-spp_service_provider.php’;

Integrating a hosted app with wordpress using the API

One way to go about doing this kind of thing is to add some settings to the plugin they are installing such as the following: (Blankman’s Site – Your User Name) (Blankman’s Site – Your Password) (Blankman’s Site – User Name to access your site) (Blankman’s Site – Password to access your site) The user … Read more

Manually return false for function_exists

Have your function return your HTML rather than echo it. Perform the logic in the function to see if the image/logo are present and only return the HTML if that’s the case, otherwise returning null/false. function my_header_function( $output = false ) { if ( /*image and logo have been uploaded */ ) { $output = … Read more