gde_row_actions

The Google Doc Embedder gde row actions function.

Description

gde_row_actions( $pid ); 

Parameters (1)

0. $pid
The pid.

Usage

  1. if ( !function_exists( 'gde_row_actions' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-doc-embedder/options.php'; 
  3.  
  4. // The pid. 
  5. $pid = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = gde_row_actions($pid); 
  9.  

Defined (1)

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

/options.php  
  1. function gde_row_actions( $pid ) { 
  2. $actions = array( 
  3. // action name => arr ( label, class ) 
  4. "edit" => array( __('Edit', 'google-document-embedder'), 'edit' ),  
  5. "delete" => array( __('Delete', 'google-document-embedder'), 'delete' ),  
  6. "default" => array( __('Make Default', 'google-document-embedder'), 'default' ) 
  7. ); 
  8.  
  9. // protect default profile 
  10. if ( $pid == 1 ) { 
  11. unset( $actions['delete'], $actions['default'] ); 
  12.  
  13. foreach ($actions as $k => $v) { 
  14. $act[] = '<span class="'.esc_attr($v[1]).'" id="'.esc_attr($k).'-'.esc_attr($pid).'"><a href="options-general.php?page=gde-settings">'.htmlentities($v[0]).'</a></span>'; 
  15. $acts = implode( " | ", $act ); 
  16.  
  17. return $acts;