`

 $options[] = array( 'title' => __('Donate to the theme developers', 'default'),
                    'desc'  => __('Note :Donate to the Developers of this theme, Donate any amount to keep the themes free '  , 'default'),
                    'id'    => '',
                    'std'   => '',
                    'type'  => 'sep' );

How do I add a link to the text I want the word "Donate" to have a link

How do I do that. If anyone could help me I would really be grateful

I'm not really sure what you're asking, however since any content that is displayed to the browser by PHP is HTML, you would create a link as you would in HTML.

So it would be <a href = "/LINK.php" > Donate </a>

Member Avatar for diafol

Am I to assume that you're using GETTEXT for translation of the strings with the __(...) format?

You question is difficult to answer as it's not clear what function you're using to create the link from the array. If it is a custom function rather than something like a built-in Wordpress function, then you can edit it freely, e.g.

$options[] = array( 'title' => __('Donate to the theme developers', 'default'),
                'desc'  => __('Note :Donate to the Developers of this theme, Donate any amount to keep the themes free '  , 'default'),
                'id'    => '',
                'std'   => '',
                'type'  => 'sep',
                'label' => __('Donate')
                );

Having said that, I can't think of a function that would not have this type of item in the array as it seems integral to me.

Could you give more info?

It looks like you are using WORDPRESS I may be wrong
I copied your code and added link directly using (<a href="">) and it showed me a link

<?php $options = array( 'title' => __('Donate to the theme developers', 'default'),
   'desc'  => __('Note :Donate to the Developers of this theme, <a href="Donate">Donate</a> any amount to keep the themes free '  , 'default'),
                    'id'    => '',
                    'std'   => '',
                    'type'  => 'sep');
                    print_r($options);?>

May be this may help

Member Avatar for diafol

Doh! now I see - I thought the array was used to generate a link - not that the OP needed to create a link within one of the strings.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.