lundi 30 mars 2015

Put HTML code in PHP array

I have this code for my WordPress theme panel:



$options[] = array( "name" => __('Top Button','framework_localize'),
"desc" => __('Show back to top button.','framework_localize'),
"id" => $shortname."_btn_top",
"std" => "1",
"type" => "radio",
"options" => array(
'Show' => 'Show',
'Hide' => 'Hide',
));


And I want to set HTML code for top button scroll when show option is selected and nothing for when hide is selected.


My HTML code for top button is this:



<a type="button" href="#" class="topbutton" data-toggle="tooltip" data-placement="left" title="Back to top"></a>

Aucun commentaire:

Enregistrer un commentaire