Word Press Questions

10
Wordpress Interview 1. You want to schedule a backup of your site database but do not have enough permission to access your host. of the following choices can help you perform this task? a) Use phpMyAdmin b) Install wp database backup plug-in c) Use cron job to schedule. Ans. (B) 2. The “function_exist()” function can be used to check whether a plug-in activated or not? A) True B) False Answer : (A) 3. Image size can be set __________ a) Directly in the post’s b) in the wp-imageresize plug-in c) in the admin settings d) a and b Answer: (C) 4. In order to to display a widget, the user must _____ a) Set he “Show Property” of the desired widget to “true” b) Drag the desired widget of the side bar c) Add the Desired widget to the post d) Change the source code Answer: (b) 5. Which of the following actions must be performed before upgrading WordPress? a. Back up the site. b. Ensure that the database user name registered to WordPress has permission to create, modify, and delete database tables. c. Deactivate plug-ins.

description

interview questions for wp

Transcript of Word Press Questions

Wordpress Interview

1. You want to schedule a backup of your site database but do not have enough permission to access your host. of the following choices can help you perform this task?a) Use phpMyAdminb) Install wp database backup plug-inc) Use cron job to schedule.Ans. (B)2. The function_exist() function can be used to check whether a plug-in activated or not?A) TrueB) FalseAnswer : (A)3. Image size can be set __________a) Directly in the postsb) in the wp-imageresize plug-inc) in the admin settingsd) a and bAnswer: (C)4. In order to to display a widget, the user must _____a) Set he Show Property of the desired widget to trueb) Drag the desired widget of the side barc) Add the Desired widget to the postd) Change the source codeAnswer: (b)5. Which of the following actions must be performed before upgrading WordPress?a. Back up the site.b. Ensure that the database user name registered to WordPress has permission to create, modify, and delete database tables.c. Deactivate plug-ins.d. Enable FTP on the site.e. a, c, and df. a, b, and cAns: ( f)6 .Which of the following actions must you perform to move your site from /wordpress to /blog/wordpress?a. Change the source code.b. Update the wp-config.php file.c. Update the database.d. The site cannot be moved in that manner.Ans: ( C)7. What is the first action you need to take for enabling WordPress MU feature?a. Enable WordPress MU feature on admin panelb. Enable Network featurec. Add this code to wp-config.php file: define( WP_ALLOW_MULTISITE, true );Ans: (c)8. Which of the following theme files can be used to customize the page not found error error page?a. index.phpb. 404.phpc. functions.phpd. page.phpAns:b:404.php9.How can a logo be placed on a WordPress header?a. Manually add the logo to the source code.b. Upload a new logo in admin settings.c. Update the logo path in the config file.Ans: (a)10. Which of the following tasks must be performed to add a favicon icon to your site?a. Upload a favicon icon to your site.b. Add a favicon icon link to the themes header file or update the existing favicon icon link to the new one.c. Change the favicon icon in admin settings.d. The favicon icon cannot be changed.e. a and bf. b and cAns: (e)11. Which of the following methods can be used to eliminate spam?a. Using the wp-captcha-free plug-in.b. Using the askimet plug-in.c. Using a widget.d. None of the above.e. a and bAns: (e)12. In order to display a widget, the user must _________________.a. set the show property of the desired widget to trueb. drag the desired widget to the side barc. add the desired widget to the postd. change the source codeAns: (b)13. You can limit the number of revisions WordPress stores by _____a. adding the following line to your wp-config.php file: define(WP_POST_REVISIONS, 3);b. using a pluginc. changing a setting on admin paneld. a & bAns: (d)14. Who of the following persons can read a post locked by password?a. Only administrators, editors and authorsb. Registered users who knows a passwordc. Anyone who knows a passwordAns: (c)15. Which of the following methods is required to post html code for others to read?a. Replacing special characters with corresponding html codes or character codes.b. Using the tag.c. Using the tag.d. None of the above: WordPress auto-replaces special characters with substituted characters.Ans: (a)16.Which of the following methods can be used to enable posting via e-mail?a. Installing the wp-emailpost plug-in.b. Configuring the feature in admin settings.c. Using a widget.d. This feature is not available in WordPress.Ans: (b)17. Meta tags can be added to WordPress pages by ________________.a. using plug-insb. adding them to the header.php filec. updating the databased. None of the above.Ans: a, b18. Conditional tags can be used to _______________________.a. get all comments from one postb. get all posts from one categoryc. change the content to be displayedd. None of the above: conditional tags are not available in WordPress.Ans: (c)19. What is the right order (by priority in use) to display tag in Template Hierarchy?.a. tag -{slug}.php, tag-{id}.php, tag.php, index.phpb. tag -{id}.php, tag -{slug}.php, tag.php, index.phpc. tag -{slug}.php, tag -{id}.php, tag.php, archive.php, index.phpd. tag -{slug}.php, tag -{id}.php, tag.php, 404.phpAns: (c)20. Which of the following files are required for completing your theme?a. Index.phpb. Style.cssc. Index.php and style.cssd. Index.php and functions.phpAns: (c)21. Which of the following is not valid PHP code?

