'General','logo' => 'Logo','taglines' => 'Taglines','error' => 'Error','help'=>'Help'); $content = "

"; echo $content; } function aerin_settings() { global $pagenow; echo "

Aerin Theme Settings

"; if (isset ($_GET['tab'])) aerin_admin_tabs($_GET['tab']); else aerin_admin_tabs('general'); if ($pagenow == 'themes.php' && $_GET['page'] == 'theme-settings') { if (isset ($_GET['tab'])) $tab = $_GET['tab']; else $tab = 'general'; switch ($tab) { case 'general' : aerin_layout(); break; case 'logo' : aerinlogo(); break; case 'taglines' : aerin_taglines(); break; case 'error' : aerin_error_options (); break; case 'help' : aerin_help (); break; } } echo "
"; } function aerin_layout() { if (isset($_POST['submit'])) { $options = array( 'location','analytics','tagline','headeron','footeron','markers','code','search'); foreach ($options as $item) $aeringen[$item] = stripslashes($_POST[$item]); update_option('aeringen',$aeringen); aerin_admin_notice("General theme settings updated."); } if (isset($_POST['reset'])) { delete_option('aeringen'); aerin_admin_notice("Theme settings have be reset to the default values."); } $aeringen = aeringen_stored(); $$aeringen['tagline'] = "checked"; $$aeringen['location'] = "checked"; $$aeringen['signoff'] = "checked"; $path = get_template_directory_uri(); $content = '

Tagline Location

Use header tagline. Set the tagline position below

Use footer tagline (appears at the bottom of the page)

Use the taglines tab to change the tagline content

Site Search

Include site search in the navigation bar

Analytics

Set analytics code location: Document head Document footer No analytics.

Google likes its code in the head, most others go in the footer. Check with your provider.

Add your analytics code to the text box below.

Code Reduction

Remove code bloat from header and menus. This will make the theme much lighter but may cause accessibility and styling issues. Use with caution.

Layout Markers

Show layout markers (to help with alignments, margins, paddings and borders)

'; echo $content; } function aerinlogo() { if (isset($_POST['submit'])) { $options = array('logoalt','logotitle','logolink','logoresponsive','logoalternative'); foreach ($options as $item) $aerinlogo[$item] = stripslashes($_POST[$item]); $filename = $_FILES['logo_name']['name']; if (!empty($filename)) { $ext = substr(strrchr($filename,'.'),1); if (strpos('jpegjpggifpng',$ext) === false) {$error = 'error'; aerin_admin_notice("Unable to upload logo. Check filetype and size: jpg, gif or png only. Max 100Kb"); } if (empty($error)) { $aerinlogo['logourl'] = get_bloginfo(template_url)."/images/".$filename; $path = get_template_directory(); move_uploaded_file($_FILES['logo_name']['tmp_name'], $path .'/images/'.$_FILES['logo_name']['name']); $aerinlogo['logoalternative'] = $aerinlogo['logourl'].','.$aerinlogo['logoalternative']; aerin_admin_notice("Logo settings updated."); } } else $aerinlogo['logourl'] = $_POST['derek']; if (!empty($_POST['logoclear'])) $aerinlogo['logoalternative'] = $aerinlogo['logourl']; update_option('aerinlogo',$aerinlogo); } if (isset($_POST['reset'])) { delete_option('aerinlogo'); aerin_admin_notice("Theme logo settings have been reset to the default values."); } $aerinlogo = aerinlogo_stored(); if ($aerinlogo['logolink'] == 'link') $aerinlogo['logolink'] ='checked'; if ($aerinlogo['logoresponsive'] == 'responsive') $aerinlogo['logoresponsive'] ='checked'; $content ='

Current Logo

Logo URL: ' .$aerinlogo['logourl'] . '

Change Logo Settings

Select a logo : (gif, jpg or png only. Max file size 100Kb)

Alt text (optional):

Image Title: (optional):

Logo links to your homepage?

Responsive logo (resizes to fit the screen)

Available Logos

Select one of the logos below to use it in your theme

'; $arr = explode(",",$aerinlogo['logoalternative']); foreach ($arr as$item) { if ($aerinlogo['logourl'] == $item) $checked = 'checked'; else $checked = ''; if (!empty($item)) $content .='  
'; } $content .='

Clear all alternate logos (only the selected logo will remain)

'; echo $content; } function aerin_taglines() { if (isset($_POST['submit'])) { $options = array('header','footer'); foreach ($options as $item) $aerintag[$item] = stripslashes($_POST[$item]); update_option('aerintag',$aerintag); aerin_admin_notice("Tagline settings updated."); } $aerintag = aerintag_stored(); $header = $aerintag['header']; $footer = $aerintag['footer']; echo '

Header Tagline

Use the general tab to change how the taglines are displayed

'; wp_editor(stripslashes($header), 'header', $settings = array('textarea_rows' => '4')); echo '

The style for the header tagline is #tagline.

Footer Sign-off

'; wp_editor(stripslashes($footer), 'footer', $settings = array('textarea_rows' => '4')); echo '

The style for the sign-off line is #signoff.

'; } function aerin_error_options() { if (isset($_POST['submit'])) { $aerinerr['error'] = $_POST['error']; $aerinerr['errortitle'] = $_POST['errortitle']; update_option('aerinerr',$aerinerr); aerin_admin_notice("Error message updated."); } if (isset($_POST['reset'])) { delete_option('aerinerr'); aerin_admin_notice("Theme error message has been reset to the default values."); } $aerinerr = aerinerr_stored(); $error = $aerinerr['error']; echo '

Page not found error message

Error Page title:

'; wp_editor($error, 'error', $settings = array('textarea_rows' => '4')); echo '

'; } function aerin_help(){ $content ='

Help on using the Aerin Responsive Theme

This theme isn\'t really designed to be used straight out the box. The styling is a bit clunky and the colours are just there to act as markers so you know where each bit is.

To get the theme (and your site) working properly here are a few guidelines:

Site Settings

Change the permalinks to something useful (default is the page ID).

Put all your media in one folder (so much easier to find things).

Change your homepage settings (the default is your latest posts).

Create your menus

Sort out what widgets you want in your sidebar and footer.

Theme Settings

General

Select if and where you want the taglines to display

Check the box if you want to display a search box in the header to the right of the main menu. If you choose this option the search box will display below the navigation on smaller screens.

If you want analytics choose the location and enter the analytics code.

There is an option to remove a lot of the header and navigation code. This will make the theme much lighter but may mess up your styling. Use with caution.

To assist with styling there is an option to display some basic markers to show where the main elements are located.

Logo

Use this to upload your logo. If you select the \'responsive\' option your logo will resize to fit the device.

You can upload more than one logo and swap between them.

The max-width of the site is 1060 pixels, a narrower logo won\'t fill the page.

Taglines

This is where you change the content of your taglines. You can insert text, headers, lists and images.

The options to display the taglines is set in the general tab

Error Page

Like it says on the tin, this is where you can create a custom error page. You can insert text, headers, lists and images.

Get More Help

Send an email to mail@quick-plugins.com.

'; echo $content; } function aerin_admin_notice($message) { if (!empty($message)) echo '

'.$message.'

'; }