• Resolved kuttekop

    (@kuttekop)


    Thank you for this plugin.
    However the disadvantage is that in some places the style is hard coded, like

    <div align=”center”>

    I prefer to do the style completely in css

    This would be an improvement in the next version

    • This topic was modified 9 years, 7 months ago by kuttekop.
Viewing 1 replies (of 1 total)
  • Plugin Author Chad Butler

    (@cbutlerjr)

    Any place in the plugin that something is hard coded like that can be changed via filters.

    Any place that you see it in the code, look close by and you will see the filter hook that allows you to change it. All filter hooks are documented inline in the code, and most are documented in the plugin’s documentation.

    Here’s an example. The generic error message dialog wraps with the following:

    <div class="wpmem_msg" align="center">

    The default tags for this message can be filtered with wpmem_msg_args. Use the filter to pass in your own tag:

    add_filter( 'wpmem_msg_args', 'my_msg_args' );
    function my_msg_args( $args ) {
        $args['div_before'] = '<div class="wpmem_msg">';
        return $args;
    }

    You can change whatever you want in this way – change the class, add an ID, change the tag. Just keep in mind that if you change the tag from being a div, then you also need to change the closing tag (div_after).

Viewing 1 replies (of 1 total)

The topic ‘Hard coded style vs css’ is closed to new replies.