A) $_10B) ${MyVar}C) &$somethingD) $10_somethingsE) $aVaRAns: (d)22. What is the difference between print() and echo()?

A) print() can be used as part of an expression, while echo() cantB) echo() can be used as part of an expression, while print() cantC) echo() can be used in the CLI version of PHP, while print() cantD) print() can be used in the CLI version of PHP, while echo() cantE) Theres no difference: both functions print out some text!Ans: A & B

23. Consider the following class:Class Insurance{function clsName(){echo get_class($this);}}8. $cl = new Insurance();9. $cl -> clsName();10. Insurance::clsName();Which of the following Lines should be commented to print the class name without errors?a. Line 8 and 9b. Line 10c. Line 9 and 10d. All the three lines 8,9, and 10 should be left as it is.Ans: d24) What is the output of the following code?a. Array ([x]=>9 [y]=>3 [z]=>-7)b. Array ([x]=>3 [y]=>2 [z]=>5)c. Array ([x]=>12 [y]=>5 [z]=>-2)d. Errore. None of the aboveAns: c

25. 8) What will be the output of the following code?$var = 10;function fn (){$var = 20;return $var;}fn ();echo $var;a. 10b. 20c. Undefined Variabled. Syntax ErrorAns: a

26. which of the following is a correct declaration?a. static $varb = array(1,'val',3);b. static $varb = 1+(2*90);c. static $varb = sqrt(81);d. static $varb = new Object;Ans: a

27. Consider the following two statements:I while (expr) statementII while (expr): statement... endwhile;Which of the following are true in context of the given statements?a. I is correct and II is wrongb. I is wrong and II is correctc. Both I & II are wrongd. Both I & II are correctAns: d

28. What will be the output of the following code?$Rent = 250;function Expenses($Other){$Rent = 250 + $Other;return $Rent;}Expenses(50);echo $Rent;a. 300b. 250c. 200d. Program will not compileAns: b

29. Which of the following regular expressions can be used to check the validity of an e-mail addresses?a. ^[^@ ]+@[^@ ]+.[^@ ]+$b. ^[^@ ]+@[^@ ]+.[^@ ]+$c. $[^@ ]+@[^@ ]+.[^@ ]+^d. $[^@ ]+@[^@ ]+.[^@ ]+^Ans: b

30. What will happen at the end of the following sequence of SQL commands?

BEGIN TRANSACTIONDELETE FROM MYTABLE WHERE ID=1DELETE FROM OTHERTABLEROLLBACK TRANSACTION

A) The contents of OTHERTABLE will be deletedB) The contents of both OTHERTABLE and MYTABLE will be deletedC) The contents of OTHERTABLE will be deleted, as will be all the contents of MYTABLE whose ID is 1D) The database will remain unchanged to all users except the one that executes these queries.E) The database will remain unchangedAns (e)

31. What is the behavior of below code:

A) Adds a div at the start of the postB) Adds a div at end the of the postC) No effectD) errorAns (B)32. What does below code do?function create_post_type() { register_post_type( 'acme_product', array( 'labels' => array( 'name' => __( 'Products' ), 'singular_name' => __( 'Product' ) ), 'public' => true, 'has_archive' => true, ) );}

A) Defines a new post type and it can be used anywhereB) Defines a new post type and it needs to be initializedC) Defines a new post type and it needs to be registeredD) Does nothingAns (B)

33. Which is the right way of changing the permalink structure?A) 301 RedirectB) 302 RedirectC) 503D) 404Ans A)

34. Consider the below code:

add_action('init','super_plugin_init'); function super_plugin_init(){ //do work run_sub_process(); } function run_sub_process(){ //more work }

When the super_plugin_init method will be called:A) Only once when the server is startedB) With each requestC) With each method callD) NeverAns: (B)35.What is the objective of below code:add_action( 'init', 'init_custom_rewrite' );

function init_custom_rewrite() {

add_rewrite_rule( '^phones/compare/([^/]*)/?', 'index.php?page_id=XXX&between=$matches[1]', 'top' );}

A) Rewrite the URL from idex.php?.... to /phone/compare/.. B) Rewrite the URL from /phone/compare/.. to idex.php?....C) Just a method which can be invoked anytimeD) No objective

Ans (B)