/** * Filters meta links on the plugins list page * * @param array $links The current plugin's links. * @param string $basename The plugin currently being filtered. * * @return array Filtered action links array. */ public function filter_meta_links($links, $basename) { // Gets any links that are set for this plugin, defaults to an empty array. $set_links = Tribe__Utils__Array::get($this->meta_links, $basename, array()); foreach ($set_links as $link) { if (true === $link['remove']) { // Remove a link. $pos = array_search($link['html'], $links); if (false !== $pos) { unset($links[$pos]); } } else { // Add a link. $links[] = $link['html']; } } return $links; }
/** * Retrieves arg, including one nested a few levels deep * * @param string|array $key To select an arg nested multiple levels deep pass an * array specifying each key in order as a value. * Example: array( 'lvl1', 'lvl2', 'lvl3' ); * @param null $default Value to return if nothing is set. * * @return mixed Returns the args value or the default if arg is not found. */ public final function get($key, $default = null) { return Tribe__Utils__Array::get($this->args, $key, $default); }