Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* mantra-admin-functions.php */
- /* Code to have an option to target link to a blank page or same page */
- /* Slide option*/
- <p>
- <b><?php _e("Target","mantra");?></b>
- <?php
- $items = array ("_blank" , "_self");
- $itemsare = array( __("Blank","mantra"), __("Self","mantra"));
- echo "<select id='mantra_slidertarget1' name='ma_options[mantra_slidertarget1]'>";
- foreach($items as $id=>$item) {
- echo "<option value='$item'";
- selected($mantra_options['mantra_slidertarget1'],$item);
- echo ">$itemsare[$id]</option>";
- }
- echo "</select>";
- echo "<br/><small>".__("Blank opens in a new page. Self opens in the same page","mantra")."</small>";
- ?>
- /* Column option */
- <p>
- <b><?php _e("Target","mantra");?></b>
- <?php
- $items = array ("_blank" , "_self");
- $itemsare = array( __("Blank","mantra"), __("Self","mantra"));
- echo "<select id='mantra_columntarget1' name='ma_options[mantra_columntarget1]'>";
- foreach($items as $id=>$item) {
- echo "<option value='$item'";
- selected($mantra_options['mantra_columntarget1'],$item);
- echo ">$itemsare[$id]</option>";
- }
- echo "</select>";
- echo "<br/><small>".__("Blank opens in a new page. Self opens in the same page","mantra")."</small>";
- ?>
- /*front-page.php */
- /* Slide & Column showing the target inherited from options */
- <a href="<?php echo $mantra_sliderlink1 ?>" target="<?php echo $mantra_slidertarget1; ?>">
- <a href="<?php echo $mantra_columnlink1 ?>" target="<?php echo $mantra_columntarget1; ?>">
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement