Professional Documents
Culture Documents
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 posts
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.
d. Enable FTP on the site.
e. a, c, and d
f. a, b, and c
Ans: ( 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 panel
b. Enable Network feature
c. 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.php
b. 404.php
c. functions.php
d. page.php
Ans: b:404.php
9. 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 b
f. b and c
Ans: (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 b
Ans: (e)
12. In order to display a widget, the user must _________________.
a. set the show property of the desired widget to true
b. drag the desired widget to the side bar
c. add the desired widget to the post
d. change the source code
Ans: (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 plugin
c. changing a setting on admin panel
d. a & b
Ans: (d)
14. Who of the following persons can read a post locked by password?
a. Only administrators, editors and authors
b. Registered users who knows a password
c. Anyone who knows a password
Ans: (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 <" code "> tag.
c. Using the <" pre "> 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-ins
b. adding them to the header.php file
c. updating the database
d. None of the above.
Ans: a, b
18. Conditional tags can be used to _______________________.
a. get all comments from one post
b. get all posts from one category
c. change the content to be displayed
d. 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.php
b. tag -{id}.php, tag -{slug}.php, tag.php, index.php
c. tag -{slug}.php, tag -{id}.php, tag.php, archive.php, index.php
d. tag -{slug}.php, tag -{id}.php, tag.php, 404.php
Ans: (c)
20. Which of the following files are required for completing your theme?
a. Index.php
b. Style.css
c. Index.php and style.css
d. Index.php and functions.php
Ans: (c)
21. Which of the following is not valid PHP code?
A) $_10
B) ${MyVar}
C) &$something
D) $10_somethings
E) $aVaR
Ans: (d)
22. What is the difference between print() and echo()?
A) print() can be used as part of an expression, while echo() cant
B) echo() can be used as part of an expression, while print() cant
C) echo() can be used in the CLI version of PHP, while print() cant
D) print() can be used in the CLI version of PHP, while echo() cant
E) Theres no difference: both functions print out some text!
Ans: A & B
d. Syntax Error
Ans: a
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 TRANSACTION
DELETE FROM MYTABLE WHERE ID=1
DELETE FROM OTHERTABLE
ROLLBACK TRANSACTION
A) The contents of OTHERTABLE will be deleted
B) The contents of both OTHERTABLE and MYTABLE will be deleted
C) The contents of OTHERTABLE will be deleted, as will be all the contents of MYTABLE whose ID is 1
D) The database will remain unchanged to all users except the one that executes these queries.
E) The database will remain unchanged
Ans (e)
function create_post_type() {
register_post_type( 'acme_product',
array(
'labels' => array(
'name' => __( 'Products' ),
'singular_name' => __( 'Product' )
),
'public' => true,
'has_archive' => true,
)
);
}
add_action('init','super_plugin_init');
function super_plugin_init(){
//do work
run_sub_process();
}
function run_sub_process(){
//more work
}
Ans (B)