How can a wordpress plugin generate pages without posts?

You can do this with a plugin, but WordPress already has settings to allow a static front page to exist for the blog. Go in the WordPress Admin screen and look under Settings>Reading and you’ll see that you can set the blog front page to be a single Post/Page that you choose. This will do … Read more

Using add_action before add_filter on a plugin?

It doesn’t matter the order in which you call add_action() and add_filter(). What matters is the order in which the corresponding do_action() and apply_filters() are called. So, if apply_filters(‘wp_insert_post_data’) is run before do_action(‘save_post’), tough luck. You’ll have to think of another way to achieve the desired result.

Get plugin download URL from slug

I forget exactly if the plugin slug is a reliable method to get the url, it might be in most cases but not all due to how plugins are named. You can query the api @wordpress.org for the plugins xml file which also contains the download link. For example: $plugin_slug = ‘akismet’; $return_plugin_info = “http://api.wordpress.org/plugins/info/1.0/$plugin_slug.xml” … Read more

How do I add content to the dashboard in WordPress?

<?php /* Plugin Name: Dashboard Google Page Rank Plugin URI: http://wordpress.org/extend/plugins/dashboard-google-pagerank/ Description: Shows your google pagerank in the wordpress dashboard Author: Weston Deboer Version: 1.1 Author URI: http://westondeboer.com */ function gpr_wp_dashboard_test() { include(‘yourfile.php’); } function gpr_wp_dashboard_setup() { wp_add_dashboard_widget( ‘gpr_wp_dashboard_test’, __( ‘Google Page Rank’ ),’gpr_wp_dashboard_test’); } add_action(‘wp_dashboard_setup’, ‘gpr_wp_dashboard_setup’); ?> I have made a small modification to … Read more