Pagelines welcome billboard

[edit] Please Note

These docs are now deprecated, we have a new Support area located here

(Difference between revisions)
(Examples)
 
(3 intermediate revisions by one user not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 
== Filter ==
 
== Filter ==
<tt>pagelines_welcome_billboard</tt> ...
+
<tt>pagelines_welcome_billboard</tt> can be used to modify the content at the top of the theme Welcome page produced by the [[get_welcome_billboard]] function.
  
 
== Usage ==
 
== Usage ==
Line 15: Line 15:
  
 
== Examples ==
 
== Examples ==
 +
The default look of the theme Welcome page is very similar to the following:
 +
[[File:PageLines-Welcome-Billboard-default.png|center]]
 +
If you wanted to remove that altogether then you could simply add the following to your (Child-Theme's) ''functions.php'' file:
 +
<syntaxhighlight><?php add_filter( 'pagelines_welcome_billboard', '__return_false' ); ?></syntaxhighlight>
 +
This would then transform the top of the theme Welcome page into something like this:
 +
[[File:PageLines-Welcome-Billboard-blank.png|center]]
 +
Well, that's rather boring ... but we can fix that rolling our own Welcome Billboard code ...
 +
 +
<syntaxhighlight><?php
 +
function my_pagelines_welcome_billboard(){
 +
  /** Let's borrow some code and make a few minor adjustments, just for show ... */
 +
 +
  $my_billboard = '<div class="admin_billboard fix"><div class="admin_billboard_pad fix">';
 +
  $my_billboard .= '<div class="admin_theme_screenshot"><img class="" src="'.CHILD_URL.'/screenshot.png" alt="Screenshot" /></div>';
 +
  $my_billboard .= sprintf( '<div class="admin_billboard_content"><div class="admin_header"><h3 class="admin_header_main">%s</h3></div>' , __( 'Congratulations!', 'my-textdomain' ) );
 +
  $my_billboard .= sprintf( "<div class='admin_billboard_text'>%s<br/>%s<br/><small>(%s)</small></div>",
 +
      __( 'Welcome to your <strong><em>AWESOME</em> professional</strong> website.', 'my-textdomain' ),
 +
      __( 'Here are a few <strong>GREAT</strong> tips to get you started with your PageLines Theme by <em>me!</em>', 'my-textdomain' ),
 +
      __( 'Note: This intro can be removed below.', 'my-textdomain' )
 +
    );
 +
  $my_billboard .= '<div class="clear"></div></div></div></div>';
 +
   
 +
  return $my_billboard;
 +
 +
}
 +
?></syntaxhighlight>
 +
 +
This is not a significant change but gives you an idea of what even a small tweak can do:
 +
[[File:My-billboard-example.png|center]]
  
 
== Source File ==
 
== Source File ==

Latest revision as of 16:28, 8 April 2012

[edit] Filter

pagelines_welcome_billboard can be used to modify the content at the top of the theme Welcome page produced by the get_welcome_billboard function.

[edit] Usage

NB: my_pagelines_welcome_billboard is used only as an example, a more appropriate function name should be used in production code.

[edit] Examples

The default look of the theme Welcome page is very similar to the following:

PageLines-Welcome-Billboard-default.png

If you wanted to remove that altogether then you could simply add the following to your (Child-Theme's) functions.php file:

This would then transform the top of the theme Welcome page into something like this:

PageLines-Welcome-Billboard-blank.png

Well, that's rather boring ... but we can fix that rolling our own Welcome Billboard code ...

'; $my_billboard .= '
Screenshot
'; $my_billboard .= sprintf( '

%s

' , __( 'Congratulations!', 'my-textdomain' ) ); $my_billboard .= sprintf( "
%s
%s
(%s)
",
     __( 'Welcome to your AWESOME professional website.', 'my-textdomain' ),
     __( 'Here are a few GREAT tips to get you started with your PageLines Theme by me!', 'my-textdomain' ),
     __( 'Note: This intro can be removed below.', 'my-textdomain' )
   );
$my_billboard .= '
';
 return $my_billboard;

}

?>

This is not a significant change but gives you an idea of what even a small tweak can do:

My-billboard-example.png

[edit] Source File

pagelines_welcome_billboard is defined in get_welcome_billboard() which is located in admin/class.welcome.php