0

I have created a Theme Options page using Settings API so now I need to style it using CSS. Instead using function like this inside functions.php

function mytheme_add_init() {
if ( is_admin() ) {
    $get_path=get_bloginfo('template_directory');
    wp_enqueue_style("functions", $get_path."/css/admin.css", false, "1.0", "all");

    }
}
add_action( 'wp_enqueue_scripts', 'mytheme_add_init' );

I am using <?php include (TEMPLATEPATH . "/functions/admin_css.php"); ?> directly inside my file responsible for creating my Theme Options Page. Reason for this approach is that I will use some images (their path will be dynamicly generated using get_template_directory_uri() thingy) inside my Options Page.

So what really want is to add my theme to WordPress.org repository.

Question: Because I am using that approach will I suffer consequences like being my theme rejected by WordPress Theme Review Team ?

2

Yes, that will get rejected. It's also wholly unnecessary, since you can use relative paths to the images in your CSS file, you don't need to have them dynamically generated.

  • 1
    Note: you'll also get rejected for using TEMPLATEPATH or get_bloginfo( 'template_directory' ), instead of get_template_directory_uri(). – Chip Bennett May 16 '13 at 14:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.