• Hi,

    I’m making a new wordpress theme, my first ever, and i want to check my code for errors. But there are far too many template files i have used and far too much coding in them to go through everything and check accurately.

    So i want to know, is there a way, or a hack of sorts, that helps scan my entire code and notify me of any unclosed tags or any other errors that may be there?

    I’d like to get through his step ‘accurately’ and ‘perfectly’ before proceeding to unleashing my theme to the world!

    Any help will be appreciated!
    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter firstain

    (@firstain)

    Thanks…

    but W3 validator is showing this error for each and every .php file i upload:

    Sorry, I am unable to validate this document because its content type is application/octet-stream, which is not currently supported by this service.
    The Content-Type header is sent by your web server (or web browser if you use the file upload interface) and depends on its configuration. Commonly, web servers will have a mapping of filename extensions (such as “.html”) to MIME Content-Type values (such as text/html).
    That you received this message can mean that your server is not configured correctly, that your file does not have the correct filename extension, or that you are attempting to validate a file type that we do not support yet. In the latter case you should let us know that you need us to support that content type (please include all relevant details, including the URL to the standards document defining the content type) using the instructions on the Feedback Page.

    For css file it replaced “application/octet-stream” with “text/css”

    What could be the issue here?

    You validate the final html pages – not the .php files.

    Thread Starter firstain

    (@firstain)

    Hi,

    thanks for the reply again.

    In the meanwhile, i tried the 3rd link you gave above (Plugin by Pross).

    I ran that plugin and it gave me a plethora of warnings. Most of them were use of depreciated tags like:

    It said:

    Used: bloginfo(‘home’)
    Instead use: bloginfo(‘url’)

    Something like those…

    But the first one was something like this:
    WP_DEBUG is not enabled…enable it first..

    What is that and how to do that? I referred the codex but couldn’t quite understand. Is it necessary?

    And lastly, the warnings it gave…is there an automatic way to correct them or i’ll have to manually replace the depreciated tags on each and every file?

    There were few ‘special characters’ also in my coding…should i remove them?

    Thread Starter firstain

    (@firstain)

    Hi,

    One of the suggestions for the plugin:

    RECOMMENDED: bloginfo(‘template_directory’) was found in the file xxx.php. Use get_template_directory_uri() instead.

    I followed this recommendation and as a result my theme was messed up.

    For example:

    Previously it was this:

    <img src='<?php bloginfo(‘template_directory’); ?>/images/feed.png’ alt=’Subscribe to our R…

    This showed the rss icon…

    When i used this:

    <img src='<?php get_template_directory_uri(); ?>/images/feed.png’ alt=’Subscribe to our R…

    The rss icon wouldn’t show.

    Whats the problem? Is the plugin suggesting me a wrong tag?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Code scanner/reviewer’ is closed to new replies.