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

  1. if ( !function_exists( 'aiosp_action_links' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'all-in-one-seo-pack/all_in_one_seo_pack.php'; 
  3.  
  4. // The actions. 
  5. $actions = null; 
  6.  
  7. // The plugin file. 
  8. $plugin_file = null; 
  9.  
  10. // The action links. 
  11. $action_links = array(); 
  12.  
  13. // The position. 
  14. $position = 'after'; 
  15.  
  16. // NOTICE! Understand what this does before running. 
  17. $result = aiosp_action_links($actions, $plugin_file, $action_links, $position); 
  18.  

Defined (1)

The function is defined in the following location(s).

/all_in_one_seo_pack.php  
  1. function aiosp_action_links( $actions, $plugin_file, $action_links = array(), $position = 'after' ) { 
  2. static $plugin; 
  3. if ( ! isset( $plugin ) ) { 
  4. $plugin = plugin_basename( __FILE__ ); 
  5. if ( $plugin === $plugin_file && ! empty( $action_links ) ) { 
  6. foreach ( $action_links as $key => $value ) { 
  7. $link = array( $key => '<a href="' . $value['url'] . '">' . $value['label'] . '</a>' ); 
  8. if ( 'after' === $position ) { 
  9. $actions = array_merge( $actions, $link ); 
  10. } else { 
  11. $actions = array_merge( $link, $actions ); 
  12. }//foreach 
  13. }// if 
  14. return $actions;