WordPress.org

Ready to get started?Download WordPress

Forums

Default Blog
[resolved] broken path to css file (1 post)

  1. arstropica
    Member
    Posted 3 years ago #

    Line 6 of the functions_layout.inc.php file in /ui directory contains a function (defblog_css) that declares a path to a styles.css file in the same directory. The path is based on a concatenation of the site url, the wordpress plugin directory and the directory name of the script calling the function. It does not account for the default blog plugin directory. An easier way to declare a path to the css file is the pathinfo function as posted below:

    function defblog_css(){
        $defblog_plugin_path=str_replace(ABSPATH, '',pathinfo(__FILE__, PATHINFO_DIRNAME));
        echo "<link rel=\"stylesheet\" href=\"".get_option('siteurl')."/".$defblog_plugin_path."/styles.css\" type=\"text/css\" media=\"screen\" />";
    }

    Hope this is helpful to anyone that needs it.

    http://wordpress.org/extend/plugins/default-blog-options/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic