WordPress.org

Ready to get started?Download WordPress

Plugin Directory

WordPress GPS

Help people navigate through the WordPress backend thanks to the pretty WordPress Pointers.

API

WordPress GPS provides some hooks to plugin writers:

  • a filter to add, remove or order the default scenarios (gb_gps_default_scenarios)
  • a function to create a new "pointer": gb_gps_create_pointer
  • a single function to register a new scenario: gb_gps_register_scenario
gb_gps_create_pointer Usage
$pointer_config = array(
    'selector' => '#menu-posts',
    'content' => '<h3>title</h3><p>content</p>',
    'position' => array(
        'edge' => 'top',
        'align' => 'right',
    ),
);

$pointer = gb_gps_create_pointer($pointer_config);
Parameters

selector (string) The DOM selector of the element on which the pointer will be attached. Default: ''

content (string) The content of the pointer. Default: ''

position (array) An array of arguments to pass to a jQuery UI Position Widget (see the documentation: http://jqueryui.com/demos/position/#options).

gb_gps_register_scenario Usage
$args = array(
    'pointers' => $pointers,
    'label' => $label,
    'description' => $description,
    'capabilities' => array('edit_post'),
);

gb_gps_register_scenario($args);
Parameters

pointers (array) An array of GBGPS_Pointer with this structure: [ 'hook' => [ $pointer_obj, $pointer_obj2 ], 'hook2' => [ $pointer_obj3 ] ], where "hook" is typically the script's name on the WordPress admin ('edit.php') or the keyword "all".

label (string) The scenario label, which will appear on the select box.

description (string) The scenario description, which will appear on the admin panel.

capabilities (array) An array of capabilities as defined by WordPress or even plugins ('edit_post' for example).

Requires: 3.3.0 or higher
Compatible up to: 3.6.1
Last Updated: 2013-10-27
Downloads: 1,311

Ratings

5 stars
5 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1 0,1,0 100,1,1 100,1,1
100,1,1 100,2,2 100,1,1