[wp-hackers] My plugin doesn't work online :( Shortcode loading order?!

Diana K. Cury dianakac at gmail.com
Mon Mar 26 18:56:04 UTC 2012


Sorry for bother,

I just can't understand why my plugin isn't working, the post type screen is ok, but the shortcode action does'nt work at all.

When adding [mensagem], it supposed to add the form into the page, but anything show up when doing so :(



<?php
/**
 * Plugin Name: Simple Messages
 * Plugin URI: http://dianakcury.com/sm
 * Description: Permite que visitantes envie mensagens, sem usar PHP Mailer ou SMTP.
 * Version: 0.2
 * Author: Diana K. Cury
 * Author URI: http://dianakcury.com
 * License: GPLv2 or later
 */


    require_once 'creation.php';

    add_action( 'init', 'msg_custom_init',2 );
    add_action( 'admin_print_styles', 'action_admin_print_styles', 3 );
    add_filter( 'manage_' . 'msg' . '_posts_columns', 'filter_manage_msg_posts_columns',4 );
    add_action( 'manage_posts_custom_column',  'action_manage_posts_custom_columna' , 5, 2 );


    add_shortcode( 'mensagem', 'mensagem_shortcode',6 );
    add_filter('get_header','wp_sd',7);
    add_filter('get_header','mensagem_form',8);


//cria shortcode
function mensagem_shortcode() {
    do_action('wp_head','mensagem_form');
    include('form.php');
  }

function mensagem_form() {
    include('form-action.php');
  }

//imprime estilos
function wp_sd($result) {
 wp_enqueue_style('extra_st', WP_PLUGIN_URL . "/simple-messages/style.css");
}



?>


More information about the wp-hackers mailing list