> Codepress Menu wordpress plugin resources analysis

Codepress Menu wordpress plugin resources analysis

Download This Plugin
Download Elegant Themes
Name Codepress Menu
Version 2.3.2
Author Codepress
Rating 100
Last updated 2013-08-02 12:16:00
Downloads
4815
Download Plugins Speed Test plugin for Wordpress

Home page

Delta: 0%

Post page

Delta: 0%
Codepress Menu plugin has no negative impact on PageSpeed score.

Home page PageSpeed score has been degraded by 0%, while Post page PageSpeed score has been degraded by 0%

Codepress Menu plugin added 4 bytes of resources to the Home page and 17 bytes of resources to the sample Post page.

Codepress Menu plugin added 0 new host(s) to the Home page and 0 new host(s) to the sample Post page.

Great! Codepress Menu plugin ads no tables to your Wordpress blog database.

Uses the native wp_nav_menu(). Add parameters to the wp_nav_menu() to enable functionality. Also, ships with one-click delete menu-items in the WordPress admin. Turned off or on using the screen-options. Sweet.

Examples

This will get the first sub-menu from the active branch and 2 levels beyond (menu + sub-menu + sub-menu):

wp_nav_menu( array(
    'level' => 2,
    'depth' => 3
));

Show the current branch only:

wp_nav_menu( array(
    'level' => 1
));

Aimed on simple use in various use cases:

// display first level in the header
wp_nav_menu( array(
    'depth' => 1
));

// display first sub-menu from the current branch somewhere else
wp_nav_menu( array(
    'depth' => 2,
    'level' => 2
));

Another feature is it's control over the css classes that are given to a menu-item. You might be faced with css selectors which you cannot change. The 'codepress_menu_filter_classes' filter can be used in your functions.php to set the class property:

/**
 * Change the classes of a menu item
 *
 * @param array $classes List current classes
 * @param object $item Current menu item
 * @param array $items Current list of items (per level)
 * @param integer $k Key of the current item in $items
 */
function codepress_menu_item_classes( $classes, $item, $items, $k ) {
    // mark the first item
    if ( reset( $items ) == $items[ $k ] )
        $classes[] = 'first';

    // mark the last item
    if ( end( $items ) == $items[ $k ] )
        $classes[] = 'last';

    // map the WordPress default 'current-menu-item' class to 'active'
    if ( in_array( 'current-menu-item', $classes ) )
        $classes[] = 'active';

    return $classes;
}
add_filter( 'codepress_menu_item_classes', 'codepress_menu_item_classes', 10, 4 );

Simple Menu Delete

It ships with one-click delete menu-items within WordPress. This functionality was integrated from our Simple Menu Delete plugin and enhanced a bit:

  • Turned off or on using the screen-options.
  • Display is more in line with WordPress's way of delete-links.
  • Works exactly the same now as the nested delete-link which is a click further inside the menu item.
Resources added by plugin to Home page/Post page in kB
Total size of resources for Home page/Post page in kB
Random Theme Tests
Grassland screenshot

Grassland

by: spectacula

25953
0%
Accesspress Parallax screenshot

Accesspress Parallax

by: Access Keys

35160
100%