[ Index ]

PHP Cross Reference of PageLines Framework

title

Body

[close]

/admin/ -> library.help.php (source)

   1  <?php
   2  /**
   3   * PageLine Inline Help System.
   4   *
   5   *
   6   * @author PageLines
   7   *
   8   * @since 2.0.b21
   9   */
  10  
  11  class PageLines_Inline_Help {
  12  
  13  
  14      /**
  15      *
  16      * @TODO document
  17      *
  18      */
  19  	function __construct() {
  20  
  21          global $wp_version;
  22          if ( true == ( version_compare( $wp_version, '3.3-beta1', '>=' ) ) )
  23              add_filter( 'contextual_help_list', array( &$this, 'get_help' ) ,9999);
  24      }
  25  
  26  
  27      /**
  28      *
  29      * @TODO document
  30      *
  31      */
  32  	function get_help() {
  33  
  34          global $current_screen;
  35          $this->screen = $current_screen;
  36  
  37          switch( $this->screen->id ) {
  38  
  39              case 'pagelines_page_pagelines_extend':
  40                  $this->extend_help( array(
  41                      'pagelines-store'    => __( 'PageLines Store', 'pagelines' ),
  42                      'integrations'        => __( 'Integrations', 'pagelines' ),
  43                  ));
  44              break;
  45  
  46  
  47              case 'pagelines_page_pagelines_special':
  48                  $this->extend_help( array(
  49                      'site-defaults'        => __( 'About Site Defaults', 'pagelines' ),
  50                      'special-about'        => __( 'About Special Pages', 'pagelines' ),
  51                      'special-blog'        => __( 'Blog Page', 'pagelines' ),
  52                      'special-archive'    => __( 'Archive Page', 'pagelines' ),
  53                      'special-category'    => __( 'Category Page', 'pagelines' ),
  54                      'special-search'    => __( 'Search Results', 'pagelines' ),
  55                      'special-tags'        => __( 'Tag Listing', 'pagelines' ),
  56                      'special-author'    => __( 'Author Posts', 'pagelines' ),
  57                      'special-404'        => __( '404 Page', 'pagelines' )
  58                      ));
  59              break;
  60  
  61              case 'pagelines_page_pagelines_templates':
  62                  $this->extend_help( array(
  63                      'templates'        => __( 'Drag & Drop', 'pagelines' )
  64                      ));
  65              break;
  66  
  67              case 'toplevel_page_pagelines':
  68              $this->extend_help( array(
  69                  'welcome'        => __( 'Welcome', 'pagelines' ),
  70                  'website_setup'    =>    __( 'Website Setup', 'pagelines' ),
  71                  'layout'        => __( 'Layout Editor', 'pagelines' ),
  72                  'color'            => __( 'Color Control', 'pagelines' ),
  73                  'typography'    => __( 'Typography', 'pagelines' ),
  74                  'header-footer'    => __( 'Header and Footer', 'pagelines' ),
  75                  'navbar'        => __( 'NavBar', 'pagelines' ),
  76                  'blog-posts'    => __( 'Blog and Posts', 'pagelines' ),
  77                  'advanced'        => __( 'Advanced', 'pagelines' ),
  78                  'custom'        => __( 'Custom Code', 'pagelines' )
  79                  ));
  80              break;
  81  
  82              case 'pagelines_page_pagelines_account':
  83                  $this->extend_help( array(
  84                      'your_account'    => __( 'Your Account', 'pagelines' ),
  85                      'import'        => __( 'Import-Export', 'pagelines' ),
  86                  ));
  87              default:
  88              break;
  89          }
  90  
  91      }
  92  
  93  
  94      /**
  95      *
  96      * @TODO document
  97      *
  98      */
  99  	function extend_help( $helps ) {
 100  
 101          foreach( $helps as $id => $help ) {
 102  
 103              $this->screen->add_help_tab( array(
 104                  'id'      => $id,
 105                  'title'   => $help,
 106                  'content' => $this->help_markup( $id ),
 107              ));
 108              $this->screen->set_help_sidebar(
 109                  '<p><strong>' . __( 'For more information:', 'pagelines' ) . '</strong></p>' .
 110                  '<p>' . sprintf( '<a href="http://www.pagelines.com/wiki/" target="_blank">%s</a>', __( 'Documentation', 'pagelines' ) ) . '</p>' .
 111                  '<p>' . sprintf( '<a href="http://forum.pagelines.com/" target="_blank">%s</a>', __( 'Support Forums', 'pagelines' ) ) . '</p>'
 112          );
 113          }
 114      }
 115  
 116  
 117      /**
 118      *
 119      * @TODO document
 120      *
 121      */
 122  	function help_markup( $help ) {
 123  
 124          $markup = array(
 125  
 126              'welcome'            =>    __( '<p>Welcome to the PageLines Help Section! Here you can find a brief overview of each tab, as well as a link to a more detailed help doc.</p>', 'pagelines' ),
 127  
 128              'website_setup'        =>    __( "<p>Website Setup is generally the first thing people configure when they activate PageLines.<br />These are the options that get your logo, brand name, and other custom elements up on your site.<br />For more information, click on <a href='http://www.pagelines.com/wiki/How_to_Use_the_Website_Setup_Settings' target='_blank'>How to Use the Website Setup Settings</a></p>", 'pagelines' ),
 129  
 130              'layout'            =>    __( "<p>The Layout Editor is what changes the layout of your site. You can change the dimensions of your content, the number & location of your sidebar(s), etc... <br />For more information, click on <a href='http://www.pagelines.com/wiki/How_to_Use_the_Layout_Editor_Settings' target='_blank'>How to Use the Layout Editor Settings</a></p>", 'pagelines' ),
 131  
 132              'color'                =>    __( "<p>Color Control lets you choose the main colors that will be displayed on your website. It will then decide the best colors for your site's secondary and tertiary elements. You can always edit these manually by using CSS but Color Control chooses the best complementary colors to your site design. <br /><br />For more information, click on <a href='http://www.pagelines.com/wiki/How_to_Use_the_Color_Control_Settings' target='_blank'>How to Use the Color Control Settings</a></p>", 'pagelines' ),
 133  
 134              'typography'        =>    __( "<p>Typography allows you to change the fonts that appear on your website. No need for html or css to make changes to the most common place that you might want to change your fonts. <br /><br />For more information, click on <a href='http://www.pagelines.com/wiki/How_to_Use_the_Typography_Settings' target='_blank'>How to Use the Typography Settings</a></p>", 'pagelines' ),
 135  
 136              'header-footer'        =>    __( "<p>The Header & Footer  settings provide flexibility and ease in setting up important site content such as Dropdown Navigation, Search capability, Social links, and Copyright statements.<br /><br />For more information, click on <a href='http://www.pagelines.com/wiki/How_to_Use_the_Header_and_Footer_Settings' target='_blank'>How to Use the Header and Footer Settings</a></p>", 'pagelines' ),
 137  
 138              'blog-posts'        =>    __( "<p>The Blog And Posts settings is where you can set up the general structure and appearance of your blog post content.<br /><br />For more information, click on <a href='http://www.pagelines.com/wiki/How_to_Use_the_Blog_and_Posts_Settings' target='_blank'>How to Use the Blog and Posts Settings</a></p>", 'pagelines' ),
 139  
 140              'advanced'            =>    __( "<p>The Advanced settings contain some additional options that can be useful to solve some specific issues when developing your site. These include notorious browser compatibility issues with JS, server issues with Ajax and some useful other options for helping troubleshoot your site or connect with the affiliate program. <br /><br />For more information, click on <a href='http://www.pagelines.com/wiki/How_to_Use_the_Advanced_Settings' target='_blank'>How to Use the Advanced Settings</a></p>", 'pagelines' ),
 141  
 142              'custom'            =>    __( "<p>The Custom Code setting is where you can insert your Custom CSS styling. If you have any Header, Footer, or Google Analytics script, all of that goes there as well. <br /><br />For more information, click on <a href='http://www.pagelines.com/wiki/How_to_Use_the_Custom_Code_Settings' target='_blank'>How to Use the Custom Code Settings</a></p>", 'pagelines' ),
 143  
 144              'templates'            => __( "<p>The Drag & Drop Settings are one of PageLine's most powerful features. Using drag and drop technology, you can easily place your sections wherever you want on your site. <br /><br />For more information, click on <a href='http://www.pagelines.com/wiki/How_to_Use_the_Template_Setup' target='_blank'>How to Use the Template Setup</a></p>", 'pagelines' ),
 145  
 146              'pagelines-store'    =>    __( "<p>The PageLines Store is your one stop online market place for everything you need to truely customize your website. Built by fellow members of the PageLines community, the Store offers the following types of components:<ul><li><strong>Sections -</strong> Drag and Drop pieces of web design that you can control on page templates</li><li><strong>Themes -</strong> The overall appearance and structure of the site; its visual presentation.</li><li><strong>Plugins -</strong> Extend the functionality of your website.</li></ul>For more information, click on <a href='http://www.pagelines.com/wiki/How_to_Use_the_PageLines_Store' target='_blank'>How to Use the PageLines Store</a><br /><br />Interested in developing your own Sections/Themes/Plugins for the PageLines Store? Click on <a href='http://developer.pagelines.com/' target='_blank'>Getting Started as a Developer</a> for more information.</p>", 'pagelines' ),
 147  
 148  
 149              'integrations'        =>    __( "<p>If you purchased a PageLines Developer license, you have access to PageLines Integrations.<br />This allows you to use non-WordPress software on your website such as Vanilla forums & MediaWiki, and completely integrate it with the PageLines Framework. <br /><br />For more information, click on <a href='http://www.pagelines.com/wiki/How_to_Use_Integrations' target='_blank'>How to Use Integrations</a></p>", 'pagelines' ),
 150  
 151              'your_account'        =>    __( '<p>To be able to receive PageLines updates and purchase & download items from the Store, you must setup your account credentials.</p>', 'pagelines' ),
 152  
 153              'import'            =>    __( "<p>You can easily transfer your PageLines 2.0 settings to another PageLines 2.0 site by using the Import-Export feature. Remember that this will only transfer your <em>PageLines</em> Settings. <br /><br />If you want to transfer your posts, pages, comments, custom fields, categories, and tags, you must use the WordPress Import-Export feature. This is located under 'Tools' inside your WordPress Administration Menu.<br /><br />For more information, click on <a href='http://www.pagelines.com/wiki/How_to_Migrate_PageLines_from_Another_Site' target='_blank'>How to Migrate PageLines from Another Site</a></p>", 'pagelines' ),
 154  
 155              'site-defaults'        =>    __( "<p>Site Defaults can be set for all active Sections on your site. They contain the exact same Section Settings found in a post or a page. Once you set a Site Default for a section, that setting will apply to the same section on any post or page that does not have the same <em>meta</em> setting set.  .<br /><br />For more information, click on <a href='http://www.pagelines.com/wiki/How_to_Use_Site_Defaults' target='_blank'>How to Use Site Defaults</a></p>", 'pagelines' ),
 156  
 157  
 158              'special-about'        =>    __( "<p>Special Pages refer to the WordPress pages which dynamically display data from your site. For example, your Blog is a Special Page, because it takes all of your individually entered posts and displays them on one page. <br /><br />Each type of Special Page has the same settings. Click on each tab to find out more on each page type.<br /><br />For more information, click on <a href='http://www.pagelines.com/wiki/How_to_Use_Special_Pages' target='_blank'>How to Use the Special Pages</a></p>", 'pagelines' ),
 159  
 160              'special-blog'        =>    __( '<p>This page contains of all the blog posts on your site.</p>', 'pagelines' ),
 161              'special-archive'    =>    __( '<p>This page displays all blog posts created in a particular month. Users can select the month via the Archives Widget in the Sidebar.</</p>', 'pagelines' ),
 162              'special-category'    =>    __( '<p>If a blog post is assigned to a certain category, a user can click on that category and arrive at this page. It will contain all the other posts in that same category.</p>', 'pagelines' ),
 163              'special-search'    =>    __( '<p>When a user types in a search on your website, the Search Results page will appear containing the results.</p>', 'pagelines' ),
 164              'special-tags'        =>    __( '<p>You can assign tag words to a post. If a user clicks on the tag word, he will arrive at this page containing other posts with the same tag.</p>', 'pagelines' ),
 165              'special-author'    =>    __( '<p>This page will show all of the posts by a certain author. Clicking on the authors name will take the user there.</p>', 'pagelines' ),
 166              'special-404'        =>    __( "<p>If a user tries to go to a page on your site that doesn't exist, he will arrive at this page.</p>", 'pagelines' ),
 167              'navbar'            =>    __( "<p>The NavBar settings allow you to control the fixed navigation bar including themes, logo and menus.<br /><br />For more information, click on <a href='http://www.pagelines.com/wiki/How_to_use_NavBar' target='_blank'>How to Use the NavBar</a></p>", 'pagelines' )
 168          );
 169  
 170          return ( isset( $markup[$help] ) ) ? $markup[ $help ] : __( 'No help for this tab yet!', 'pagelines' );
 171      }
 172  
 173  } //end class


Generated: Fri Aug 30 18:26:24 2013 Cross-referenced by PHPXref 0.7.1