Hi my theme is rejected with the following reasons. Please can anybody guide me on this
- REQUIRED : get_settings found in the file ot-settings-api.php. Deprecated since version 2.1. Use get_option() instead.
(How can I get rid of this. Please brief.)
- Could not find comment_form. This hook was introduced on WordPress 3.0 and plenty 3rd party plugins use it to add information like social links, etc. Read more: http://ottopress.com/2010/wordpress-3-0-theme-tip-the-comment-form/
(This is my theme blog post page and you can see the comment form there http://mountainia-wp.ries.cz/?p=82. But reviewer said Could not find comment_form.
my comment file name is comments.php
and i use it as <?php comments_template(’’,true); ?> in my single.phpand this is the code for my comment form in comments.php
<!-- comment form --> <?php if ( comments_open() ) : ?> <h4><?php comment_form_title( 'LEAVE A COMMENT', 'LEAVE A REPLY TO %s' ); ?></h4> <div class="cancel-comment-reply"> <small><?php cancel_comment_reply_link(); ?></small> </div> <?php if ( get_option('comment_registration') && !is_user_logged_in() ) : ?> <p>You must be <a href="<?php echo wp_login_url( get_permalink() ); ?>">logged in</a> to post a comment.</p> <?php else : ?> <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform"> <?php if ( is_user_logged_in() ) : ?> <p>You are logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a class="logout" href="<?php echo wp_logout_url(get_permalink()); ?>" title="Log out of this account">Log out</a></p> <?php else : ?> <fieldset> <input type="text" class="field" name="author" value="<?php echo esc_attr($comment_author); ?>" /> <input type="text" class="field" name="email" value="<?php echo esc_attr($comment_author_email); ?>" /> </fieldset> <?php endif; ?> <fieldset> <textarea name="comment" id="comment" cols="30" rows="10">Message</textarea> </fieldset> <fieldset> <input type="submit" class="submit" id="submit" name="submit" value="POST YOUR COMMMENT" /> </fieldset> <?php comment_id_fields(); ?> <?php do_action('comment_form', $post->ID); ?> </form> <?php endif; // If registration required and not logged in ?> <?php endif; // if you delete this the sky will fall on your head ?>
Please really need help in this.
THANX in ADVANCE .
I had the same 2 errors on the theme I submitted last week but I sorted them and got my theme accepted.
For the first one, simply find any instances of get_settings in your ot-settings-api.php file and replace it with get_option(). The former has been replaced with the latter.
For the comments one, follow the link and read the article, it’s a cleaner way of displaying the comments on posts and should be used rather than the old way of using a big ugly block of code, this simplifies the comments section of a theme for designers/devs.
Hope this helps, Martin
Thanx Martin really helpfull. Solve the first issue. But is it necessary to change the comments with the new method?.
I believe so, my theme was soft rejected until I did it.
It’s really simple to implement, will take a matter of minutes and it’s for the benefit of anyone who wants to tap into the comments system and modify them.
but shouldn`t notices from 3rd party items, like Option Tree, pass the inspection?
i mean, Option Tree is sponsored by Envato and built specially for themes on TF. If authors include it in their themes, i would guess it should pass the inspection automatically.
ok, replacing the OT get_settings is easy, but then every time you have to include a newer version, you have to do this again and again. i think that the author of OT (which is a magnificent plugin, btw!) should add the changes right into the plugin.
It’s just certain bits of PHP or WordPress code that eventually gets deprecated and it won’t happen all that often.
Maybe PixelArtInc isn’t using the very latest version of OT, the author of OT will have built it with the latest code at the time of that version.
Downloading the very latest version probably won’t have this deprecated code in it.
I myself have my own WP framework that I use from theme to theme and I don’t re-download the OT framework every time which is why it’s sometimes necessary to replace the odd line of code.
Hope this clears it up
MushinDesign: Thank you so much. You really clear my mind for OT. thank you so much.
REQUIRED : get_settings found in the file ot-settings-api.php. Deprecated since version 2.1. Use get_option() instead.
As author of OT have said: ‘This is not using a deprecated function it is calling a class method of the OT_Settings class. It is actually referencing $this->get_settings() not the WP function get_settings().’
Did you ever get to correctly add the comments to your theme?
I’ve had a soft-rejection on my first attempt in several years and the “REQUIRED: Could not find comment_form.” is my last outstanding thing on my list before resubmitting.
I’ve followed every tutorial imaginable, simply adding ”<?php comment_form() ?>” to comments.php is easy enough, but how do I pass these supposed awesome arguments, and how can I get the actual comments listed under my posts, list_comments stopped working!!
Appreciate any help!!