# {ANCHOR }

ClipBucket anchors are basically hook points where you can execute your codes via plugins

for example

if you want to call code under your video player, you will simply create or write an anchor after your player code as follows

```
{ANCHOR place="after_video_player"}
```

now if you want to call code at this anchor, you will simply “register anchor code” or “anchor function”

there are two functions for registering codes for anchor points

1. register\_anchor
2. register\_anchor\_function

#### Register\_Anchor

```
register_anchor(String[text you want to display on this anchor point], String[Anchor place]);  
```

now if you want to show a text “Hello World!” , you simply have to do is

```
 register_anchor("Hello World!","after_video_player");
```

#### Register\_Anchor\_Function

```
register_anchor(String[function name], String[Anchor place]);  
```

now if you want to execute a function on place “after\_video\_player” , here how you will do that

```
register_anchor_function("my_function","after_video_player");
```

and you also have to write my\_function code such as

```
 function my_function(){ echo "Hello World!"; }  
```

#### Passing Parameters To Function Via Anchor

if you want to pass paramters to function via anchor, its really simple. First you have to add a paramter in anchor function

```
{ANCHOR place='after_video_player' data="This is me, Mickey!"}
```

and the function you want to call is my\_function($text) , you just have to do is

```
register_anchor_function("my_function","after_video_player");
function my_function($text){ echo "Hello World! ".$text;  }
```

it will show the whole phrase as “Hello World! This is me, Mickey”;

Hope i have cleared the mystery of our Anchor points, need more help regarding this , please leave a comment or discuss it on forums.clip-bucket.com

![](https://clipbucket.com/docs/wp-content/plugins/wp-postratings/images/loading.gif)Loading...


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.clipbucket.com/guides/functions/anchor.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
