aiosp_action_links
The All In One SEO Pack aiosp action links function.
Description
(array) aiosp_action_links( $actions, $plugin_file, (array) $action_links = array(), (string) $position = 'after' );
Returns (array)
Parameters (4)
- 0. $actions
- The actions.
- 1. $plugin_file
- The plugin file.
- 2. $action_links — Optional. (array) =>
array()
- The action links.
- 3. $position — Optional. (string) =>
'after'
- The position.
Usage
if ( !function_exists( 'aiosp_action_links' ) ) { require_once ABSPATH . PLUGINDIR . 'all-in-one-seo-pack/all_in_one_seo_pack.php'; } // The actions. $actions = null; // The plugin file. $plugin_file = null; // The action links. $action_links = array(); // The position. $position = 'after'; // NOTICE! Understand what this does before running. $result = aiosp_action_links($actions, $plugin_file, $action_links, $position);
Defined (1)
The function is defined in the following location(s).
- /all_in_one_seo_pack.php
- function aiosp_action_links( $actions, $plugin_file, $action_links = array(), $position = 'after' ) {
- static $plugin;
- if ( ! isset( $plugin ) ) {
- $plugin = plugin_basename( __FILE__ );
- }
- if ( $plugin === $plugin_file && ! empty( $action_links ) ) {
- foreach ( $action_links as $key => $value ) {
- $link = array( $key => '<a href="' . $value['url'] . '">' . $value['label'] . '</a>' );
- if ( 'after' === $position ) {
- $actions = array_merge( $actions, $link );
- } else {
- $actions = array_merge( $link, $actions );
- }
- }//foreach
- }// if
- return $actions;
- }