====== Plugins / call_anchor() ====== ===== Description ===== "Calls an anchor": sets up a callback for plugins. Can be used to define an action spot in the code or set up a filter on data. ===== Usage ===== ===== Parameters ===== **$name** * required * string The name of the anchor. **$function** * optional * string or array Any data/parameters you need to send to plugin functions. Can be a single string value or an array of values. It is recommended that arrays be associative, for ease of use on the receiving end. ===== Examples ===== "Denmark", "city" => "Copenhagen" ) ); hook( "my_anchor", "my_func" ); function my_func( $data ) { // extract() can be used extract( $data ); echo "$city, $country"; // or you can do it cumbersomely $city= $data['city']; $country= $data['country']; echo "$city, $country"; } ?> ===== Related ===== * [[plugins:advanced-plugins|Advanced Examples]] * [[plugins:hook|hook()]] * [[plugins:define_anchor|define_anchor()]]