Search for:
01s Agency
Please anwer each of the questions below to the best of your knowledge. Thank you.
LinkedIn
This field is for validation purposes and should be left unchanged.
Date
MM slash DD slash YYYY
Name
(Required)
First
Last
Email
(Required)
Upwork / Freelancer / Malt / etc... profile link
(Required)
Test begins...
Where can you see available WordPress, theme, and plugin options as they are recorded in the database?
Browse to wp-admin/options.php
Go to Options, see all
Check view all under options - reading
You can't, the options are divided into sub menus
I cannot hook in this action with add_submenu_page() function
user_admin_menu
admin_menu
admin_submenu
network_admin_menu
What are the best settings for folders security in UNIX / WP environment ?
555
557
775
755
Which of the following will correctly load localized (translated) text for a WordPress plugin?
function load_theme_textdomain('tutsplus', $lang_dir); { $lang_dir = get_template_directory() . '/lang'); custom_theme_setup(); } add_action('after_setup_theme', 'custom_theme_setup');
function custom_theme_setup() { $lang_dir = get_template_directory() . '/lang'); add_action('after_setup_theme', 'custom_theme_setup'); } load_theme_textdomain('tutsplus', $lang_dir);
function custom_theme_setup() { $lang_dir = get_template_directory() . '/lang'); load_theme_textdomain('tutsplus', $lang_dir); } add_action('after_setup_theme', 'custom_theme_setup');
function custom_theme_setup() { $lang_dir = get_template_directory() . '/lang'); add_action('after_setup_theme', 'custom_theme_setup'); }
To detect if current page = login page I can use :
if ($pagenow != ‘wp-login.php’ && !is_admin())
function is_login_page() {return !strncmp($_SERVER[‘REQUEST_URI’], ‘/wp-login.php’, strlen(‘/wp-login.php’));}
function is_login_page() {return in_array($GLOBALS[‘pagenow’], array(‘wp-login.php’, ‘wp-register.php’));}
$uri = $_SERVER[‘REQUEST_URI’];echo $uri;
If you want to create a custom WP loop without affecting the original query, you would use which of the following?
$my_query = new WP_Query();
$my_query = $do_not_duplicate;
$wp_query = clone $temps_query;
rewind_posts();
When displaying a URL inside an anchor tag (<a>), which function should be used to escape the URL before displaying it?
esc_html()
esc_js()
esc_url()
esc_attr()
attribute_escape()
Which of the following will give the option to add inline Ajax for comment posting?
Enabling Ajax in the wp-config.php file
WordPress doesn't support inline Ajax.
Activating Ajax from the admin settings of WordPres
Using the Ajax Comment Posting plugin
It is important to enqueue your parent and child theme stylesheets.
False
True
To create a one time single post meta value in a big post loop so that it is as fast as possible, i'd use:
Of course, get_post_meta($post->ID, ‘post_meta’, true);
I would use a direct query like: $wpdb->get_results($wpdb->prepare(«SELECT * from $wpdb->postmeta WHERE meta_key = %s”, ‘post_meta’));
network_admin_menu
I would use a direct query like: $wpdb->get_var($wpdb->prepare(«SELECT meta_value from $wpdb->postmeta WHERE post_id = %d and meta_key = ‘post_meta’”, $post->ID));
How many users roles are defined in wordpress by default?
5
6
3
4
Which constant will allow me to control the number of post revisons kept by WP?
POST_REVISIONS
WP_POST_REVISIONS
POSTREVISIONS
WPPOSTREVISIONS
Correct WP plugin development steps are :
Step 1 — Create your file and let it be known as a plugin Step 2 – Create the objects of your plugin Step 3 – Adding your actions and filters Step 4 – Adding settings/options to your plugin Step 5 — Finishing the code
Step 1 – Create the objects of your plugin Step 2 – Adding settings/options to your plugin Step 3 — Finishing the code
Step 1 – Create the objects of your plugin Step 2 – Adding settings/options to your plugin Step 3 — Create your file and let it be known as a plugin Step 4 — Finishing the code
sStep 1 – Adding settings/options to your plugin Step 2 — Create your file and let it be known as a plugin Step 3 – Create the objects of your plugin Step 4 – Adding your actions and filters Step 5 — Finishing the codeelect * from wp_posts where ID in( select ID from ( select wp_posts.ID , wp_posts.post_date, d.name from wp_posts as a join wp_terms as d on (c.term_id = d.term_id) where c.taxonomy = ‘post-series’ group by d.name having (wp_posts.post_date = max(wp_posts.post_date)) )tmp)
Which of the following will show the most recent post (by date) from a custom taxonomy?
select * from wp_posts where ID in( select ID from ( select wp_posts.ID , wp_posts.post_date, d.name from wp_posts as a join wp_term_relationships as b on ( a.ID = b.object_id) join wp_term_taxonomy as c on (b.term_taxonomy_id = c.term_taxonomy_id) join wp_terms as d on (c.term_id = d.term_id) having (wp_posts.post_date = max(wp_posts.post_date)) )tmp)
select * from wp_posts where ID in( select ID from ( select wp_posts.ID , wp_posts.post_date, d.name from wp_posts as a join wp_term_relationships as b on ( a.ID = b.object_id) join wp_terms as d on (c.term_id = d.term_id) where c.taxonomy = ‘post-series’ group by d.name having (wp_posts.post_date = max(wp_posts.post_date)) )tmp)
select * from wp_posts where ID in( select ID from ( select wp_posts.ID , wp_posts.post_date, d.name from wp_posts as a join wp_terms as d on (c.term_id = d.term_id) where c.taxonomy = ‘post-series’ group by d.name having (wp_posts.post_date = max(wp_posts.post_date)) )tmp)
select * from wp_posts where ID in( select ID from ( select wp_posts.ID , wp_posts.post_date, d.name from wp_posts as a join wp_term_relationships as b on ( a.ID = b.object_id) join wp_term_taxonomy as c on (b.term_taxonomy_id = c.term_taxonomy_id) join wp_terms as d on (c.term_id = d.term_id) where c.taxonomy = ‘post-series’ group by d.name having (wp_posts.post_date = max(wp_posts.post_date)) )tmp)
I can change the class name of a sub-menu in the wp_nav_menu...
By manually adding the class name in Appearance—>Menus
WordPress does not support the ability to change the class name of a sub-menu in the wp_nav_menu.
By adding the following code in functions.php: class UL_Class_Walker extends Walker_Nav_Menu { function start_lvl(&$output, $depth) { $indent = str_repeat(«\t», $depth); $output .= «\n$indent
\n»; } }
By adding the following code in header.php: class UL_Class_Walker extends Walker_Nav_Menu { function start_lvl(&$output, $depth) { $indent = str_repeat(«\t», $depth); $output .= «\n$indent
\n»; } }
Which of the following methods can be used to make SEO friendly permalinks?
Configuring the feature in the admin settings
Configuring the feature in the config file
Updating the database
Changing the source code
What is the output of the following code? <ul id=»sortable»> <li id=»1″>example 1</li> <li id=»2″>example 2</li> <li id=»3″>example 3</li> <li id=»4″>example 4</li> </ul> $(document).ready(function(){ $(‘#sortable’).sortable({ update: function(event, ui) { var newOrder = $(this).sortable(‘toArray’).toString(); $.get(‘saveSortable.php’, {order:newOrder}); } }); });
Sorts out existing positions without updating the data base with the new user inputs
Saves sortable positions to data base based on the user input
Adds new sortable positions from another data base
Removes positions from data base based on the user input
There can only be one loop in a template
False
True
Is super cache a built-in plugin of WordPress?
No
Yes
I can use this command (Apache) to change WP's directory ownership to www-data?
sudo crown -Df www-data *
chown -Rf www-data *
Alldo chown -Rf www-data *
sudo chown -Rf www-data *
Which of the following is the correct sequence of steps to adapt a WordPress plugin to a multisite?
Use $wp_posts to iterate through all blogs 2. Hook according to the $function 3. Install the plugin as Network only 4. Uninstall is same for all the plugins
Use $wpdb to iterate through all blogs 2. Hook according to the $blog_id 3. Install the plugin as Network only 4. Uninstall depends the specific plugin
Use $wp_posts to iterate through all blogs 2. Hook according to the $function 3. Install other activations except Network 4. Uninstall is the same for all the plugins
Use $wp_posts to iterate through all blogs 2. Hook according to the $function 3. IInstall the plugin as Network only 4. Uninstall depends the specific plugin
How can an <li> tag's class and ID attributes be removed from menu items and page lists?
add_filter('nav_menu_css_class', 'my_css_attributes_filter', 100, 1); add_filter('nav_menu_item_id', 'my_css_attributes_filter', 100, 1); function my_css_attributes_filter($var) { if(is_array($var)){ $varci= array_intersect($var, array('current-m
None of the above
add_filter('nav_menu_css_class', 'my_css_attributes_filter', 100, 1); add_filter('nav_menu_item_id', 'my_css_attributes_filter', 100, 1); add_filter('page_css_class', 'my_css_attributes_filter', 100, 1); function my_css_attributes_filter($var)
add_filter ('wp_nav_menu','strip_empty_classes'); function strip_empty_classes($menu) { $menu = preg_replace('/ class=([
To get WordPress Post ID from the Post title I use
$page = get_page_by_title( ‘About’ ); wp_pages( ‘exclude=’ . $page->ID );
$page = get_page_by_title( ‘Home’ ); $page_id = $page->ID;
$page = get_page_title( ‘About’ ); wp_pages( ‘exclude=’ . $page->ID );
None of the above
Which of the following code snippets will create plugins back-end page without showing it as menu item?
add_menu_page with parent slug = null
add_submenu_page with parent slug = null
add_submenu_page without parent slug = null
Which is the necessary file if you need to create a child theme?
single.php
index.php
page.php
index.html
style.css
What is the BEST way to get last inserted row ID from WordPress database ?
The following code snippet should be added $last = $wpdb->get_row("SHOW TABLE STATUS LIKE 'table_name'"); $lastid = $last->Auto_increment;
Straight after the $wpdb->insert() insert, the following code should be added: $lastid = $wpdb->insert_id;
The call to mysql_insert_id() inside a transaction should be added: mysql_query('BEGIN'); // Whatever code that does the insert here. $id = mysql_insert_id(); mysql_query('COMMIT'); // Stuff with $id.
Use the following code snippet $lastid->$wpdb=$last->get_row;
When are child theme required?
If I need to make changes to the css files
When I need to duplicate my home
Always
Almost never
If I need to overwrite the home page
What are the best settings for files security in UNIX / WP environment ?
644
444
666
664
Which of the following is the correct way to redirect the default login and registration page URL to a custom login and registration page URL?
add_action('init','possibly_redirect'); function possibly_redirect(){ global $pagenow; if( 'wp-login.php' == $pagenow ) { wp_redirect('Your custom url'); exit(); } }
add_action('init','possibly_redirect'); function possibly_redirect(){ global $pagenow; if( 'wp-login.php' == $pagenow ) { wp_return('Your custom url'); exit(); } }
add_action('init','possibly_redirect'); function possibly_redirect(){ global $pagenow; if( 'wp-login.php' == $pagenow ) { redirect('Your custom url'); exit(); } }
add_action('init','possibly_redirect'); function possibly_redirect(){ global $pagenow; if( 'wp-login.php' == $pagenow ) { return('Your custom url'); exit(); } }
How would one generate RSS feed for a search result via WordPress default search function?
Adding search_feed_rss_redirect on; to .htaccess
Adding &extend=RSS to the Search URL
Adding &feed=rss to the Search URL
Adding "define( 'WP_SEARCH_FEED', true ); to wp-config.php
Adding &extend=Atom to the Search URL
What are the database privileges that are required for WordPress?
select, insert, delete, update, create, drop and alter
insert and delete
insert, delete, update, create, drop and alter
insert, delete, update, drop and alter
When I need to override a plugin behaviour, it is best practice to do it:
In the plugin code
In a new plugin
In the plugin child folder
In the functions.php file
To create a custom login / registration page URL redirecting from default login I can use :
add_action(‘init’,’possibly_redirect’); function possibly_redirect(){ global $pagenow; if( ‘wp-login.php’ == $pagenow ) { wp_return(‘Your custom url’); exit(); } }
add_action(‘init’,’possibly_redirect’); function possibly_redirect(){ global $pagenow; if( ‘wp-login.php’ == $pagenow ) { redirect(‘Your custom url’); exit(); } }
add_action(‘init’,’possibly_redirect’); function possibly_redirect(){ global $pagenow; if( ‘wp-login.php’ == $pagenow ) { wp_redirect(‘Your custom url’); exit(); } }
add_action(‘init’,’possibly_redirect’); function possibly_redirect(){ global $pagenow; if( ‘wp-login.php’ == $pagenow ) { return(‘Your custom url’); exit(); } }
Which of the following is the correct way to assign a category to a WordPress post?
By XML-RPC call to wpc.newPost
This is not possible
wp_set_post_categories($postId,$categories)
wp_set_category($catId,$postId)
What is the best permalink format for SEO?
/%categoryr%/%name%/
/%postname%/
/%year%/%monthnum%/%day%/%postname%/
/%year%/%postname%/
/posts/%post_id%/
Which of the following will remove anchors from all nodes/levels except the 4th level nodes of a WordPress category? Parent node (1st level) —>Child node (2nd level) —->3rd level node ——>4th level node
.cat-item a, .cat-item .cat-item a:hover {cursor: pointer;} .cat-item .cat-item a:hover {cursor: default;}
.cat-item a, .cat-item .cat-item .cat-item .cat-item a {cursor: default;} .cat-item .cat-item .cat-item a {cursor: pointer;}
.cat-item a, .cat-item .cat-item a.hover {cursor: default;} .cat-item .cat-item a.hover {cursor: pointer;}
.cat-item a, .cat-item .cat-item a {cursor: default;} .cat-item .cat-item a {cursor: pointer;}
Which function should you use to retrieve the contents of a remote file?
fopen
file_get_contents
fsockopen
wp_remote_get
curl_exec
If I want to generate an array for every image uploaded in a particular post, I use
$images =& get_children( ‘post_type=attachment&post_mime_type=image&post_parent=10’ );
It cannot be done
$images = get_post(7, ARRAY_A);
$images = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );
In which folder should a plugin be stored to make wordpress use it automatically and to prevent the plugin deactivation?
wp-admin/mustuse-plugins
wp-content/plugins/mu
wp-content/plugins/mustuse
wp-content/mu-plugins
Which of the following will correctly load localized (translated) text for a WordPress plugin?
function custom_theme_setup() { $lang_dir = get_template_directory() . ‘/lang’); add_action(‘after_setup_theme’, ‘custom_theme_setup’); }
function load_theme_textdomain(‘tutsplus’, $lang_dir); { $lang_dir = get_template_directory() . ‘/lang’); custom_theme_setup(); } add_action(‘after_setup_theme’, ‘custom_theme_setup’);
function custom_theme_setup() { $lang_dir = get_template_directory() . ‘/lang’); add_action(‘after_setup_theme’, ‘custom_theme_setup’); } load_theme_textdomain(‘tutsplus’, $lang_dir);
function custom_theme_setup() { $lang_dir = get_template_directory() . ‘/lang’); load_theme_textdomain(‘tutsplus’, $lang_dir); } add_action(‘after_setup_theme’, ‘custom_theme_setup’);
Which of the following is the best countermeasure to session hijacking
Session monitoring
Strong passwords
Port filtering firewall
Encryption
To ensure all plugins have been loaded before performing an action, which WordPress hook should the action be added to?
after_plugins_loaded
plugins_loaded
wp
init
after_setup_theme
When designing for mobile devices, it is best to:
Use percentage measurements for formatting to adjust dynamically
Use fixed measurements to accommodate the smaller screens
Not specify measurements because there are so many different models and sizes
What is the best way to include a JavaScript object to a plugin or theme with WordPress?
wp_register_object( $handle, $object_name,$array );
wp_localize_script( $handle, $object_name, $l10n );
wp_object( $object, $in_footer );
wp_enqueue_script( $handle, $src, $deps, $ver, $in_footer );
wp_register_script( $handle, $src, $deps, $ver, $in_footer );
Which of the following will hash a string/password to its md5 equivalent?
wp_generate_md5()
password_md5()
wp_generate_password()
md5()
Themes I fully master / am expert with :
(Required)
Astra
Avada
Divi
Enfold
Kadence
The7
Select All
Page Builders I fully master / am expert with :
(Required)
Brizy
Divi builder
Elementor Pro
Genesis PRo
Guttenberg
Visual Composer
Select All
Plugins I fully master / am expert with :
(Required)
All In One Export / Import
Duplicator
Permalink Manager Pro
Gravity Form
Learndash
PMP Manager
RankMath
Shield Security
Woocommerce
WP Rocket
Yoast
Select All
Comments.?
If you have anything to add, please write it here...