Logo F2FInterview

Wordpress Interview Questions

Q   |   QA

WordPress version 1.2 This will stop WP from sending you a mail if the email address you used when you posted the comment was the same as the email address for the author of the post (which is the address the notification email gets sent to). This applies to v1.2 / 1.2.1 code ONLY.

In functions.php change the following line:

if ( == $user->user_email) return false; // If there's no email to send the comment to

to

if ( == $user->user_email || $comment->comment_author_email == $user->user_email) return false; // If there's no email to send the comment to
 

To turn your comments feature off:

WordPress version 1.2

    Line 58 of wp-includes/template-functions-comment.php has the words 'Comments Off'

WordPress version 1.3

Line 98 of wp-includes/template-functions-comment.php has the words 'Comments Off'

WordPress version 2.5

Line 720 of wp-includes/comment-template.php has the words 'Comments Off' as the value of the variable $none (in the comments_popup_link function)  

To create password protected text, see Line 19 of wp-includes/template-functions-post.php for that information. 

WordPress versions prior to 1.2

If you would like to override the $allowedtags variable in kses.php you may do so in your my-hacks.php file, provided you add the following code after you set up the

$allowedtags array.

define('CUSTOM_TAGS', true);

Alternatively one can use a custom filter in your themes functions.php or plugin as explained here:

add_filter('preprocess_comment','fa_allow_tags_in_comments');

function fa_allow_tags_in_comments($data) {
 global $allowedtags;
$allowedtags['span'] = array('style'=>array());
$allowedtags['p'] = array();
return $data;
}

More recent versions of WordPress

More recent verions of WordPress allow uploads while writing posts by using the "Upload/Insert" or "Add Media" buttons found across the top of the posting panel on the new post screen (See Using Image and File Attachments). You can control where images are stored through the Miscellaneous panel in Settings.

  •     From Administration > Settings > Miscellaneous
  •         Make sure the correct information, such as wp-content/uploads is in Store uploads in this folder.
  •         Don't forget to decide if you want to Organize my uploads into month- and year-based folders by checking that setting.

In older WordPress versions

To permit images to be uploaded to your site:

  • From the Administration Panel->Options->Miscellaneous
  • Select the option to Allow File Uploads
  • If you need help with finding the absolute path, visit Absolute Path
  • If you need help with changing permissions, visit Changing_File_Permissions
  • Then check main menu across the top. Click Upload  

In order to link this F2FInterview's page as Reference on your website or Blog, click on below text area and pres (CTRL-C) to copy the code in clipboard or right click then copy the following lines after that paste into your website or Blog.

Get Reference Link To This Page: (copy below code by (CTRL-C) and paste into your website or Blog)
HTML Rendering of above code: