[ Index ] |
MailPress 7.2 |
[ Index ] [ Classes ] [ Functions ] [ Variables ] [ Constants ] [ Statistics ] |
[Summary view] [Print] [Text view]
1 <?php 2 class MP_theme_html_2011 extends MP_theme_html_ 3 { 4 const HEADER_IMAGE_WIDTH = 760; 5 const HEADER_IMAGE_HEIGHT = 219; 6 7 public static $_comments_1st = false; 8 9 var $style = 'style="border:0 none;font-family:inherit;font-size:100%;font-style:inherit;font-weight:inherit;margin:0;padding:0;vertical-align:baseline;color:#1982D1;text-decoration:none;font-weight:bold;"'; 10 11 function build_mail_content_start( $type ) 12 { 13 if ( 'html' != $type ) return; 14 15 add_filter( 'wp_nav_menu', array( $this, 'wp_nav_menu' ), 8, 2 ); 16 add_filter( 'wp_page_menu', array( $this, 'wp_nav_menu' ), 8, 2 ); 17 18 parent::build_mail_content_start( $type ); 19 } 20 21 function build_mail_content_end( $type ) 22 { 23 if ( 'html' != $type ) return; 24 25 remove_filter( 'wp_nav_menu', array( $this, 'wp_nav_menu' ) ); 26 remove_filter( 'wp_page_menu', array( $this, 'wp_nav_menu' ) ); 27 28 parent::build_mail_content_end( $type ); 29 } 30 31 function wp_nav_menu( $menu, $args ) 32 { 33 $searched = array( '<ul>', 34 '<li class="current_page_item">', 35 '<li class="page_item page-item-', 36 '<a', 37 ); 38 $replace = array( '<ul style="font-size:13px;list-style:none outside none;margin:0 7.6%;padding-left:0;">', 39 '<li style="float:left;font-weight: bold;">', 40 '<li style="float:left;" class="page_item page-item-', 41 '<a style="color:#EEE;display:block;line-height:3.333em;padding:0 1.2125em;text-decoration:none;" ', 42 ); 43 return str_ireplace( $searched, $replace, $menu ); 44 } 45 46 function comments_popup_link_attributes( $attrs = '' ) 47 { 48 self::$_comments_1st = !self::$_comments_1st; 49 if ( self::$_comments_1st ) 50 { 51 $url = content_url() . "/themes/twentyeleven/images/comment-bubble.png"; 52 return $attrs . ' style="background: url( \'' . $url . '\' ) no-repeat scroll 0 0 #EEEEEE;color:#666666;font-size:13px;font-weight:normal;height:36px;line-height:35px;overflow:hidden;padding:0;position:absolute;right:0;text-align:center;text-decoration:none;top:1.5em;width:43px;" '; 53 } 54 return "$attrs {$this->style} "; 55 } 56 } 57 new MP_theme_html_2011();
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Tue May 19 15:55:14 2020 | Cross-referenced by PHPXref 0.7.1 |