WordPress.org

Ready to get started?Download WordPress

Forums

WP-Syntax
[resolved] Use wp_enqueue_style to add css (2 posts)

  1. CodingFabian
    Member
    Posted 2 years ago #

    Hi,
    at the moment wp-syntax does this to add its stlye:


    function wp_syntax_head()
    {

    $css_url = WP_PLUGIN_URL . "/wp-syntax/wp-syntax.css";
    echo "\n".'<link rel="stylesheet" href="' . $css_url . '" type="text/css" media="screen" />'."\n";
    }

    It would be better to use the wordpress standard way to include plugins

    wp_enqueue_style("WP-Syntax", WP_PLUGIN_URL . "/wp-syntax/wp-syntax.css", false, false, "screen");

    by doing so the css can be modified by other plugins, or which is important for me, can be combined by mod_pagespeed, as this causes the css file to appear next to each other.

    http://wordpress.org/extend/plugins/wp-syntax/

  2. shazahm1
    Member
    Plugin Author

    Posted 1 year ago #

    Fixed in version 0.9.12.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags