| [ Index ] |
PHP Cross Reference of PageLines Framework |
[Summary view] [Print] [Text view]
1 <?php 2 /* 3 Section: Highlight 4 Author: PageLines 5 Author URI: http://www.pagelines.com 6 Description: Adds a highlight sections with a splash image and 2-big lines of text. 7 Class Name: PageLinesHighlight 8 Workswith: templates, main, header, morefoot, sidebar1, sidebar2, sidebar_wrap 9 Edition: pro 10 Cloning: true 11 */ 12 13 /** 14 * Highlight Section 15 * 16 * @package PageLines Framework 17 * @author PageLines 18 */ 19 class PageLinesHighlight extends PageLinesSection { 20 21 var $tabID = 'highlight_meta'; 22 23 24 /** 25 * 26 * @TODO document 27 * 28 */ 29 function section_optionator( $settings ){ 30 31 $settings = wp_parse_args($settings, $this->optionator_default); 32 33 $metatab_array = array( 34 35 'hl_options' => array( 36 'version' => 'pro', 37 'type' => 'multi_option', 38 'title' => 'Highlight Header Text (Optional)', 39 'shortexp' => 'Add the main header text for the highlight section.', 40 'selectvalues' => array( 41 '_highlight_head' => array( 42 'version' => 'pro', 43 'type' => 'text', 44 'size' => 'big', 45 'inputlabel' => 'Highlight Header Text (Optional)', 46 ), 47 '_highlight_subhead' => array( 48 'version' => 'pro', 49 'type' => 'text', 50 'size' => 'big', 51 'inputlabel' => 'Highlight Subheader Text (Optional)', 52 ), 53 54 '_highlight_splash' => array( 55 'version' => 'pro', 56 'type' => 'image_upload', 57 'inputlabel' => 'Upload Splash Image' 58 ), 59 '_highlight_splash_position' => array( 60 'version' => 'pro', 61 'type' => 'select', 62 'inputlabel' => 'Highlight Image Style', 63 'selectvalues'=> array( 64 'top' => array( 'name' => 'Image on top of text' ), 65 'bottom' => array( 'name' => 'Image on bottom of text' ), 66 'notext' => array( 'name' => 'No text, just the image' ) 67 ), 68 ), 69 '_highlight_image_frame' => array( 70 'type' => 'check', 71 'inputlabel' => 'Add frame to image?' 72 ), 73 ) 74 ) 75 76 ); 77 78 $metatab_settings = array( 79 'id' => $this->tabID, 80 'name' => 'Highlight', 81 'icon' => $this->icon, 82 'clone_id' => $settings['clone_id'], 83 'active' => $settings['active'] 84 ); 85 86 register_metatab($metatab_settings, $metatab_array); 87 } 88 89 /** 90 * 91 * @TODO document 92 * 93 */ 94 function section_template( $clone_id ) { 95 96 $h_head = ploption('_highlight_head', $this->tset); 97 $h_subhead = ploption('_highlight_subhead', $this->tset); 98 $h_splash = ploption('_highlight_splash', $this->tset); 99 $h_splash_position = ploption('_highlight_splash_position', $this->oset); 100 101 $frame_class = (ploption('_highlight_image_frame', $this->oset)) ? 'pl-imageframe' : ''; 102 103 if($h_head || $h_subhead || $h_splash){?> 104 <div class="highlight-area"> 105 <?php 106 107 if( $h_splash_position == 'top' && $h_splash) 108 printf('<div class="highlight-splash hl-image-top %s"><img src="%s" alt="" /></div>', $frame_class, $h_splash); 109 110 if( $h_splash_position != 'notext' ){ 111 112 if($h_head) 113 printf('<h1 class="highlight-head">%s</h1>', __( $h_head, 'pagelines' ) ); 114 115 if($h_subhead) 116 printf('<h3 class="highlight-subhead subhead">%s</h3>', __( $h_subhead, 'pagelines' ) ); 117 118 } 119 120 if( $h_splash_position != 'top' && $h_splash) 121 printf('<div class="highlight-splash hl-image-bottom %s"><img src="%s" alt="" /></div>', $frame_class, apply_filters( 'pl_highlight_splash', $h_splash ) ); 122 ?> 123 </div> 124 <?php 125 } else 126 echo setup_section_notify($this, __('Set highlight page options to activate.', 'pagelines') ); 127 } 128 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Sat Apr 6 23:00:27 2013 | Cross-referenced by PHPXref 0.7.1 |