diff options
Diffstat (limited to 'themes/mantra/admin')
19 files changed, 4387 insertions, 0 deletions
diff --git a/themes/mantra/admin/admin-functions.php b/themes/mantra/admin/admin-functions.php new file mode 100644 index 00000000..b361652c --- /dev/null +++ b/themes/mantra/admin/admin-functions.php @@ -0,0 +1,192 @@ +<?php
+/**
+ * Export Mantra settings to file
+ */
+
+function mantra_export_options(){
+
+ ob_clean();
+
+ /* Check authorisation */
+ $authorised = true;
+ // Check nonce
+ if ( ! wp_verify_nonce( $_POST['mantra-export'], 'mantra-export' ) ) {
+ $authorised = false;
+ }
+ // Check permissions
+ if ( ! current_user_can( 'edit_theme_options' ) ){
+ $authorised = false;
+ }
+
+ if ( $authorised) {
+global $mantra_options;
+/*date_default_timezone_set('UTC');
+$today = date("YmdGis");
+$name = 'mantra-settings'.$today.'.txt';*/
+ $name = 'mantra-settings.txt';
+ $data = $mantra_options;
+ $data = json_encode( $data );
+ $size = strlen( $data );
+
+ header( 'Content-Type: text/plain' );
+ header( 'Content-Disposition: attachment; filename="'.$name.'"' );
+ header( "Content-Transfer-Encoding: binary" );
+ header( 'Accept-Ranges: bytes' );
+
+ /* The three lines below basically make the download non-cacheable */
+ header( "Cache-control: private" );
+ header( 'Pragma: private' );
+ header( "Expires: Mon, 26 Jul 1997 05:00:00 GMT" );
+
+ header( "Content-Length: " . $size);
+ print( $data );
+}
+die();
+}
+
+if ( isset( $_POST['mantra_export'] ) ){
+ add_action( 'init', 'mantra_export_options' );
+}
+
+/**
+ * This file manages the theme settings uploading and import operations.
+ * Uses the theme page to create a new form for uplaoding the settings
+ * Uses WP_Filesystem
+*/
+function mantra_import_form(){
+
+ $bytes = apply_filters( 'import_upload_size_limit', wp_max_upload_size() );
+ $size = wp_convert_bytes_to_hr( $bytes );
+ $upload_dir = wp_upload_dir();
+ if ( ! empty( $upload_dir['error'] ) ) :
+ ?><div class="error"><p><?php _e('Before you can upload your import file, you will need to fix the following error:', 'mantra'); ?></p>
+ <p><strong><?php echo $upload_dir['error']; ?></strong></p></div><?php
+ else :
+ ?>
+
+ <div class="wrap">
+ <div style="width:400px;display:block;margin-left:30px;">
+ <div id="icon-tools" class="icon32"><br></div>
+ <h2><?php echo __( 'Import Mantra Theme Options', 'mantra' );?></h2>
+ <form enctype="multipart/form-data" id="import-upload-form" method="post" action="">
+ <p><?php _e('Hi! This is where you import the Mantra settings.<i> Please remember that this is still an experimental feature.</i>', 'mantra'); ?></p>
+ <p>
+ <label for="upload"><strong><?php _e('Just choose a file from your computer:', 'mantra'); ?> </strong><i>(mantra-settings.txt)</i></label>
+ <input type="file" id="upload" name="import" size="25" />
+ <span style="font-size:10px;">(<?php printf( __( 'Maximum size: %s', 'mantra' ), $size ); ?> )</span>
+ <input type="hidden" name="action" value="save" />
+ <input type="hidden" name="max_file_size" value="<?php echo $bytes; ?>" />
+ <?php wp_nonce_field('mantra-import', 'mantra-import'); ?>
+ <input type="hidden" name="mantra_import_confirmed" value="true" />
+ </p>
+ <input type="submit" class="button" value="<?php _e('And import!', 'mantra'); ?>" />
+ </form>
+ </div>
+ </div> <!-- end wrap -->
+ <?php
+ endif;
+} // Closes the mantra_import_form() function definition
+
+
+/**
+ * This actual import of the options from the file to the settings array.
+*/
+function mantra_import_file() {
+ global $mantra_options;
+
+ /* Check authorisation */
+ $authorised = true;
+ // Check nonce
+ if (!wp_verify_nonce($_POST['mantra-import'], 'mantra-import')) {$authorised = false;}
+ // Check permissions
+ if (!current_user_can('edit_theme_options')){ $authorised = false; }
+
+ // If the user is authorised, import the theme's options to the database
+ if ($authorised) {?>
+ <?php
+ // make sure there is an import file uploaded
+ if ( (isset($_FILES["import"]["size"]) && ($_FILES["import"]["size"] > 0) ) ) {
+
+ $form_fields = array('import');
+ $method = '';
+
+ $url = wp_nonce_url('themes.php?page=mantra-page', 'mantra-import');
+
+ // Get file writing credentials
+ if (false === ($creds = request_filesystem_credentials($url, $method, false, false, $form_fields) ) ) {
+ return true;
+ }
+
+ if ( ! WP_Filesystem($creds) ) {
+ // our credentials were no good, ask the user for them again
+ request_filesystem_credentials($url, $method, true, false, $form_fields);
+ return true;
+ }
+
+ // Write the file if credentials are good
+ $upload_dir = wp_upload_dir();
+ $filename = trailingslashit($upload_dir['path']).'mantra_options.txt';
+
+ // by this point, the $wp_filesystem global should be working, so let's use it to create a file
+ global $wp_filesystem;
+ if ( ! $wp_filesystem->move($_FILES['import']['tmp_name'], $filename, true) ) {
+ echo 'Error saving file!';
+ return;
+ }
+
+ $file = $_FILES['import'];
+
+ if ($file['type'] == 'text/plain') {
+ $data = $wp_filesystem->get_contents($filename);
+ // try to read the file
+ if ($data !== FALSE){
+ $settings = json_decode($data, true);
+ // try to read the settings array
+ if (isset($settings['mantra_db'])){ ?>
+ <div class="wrap">
+ <div id="icon-tools" class="icon32"><br></div>
+ <h2><?php echo __( 'Import Mantra Theme Options ', 'mantra' );?></h2> <?php
+ $settings = array_merge($mantra_options, $settings);
+ update_option('ma_options', $settings);
+ echo '<div class="updated fade"><p>'. __('Great! The options have been imported!', 'mantra').'<br />';
+ echo '<a href="themes.php?page=mantra-page">'.__('Go back to the Mantra options page and check them out!', 'mantra').'<a></p></div>';
+ }
+ else { // else: try to read the settings array
+ echo '<div class="error"><p><strong>'.__('Oops, there\'s a small problem.', 'mantra').'</strong><br />';
+ echo __('The uploaded file does not contain valid Mantra options. Make sure the file is exported from the Mantra Options page.', 'mantra').'</p></div>';
+ mantra_import_form();
+ }
+ }
+ else { // else: try to read the file
+ echo '<div class="error"><p><strong>'.__('Oops, there\'s a small problem.', 'mantra').'</strong><br />';
+ echo __('The uploaded file could not be read.', 'mantra').'</p></div>';
+ mantra_import_form();
+ }
+ }
+ else { // else: make sure the file uploaded was a plain text file
+ echo '<div class="error"><p><strong>'.__('Oops, there\'s a small problem.', 'mantra').'</strong><br />';
+ echo __('The uploaded file is not supported. Make sure the file was exported from the Mantra page and that it is a text file.', 'mantra').'</p></div>';
+ mantra_import_form();
+ }
+
+ // Delete the file after we're done
+ $wp_filesystem->delete($filename);
+
+ }
+ else { // else: make sure there is an import file uploaded
+ echo '<div class="error"><p>'.__( 'Oops! The file is empty or there was no file. This error could also be caused by uploads being disabled in your php.ini or by post_max_size being defined as smaller than upload_max_filesize in php.ini.', 'mantra' ).'</p></div>';
+ mantra_import_form();
+ }
+ echo '</div> <!-- end wrap -->';
+ }
+ else {
+ wp_die(__('ERROR: You are not authorised to perform that operation', 'mantra'));
+ }
+} // Closes the mantra_import_file() function definition
+
+// Truncate function for use in the Admin RSS feed
+function mantra_truncate_words($string,$words=20, $ellipsis=' ...') {
+ $new = preg_replace('/((\w+\W+\'*){'.($words-1).'}(\w+))(.*)/', '${1}', $string);
+ return $new.$ellipsis;
+}
+?>
\ No newline at end of file diff --git a/themes/mantra/admin/css/admin.css b/themes/mantra/admin/css/admin.css new file mode 100644 index 00000000..1be4cb73 --- /dev/null +++ b/themes/mantra/admin/css/admin.css @@ -0,0 +1,578 @@ + /* Farbtastic overwrites */
+
+.farbtastic {
+ position: absolute !important;
+ z-index:2;
+margin-left:50px;
+margin-top:-110px;
+background-color:#F7F7F7;
+border:1px solid #CCC;
+}
+.farbtastic * {
+ position: absolute;
+ cursor: crosshair;
+}
+.farbtastic, .farbtastic .wheel {
+ width: 195px;
+ height: 195px;
+}
+.farbtastic .color, .farbtastic .overlay {
+ top: 47px;
+ left: 47px;
+ width: 101px;
+ height: 101px;
+}
+
+
+/* end of Farbtastic overwrites */
+
+
+#lefty {
+clear:left;
+float:left;
+width:60%;
+min-width:500px;
+max-width:820px;
+margin-right:1%;
+}
+
+#main-options {
+width:100%;
+display:block;
+clear:left;
+/*border:1px solid #DFDFDF;
+background:#F5F5F5;
+border-radius:5px;
+-moz-border-radius:5px;
+-webkit-border-radius:5px;
+*/
+padding-top:10px;
+background:#FFF;
+font-family: Segoe UI !important;
+font-size: 12px;
+margin-bottom:10px;
+
+}
+
+ #righty {
+float:left;
+width:39%;
+margin-top:10px;
+}
+#righty p, #righty span, .form-table small, #righty ul li, #righty h3 {
+font-size: 12px;
+color:#444;
+font-family:Segoe UI;
+}
+
+.form-table small {
+font-style:italic;
+display:block;
+float:none;
+clear:both;
+}
+
+ .donate, .support {
+width:100%;
+}
+
+.postbox .hndle {
+ cursor: auto;
+ font-size: 13px;
+ margin: 0;
+ padding: 6px 10px 7px;
+}
+
+
+.wrap h2 {
+font-family: Calibri, Arial !important;
+margin-bottom:5px;
+}
+
+#accordion {
+width:95% ;
+margin:0px auto;
+font-family:Segoe UI,Calibri, Arial !important;
+display:block;
+float:none;
+}
+
+#submitDiv {
+display:block;
+float:none;
+height:30px;
+margin:10px 40px;
+font-family:Segoe UI,Calibri, Arial !important;
+}
+
+#version {
+display:block;
+float:none;
+clear:both;
+padding-top:10px;
+margin-left:20px;
+color:#666;
+}
+
+#accordion h3 {
+border:none;
+background-image:none;
+background:#2C5353;
+margin:0;
+padding:8px;
+clear:both;
+display:block;
+float:none;
+font-size: 17px ;
+padding-left:30px ;
+font-weight:normal;
+text-transform:uppercase;
+color:#F5F5F5;
+border-top:1px solid #4C7373;
+border-bottom:1px solid #0C3333;
+line-height: 1.3;
+-moz-border-radius:0;
+-webkit-border-radius:0;
+border-radius:0;
+transition:background ease-in-out .2s;
+}
+
+#accordion h3:hover {
+background:#3C6363;
+}
+
+#accordion select option {
+font-size:1.1em;
+}
+
+.form-table th, .form-wrap label {
+ color: #222 !important;
+font-size: 16px;
+font-weight:normal;
+}
+
+.form-table tr {
+border-bottom:1px dashed #DDD;
+}
+
+.form-table td {
+vertical-align:middle;
+}
+
+input[type="text"] , select {
+border:1px solid #AAA !important;
+border-radius:2px;
+-moz-border-radius:2px;
+-webkit-border-radius:2px;
+}
+
+.submit {
+text-align:right;
+margin-right:20px;
+}
+
+ #accordion select {
+min-width:120px;
+max-width:200px;
+}
+
+ #accordion textarea, #mantra_favicon {
+max-width:90%;
+}
+
+.googlefonts {
+width:200px;
+}
+
+/* Images */
+
+
+.images {
+display:inline-block;
+}
+
+#imageOne {
+border:1px solid #DDD !important;
+padding:3px;
+ height: auto;
+}
+
+#imageTwo{
+ background-color: #FFFFFF;
+ border: 1px solid #EEE;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ border-radius: 3px;
+ padding: 3px;
+ -moz-box-shadow:0px 0px 4px #CCC;
+ -webkit-box-shadow:0px 0px 4px #CCC;
+ box-shadow:0px 0px 4px #CCC;
+}
+
+#imageThree{
+ background-color: #FFFFFF;
+ border: 6px solid #EEEEEE;
+ -moz-border-radius: 5px 5px 5px 5px;
+ -webkit-border-radius: 5px 5px 5px 5px;
+ border-radius: 5px 5px 5px 5px;
+ padding: 3px;
+}
+
+
+
+#imageFour{
+border:1px solid #666 !important;
+ -moz-box-shadow:0px 0px 4px #666;
+ -webkit-box-shadow:0px 0px 4px #666;
+ box-shadow:0px 3px 4px #999;
+}
+
+#imageFive{
+border:3px solid #DDD !important;
+}
+
+#imageSix{
+border:8px solid #BBB !important;
+ -moz-box-shadow:0px 0px 5px #333;
+ -webkit-box-shadow:0px 0px 5px #333;
+ box-shadow: 0px 0px 5px #333;
+}
+
+#imageSeven{
+ background-color: #FFFFFF;
+ border: 1px solid #CCC;
+ padding: 7px;
+ -moz-box-shadow:2px 2px 2px #CCC;
+ -webkit-box-shadow:2px 2px 2px #CCC;
+ box-shadow:inset 0px 0px 7px #CCC;
+}
+
+/* Labels */
+
+label {
+display:inline-block;
+width:auto;
+border:2px solid #FFF;
+text-align:center;
+background-color:#FFF;
+padding:5px 2px;
+-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=80)";
+filter: alpha(opacity=80);
+opacity:0.8;
+}
+
+label.hideareas {
+display:block;
+float:none;
+text-align:left;
+
+}
+
+label:hover {
+ -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
+ filter: alpha(opacity=100);
+ opacity:1;
+background-color:#EEE;
+}
+
+
+label input[type=radio] {
+display:none;
+}
+
+label.layouts {
+display:block;
+float:left;
+padding:3px;
+height:55px;
+}
+
+label.layouts:hover {
+background:none;
+border:2px solid #CCC;
+}
+
+
+.layouts img {
+width:60px;
+}
+
+
+.borderful {
+border-color:#F6A828 ;
+ -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
+ filter: alpha(opacity=100);
+ opacity:1;
+}
+
+ label.layouts.checkedClass, label.images.checkedClass, label.pins.checkedClass, label.sidebullets.checkedClass {
+border-color:#F6A828;
+-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
+filter: alpha(opacity=100);
+opacity:1;
+}
+
+
+#accordion input[type="text"] {
+font-family:"Lucida Console", Monaco, monospace !important;
+font-size:12px;
+}
+
+#accordion > * {
+display:none;
+}
+
+#accrodion > h3 {
+display:block;
+}
+
+.ui-accordion-content {
+border-color:#EEE !important;
+background:#FFF !important;
+margin-bottom:10px !important;
+border:1px solid #DDD !important;
+border-top:none !important;
+overflow: hidden;
+padding:1em !important;
+}
+.ui-accordion .ui-accordion-content { overflow: hidden !important; }
+.ui-accordion .ui-accordion-content-overflow { overflow: visible !important; }
+
+.ui-state-active {
+ background:#0C3333 !important;
+}
+
+.darkbg{
+ background:#ddd !important;
+}
+#status{
+ font-family:Arial; padding:5px;
+}
+ul#files{ list-style:none; padding:0; margin:0; }
+ul#files li{ padding:10px; margin-bottom:2px; width:400px; float:left; margin-right:10px;}
+ul#files li img{ max-width:180px; max-height:150px; }
+.success{ background:#99f099; border:1px solid #339933; }
+.error{ background:#f0c6c3; border:1px solid #cc6622; }
+
+#uploadpreview {
+max-width:64px;
+display:block;float:left;
+border:1px solid #DDD;
+padding:2px;
+}
+
+#filename {
+display:block;
+width:auto;
+float:left;
+margin-left:10px;
+font-weight:bold;
+}
+
+#uploadarea {
+margin-top:10px;
+}
+
+#absolutedim, #relativedim {
+margin-top:30px;
+position:relative;
+}
+#absolutedim small, #relativedim small{
+margin-top:20px;}
+
+.slmini, #cdimensions {
+display:block;
+float:none;
+margin:10px;
+}
+
+.slmini {
+background:#F9F9F9;
+border:1px dashed #CCC;
+padding:5px;
+}
+
+.slmini b {
+width:130px;
+display:inline-block;
+float:left;}
+
+.slidebox {
+background:#F7F7F7;
+border-bottom:2px solid #eaeaea;
+transition:border-color .3s ease-in-out;
+}
+
+.slidebox:hover {
+border-color:#8CB3B3;
+}
+
+.slidercontent{
+display:none;
+padding:0 10px 10px;
+}
+
+
+.slidetitle{
+color:#777;
+background:#F7F7F7;
+padding: 2px 10px;
+margin:3px;
+cursor:pointer;
+}
+
+.slidetitle:after {
+content:"\25BC";
+float:right;
+margin-right:5px;
+color:#AAA;
+font-size:10px;
+}
+
+.slidetitle:hover{
+background:#F6F6F6;
+}
+
+.slidetitle:hover:after {
+color:#6C9393;
+}
+
+.slidebox h5 {
+display:inline-block;
+float:none;
+font-size:12px;
+background:#FFF;
+color:#777;
+padding:0 10px;
+margin:10px 0px 0 10px;
+position:relative;
+top:2px;
+border:1px solid #DFDFDF;
+border-bottom:none;
+-moz-border-radius:4px;
+-webkit-border-radius:4px;
+border-radius:4px;
+}
+
+.slidebox .description {
+display:block;
+float:none;
+}
+
+.slidebox input[type="text"], .slidebox textarea {
+width:100%;
+border-color:#DFDFDF !important;
+color:#444;
+}
+
+#sliderCustomSlides {margin-top:10px;}
+
+a.upload_image_button {
+color:#C67828 !important;
+text-decoration:none;
+clear:both;
+padding:2px 4px;
+display:block;
+float:none;
+}
+
+#submitDiv input.button {
+font-size:13px !important;
+padding:4px 10px !important;
+height:auto;
+}
+
+.header_upload_inputs {
+width:300px;
+}
+
+/* NEWS LISTS */
+
+#righty .news-list li {
+background:#FFF;
+padding:7px;
+border:1px solid #EEE;
+}
+
+#righty span.news-item-date {
+color:#999;
+font-size:11px;
+}
+
+a.news-header {
+text-decoration:none;
+color:#4C7373;
+font-size:14px;
+font-weight:bold;
+text-transform:uppercase;
+}
+
+a.news-header:hover, a.news-read:hover {
+color:#C47D09 !important;
+}
+
+/*Tooltip */
+
+.tooltip_div{
+display:inline-block;
+clear:none;
+height:22px;
+line-height:22px;
+}
+
+a.tooltip{
+display:inline-block;
+clear:none;
+height:22px;
+line-height:22px;
+margin-left:7px;
+}
+
+a.tooltip img {
+vertical-align:bottom;
+}
+
+.ui-tooltip {
+display:block;
+max-width:300px;
+padding:5px;
+z-index:3;
+}
+
+/* ADMIN HEADER AND LINKS */
+
+#admin_header {
+ padding-top:10px;
+ padding-left:20px;
+ display:block;
+ float:left;
+ }
+#admin_links {
+ display:block;
+ float:left;
+ clear:both;
+ text-align:left;
+ margin-left:90px;
+ margin-top:-18px;
+ }
+
+#admin_links a {
+display:block;
+float:left;
+margin-left:3px;
+margin-right:9px;
+text-decoration:none;
+font-family:Segoe UI, Arial;
+font-size:11px;
+color:#3F5F5F;
+text-transform:uppercase;
+}
+
+#admin_links a:hover {
+color:#C47D09;
+}
+
+.wrap div.updated, .wrap div.error {
+margin-left: 15px; margin-right: 15px;
+margin-top: 20px; }
+
diff --git a/themes/mantra/admin/custom-styles.php b/themes/mantra/admin/custom-styles.php new file mode 100644 index 00000000..c8a7439e --- /dev/null +++ b/themes/mantra/admin/custom-styles.php @@ -0,0 +1,300 @@ +<?php
+
+function cryout_optset($var,$val1,$val2='',$val3='',$val4=''){
+$vals = array($val1,$val2,$val3,$val4);
+if (in_array($var,$vals)): return false; else: return true; endif;
+}
+
+function mantra_custom_styles() {
+
+/* This retrieves admin options. */
+$mantra_options= mantra_get_theme_options();
+foreach ($mantra_options as $key => $value) {
+ ${"$key"} = esc_attr($value) ;
+}
+if ($mantra_dimselect=="Absolute") {
+$totalwidth = $mantra_sidewidth+$mantra_sidebar+50;
+$contentSize = $mantra_sidewidth;
+$sidebarSize = $mantra_sidebar;
+}
+else if ($mantra_dimselect=="Relative") {
+$totalwidth = $mantra_sidewidthRel+$mantra_sidebarRel;
+$contentSize = intval(($mantra_sidewidthRel/$totalwidth*100)-2);
+$sidebarSize = intval(($mantra_sidebarRel/$totalwidth*100)-2);
+}
+ob_start(); ?>
+
+<style type="text/css">
+<?php
+/*
+ * LAYOUT CSS
+ */
+
+/* ABSOLUTE DIMENSIONS. */
+
+if ($mantra_dimselect=="Absolute") { ?>
+#wrapper, #access, #colophon, #branding, #main { width:<?php echo ($totalwidth) ?>px ;}
+#access .menu-header, div.menu {width:<?php echo ($totalwidth-12) ?>px ;}
+<?php if (is_page_template() && !is_page_template('template-blog.php') && !is_page_template('template-onecolumn.php') && !is_page_template('template-page-with-intro.php')) {
+
+ if (is_page_template("template-twocolumns-right.php") ) { ?>
+#content { width:<?php echo ($contentSize- 10) ?>px;}
+#primary,#secondary {width:<?php echo ($sidebarSize ) ?>px;}<?php }
+
+?><?php if ( is_page_template("template-twocolumns-left.php")) { ?>
+#content { width:<?php echo ($contentSize - 10) ?>px;float:right;margin:0px 20px 0 0;}
+#primary,#secondary {width:<?php echo ($sidebarSize ) ?>px;float:left;padding-left:0px;clear:left;border:none;border-right:1px dashed #EEE;padding-right:20px;}
+.widget-title { -moz-border-radius:0 10px 0 0; -webkit-border-radius:0 10px 0 0;border-radius:0 10px 0 0 ;text-align:right;}
+ #primary ul.xoxo {padding:0 0 0 10px ;} <?php }
+
+?><?php if ( is_page_template("template-threecolumns-right.php")) { ?>
+#content { width:<?php echo ($contentSize- 20) ?>px;}
+#primary,#secondary {width:<?php echo ($mantra_sidebar/2 ) ?>px;} <?php }
+
+?><?php if ( is_page_template("template-threecolumns-left.php")) { ?>
+#content { width:<?php echo ($contentSize - 20) ?>px;float:right;margin:0px 20px 0 0;display:block;}
+#primary,#secondary {width:<?php echo ($sidebarSize/2 ) ?>px;float:left;padding-left:0px;;border:none;border-right:1px dashed #EEE;padding-right:20px;}
+.widget-title { -moz-border-radius:0 10px 0 0; -webkit-border-radius:0 10px 0 0;border-radius:0 10px 0 0 ;text-align:right;}
+#main .widget-area ul.xoxo {padding:0 0 0 10px ;} <?php }
+
+?><?php if (is_page_template("template-threecolumns-center.php")) { ?>
+#content { width:<?php echo ($contentSize - 20) ?>px;float:right;margin:0px <?php echo $sidebarSize/2+35 ?>px 0 <?php echo -($contentSize+$sidebarSize) ?>px;display:block;}
+#primary {width:<?php echo ($sidebarSize/2 ) ?>px;float:left;padding-left:0px;border:none;border-right:1px dashed #EEE;padding-right:20px;}
+#secondary {width:<?php echo ($sidebarSize/2 ) ?>px;float:right;}
+#primary .widget-title { -moz-border-radius:0 10px 0 0; -webkit-border-radius:0 10px 0 0;border-radius:0 10px 0 0 ; text-align:right;padding-right:15px;width:100%;margin-left:-15px;}
+#primary ul.xoxo {padding:0 0 0 10px;}<?php }
+
+ } //is_page_template
+ else { // IF NO PAGE TEMPLATE HAS BEEN SELECTED
+
+ if ($mantra_side == "1c" ) { ?>
+#content {width:<?php echo ($totalwidth-40) ?>px; margin:20px;margin-top:0px;} <?php }
+
+?><?php if ($mantra_side == "2cSr" ) { ?>
+#content { width:<?php echo ($contentSize- 10) ?>px;}
+#primary,#secondary {width:<?php echo ($sidebarSize ) ?>px;}<?php }
+
+?><?php if ($mantra_side == "2cSl" ) { ?>
+#content { width:<?php echo ($contentSize - 10) ?>px;float:right;margin:0px 20px 0 0;}
+#primary,#secondary {width:<?php echo ($sidebarSize ) ?>px;float:left;padding-left:0px;clear:left;border:none;border-right:1px dashed #EEE;padding-right:20px;}
+ .widget-title { -moz-border-radius:0 10px 0 0; -webkit-border-radius:0 10px 0 0;border-radius:0 10px 0 0 ; text-align:right;width:100%;}
+ #primary ul.xoxo {padding:0 0 0 10px ;}<?php }
+
+?><?php if ($mantra_side == "3cSr" ) { ?>
+#content { width:<?php echo ($contentSize- 20) ?>px;}
+#primary,#secondary {width:<?php echo ($mantra_sidebar/2 ) ?>px;} <?php }
+
+?><?php if ($mantra_side == "3cSl" ) { ?>
+#content { width:<?php echo ($contentSize - 20) ?>px;float:right;margin:0px 20px 0 0;display:block;}
+#primary,#secondary {width:<?php echo ($sidebarSize/2 ) ?>px;float:left;padding-left:0px;;border:none;border-right:1px dashed #EEE;padding-right:20px;}
+ .widget-title { -moz-border-radius:0 10px 0 0; -webkit-border-radius:0 10px 0 0;border-radius:0 10px 0 0 ; text-align:right;}
+#main .widget-area ul.xoxo {padding:0 0 0 10px ;} <?php }
+
+?><?php if ($mantra_side == "3cSs") { ?>
+#content { width:<?php echo ($contentSize - 20) ?>px;float:right;margin:0px <?php echo $sidebarSize/2+35 ?>px 0 <?php echo -($contentSize+$sidebarSize) ?>px;display:block;}
+#primary {width:<?php echo ($sidebarSize/2 ) ?>px;float:left;padding-left:0px;border:none;border-right:1px dashed #EEE;padding-right:20px;}
+#secondary {width:<?php echo ($sidebarSize/2 ) ?>px;float:right;}
+#primary .widget-title { -moz-border-radius:0 10px 0 0; -webkit-border-radius:0 10px 0 0;border-radius:0 10px 0 0 ; text-align:right;padding-right:15px;width:100%;margin-left:-15px;}
+#primary ul.xoxo {padding:0 0 0 10px ;} <?php }
+
+ }//else
+}//absolute dim
+
+/* RELATIVE DIMENSIONS. */
+
+else if ($mantra_dimselect=="Relative") { ?>
+#wrapper { width:<?php echo ($totalwidth) ?>% ;}
+#access, #colophon, #branding, #main {width:100%;}
+#access .menu-header, div.menu {width:96% ;}
+#content {margin-left:2%;}
+#primary, #secondary {padding-left:1%;}
+<?php
+ if (is_page_template() && !is_page_template('template-blog.php') && !is_page_template('template-onecolumn.php') && !is_page_template('template-page-with-intro.php')) {
+
+?><?php if (is_page_template("template-twocolumns-right.php")) { ?>
+#content { width:<?php echo ($contentSize) ?>%;}
+#primary,#secondary {width:<?php echo ($sidebarSize ) ?>%;}<?php }
+
+?><?php if (is_page_template("template-twocolumns-left.php")) { ?>
+#content { width:<?php echo ($contentSize ) ?>%;float:right;margin:0px 20px 0 0;}
+#primary,#secondary {width:<?php echo ($sidebarSize ) ?>%;float:left;padding-left:0px;clear:left;border:none;border-right:1px dashed #EEE;padding-right:20px;}
+ .widget-title { -moz-border-radius:0 10px 0 0; -webkit-border-radius:0 10px 0 0;border-radius:0 10px 0 0 ; text-align:right;padding-right:5%;width:95%;margin-left:-10px;}
+#primary ul.xoxo {padding:0 0 0 10px ;} <?php }
+
+?><?php if ( is_page_template("template-threecolumns-right.php")) { ?>
+#content { width:<?php echo ($contentSize-2) ?>%;}
+#primary,#secondary {width:<?php echo ($sidebarSize/2 ) ?>%;} <?php }
+
+?><?php if (is_page_template("template-threecolumns-left.php")) { ?>
+#content { width:<?php echo ($contentSize-2) ?>%;float:right;margin:0px 20px 0 0;display:block;}
+#primary,#secondary {width:<?php echo ($sidebarSize/2 ) ?>%;float:left;padding-left:0px;;border:none;border-right:1px dashed #EEE;padding-right:10px;}
+ .widget-title { -moz-border-radius:0 10px 0 0; -webkit-border-radius:0 10px 0 0;border-radius:0 10px 0 0 ; text-align:right;padding-right:8%;width:95%;margin-left:-10px;}
+#main .widget-area ul.xoxo {margin:0 0 0 10px ;} <?php }
+
+?><?php if ( is_page_template("template-threecolumns-center.php")) { ?>
+#content { width:<?php echo ($contentSize-1 ) ?>%;float:right;margin:0px <?php echo $sidebarSize/2+2 ?>% 0 <?php echo -($contentSize+$sidebarSize) ?>%;display:block;}
+#primary {width:<?php echo ($sidebarSize/2 ) ?>%;float:left;padding-left:0px;border:none;border-right:1px dashed #EEE;padding-right:20px;}
+#secondary {width:<?php echo ($sidebarSize/2 ) ?>%;float:right;}
+#primary .widget-title { -moz-border-radius:0 10px 0 0; -webkit-border-radius:0 10px 0 0;border-radius:0 10px 0 0 ; text-align:right;padding-right:8%;width:100%;margin-left:-10px;}
+#primary ul.xoxo {padding:0 0 0 10px ;} <?php }
+ }// is_page_template
+
+ else { // IF NO PAGE TEMPLATE HAS BEEN SELECTED
+
+ if ($mantra_side == "1c") { ?>
+#content {width:96%; margin:20px;} <?php }
+
+?><?php if ($mantra_side == "2cSr" ) { ?>
+#content { width:<?php echo ($contentSize) ?>%;}
+#primary,#secondary {width:<?php echo ($sidebarSize ) ?>%;}<?php }
+
+?><?php if ($mantra_side == "2cSl" ) { ?>
+#content { width:<?php echo ($contentSize ) ?>%;float:right;margin:0px 20px 0 0;}
+#primary,#secondary {width:<?php echo ($sidebarSize ) ?>%;float:left;padding-left:0px;clear:left;border:none;border-right:1px dashed #EEE;padding-right:20px;}
+ .widget-title { -moz-border-radius:0 10px 0 0; -webkit-border-radius:0 10px 0 0;border-radius:0 10px 0 0 ; text-align:right;padding-right:5%;width:95%;margin-left:-10px;}
+#primary ul.xoxo {padding:0 0 0 10px ;} <?php }
+
+?><?php if ($mantra_side == "3cSr" ) { ?>
+#content { width:<?php echo ($contentSize-2) ?>%;}
+#primary,#secondary {width:<?php echo ($sidebarSize/2 ) ?>%;} <?php }
+
+?><?php if ($mantra_side == "3cSl" ) { ?>
+#content { width:<?php echo ($contentSize-2) ?>%;float:right;margin:0px 20px 0 0;display:block;}
+#primary,#secondary {width:<?php echo ($sidebarSize/2 ) ?>%;float:left;padding-left:0px;;border:none;border-right:1px dashed #EEE;padding-right:15px;}
+ .widget-title { -moz-border-radius:0 10px 0 0; -webkit-border-radius:0 10px 0 0;border-radius:0 10px 0 0 ; text-align:right;padding-right:8%;width:100%;margin-left:-10px;}
+#main .widget-area ul.xoxo {margin:0 0 0 10px ;} <?php }
+
+?><?php if ($mantra_side == "3cSs") { ?>
+#content { width:<?php echo ($contentSize-1 ) ?>%;float:right;margin:0px <?php echo $sidebarSize/2+2 ?>% 0 <?php echo -($contentSize+$sidebarSize) ?>%;display:block;}
+#primary {width:<?php echo ($sidebarSize/2 ) ?>%;float:left;padding-left:0px;border:none;border-right:1px dashed #EEE;padding-right:20px;}
+#secondary {width:<?php echo ($sidebarSize/2 ) ?>%;float:right;}
+#primary .widget-title { -moz-border-radius:0 10px 0 0; -webkit-border-radius:0 10px 0 0;border-radius:0 10px 0 0 ; text-align:right;padding-right:8%;width:100%;margin-left:-10px;}
+#primary ul.xoxo {padding:0 0 0 10px ;} <?php }
+
+ }//else
+}
+
+/*
+ * THE REST OF THE CSS
+ */
+?>
+#content, #content p, #content ul, #content ol, #content input, #content select, #content textarea{
+font-size:<?php echo $mantra_fontsize ?>;
+<?php if ($mantra_lineheight != "Default") { ?>line-height:<?php echo $mantra_lineheight ?>; <?php }
+?><?php if ($mantra_wordspace != "Default") { ?>word-spacing:<?php echo $mantra_wordspace ?>;<?php }
+?><?php if ($mantra_letterspace != "Default") { ?>letter-spacing:<?php echo $mantra_letterspace ?>;<?php }
+?><?php if ($mantra_textalign != "Default") { ?>text-align:<?php echo $mantra_textalign; ?> ; <?php } ?>}
+
+<?php if ($mantra_hcenter != "") { ?> #bg_image { display:block;margin:0 auto;} <?php }
+?><?php if ($mantra_contentbg != "#FFFFFF") { ?> #main, #access ul li.current_page_item, #access ul li.current-menu-item ,#access ul ul li { background-color:<?php echo $mantra_contentbg; ?>} <?php }
+?><?php if ($mantra_menubg != "#FAFAFA") { ?> #access ul li { background-color:<?php echo $mantra_menubg; ?>} <?php }
+?><?php if (cryout_optset($mantra_s1bg, "")) { ?> #primary { background-color:<?php echo $mantra_s1bg; ?>} <?php }
+?><?php if (cryout_optset($mantra_s2bg ,"" )){ ?> #secondary { background-color:<?php echo $mantra_s2bg; ?>} <?php }
+
+$mantra_googlefont = str_replace('+',' ',preg_replace('/:.*/i','',$mantra_googlefont));
+$mantra_googlefonttitle = str_replace('+',' ',preg_replace('/:.*/i','',$mantra_googlefonttitle));
+$mantra_googlefontside = str_replace('+',' ',preg_replace('/:.*/i','',$mantra_googlefontside));
+$mantra_googlefontsubheader = str_replace('+',' ',preg_replace('/:.*/i','',$mantra_googlefontsubheader));
+
+?><?php if (stripslashes($mantra_fontfamily) != '"Segoe UI", Arial, sans-serif' || $mantra_googlefont) { ?> * , .widget-title {font-family:<?php if (!$mantra_googlefont) echo $mantra_fontfamily; else echo "\"$mantra_googlefont\""; ?> ; }<?php }
+?><?php if ($mantra_fonttitle != "Default" || $mantra_googlefonttitle) { ?> #content h1.entry-title a, #content h2.entry-title a, #content h1.entry-title , #content h2.entry-title {font-family:<?php if (!$mantra_googlefonttitle) echo $mantra_fonttitle; else echo "\"$mantra_googlefonttitle\""; ?> ; }<?php }
+?><?php if ($mantra_fontside != "Default" || $mantra_googlefontside) { ?> .widget-area * {font-family:<?php if (!$mantra_googlefontside) echo $mantra_fontside; else echo "\"$mantra_googlefontside\""; ?> ; }<?php }
+?><?php if ($mantra_fontsubheader != "Default" || $mantra_googlefontsubheader ) { ?> .entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4, .entry-content h5, .entry-content h6 {font-family:<?php if (!$mantra_googlefontsubheader) echo $mantra_fontsubheader; else echo "\"$mantra_googlefontsubheader\""; ?> ; }<?php }
+?><?php if ($mantra_caption != "Light") { ?> #content .wp-caption { <?php }
+?><?php if ($mantra_caption == "White") { ?> background-color:#FFF;}
+ <?php } else if ($mantra_caption == "Light Gray") {?> background-color:#EEE; }
+ <?php } else if ($mantra_caption == "Gray") {?> background-color:#CCC;}
+ <?php } else if ($mantra_caption == "Dark Gray") {?> background-color:#444;color:#CCC;}
+ <?php } else if ($mantra_caption == "Black") {?> background-color:#000;color:#CCC;}
+<?php }
+?><?php if ($mantra_menurounded == "Disable") { ?> #access ul li { border-radius:0;-moz-border-radius:0;border-radius:0;}<?php }
+?><?php if ($mantra_metaback == "White") { ?> .entry-meta { background:#FFF;} <?php } else if ($mantra_metaback == "None") { ?> .entry-meta { background:#FFF;border:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;} <?php }
+?><?php if ($mantra_postseparator == "Show") { ?> article.post, article.page { padding-bottom:10px;border-bottom:3px solid #EEE} <?php }
+?><?php if ($mantra_contentlist == "Hide") { ?> .entry-content ul li { background-image:none ; padding-left:0;} .entry-content ul { margin-left:0;} <?php }
+?><?php if ($mantra_comtext == "Hide") { ?> #respond .form-allowed-tags { display:none;} <?php }
+?><?php if ($mantra_comclosed == "Hide in posts") { ?> .nocomments { display:none;} <?php } elseif ($mantra_comclosed == "Hide in pages") { ?> .nocomments2 {display:none;} <?php } elseif ($mantra_comclosed == "Hide everywhere") { ?> .nocomments, .nocomments2 {display:none;} <?php }
+?><?php if ($mantra_comoff == "Hide") { ?> .comments-link span { display:none;} <?php }
+?><?php if ($mantra_tables == "Enable") { ?> #content table {border:none;} #content tr {background:none;} #content table {border:none;} #content tr th,
+#content thead th {background:none;} #content tr td {border:none;}<?php }
+?><?php if ($mantra_headfontsize != "Default") { ?> #content h1.entry-title, #content h2.entry-title { font-size:<?php echo $mantra_headfontsize; ?> ;}<?php }
+?><?php if ($mantra_sidefontsize != "Default") { ?> .widget-area a:link, .widget-area a:visited { font-size:<?php echo $mantra_sidefontsize; ?> ;}<?php }
+?><?php if ($mantra_textshadow != "Enable") { ?> #content h1, #content h2, #content h3, #content h4, #content h5, #content h6, #content .entry-title, #site-title a , #site-description { text-shadow:none; moz-text-shadow:none; -webkit-text-shadow:none ;}<?php }
+?><?php if ($mantra_headerindent == "Enable") { ?> #content h1, #content h2, #content h3, #content h4, #content h5, #content h6 { margin-left:20px;} .sticky hgroup { background: url(<?php echo get_template_directory_uri().'/images/icon-featured.png' ; ?>) no-repeat 12px 10px transparent; padding-left: 15px;}<?php } ?>
+
+#header-container > div { margin-top:<?php echo $mantra_headermargintop; ?>px;}
+#header-container > div { margin-left:<?php echo $mantra_headermarginleft; ?>px;}
+<?php if ($mantra_backcolor != "444444") { ?> body { background-color:<?php echo $mantra_backcolor; ?> !important ;}<?php }
+?><?php if ($mantra_headercolor != "333333") { ?> #header { background-color:<?php echo $mantra_headercolor; ?> ;}<?php }
+?><?php if ($mantra_prefootercolor != "222222") { ?> #footer { background-color:<?php echo $mantra_prefootercolor; ?> ;}<?php }
+?><?php if ($mantra_footercolor != "171717") { ?> #footer2 { background-color:<?php echo $mantra_footercolor; ?> ;}<?php }
+?><?php if ($mantra_titlecolor != "0D85CC") { ?> #site-title span a { color:<?php echo $mantra_titlecolor; ?> ;}<?php }
+?><?php if ($mantra_descriptioncolor != "0D85CC") { ?> #site-description { color:<?php echo $mantra_descriptioncolor; ?> ;}<?php }
+?><?php if ($mantra_contentcolor != "333333") { ?> #content, #content p, #content ul, #content ol { color:<?php echo $mantra_contentcolor; ?> ;}<?php }
+?><?php if ($mantra_linkscolor != "0D85CC") { ?> .widget-area a:link, .widget-area a:visited, a:link, a:visited ,#searchform #s:hover , #container #s:hover, #access a:hover, #wp-calendar tbody td a , #site-info a ,#site-copyright a, #access li:hover > a, #access ul ul :hover > a { color:<?php echo $mantra_linkscolor; ?>;}<?php }
+?><?php if ($mantra_hovercolor != "333333") { ?> a:hover, .entry-meta a:hover, .entry-utility a:hover , .widget-area a:hover { color:<?php echo $mantra_hovercolor; ?> ;}<?php }
+?><?php if ($mantra_headtextcolor != "333333") { ?> #content .entry-title a, #content .entry-title, #content h1, #content h2, #content h3, #content h4, #content h5, #content h6{ color:<?php echo $mantra_headtextcolor; ?> ;}<?php }
+?><?php if ($mantra_headtexthover != "000000") { ?> #content .entry-title a:hover { color:<?php echo $mantra_headtexthover; ?> ;}<?php }
+?><?php if ($mantra_sideheadbackcolor != "444444") { ?> .widget-title,#footer-widget-area .widget-title { background-color:<?php echo $mantra_sideheadbackcolor; ?> ;}<?php }
+?><?php if ($mantra_sideheadtextcolor != "2EA5FD") { ?> .widget-title { color:<?php echo $mantra_sideheadtextcolor; ?> ;}<?php }
+
+?><?php if ($mantra_magazinelayout == "Enable") { ?> #content article.post{float:left;width:47%;margin-right:3%; } #content article.sticky { margin-right:3%;padding:0; } #content article.sticky > * {margin:2%;} #content article:nth-of-type(2n+1) {clear: both;} <?php }
+
+?><?php if (1) { ?> #footer-widget-area .widget-title { color:<?php echo $mantra_footerheader; ?> ; ;}<?php }
+?><?php if (1) { ?> #footer-widget-area a { color:<?php echo $mantra_footertext; ?> ;}<?php }
+?><?php if (1) { ?> #footer-widget-area a:hover { color:<?php echo $mantra_footerhover; ?> ;}<?php }
+
+switch ($mantra_menualign):
+ case "center": ?> #access ul { display: table; margin: 0 auto; } <?php break;
+ case "right": ?> #access ul li { float: right; } <?php break;
+ default: break;
+endswitch;
+
+?><?php if ($mantra_pin != "Pin2") { ?> #content .wp-caption { background-image:url(<?php echo get_template_directory_uri()."/images/pins/".$mantra_pin; ?>.png) ;} <?php }
+?><?php if ($mantra_sidebullet != "arrow_white") { ?>.widget-area ul ul li{ background-image:url(<?php echo get_template_directory_uri()."/images/bullets/".$mantra_sidebullet; ?>.png);background-position: 0px 8px ;}<?php }
+
+?><?php if ($mantra_pagetitle == "Hide") { ?> .page h1.entry-title, .home .page h2.entry-title { display:none;} <?php }
+?><?php if ($mantra_categtitle == "Hide") { ?> h1.page-title { display:none;} <?php }
+?><?php if (($mantra_postdate == "Hide" && $mantra_postcateg == "Hide") || ($mantra_postauthor == "Hide" && $mantra_postcateg == "Hide") ) { ?>.entry-meta .bl_sep {display:none;} <?php }
+?><?php if ($mantra_postdate == "Hide") { ?>.entry-meta span.entry-date,.entry-meta span.onDate {display:none;} <?php }
+?><?php if ($mantra_postcomlink == "Hide") { ?>.entry-meta .comments-link,.entry-meta2 .comments-link{display:none;} <?php }
+?><?php if ($mantra_postauthor == "Hide") { ?>.entry-meta .author {display:none;} <?php }
+?><?php if ($mantra_postcateg == "Hide") { ?>.entry-meta span.bl_categ {display:none;} <?php }
+?><?php if ($mantra_posttag == "Hide") { ?> .entry-utility span.bl_posted, .entry-meta2 span.bl_tagg,.entry-meta3 span.bl_tagg {display:none;} <?php }
+?><?php if ($mantra_postbook == "Hide") { ?> .entry-utility span.bl_bookmark {display:none;} <?php }
+?><?php if ($mantra_parmargin) { ?> #content p, .entry-content ul, .entry-summary ul , .entry-content ol, .entry-summary ol { margin-bottom:<?php echo $mantra_parmargin; ?>;} <?php }
+?><?php if ($mantra_parindent != "0px") { ?> p {text-indent:<?php echo $mantra_parindent;?> ;} <?php }
+?><?php if ($mantra_posttime == "Hide") { ?> .entry-meta .entry-time {display:none;} <?php }
+?><?php if ($mantra_postmetas == "Hide") { ?> #content .entry-meta {display:none;} <?php }
+?><?php if (($mantra_mobile == "Enable") && $mantra_hcontain) { ?> #branding{ -webkit-background-size:contain !important;-moz-background-size:contain !important;background-size:contain !important; } <?php } ?>
+#branding { height:<?php echo HEADER_IMAGE_HEIGHT; ?>px ;}
+<?php if ($mantra_hratio) { ?> @media (max-width: 800px) {#branding, #bg_image { min-height:inherit !important; } } <?php } ?>
+</style>
+
+<?php $mantra_custom_styling = ob_get_contents();
+ ob_end_clean();
+
+return $mantra_custom_styling;
+}
+
+// Mantra function for inseting into the header the Custom Css field in the theme options
+
+function mantra_customcss() {
+$mantra_options= mantra_get_theme_options();
+foreach ($mantra_options as $key => $value) {
+ ${"$key"} = esc_attr($value) ; }
+
+if ($mantra_customcss != "") {
+ return '<style>'.htmlspecialchars_decode($mantra_customcss, ENT_QUOTES).'</style>';
+ }
+}
+
+function mantra_customjs() {
+$mantra_options= mantra_get_theme_options();
+foreach ($mantra_options as $key => $value) {
+ ${"$key"} = esc_attr($value) ; }
+
+if ($mantra_customjs != "") {
+ echo '<script>'.htmlspecialchars_decode($mantra_customjs, ENT_QUOTES).'</script>';
+ }
+}
+?>
\ No newline at end of file diff --git a/themes/mantra/admin/defaults.php b/themes/mantra/admin/defaults.php new file mode 100644 index 00000000..44927d29 --- /dev/null +++ b/themes/mantra/admin/defaults.php @@ -0,0 +1,216 @@ +<?php
+
+// DEFAULT OPTIONS ARRAY
+
+$mantra_defaults = array(
+
+"mantra_db" => "1.0",
+
+"mantra_side" => "2cSr",
+"mantra_dimselect" => 'Absolute',
+"mantra_sidewidth" => 800,
+"mantra_sidebar" => 250,
+"mantra_sidewidthRel" => 60,
+"mantra_sidebarRel" => 20,
+"mantra_mobile" => "Enable",
+"mantra_hcontain" => "",
+
+
+"mantra_frontpage" => "Disable",
+"mantra_frontposts" => "Disable",
+"mantra_frontpostscount" => 5,
+"mantra_menualign" => "left",
+"mantra_fpsliderwidth" => "800",
+"mantra_fpsliderheight" => "250",
+"mantra_fpslideranim" => "random",
+"mantra_fpsliderborderwidth" => "10",
+"mantra_fpsliderbordercolor" => "#EEEEEE",
+"mantra_fpslidertime" => "750",
+"mantra_fpsliderpause" => "5000",
+"mantra_fpslidernav" => "Bullets",
+"mantra_fpsliderarrows" => "Visible on Hover",
+
+"mantra_slideType" => "Custom Slides",
+"mantra_slideCateg" => "",
+"mantra_slideNumber" => "5",
+"mantra_slideSpecific" => "",
+
+"mantra_sliderimg1" => get_template_directory_uri()."/images/slider/mantra-slide1.jpg",
+"mantra_slidertitle1" => "This is your caption's title",
+"mantra_slidertext1" => "And this is the text that could accompany it. It is all optional so if you delete it in the Mantra Settings there will be no more caption with the black background.",
+"mantra_sliderlink1" => "",
+"mantra_sliderimg2" => get_template_directory_uri()."/images/slider/mantra-slide2.jpg",
+"mantra_slidertitle2" => "This is yet another caption title",
+"mantra_slidertext2" => "And some more text to give you as an example. You can use <a href='http://www.riotreaction.com' >links</a> and other type of <b>HTML</b> <i>formats</i>.",
+"mantra_sliderlink2" => "",
+"mantra_sliderimg3" => "",
+"mantra_slidertitle3" => "",
+"mantra_slidertext3" => "",
+"mantra_sliderlink3" => "",
+"mantra_sliderimg4" => "",
+"mantra_slidertitle4" => "",
+"mantra_slidertext4" => "",
+"mantra_sliderlink4" => "",
+"mantra_sliderimg5" => "",
+"mantra_slidertitle5" => "",
+"mantra_slidertext5" => "",
+"mantra_sliderlink5" => "",
+
+"mantra_nrcolumns" => "4",
+"mantra_colimageheight" => "120",
+"mantra_columnreadmore" => "Read more",
+
+"mantra_columnimg1" => get_template_directory_uri()."/images/slider/mantra-column.jpg",
+"mantra_columntitle1" => "Hi there!",
+"mantra_columntext1" => "You can also have some text here. Just like with the slider, it's all optional (including the title and the link inputs). All you need is an image, unless you want the Mantra image above to follow you everywhere.",
+"mantra_columnlink1" => "",
+"mantra_columnimg2" => get_template_directory_uri()."/images/slider/mantra-column.jpg",
+"mantra_columntitle2" => " HTML tags",
+"mantra_columntext2" => "You can also have <a href='http://www.riotreactions.com'>links</a> here as well as some <strong>HTML tags</strong>.",
+"mantra_columnlink2" => "",
+"mantra_columnimg3" => get_template_directory_uri()."/images/slider/mantra-column.jpg",
+"mantra_columntitle3" => "",
+"mantra_columntext3" => "",
+"mantra_columnlink3" => "",
+"mantra_columnimg4" => get_template_directory_uri()."/images/slider/mantra-column.jpg",
+"mantra_columntitle4" => "",
+"mantra_columntext4" => "",
+"mantra_columnlink4" => "",
+
+"mantra_fronttext1" => "This could be a title",
+"mantra_fronttext2" => "And this is a second title",
+"mantra_fronttitlecolor" => "#333333",
+"mantra_fronttext3" => "And here you could have a whole lot of text. Or not. It's all up to you. Deleting all text inside the appropriate input in the Mantra Settings will remove this whole text zone. It can also contain some HTML tags.<br /> Just try everything out and see what suits you. Have fun and good luck! ",
+"mantra_fronttext4" => "",
+
+"mantra_fronthideheader" => "",
+"mantra_fronthidemenu" => "",
+"mantra_fronthidewidget" => "",
+"mantra_fronthidefooter" => "",
+"mantra_fronthideback" => "",
+
+
+"mantra_hheight" => "75",
+"mantra_hcenter" => "",
+"mantra_hratio" => "",
+"mantra_menurounded" => "Enable",
+"mantra_logoupload" => "",
+"mantra_favicon" => "",
+"mantra_siteheader" => "Site Title and Description",
+"mantra_headermargintop" => "20",
+"mantra_headermarginleft" => "40",
+
+"mantra_fontfamily" => 'Segoe UI, Arial, sans-serif',
+"mantra_googlefont" => '',
+"mantra_googlefont2" => '',
+"mantra_fontsize" => "14px",
+"mantra_fonttitle" => 'Georgia, Times New Roman, Times, serif',
+"mantra_googlefonttitle" => '',
+"mantra_googlefonttitle2" => '',
+"mantra_headfontsize" => "Default",
+"mantra_fontside" => 'Helvetica, sans-serif',
+"mantra_googlefontside" => '',
+"mantra_googlefontside2" => '',
+"mantra_sidefontsize" => "Default",
+"mantra_fontsubheader" => 'Georgia, Times New Roman, Times, serif',
+"mantra_googlefontsubheader" => '',
+"mantra_googlefontsubheader2" => '',
+"mantra_textalign" => "Default",
+"mantra_parmargin" => "1.5em",
+"mantra_parindent" => "0px",
+"mantra_headerindent" => "Disable",
+"mantra_lineheight" => "Default",
+"mantra_wordspace" => "Default",
+"mantra_letterspace" => "Default",
+"mantra_textshadow" => "Enable",
+
+"mantra_contentbg" => "#FFFFFF",
+"mantra_menubg" => "#FAFAFA",
+"mantra_s1bg" => "",
+"mantra_s2bg" => "",
+"mantra_backcolor" => "#444444",
+"mantra_headercolor" => "#333333",
+"mantra_prefootercolor" => "#222222",
+"mantra_footercolor" => "#171717",
+"mantra_titlecolor" => "#0D85CC",
+"mantra_descriptioncolor" => "#999999",
+"mantra_contentcolor" => "#333333",
+"mantra_linkscolor" => "#0D85CC",
+"mantra_hovercolor" => "#12a7ff",
+"mantra_headtextcolor" => "#444444",
+"mantra_headtexthover" => "#000000",
+"mantra_sideheadbackcolor" => "#444444",
+"mantra_sideheadtextcolor" => "#2EA5FD",
+
+"mantra_footerheader" => "#0C85CD",
+"mantra_footertext" => "#666666",
+"mantra_footerhover" => "#888888",
+
+"mantra_breadcrumbs" => "Disable",
+"mantra_pagination" => "Enable",
+"mantra_caption" => "Light",
+"mantra_image" => "Seven",
+"mantra_pin" => "Pin2",
+"mantra_sidebullet" => "arrow_white",
+"mantra_metaback" => "Gray",
+"mantra_postseparator" => "Hide",
+"mantra_contentlist" => "Show",
+"mantra_pagetitle" => "Show",
+"mantra_categtitle" => "Show",
+"mantra_tables" => "Disable",
+"mantra_backtop" => "Enable",
+"mantra_comtext" => "Show",
+"mantra_comclosed" => "Hide everywhere",
+"mantra_comoff" => "Show",
+
+"mantra_postcomlink" => "Show",
+"mantra_postdate" => "Show",
+"mantra_posttime" => "Hide",
+"mantra_postauthor" => "Show",
+"mantra_postcateg" => "Show",
+"mantra_posttag" => "Show",
+"mantra_postbook" => "Show",
+"mantra_postmetas" => "Show",
+
+"mantra_excerpthome" => "Full Post",
+"mantra_excerptsticky" => "Full Post",
+"mantra_excerptarchive" => "Full Post",
+"mantra_excerptwords" => "50",
+"mantra_magazinelayout" => "Disable",
+"mantra_excerptdots" => " …",
+"mantra_excerptcont" => " Continue reading",
+"mantra_excerpttags" => "Disable",
+
+"mantra_fpost" => "Disable",
+"mantra_fpostlink" => "1",
+"mantra_fauto" => "Disable",
+"mantra_falign" => "Left",
+"mantra_fwidth" => "250",
+"mantra_fheight" => "150",
+"mantra_fcrop" => "",
+"mantra_fheader" => "Disable",
+
+"mantra_social1" => "",
+"mantra_social2" => "",
+"mantra_social3" => "",
+"mantra_social4" => "",
+"mantra_social5" => "",
+"mantra_social6" => "",
+"mantra_social7" => "",
+"mantra_social8" => "",
+"mantra_social9" => "",
+"mantra_social10" => "",
+"mantra_socialsdisplay0" => "",
+"mantra_socialsdisplay1" => "",
+"mantra_socialsdisplay2" => "",
+"mantra_socialsdisplay3" => "",
+
+"mantra_copyright" => "",
+"mantra_customcss" => "/* Mantra Custom CSS */ ",
+"mantra_customjs" => "",
+"mantra_seo" => "Enable",
+"mantra_seo_home_desc" => "",
+"mantra_seo_gen_desc" => "Auto",
+"mantra_seo_author" => "Do not use");
+
+?>
\ No newline at end of file diff --git a/themes/mantra/admin/images/1c.png b/themes/mantra/admin/images/1c.png Binary files differnew file mode 100644 index 00000000..29891b17 --- /dev/null +++ b/themes/mantra/admin/images/1c.png diff --git a/themes/mantra/admin/images/2cSl.png b/themes/mantra/admin/images/2cSl.png Binary files differnew file mode 100644 index 00000000..61ca2efb --- /dev/null +++ b/themes/mantra/admin/images/2cSl.png diff --git a/themes/mantra/admin/images/2cSr.png b/themes/mantra/admin/images/2cSr.png Binary files differnew file mode 100644 index 00000000..13928446 --- /dev/null +++ b/themes/mantra/admin/images/2cSr.png diff --git a/themes/mantra/admin/images/3cSl.png b/themes/mantra/admin/images/3cSl.png Binary files differnew file mode 100644 index 00000000..f47dbab9 --- /dev/null +++ b/themes/mantra/admin/images/3cSl.png diff --git a/themes/mantra/admin/images/3cSr.png b/themes/mantra/admin/images/3cSr.png Binary files differnew file mode 100644 index 00000000..a21b6d98 --- /dev/null +++ b/themes/mantra/admin/images/3cSr.png diff --git a/themes/mantra/admin/images/3cSs.png b/themes/mantra/admin/images/3cSs.png Binary files differnew file mode 100644 index 00000000..0e6b5fe2 --- /dev/null +++ b/themes/mantra/admin/images/3cSs.png diff --git a/themes/mantra/admin/images/coffee.png b/themes/mantra/admin/images/coffee.png Binary files differnew file mode 100644 index 00000000..6a94cc89 --- /dev/null +++ b/themes/mantra/admin/images/coffee.png diff --git a/themes/mantra/admin/images/mantra-logo.png b/themes/mantra/admin/images/mantra-logo.png Binary files differnew file mode 100644 index 00000000..68d6c88f --- /dev/null +++ b/themes/mantra/admin/images/mantra-logo.png diff --git a/themes/mantra/admin/images/placeholder.gif b/themes/mantra/admin/images/placeholder.gif Binary files differnew file mode 100644 index 00000000..7e063df0 --- /dev/null +++ b/themes/mantra/admin/images/placeholder.gif diff --git a/themes/mantra/admin/images/testimg.png b/themes/mantra/admin/images/testimg.png Binary files differnew file mode 100644 index 00000000..9b2bcbf1 --- /dev/null +++ b/themes/mantra/admin/images/testimg.png diff --git a/themes/mantra/admin/js/accordion-slider.js b/themes/mantra/admin/js/accordion-slider.js new file mode 100644 index 00000000..e43b28a8 --- /dev/null +++ b/themes/mantra/admin/js/accordion-slider.js @@ -0,0 +1,96 @@ +/*!
+ * jQuery UI Widget 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Widget
+ */
+(function(b,j){if(b.cleanData){var k=b.cleanData;b.cleanData=function(a){for(var c=0,d;(d=a[c])!=null;c++)try{b(d).triggerHandler("remove")}catch(e){}k(a)}}else{var l=b.fn.remove;b.fn.remove=function(a,c){return this.each(function(){if(!c)if(!a||b.filter(a,[this]).length)b("*",this).add([this]).each(function(){try{b(this).triggerHandler("remove")}catch(d){}});return l.call(b(this),a,c)})}}b.widget=function(a,c,d){var e=a.split(".")[0],f;a=a.split(".")[1];f=e+"-"+a;if(!d){d=c;c=b.Widget}b.expr[":"][f]=
+function(h){return!!b.data(h,a)};b[e]=b[e]||{};b[e][a]=function(h,g){arguments.length&&this._createWidget(h,g)};c=new c;c.options=b.extend(true,{},c.options);b[e][a].prototype=b.extend(true,c,{namespace:e,widgetName:a,widgetEventPrefix:b[e][a].prototype.widgetEventPrefix||a,widgetBaseClass:f},d);b.widget.bridge(a,b[e][a])};b.widget.bridge=function(a,c){b.fn[a]=function(d){var e=typeof d==="string",f=Array.prototype.slice.call(arguments,1),h=this;d=!e&&f.length?b.extend.apply(null,[true,d].concat(f)):
+d;if(e&&d.charAt(0)==="_")return h;e?this.each(function(){var g=b.data(this,a),i=g&&b.isFunction(g[d])?g[d].apply(g,f):g;if(i!==g&&i!==j){h=i;return false}}):this.each(function(){var g=b.data(this,a);g?g.option(d||{})._init():b.data(this,a,new c(d,this))});return h}};b.Widget=function(a,c){arguments.length&&this._createWidget(a,c)};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(a,c){b.data(c,this.widgetName,this);this.element=b(c);this.options=
+b.extend(true,{},this.options,this._getCreateOptions(),a);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+
+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(a,c){var d=a;if(arguments.length===0)return b.extend({},this.options);if(typeof a==="string"){if(c===j)return this.options[a];d={};d[a]=c}this._setOptions(d);return this},_setOptions:function(a){var c=this;b.each(a,function(d,e){c._setOption(d,e)});return this},_setOption:function(a,c){this.options[a]=c;if(a==="disabled")this.widget()[c?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",
+c);return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(a,c,d){var e=this.options[a];c=b.Event(c);c.type=(a===this.widgetEventPrefix?a:this.widgetEventPrefix+a).toLowerCase();d=d||{};if(c.originalEvent){a=b.event.props.length;for(var f;a;){f=b.event.props[--a];c[f]=c.originalEvent[f]}}this.element.trigger(c,d);return!(b.isFunction(e)&&e.call(this.element[0],c,d)===false||c.isDefaultPrevented())}}})(jQuery);
+;/*!
+ * jQuery UI Mouse 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Mouse
+ *
+ * Depends:
+ * jquery.ui.widget.js
+ */
+(function(b){var d=false;b(document).mouseup(function(){d=false});b.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var a=this;this.element.bind("mousedown."+this.widgetName,function(c){return a._mouseDown(c)}).bind("click."+this.widgetName,function(c){if(true===b.data(c.target,a.widgetName+".preventClickEvent")){b.removeData(c.target,a.widgetName+".preventClickEvent");c.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+
+this.widgetName)},_mouseDown:function(a){if(!d){this._mouseStarted&&this._mouseUp(a);this._mouseDownEvent=a;var c=this,f=a.which==1,g=typeof this.options.cancel=="string"&&a.target.nodeName?b(a.target).closest(this.options.cancel).length:false;if(!f||g||!this._mouseCapture(a))return true;this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){c.mouseDelayMet=true},this.options.delay);if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a)){this._mouseStarted=
+this._mouseStart(a)!==false;if(!this._mouseStarted){a.preventDefault();return true}}true===b.data(a.target,this.widgetName+".preventClickEvent")&&b.removeData(a.target,this.widgetName+".preventClickEvent");this._mouseMoveDelegate=function(e){return c._mouseMove(e)};this._mouseUpDelegate=function(e){return c._mouseUp(e)};b(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);a.preventDefault();return d=true}},_mouseMove:function(a){if(b.browser.msie&&
+!(document.documentMode>=9)&&!a.button)return this._mouseUp(a);if(this._mouseStarted){this._mouseDrag(a);return a.preventDefault()}if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,a)!==false)?this._mouseDrag(a):this._mouseUp(a);return!this._mouseStarted},_mouseUp:function(a){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=
+false;a.target==this._mouseDownEvent.target&&b.data(a.target,this.widgetName+".preventClickEvent",true);this._mouseStop(a)}return false},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery);
+;/*
+ * jQuery UI Accordion 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Accordion
+ *
+ * Depends:
+ * jquery.ui.core.js
+ * jquery.ui.widget.js
+ */
+(function(c){c.widget("ui.accordion",{options:{active:0,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}},_create:function(){var a=this,b=a.options;a.running=0;a.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix");
+a.headers=a.element.find(b.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){b.disabled||c(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){b.disabled||c(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){b.disabled||c(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){b.disabled||c(this).removeClass("ui-state-focus")});a.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");
+if(b.navigation){var d=a.element.find("a").filter(b.navigationFilter).eq(0);if(d.length){var h=d.closest(".ui-accordion-header");a.active=h.length?h:d.closest(".ui-accordion-content").prev()}}a.active=a._findActive(a.active||b.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");a.active.next().addClass("ui-accordion-content-active");a._createIcons();a.resize();a.element.attr("role","tablist");a.headers.attr("role","tab").bind("keydown.accordion",
+function(f){return a._keydown(f)}).next().attr("role","tabpanel");a.headers.not(a.active||"").attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).next().hide();a.active.length?a.active.attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}):a.headers.eq(0).attr("tabIndex",0);c.browser.safari||a.headers.find("a").attr("tabIndex",-1);b.event&&a.headers.bind(b.event.split(" ").join(".accordion ")+".accordion",function(f){a._clickHandler.call(a,f,this);f.preventDefault()})},_createIcons:function(){var a=
+this.options;if(a.icons){c("<span></span>").addClass("ui-icon "+a.icons.header).prependTo(this.headers);this.active.children(".ui-icon").toggleClass(a.icons.header).toggleClass(a.icons.headerSelected);this.element.addClass("ui-accordion-icons")}},_destroyIcons:function(){this.headers.children(".ui-icon").remove();this.element.removeClass("ui-accordion-icons")},destroy:function(){var a=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("tabIndex");
+this.headers.find("a").removeAttr("tabIndex");this._destroyIcons();var b=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");if(a.autoHeight||a.fillHeight)b.css("height","");return c.Widget.prototype.destroy.call(this)},_setOption:function(a,b){c.Widget.prototype._setOption.apply(this,arguments);a=="active"&&this.activate(b);if(a=="icons"){this._destroyIcons();
+b&&this._createIcons()}if(a=="disabled")this.headers.add(this.headers.next())[b?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")},_keydown:function(a){if(!(this.options.disabled||a.altKey||a.ctrlKey)){var b=c.ui.keyCode,d=this.headers.length,h=this.headers.index(a.target),f=false;switch(a.keyCode){case b.RIGHT:case b.DOWN:f=this.headers[(h+1)%d];break;case b.LEFT:case b.UP:f=this.headers[(h-1+d)%d];break;case b.SPACE:case b.ENTER:this._clickHandler({target:a.target},a.target);
+a.preventDefault()}if(f){c(a.target).attr("tabIndex",-1);c(f).attr("tabIndex",0);f.focus();return false}return true}},resize:function(){var a=this.options,b;if(a.fillSpace){if(c.browser.msie){var d=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}b=this.element.parent().height();c.browser.msie&&this.element.parent().css("overflow",d);this.headers.each(function(){b-=c(this).outerHeight(true)});this.headers.next().each(function(){c(this).height(Math.max(0,b-c(this).innerHeight()+
+c(this).height()))}).css("overflow","auto")}else if(a.autoHeight){b=0;this.headers.next().each(function(){b=Math.max(b,c(this).height("").height())}).height(b)}return this},activate:function(a){this.options.active=a;a=this._findActive(a)[0];this._clickHandler({target:a},a);return this},_findActive:function(a){return a?typeof a==="number"?this.headers.filter(":eq("+a+")"):this.headers.not(this.headers.not(a)):a===false?c([]):this.headers.filter(":eq(0)")},_clickHandler:function(a,b){var d=this.options;
+if(!d.disabled)if(a.target){a=c(a.currentTarget||b);b=a[0]===this.active[0];d.active=d.collapsible&&b?false:this.headers.index(a);if(!(this.running||!d.collapsible&&b)){var h=this.active;j=a.next();g=this.active.next();e={options:d,newHeader:b&&d.collapsible?c([]):a,oldHeader:this.active,newContent:b&&d.collapsible?c([]):j,oldContent:g};var f=this.headers.index(this.active[0])>this.headers.index(a[0]);this.active=b?c([]):a;this._toggle(j,g,e,b,f);h.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);
+if(!b){a.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(d.icons.header).addClass(d.icons.headerSelected);a.next().addClass("ui-accordion-content-active")}}}else if(d.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass("ui-accordion-content-active");var g=this.active.next(),
+e={options:d,newHeader:c([]),oldHeader:d.active,newContent:c([]),oldContent:g},j=this.active=c([]);this._toggle(j,g,e)}},_toggle:function(a,b,d,h,f){var g=this,e=g.options;g.toShow=a;g.toHide=b;g.data=d;var j=function(){if(g)return g._completed.apply(g,arguments)};g._trigger("changestart",null,g.data);g.running=b.size()===0?a.size():b.size();if(e.animated){d={};d=e.collapsible&&h?{toShow:c([]),toHide:b,complete:j,down:f,autoHeight:e.autoHeight||e.fillSpace}:{toShow:a,toHide:b,complete:j,down:f,autoHeight:e.autoHeight||
+e.fillSpace};if(!e.proxied)e.proxied=e.animated;if(!e.proxiedDuration)e.proxiedDuration=e.duration;e.animated=c.isFunction(e.proxied)?e.proxied(d):e.proxied;e.duration=c.isFunction(e.proxiedDuration)?e.proxiedDuration(d):e.proxiedDuration;h=c.ui.accordion.animations;var i=e.duration,k=e.animated;if(k&&!h[k]&&!c.easing[k])k="slide";h[k]||(h[k]=function(l){this.slide(l,{easing:k,duration:i||700})});h[k](d)}else{if(e.collapsible&&h)a.toggle();else{b.hide();a.show()}j(true)}b.prev().attr({"aria-expanded":"false",
+"aria-selected":"false",tabIndex:-1}).blur();a.prev().attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}).focus()},_completed:function(a){this.running=a?0:--this.running;if(!this.running){this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""});this.toHide.removeClass("ui-accordion-content-active");if(this.toHide.length)this.toHide.parent()[0].className=this.toHide.parent()[0].className;this._trigger("change",null,this.data)}}});c.extend(c.ui.accordion,{version:"1.8.16",
+animations:{slide:function(a,b){a=c.extend({easing:"swing",duration:300},a,b);if(a.toHide.size())if(a.toShow.size()){var d=a.toShow.css("overflow"),h=0,f={},g={},e;b=a.toShow;e=b[0].style.width;b.width(parseInt(b.parent().width(),10)-parseInt(b.css("paddingLeft"),10)-parseInt(b.css("paddingRight"),10)-(parseInt(b.css("borderLeftWidth"),10)||0)-(parseInt(b.css("borderRightWidth"),10)||0));c.each(["height","paddingTop","paddingBottom"],function(j,i){g[i]="hide";j=(""+c.css(a.toShow[0],i)).match(/^([\d+-.]+)(.*)$/);
+f[i]={value:j[1],unit:j[2]||"px"}});a.toShow.css({height:0,overflow:"hidden"}).show();a.toHide.filter(":hidden").each(a.complete).end().filter(":visible").animate(g,{step:function(j,i){if(i.prop=="height")h=i.end-i.start===0?0:(i.now-i.start)/(i.end-i.start);a.toShow[0].style[i.prop]=h*f[i.prop].value+f[i.prop].unit},duration:a.duration,easing:a.easing,complete:function(){a.autoHeight||a.toShow.css("height","");a.toShow.css({width:e,overflow:d});a.complete()}})}else a.toHide.animate({height:"hide",
+paddingTop:"hide",paddingBottom:"hide"},a);else a.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},a)},bounceslide:function(a){this.slide(a,{easing:a.down?"easeOutBounce":"swing",duration:a.down?1E3:200})}}})})(jQuery);
+;/*
+ * jQuery UI Slider 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Slider
+ *
+ * Depends:
+ * jquery.ui.core.js
+ * jquery.ui.mouse.js
+ * jquery.ui.widget.js
+ */
+(function(d){d.widget("ui.slider",d.ui.mouse,{widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var a=this,b=this.options,c=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),f=b.values&&b.values.length||1,e=[];this._mouseSliding=this._keySliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+
+this.orientation+" ui-widget ui-widget-content ui-corner-all"+(b.disabled?" ui-slider-disabled ui-disabled":""));this.range=d([]);if(b.range){if(b.range===true){if(!b.values)b.values=[this._valueMin(),this._valueMin()];if(b.values.length&&b.values.length!==2)b.values=[b.values[0],b.values[0]]}this.range=d("<div></div>").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+(b.range==="min"||b.range==="max"?" ui-slider-range-"+b.range:""))}for(var j=c.length;j<f;j+=1)e.push("<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>");
+this.handles=c.add(d(e.join("")).appendTo(a.element));this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(g){g.preventDefault()}).hover(function(){b.disabled||d(this).addClass("ui-state-hover")},function(){d(this).removeClass("ui-state-hover")}).focus(function(){if(b.disabled)d(this).blur();else{d(".ui-slider .ui-state-focus").removeClass("ui-state-focus");d(this).addClass("ui-state-focus")}}).blur(function(){d(this).removeClass("ui-state-focus")});this.handles.each(function(g){d(this).data("index.ui-slider-handle",
+g)});this.handles.keydown(function(g){var k=true,l=d(this).data("index.ui-slider-handle"),i,h,m;if(!a.options.disabled){switch(g.keyCode){case d.ui.keyCode.HOME:case d.ui.keyCode.END:case d.ui.keyCode.PAGE_UP:case d.ui.keyCode.PAGE_DOWN:case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:k=false;if(!a._keySliding){a._keySliding=true;d(this).addClass("ui-state-active");i=a._start(g,l);if(i===false)return}break}m=a.options.step;i=a.options.values&&a.options.values.length?
+(h=a.values(l)):(h=a.value());switch(g.keyCode){case d.ui.keyCode.HOME:h=a._valueMin();break;case d.ui.keyCode.END:h=a._valueMax();break;case d.ui.keyCode.PAGE_UP:h=a._trimAlignValue(i+(a._valueMax()-a._valueMin())/5);break;case d.ui.keyCode.PAGE_DOWN:h=a._trimAlignValue(i-(a._valueMax()-a._valueMin())/5);break;case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:if(i===a._valueMax())return;h=a._trimAlignValue(i+m);break;case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:if(i===a._valueMin())return;h=a._trimAlignValue(i-
+m);break}a._slide(g,l,h);return k}}).keyup(function(g){var k=d(this).data("index.ui-slider-handle");if(a._keySliding){a._keySliding=false;a._stop(g,k);a._change(g,k);d(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy();
+return this},_mouseCapture:function(a){var b=this.options,c,f,e,j,g;if(b.disabled)return false;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();c=this._normValueFromMouse({x:a.pageX,y:a.pageY});f=this._valueMax()-this._valueMin()+1;j=this;this.handles.each(function(k){var l=Math.abs(c-j.values(k));if(f>l){f=l;e=d(this);g=k}});if(b.range===true&&this.values(1)===b.min){g+=1;e=d(this.handles[g])}if(this._start(a,g)===false)return false;
+this._mouseSliding=true;j._handleIndex=g;e.addClass("ui-state-active").focus();b=e.offset();this._clickOffset=!d(a.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:a.pageX-b.left-e.width()/2,top:a.pageY-b.top-e.height()/2-(parseInt(e.css("borderTopWidth"),10)||0)-(parseInt(e.css("borderBottomWidth"),10)||0)+(parseInt(e.css("marginTop"),10)||0)};this.handles.hasClass("ui-state-hover")||this._slide(a,g,c);return this._animateOff=true},_mouseStart:function(){return true},_mouseDrag:function(a){var b=
+this._normValueFromMouse({x:a.pageX,y:a.pageY});this._slide(a,this._handleIndex,b);return false},_mouseStop:function(a){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(a,this._handleIndex);this._change(a,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=false},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(a){var b;if(this.orientation==="horizontal"){b=
+this.elementSize.width;a=a.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{b=this.elementSize.height;a=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}b=a/b;if(b>1)b=1;if(b<0)b=0;if(this.orientation==="vertical")b=1-b;a=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+b*a)},_start:function(a,b){var c={handle:this.handles[b],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(b);
+c.values=this.values()}return this._trigger("start",a,c)},_slide:function(a,b,c){var f;if(this.options.values&&this.options.values.length){f=this.values(b?0:1);if(this.options.values.length===2&&this.options.range===true&&(b===0&&c>f||b===1&&c<f))c=f;if(c!==this.values(b)){f=this.values();f[b]=c;a=this._trigger("slide",a,{handle:this.handles[b],value:c,values:f});this.values(b?0:1);a!==false&&this.values(b,c,true)}}else if(c!==this.value()){a=this._trigger("slide",a,{handle:this.handles[b],value:c});
+a!==false&&this.value(c)}},_stop:function(a,b){var c={handle:this.handles[b],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(b);c.values=this.values()}this._trigger("stop",a,c)},_change:function(a,b){if(!this._keySliding&&!this._mouseSliding){var c={handle:this.handles[b],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(b);c.values=this.values()}this._trigger("change",a,c)}},value:function(a){if(arguments.length){this.options.value=
+this._trimAlignValue(a);this._refreshValue();this._change(null,0)}else return this._value()},values:function(a,b){var c,f,e;if(arguments.length>1){this.options.values[a]=this._trimAlignValue(b);this._refreshValue();this._change(null,a)}else if(arguments.length)if(d.isArray(arguments[0])){c=this.options.values;f=arguments[0];for(e=0;e<c.length;e+=1){c[e]=this._trimAlignValue(f[e]);this._change(null,e)}this._refreshValue()}else return this.options.values&&this.options.values.length?this._values(a):
+this.value();else return this._values()},_setOption:function(a,b){var c,f=0;if(d.isArray(this.options.values))f=this.options.values.length;d.Widget.prototype._setOption.apply(this,arguments);switch(a){case "disabled":if(b){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.propAttr("disabled",true);this.element.addClass("ui-disabled")}else{this.handles.propAttr("disabled",false);this.element.removeClass("ui-disabled")}break;case "orientation":this._detectOrientation();
+this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue();break;case "value":this._animateOff=true;this._refreshValue();this._change(null,0);this._animateOff=false;break;case "values":this._animateOff=true;this._refreshValue();for(c=0;c<f;c+=1)this._change(null,c);this._animateOff=false;break}},_value:function(){var a=this.options.value;return a=this._trimAlignValue(a)},_values:function(a){var b,c;if(arguments.length){b=this.options.values[a];
+return b=this._trimAlignValue(b)}else{b=this.options.values.slice();for(c=0;c<b.length;c+=1)b[c]=this._trimAlignValue(b[c]);return b}},_trimAlignValue:function(a){if(a<=this._valueMin())return this._valueMin();if(a>=this._valueMax())return this._valueMax();var b=this.options.step>0?this.options.step:1,c=(a-this._valueMin())%b;a=a-c;if(Math.abs(c)*2>=b)a+=c>0?b:-b;return parseFloat(a.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var a=
+this.options.range,b=this.options,c=this,f=!this._animateOff?b.animate:false,e,j={},g,k,l,i;if(this.options.values&&this.options.values.length)this.handles.each(function(h){e=(c.values(h)-c._valueMin())/(c._valueMax()-c._valueMin())*100;j[c.orientation==="horizontal"?"left":"bottom"]=e+"%";d(this).stop(1,1)[f?"animate":"css"](j,b.animate);if(c.options.range===true)if(c.orientation==="horizontal"){if(h===0)c.range.stop(1,1)[f?"animate":"css"]({left:e+"%"},b.animate);if(h===1)c.range[f?"animate":"css"]({width:e-
+g+"%"},{queue:false,duration:b.animate})}else{if(h===0)c.range.stop(1,1)[f?"animate":"css"]({bottom:e+"%"},b.animate);if(h===1)c.range[f?"animate":"css"]({height:e-g+"%"},{queue:false,duration:b.animate})}g=e});else{k=this.value();l=this._valueMin();i=this._valueMax();e=i!==l?(k-l)/(i-l)*100:0;j[c.orientation==="horizontal"?"left":"bottom"]=e+"%";this.handle.stop(1,1)[f?"animate":"css"](j,b.animate);if(a==="min"&&this.orientation==="horizontal")this.range.stop(1,1)[f?"animate":"css"]({width:e+"%"},
+b.animate);if(a==="max"&&this.orientation==="horizontal")this.range[f?"animate":"css"]({width:100-e+"%"},{queue:false,duration:b.animate});if(a==="min"&&this.orientation==="vertical")this.range.stop(1,1)[f?"animate":"css"]({height:e+"%"},b.animate);if(a==="max"&&this.orientation==="vertical")this.range[f?"animate":"css"]({height:100-e+"%"},{queue:false,duration:b.animate})}}});d.extend(d.ui.slider,{version:"1.8.16"})})(jQuery);
+;
\ No newline at end of file diff --git a/themes/mantra/admin/js/admin.js b/themes/mantra/admin/js/admin.js new file mode 100644 index 00000000..6ee51806 --- /dev/null +++ b/themes/mantra/admin/js/admin.js @@ -0,0 +1,185 @@ +/*!
+ * Admin js
+ */
+
+jQuery(document).ready(function() {
+
+// WP image uploader for custom use in the admin section
+ var uploadparent = 0;
+ var old_send_to_editor = window.send_to_editor;
+ var old_tb_remove = window.tb_remove;
+
+ jQuery('.upload_image_button').click(function(){
+ uploadparent = jQuery(this).closest('div');
+ //Change "insert into post" to "Use this Button"
+ tbframe_interval = setInterval( function() {jQuery('#TB_iframeContent').contents().find('.savesend .button').val('Use This Image');}, 2000);
+ tb_show('Select File', 'media-upload.php?post_id=0&type=file&TB_iframe=true');
+ return false;
+ });
+
+ window.tb_remove = function() {
+ uploadparent = 0;
+ old_tb_remove();
+ }
+
+ window.send_to_editor = function(html) {
+ if(uploadparent){
+ imgurl = jQuery('img',html).attr('src');
+ uploadparent.find('.slideimages').attr('value', imgurl);
+ uploadparent.find('.imagebox').attr('src', imgurl);
+ tb_remove();
+ } else {
+ old_send_to_editor();
+ }
+ }
+
+
+// Show/hide slides
+ jQuery('.slidetitle').click(function() {
+ jQuery(this).next().toggle("fast");
+ });
+
+
+// Jquery confim window on reset to defaults
+jQuery('#mantra_defaults').click (function() {
+ if (!confirm('Reset Mantra Settings to Defaults?')) { return false;}
+ });
+
+// Hide or show dimmensions
+jQuery('#mantra_dimselect').change(function() {
+ if (jQuery('#mantra_dimselect option:selected').val()=="Absolute") {
+ jQuery('#relativedim').hide("normal");jQuery('#absolutedim').show("normal");
+ }
+ else {
+ jQuery('#relativedim').show("normal");jQuery('#absolutedim').hide("normal");
+ }
+ });
+
+if (jQuery('#mantra_dimselect option:selected').val()=="Absolute") {
+ jQuery('#relativedim').hide("normal");jQuery('#absolutedim').show("normal");}
+else {
+ jQuery('#relativedim').show("normal");jQuery('#absolutedim').hide("normal");
+ }
+
+
+// Hide or show slider settings
+jQuery('#mantra_slideType').change(function() {
+ jQuery('.slideDivs').hide("normal");
+ switch (jQuery('#mantra_slideType option:selected').val()) {
+
+ case "Custom Slides" :
+ jQuery('#sliderCustomSlides').show("normal");
+ break;
+
+ case "Latest Posts" :
+ jQuery('#sliderLatestPosts').show("normal");
+ break;
+
+ case "Random Posts" :
+ jQuery('#sliderRandomPosts').show("normal");
+ break;
+
+ case "Sticky Posts" :
+ jQuery('#sliderStickyPosts').show("normal");
+ break;
+
+ case "Latest Posts from Category" :
+ jQuery('#sliderLatestCateg').show("normal");
+ break;
+
+ case "Random Posts from Category" :
+ jQuery('#sliderRandomCateg').show("normal");
+ break;
+
+ case "Specific Posts" :
+ jQuery('#sliderSpecificPosts').show("normal");
+ break;
+
+ }//switch
+
+});//function
+
+jQuery('.slideDivs').hide("normal");
+ switch (jQuery('#mantra_slideType option:selected').val()) {
+
+ case "Custom Slides" :
+ jQuery('#sliderCustomSlides').show("normal");
+ break;
+
+ case "Latest Posts" :
+ jQuery('#sliderLatestPosts').show("normal");
+ break;
+
+ case "Random Posts" :
+ jQuery('#sliderRandomPosts').show("normal");
+ break;
+
+ case "Sticky Posts" :
+ jQuery('#sliderStickyPosts').show("normal");
+ break;
+
+ case "Latest Posts from Category" :
+ jQuery('#sliderLatestCateg').show("normal");
+ break;
+
+ case "Random Posts from Category" :
+ jQuery('#sliderRandomCateg').show("normal");
+ break;
+
+ case "Specific Posts" :
+ jQuery('#sliderSpecificPosts').show("normal");
+ break;
+};//switch
+
+//Slide type value
+$sliderNr=jQuery('#mantra_slideType').val();
+
+//Show category if a category type is selected
+if ($sliderNr=="Latest Posts from Category" || $sliderNr=="Random Posts from Category" )
+ jQuery('#slider-category').show();
+else jQuery('#slider-category').hide();
+
+//Show number of slides if that's the case
+if ($sliderNr=="Latest Posts" || $sliderNr =="Random Posts" || $sliderNr =="Sticky Posts" || $sliderNr=="Latest Posts from Category" || $sliderNr=="Random Posts from Category" )
+ jQuery('#slider-post-number').show();
+else jQuery('#slider-post-number').hide();
+
+//On change
+jQuery('#mantra_slideType').change(function(){
+ $sliderNr=jQuery('#mantra_slideType').val();
+//Show category if a category type is selected
+ if ($sliderNr=="Latest Posts from Category" || $sliderNr=="Random Posts from Category" )
+ jQuery('#slider-category').show();
+ else jQuery('#slider-category').hide();
+//Show number of slides if that's the case
+ if ($sliderNr=="Latest Posts" || $sliderNr =="Random Posts" || $sliderNr =="Sticky Posts" || $sliderNr=="Latest Posts from Category" || $sliderNr=="Random Posts from Category" )
+ jQuery('#slider-post-number').show();
+else jQuery('#slider-post-number').hide();
+ });//onchange funciton
+
+
+
+// Create accordion from existing settings table
+ jQuery('.form-table').wrap('<div>');
+ jQuery(function() {
+ jQuery( "#accordion" ).accordion({
+ header: 'h3',
+ autoHeight: false, // for jQueryUI <1.10
+ heightStyle: "content", // required in jQueryUI 1.10
+ collapsible: true,
+ navigation: true,
+ active: false
+ });
+ });
+
+
+ });// ready
+
+ // Change border for selecte inputs
+function changeBorder (idName, className) {
+ jQuery('.'+className).removeClass( 'checkedClass' );
+ jQuery('.'+className).removeClass( 'borderful' );
+ jQuery('#'+idName).addClass( 'borderful' );
+
+return 0;
+}
\ No newline at end of file diff --git a/themes/mantra/admin/main.php b/themes/mantra/admin/main.php new file mode 100644 index 00000000..379303e0 --- /dev/null +++ b/themes/mantra/admin/main.php @@ -0,0 +1,478 @@ +<?php
+// Loading files for frontend
+
+// Loading Default values
+require_once(dirname(__FILE__) . "/defaults.php");
+// Loading function that generates the custom css
+require_once(dirname(__FILE__) . "/custom-styles.php");
+
+// Loading the admin files
+
+if( is_admin() ) {
+// Loading the settings arrays
+require_once(dirname(__FILE__) . "/settings.php");
+// Loading the callback functions
+require_once(dirname(__FILE__) . "/admin-functions.php");
+// Loading the sanitize funcions
+require_once(dirname(__FILE__) . "/sanitize.php");
+}
+
+// Getting the theme options and making sure defaults are used if no values are set
+function mantra_get_theme_options() {
+ global $mantra_defaults;
+ $optionsMantra = get_option( 'ma_options', (array)$mantra_defaults );
+ $optionsMantra = array_merge((array)$mantra_defaults, (array)$optionsMantra);
+return $optionsMantra;
+}
+
+$mantra_options= mantra_get_theme_options();
+foreach ($mantra_options as $key => $value) {
+ ${"$key"} = $value ;
+}
+
+
+// Hooks/Filters
+add_action('admin_init', 'mantra_init_fn' );
+add_action('admin_menu', 'mantra_add_page_fn');
+add_action('init', 'mantra_init');
+
+
+$mantra_options= mantra_get_theme_options();
+
+// Registering and enqueuing all scripts and styles for the init hook
+function mantra_init() {
+//Loading Mantra text domain into the admin section
+ load_theme_textdomain( 'mantra', get_template_directory_uri() . '/languages' );
+}
+
+// Creating the mantra subpage
+function mantra_add_page_fn() {
+$page = add_theme_page('Mantra Settings', 'Mantra Settings', 'edit_theme_options', 'mantra-page', 'mantra_page_fn');
+ add_action( 'admin_print_styles-'.$page, 'mantra_admin_styles' );
+ add_action('admin_print_scripts-'.$page, 'mantra_admin_scripts');
+
+}
+
+// Adding the styles for the Mantra admin page used when mantra_add_page_fn() is launched
+function mantra_admin_styles() {
+
+ wp_register_style( 'mantra-admin-style',get_template_directory_uri() . '/admin/css/admin.css' );
+ wp_register_style( 'jquery-ui-style',get_template_directory_uri() . '/js/jqueryui/css/ui-lightness/jquery-ui-1.8.16.custom.css' );
+ wp_enqueue_style( 'mantra-admin-style' );
+ wp_enqueue_style( 'jquery-ui-style' );
+
+}
+
+// Adding the styles for the Mantra admin page used when mantra_add_page_fn() is launched
+function mantra_admin_scripts() {
+// The farbtastic color selector already included in WP
+ wp_enqueue_script("farbtastic");
+ wp_enqueue_style( 'farbtastic' );
+
+//Jquery accordion and slider libraries alreay included in WP
+ wp_enqueue_script('jquery-ui-accordion');
+ wp_enqueue_script('jquery-ui-slider');
+ wp_enqueue_script('jquery-ui-tooltip');
+// For backwards compatibility where Mantra is installed on older versions of WP where the ui accordion and slider are not included
+ if (!wp_script_is('jquery-ui-accordion',$list='registered')) {
+ wp_register_script('cryout_accordion',get_template_directory_uri() . '/admin/js/accordion-slider.js', array('jquery') );
+ wp_enqueue_script('cryout_accordion');
+ }
+// For the WP uploader
+ wp_enqueue_script('media-upload');
+ wp_enqueue_script('thickbox');
+ wp_enqueue_style('thickbox');
+// The js used in the admin
+ wp_register_script('cryout-admin-js',get_template_directory_uri() . '/admin/js/admin.js' );
+ wp_enqueue_script('cryout-admin-js');
+}
+
+// The settings sectoions. All the referenced functions are found in admin-functions.php
+function mantra_init_fn(){
+
+
+ register_setting('ma_options', 'ma_options', 'ma_options_validate' );
+
+/**************
+ sections
+**************/
+
+ add_settings_section('layout_section', __('Layout Settings','mantra'), 'cryout_section_layout_fn', __FILE__);
+ add_settings_section('header_section', __('Header Settings','mantra'), 'cryout_section_header_fn', __FILE__);
+ add_settings_section('presentation_section', __('Presentation Page','mantra'), 'cryout_section_presentation_fn', __FILE__);
+ add_settings_section('text_section', __('Text Settings','mantra'), 'cryout_section_text_fn', __FILE__);
+ add_settings_section('appereance_section',__('Color Settings','mantra') , 'cryout_section_appereance_fn', __FILE__);
+ add_settings_section('graphics_section', __('Graphics Settings','mantra') , 'cryout_section_graphics_fn', __FILE__);
+ add_settings_section('post_section', __('Post Information Settings','mantra') , 'cryout_section_post_fn', __FILE__);
+ add_settings_section('excerpt_section', __('Post Excerpt Settings','mantra') , 'cryout_section_excerpt_fn', __FILE__);
+ add_settings_section('featured_section', __('Featured Image Settings','mantra') , 'cryout_section_featured_fn', __FILE__);
+ add_settings_section('socials_section', __('Social Media Settings','mantra') , 'cryout_section_social_fn', __FILE__);
+ add_settings_section('misc_section', __('Miscellaneous Settings','mantra') , 'cryout_section_misc_fn', __FILE__);
+
+/*** layout ***/
+ add_settings_field('mantra_side', __('Main Layout','mantra') , 'cryout_setting_side_fn', __FILE__, 'layout_section');
+ add_settings_field('mantra_sidewidth', __('Content / Sidebar Width','mantra') , 'cryout_setting_sidewidth_fn', __FILE__, 'layout_section');
+ add_settings_field('mantra_mobile', __('Responsiveness','mantra') , 'cryout_setting_mobile_fn', __FILE__, 'layout_section');
+/*** presentation ***/
+
+ add_settings_field('mantra_frontpage', __('Enable Presentation Page','mantra') , 'cryout_setting_frontpage_fn', __FILE__, 'presentation_section');
+ add_settings_field('mantra_frontposts', __('Show Posts on Presentation Page','mantra') , 'cryout_setting_frontposts_fn', __FILE__, 'presentation_section');
+ add_settings_field('mantra_frontslider', __('Slider Settings','mantra') , 'cryout_setting_frontslider_fn', __FILE__, 'presentation_section');
+ add_settings_field('mantra_frontslider2', __('Slides','mantra') , 'cryout_setting_frontslider2_fn', __FILE__, 'presentation_section');
+ add_settings_field('mantra_frontcolumns', __('Presentation Page Columns','mantra') , 'cryout_setting_frontcolumns_fn', __FILE__, 'presentation_section');
+ add_settings_field('mantra_fronttext', __('Extras','mantra') , 'cryout_setting_fronttext_fn', __FILE__, 'presentation_section');
+
+/*** header ***/
+ add_settings_field('mantra_hheight', __('Header Height','mantra') , 'cryout_setting_hheight_fn', __FILE__, 'header_section');
+ add_settings_field('mantra_himage', __('Header Image','mantra') , 'cryout_setting_himage_fn', __FILE__, 'header_section');
+ add_settings_field('mantra_siteheader', __('Site Header','mantra') , 'cryout_setting_siteheader_fn', __FILE__, 'header_section');
+ add_settings_field('mantra_logoupload', __('Custom Logo Upload','mantra') , 'cryout_setting_logoupload_fn', __FILE__, 'header_section');
+ add_settings_field('mantra_headermargin', __('Header Spacing','mantra') , 'cryout_setting_headermargin_fn', __FILE__, 'header_section');
+ add_settings_field('mantra_menurounded', __('Rounded Menu Corners','mantra') , 'cryout_setting_menurounded_fn', __FILE__, 'header_section');
+ add_settings_field('mantra_favicon', __('FavIcon Upload','mantra') , 'cryout_setting_favicon_fn', __FILE__, 'header_section');
+/*** text ***/
+ add_settings_field('mantra_fontfamily', __('General Font','mantra') , 'cryout_setting_fontfamily_fn', __FILE__, 'text_section');
+ add_settings_field('mantra_fontsize', __('General Font Size','mantra') , 'cryout_setting_fontsize_fn', __FILE__, 'text_section');
+ add_settings_field('mantra_fonttitle', __('Post Title Font ','mantra') , 'cryout_setting_fonttitle_fn', __FILE__, 'text_section');
+ add_settings_field('mantra_headfontsize', __('Post Title Font Size','mantra') , 'cryout_setting_headfontsize_fn', __FILE__, 'text_section');
+ add_settings_field('mantra_fontside', __('Sidebar Font','mantra') , 'cryout_setting_fontside_fn', __FILE__, 'text_section');
+ add_settings_field('mantra_sidefontsize', __('SideBar Font Size','mantra') , 'cryout_setting_sidefontsize_fn', __FILE__, 'text_section');
+ add_settings_field('mantra_fontsubheader', __('Headings Font','mantra') , 'cryout_setting_fontsubheader_fn', __FILE__, 'text_section');
+ add_settings_field('mantra_textalign', __('Force Text Align','mantra') , 'cryout_setting_textalign_fn', __FILE__, 'text_section');
+ add_settings_field('mantra_parmargin', __('Paragraph spacing','mantra') , 'cryout_setting_parmargin_fn', __FILE__, 'text_section');
+ add_settings_field('mantra_parindent', __('Paragraph indent','mantra') , 'cryout_setting_parindent_fn', __FILE__, 'text_section');
+ add_settings_field('mantra_headerindent', __('Header indent','mantra') , 'cryout_setting_headerindent_fn', __FILE__, 'text_section');
+ add_settings_field('mantra_lineheight', __('Line Height','mantra') , 'cryout_setting_lineheight_fn', __FILE__, 'text_section');
+ add_settings_field('mantra_wordspace', __('Word spacing','mantra') , 'cryout_setting_wordspace_fn', __FILE__, 'text_section');
+ add_settings_field('mantra_letterspace', __('Letter spacing','mantra') , 'cryout_setting_letterspace_fn', __FILE__, 'text_section');
+ add_settings_field('mantra_textshadow', __('Text shadow','mantra') , 'cryout_setting_textshadow_fn', __FILE__, 'text_section');
+/*** appereance ***/
+ add_settings_field('mantra_sitebackground', __('Background Image','mantra') , 'cryout_setting_sitebackground_fn', __FILE__, 'appereance_section');
+ add_settings_field('mantra_backcolor', __('Background Color','mantra') , 'cryout_setting_backcolor_fn', __FILE__, 'appereance_section');
+ add_settings_field('mantra_headercolor', __('Header (Banner and Menu) Background Color','mantra') , 'cryout_setting_headercolor_fn', __FILE__, 'appereance_section');
+ add_settings_field('mantra_contentbg', __('Content Background Color','mantra') , 'cryout_setting_contentbg_fn', __FILE__, 'appereance_section');
+ add_settings_field('mantra_menubg', __('Menu Items Background Color','mantra') , 'cryout_setting_menubg_fn', __FILE__, 'appereance_section');
+ add_settings_field('mantra_s1bg', __('First Sidebar Background Color','mantra') , 'cryout_setting_first_sidebar_fn', __FILE__, 'appereance_section');
+ add_settings_field('mantra_s2bg', __('Second Sidebar Background Color','mantra') , 'cryout_setting_second_sidebar_fn', __FILE__, 'appereance_section');
+
+ add_settings_field('mantra_titlecolor', __('Site Title Color','mantra') , 'cryout_setting_titlecolor_fn', __FILE__, 'appereance_section');
+ add_settings_field('mantra_descriptioncolor', __('Site Description Color','mantra') , 'cryout_setting_descriptioncolor_fn', __FILE__, 'appereance_section');
+
+ add_settings_field('mantra_contentcolor', __('Content Text Color','mantra') , 'cryout_setting_contentcolor_fn', __FILE__, 'appereance_section');
+ add_settings_field('mantra_linkscolor', __('Links Color','mantra') , 'cryout_setting_linkscolor_fn', __FILE__, 'appereance_section');
+ add_settings_field('mantra_hovercolor', __('Links Hover Color','mantra') , 'cryout_setting_hovercolor_fn', __FILE__, 'appereance_section');
+ add_settings_field('mantra_headtextcolor',__( 'Post Title Color','mantra') , 'cryout_setting_headtextcolor_fn', __FILE__, 'appereance_section');
+ add_settings_field('mantra_headtexthover', __('Post Title Hover Color','mantra') , 'cryout_setting_headtexthover_fn', __FILE__, 'appereance_section');
+ add_settings_field('mantra_sideheadbackcolor', __('Sidebar Header Background Color','mantra') , 'cryout_setting_sideheadbackcolor_fn', __FILE__, 'appereance_section');
+ add_settings_field('mantra_sideheadtextcolor', __('Sidebar Header Text Color','mantra') , 'cryout_setting_sideheadtextcolor_fn', __FILE__, 'appereance_section');
+ add_settings_field('mantra_prefootercolor', __('Footer Widget Background Color','mantra') , 'cryout_setting_prefootercolor_fn', __FILE__, 'appereance_section');
+ add_settings_field('mantra_footercolor', __('Footer Background Color','mantra') , 'cryout_setting_footercolor_fn', __FILE__, 'appereance_section');
+ add_settings_field('mantra_footerheader', __('Footer Widget Header Text Color','mantra') , 'cryout_setting_footerheader_fn', __FILE__, 'appereance_section');
+ add_settings_field('mantra_footertext', __('Footer Widget Link Color','mantra') , 'cryout_setting_footertext_fn', __FILE__, 'appereance_section');
+ add_settings_field('mantra_footerhover', __('Footer Widget Hover Color','mantra') , 'cryout_setting_footerhover_fn', __FILE__, 'appereance_section');
+/*** graphics ***/
+ add_settings_field('mantra_breadcrumbs', __('Breadcrumbs','mantra') , 'cryout_setting_breadcrumbs_fn', __FILE__, 'graphics_section');
+ add_settings_field('mantra_pagination', __('Pagination','mantra') , 'cryout_setting_pagination_fn', __FILE__, 'graphics_section');
+ add_settings_field('mantra_menualign', __('Main Menu Alignment','mantra') , 'cryout_setting_menualign_fn', __FILE__, 'graphics_section');
+ add_settings_field('mantra_image', __('Post Images Border','mantra') , 'cryout_setting_image_fn', __FILE__, 'graphics_section');
+ add_settings_field('mantra_caption', __('Caption Border','mantra') , 'cryout_setting_caption_fn', __FILE__, 'graphics_section');
+ add_settings_field('mantra_pin', __('Caption Pin','mantra') , 'cryout_setting_pin_fn', __FILE__, 'graphics_section');
+ add_settings_field('mantra_sidebullet', __('Sidebar Menu Bullets','mantra') , 'cryout_setting_sidebullet_fn', __FILE__, 'graphics_section');
+ add_settings_field('mantra_metaback', __('Meta Area Background','mantra') , 'cryout_setting_metaback_fn', __FILE__, 'graphics_section');
+ add_settings_field('mantra_postseparator', __('Post Separator','mantra') , 'cryout_setting_postseparator_fn', __FILE__, 'graphics_section');
+ add_settings_field('mantra_contentlist', __('Content List Bullets','mantra') , 'cryout_setting_contentlist_fn', __FILE__, 'graphics_section');
+ add_settings_field('mantra_pagetitle', __('Page Titles','mantra') , 'cryout_setting_pagetitle_fn', __FILE__, 'graphics_section');
+ add_settings_field('mantra_categetitle', __('Category Page Titles','mantra') , 'cryout_setting_categtitle_fn', __FILE__, 'graphics_section');
+ add_settings_field('mantra_tables', __('Hide Tables','mantra') , 'cryout_setting_tables_fn', __FILE__, 'graphics_section');
+ add_settings_field('mantra_backtop', __('Back to Top button','mantra') , 'cryout_setting_backtop_fn', __FILE__, 'graphics_section');
+ add_settings_field('mantra_comtext', __('Text Under Comments','mantra') , 'cryout_setting_comtext_fn', __FILE__, 'graphics_section');
+ add_settings_field('mantra_comclosed', __('Comments are closed text','mantra') , 'cryout_setting_comclosed_fn', __FILE__, 'graphics_section');
+ add_settings_field('mantra_comoff', __('Comments off','mantra') , 'cryout_setting_comoff_fn', __FILE__, 'graphics_section');
+/*** post metas***/
+ add_settings_field('mantra_postcomlink', __('Post Comments Link','mantra') , 'cryout_setting_postcomlink_fn', __FILE__, 'post_section');
+ add_settings_field('mantra_postdate', __('Post Date','mantra') , 'cryout_setting_postdate_fn', __FILE__, 'post_section');
+ add_settings_field('mantra_posttime', __('Post Time','mantra') , 'cryout_setting_posttime_fn', __FILE__, 'post_section');
+ add_settings_field('mantra_postauthor', __('Post Author','mantra') , 'cryout_setting_postauthor_fn', __FILE__, 'post_section');
+ add_settings_field('mantra_postcateg', __('Post Category','mantra') , 'cryout_setting_postcateg_fn', __FILE__, 'post_section');
+ add_settings_field('mantra_postmetas', __('Meta Bar','mantra') , 'cryout_setting_postmetas_fn', __FILE__, 'post_section');
+ add_settings_field('mantra_posttag', __('Post Tags','mantra') , 'cryout_setting_posttag_fn', __FILE__, 'post_section');
+ add_settings_field('mantra_postbook', __('Post Permalink','mantra') , 'cryout_setting_postbook_fn', __FILE__, 'post_section');
+/*** post exceprts***/
+ add_settings_field('mantra_excerpthome', __('Post Excerpts on Home Page','mantra') , 'cryout_setting_excerpthome_fn', __FILE__, 'excerpt_section');
+ add_settings_field('mantra_excerptsticky', __('Affect Sticky Posts','mantra') , 'cryout_setting_excerptsticky_fn', __FILE__, 'excerpt_section');
+ add_settings_field('mantra_excerptarchive', __('Post Excerpts on Archive and Category Pages','mantra') , 'cryout_setting_excerptarchive_fn', __FILE__, 'excerpt_section');
+ add_settings_field('mantra_excerptwords', __('Number of Words for Post Excerpts ','mantra') , 'cryout_setting_excerptwords_fn', __FILE__, 'excerpt_section');
+ add_settings_field('mantra_magazinelayout', __('Magazine Layout','mantra') , 'cryout_setting_magazinelayout_fn', __FILE__, 'excerpt_section');
+ add_settings_field('mantra_excerptdots', __('Excerpt suffix','mantra') , 'cryout_setting_excerptdots_fn', __FILE__, 'excerpt_section');
+ add_settings_field('mantra_excerptcont', __('Continue reading link text ','mantra') , 'cryout_setting_excerptcont_fn', __FILE__, 'excerpt_section');
+ add_settings_field('mantra_excerpttags', __('HTML tags in Excerpts','mantra') , 'cryout_setting_excerpttags_fn', __FILE__, 'excerpt_section');
+/*** featured ***/
+ add_settings_field('mantra_fpost', __('Featured Images as POST Thumbnails ','mantra') , 'cryout_setting_fpost_fn', __FILE__, 'featured_section');
+ add_settings_field('mantra_fauto', __('Auto Select Images From Posts ','mantra') , 'cryout_setting_fauto_fn', __FILE__, 'featured_section');
+ add_settings_field('mantra_falign', __('Thumbnails Alignment ','mantra') , 'cryout_setting_falign_fn', __FILE__, 'featured_section');
+ add_settings_field('mantra_fsize', __('Thumbnails Size ','mantra') , 'cryout_setting_fsize_fn', __FILE__, 'featured_section');
+ add_settings_field('mantra_fheader', __('Featured Images as HEADER Images ','mantra') , 'cryout_setting_fheader_fn', __FILE__, 'featured_section');
+/*** socials ***/
+ add_settings_field('mantra_socials1', __('Link nr. 1','mantra') , 'cryout_setting_socials1_fn', __FILE__, 'socials_section');
+ add_settings_field('mantra_socials2', __('Link nr. 2','mantra') , 'cryout_setting_socials2_fn', __FILE__, 'socials_section');
+ add_settings_field('mantra_socials3', __('Link nr. 3','mantra') , 'cryout_setting_socials3_fn', __FILE__, 'socials_section');
+ add_settings_field('mantra_socials4', __('Link nr. 4','mantra') , 'cryout_setting_socials4_fn', __FILE__, 'socials_section');
+ add_settings_field('mantra_socials5', __('Link nr. 5','mantra') , 'cryout_setting_socials5_fn', __FILE__, 'socials_section');
+ add_settings_field('mantra_socialshow', __('Socials display','mantra') , 'cryout_setting_socialsdisplay_fn', __FILE__, 'socials_section');
+/*** misc ***/
+ add_settings_field('mantra_seo', __('SEO Settings','mantra') , 'cryout_setting_seo_fn', __FILE__, 'misc_section');
+ add_settings_field('mantra_copyright', __('Custom Footer Text','mantra') , 'cryout_setting_copyright_fn', __FILE__, 'misc_section');
+ add_settings_field('mantra_customcss', __('Custom CSS','mantra') , 'cryout_setting_customcss_fn', __FILE__, 'misc_section');
+ add_settings_field('mantra_customjs', __('Custom JavaScript','mantra') , 'cryout_setting_customjs_fn', __FILE__, 'misc_section');
+}
+
+ // Display the admin options page
+function mantra_page_fn() {
+ // Load the import form page if the import button has been pressed
+ if (isset($_POST['mantra_import'])) {
+ mantra_import_form();
+ return;
+ }
+ // Load the import form page after upload button has been pressed
+ if (isset($_POST['mantra_import_confirmed'])) {
+ mantra_import_file();
+ return;
+ }
+
+ if (!current_user_can('edit_theme_options')) {
+ wp_die( __('Sorry, but you do not have sufficient permissions to access this page.','mantra') );
+ }?>
+
+
+<div class="wrap"><!-- Admin wrap page -->
+
+<div id="lefty"><!-- Left side of page - the options area -->
+ <div>
+<div id="admin_header"><img src="<?php echo get_template_directory_uri() . '/admin/images/mantra-logo.png' ?>" /> </div>
+
+<div id="admin_links">
+ <a target="_blank" href="http://www.cryoutcreations.eu/mantra">Mantra Homepage</a>
+ <a target="_blank" href="http://www.cryoutcreations.eu/forum">Support</a>
+ <a target="_blank" href="http://www.cryoutcreations.eu">Cryout Creations</a>
+</div>
+ <div style="clear: both;"></div>
+</div>
+<div id="jsAlert" class="error" style="padding:5px 10px;">If this message remains visible after the page has loaded then there is a problem with your WordPress jQuery library. This can have several causes, including incompatible plugins.<br> The Mantra Settings page cannot function without jQuery. You need to fix this issue before you can configure Mantra.</div>
+<?php if ( isset( $_GET['settings-updated'] ) ) {
+ echo "<div class='updated fade' style='clear:left;'><p>";
+ echo _e('Mantra settings updated successfully.','mantra');
+ echo "</p></div>";
+} ?>
+
+ <div id="main-options">
+ <form name="mantra_form" action="options.php" method="post" enctype="multipart/form-data">
+ <div id="accordion">
+ <?php settings_fields('ma_options'); ?>
+ <?php do_settings_sections(__FILE__); ?>
+ </div>
+ <div id="submitDiv">
+ <br>
+ <input class="button" name="ma_options[mantra_submit]" type="submit" style="float:right;" value="<?php _e('Save Changes','mantra'); ?>" />
+ <input class="button" name="ma_options[mantra_defaults]" id="mantra_defaults" type="submit" style="float:left;" value="<?php _e('Reset to Defaults','mantra'); ?>" />
+ </div>
+ </form>
+ <?php $mantra_theme_data = get_transient( 'mantra_theme_info'); ?>
+ <span id="version">
+ Mantra v <?php echo MANTRA_VERSION; ?> by <a href="http://www.cryoutcreations.eu" target="_blank">Cryout Creations</a>
+ </span>
+ </div><!-- main-options -->
+</div><!--lefty -->
+
+
+<div id="righty" ><!-- Right side of page - Coffee, RSS tips and others -->
+ <div class="postbox donate">
+ <h3 class="hndle"> Coffee Break </h3>
+ <div class="inside"><?php echo "<p>Here at Cryout Creations (the developers of yours truly Mantra Theme), we spend night after night improving the Mantra Theme. We fix a lot of bugs (that we previously created); we add more and more customization options while also trying to keep things as simple as possible; then... we might play a game or two but rest assured that we return to read and (in most cases) reply to your late night emails and comments, take notes and draw dashboards of things to implement in future versions.</p>
+ <p>So you might ask yourselves: <i>How do they do it? How can they keep so fresh after all that hard labor for that darned theme? </i> Well folks, it's simple. We drink coffee. Industrial quantities of hot boiling coffee. We love it! So if you want to help with the further development of the Mantra Theme...</p>"; ?>
+ <div style="display:block;float:none;margin:0 auto;text-align:center;">
+<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
+<input type="hidden" name="cmd" value="_s-xclick">
+<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHTwYJKoZIhvcNAQcEoIIHQDCCBzwCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYB6t4g8WkJ5qwckdcHRKES3Ix+MBMSRbUgkzMnO6B+ynKXEuDkNPsQ1WzC48YDtegeKk+UgR+PbsMg8c5JTpz3NwwOus3CJQRS7hVuZwhWWGU2AYgYff9zE0D4AtymmA1sCWAneI4HmKJ8uYDX9sQes46PC5gJykiChbI3A9Lk90DELMAkGBSsOAwIaBQAwgcwGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQINfugE9rcRE6AgaiT+Rt+4rKFBHUClxMWacpSO3ncnbXrPi9IP+nX6D1KtZM3rPGuAV/r7aOkMeeA4lZMoluo+oqpKFSiheLfzxJoGyOy157fodhiDbByUyhPwMYAmruw1nHpdG3OaRMMseKgsF9XpzC8Zy25vxmUHfK5yoM++9weqIivrHzITOAWB836ld1Og/CKHEbz3kOwvkBIXcZN55atVeTAx1f2sceSN4ySw6ofQtOgggOHMIIDgzCCAuygAwIBAgIBADANBgkqhkiG9w0BAQUFADCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20wHhcNMDQwMjEzMTAxMzE1WhcNMzUwMjEzMTAxMzE1WjCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMFHTt38RMxLXJyO2SmS+Ndl72T7oKJ4u4uw+6awntALWh03PewmIJuzbALScsTS4sZoS1fKciBGoh11gIfHzylvkdNe/hJl66/RGqrj5rFb08sAABNTzDTiqqNpJeBsYs/c2aiGozptX2RlnBktH+SUNpAajW724Nv2Wvhif6sFAgMBAAGjge4wgeswHQYDVR0OBBYEFJaffLvGbxe9WT9S1wob7BDWZJRrMIG7BgNVHSMEgbMwgbCAFJaffLvGbxe9WT9S1wob7BDWZJRroYGUpIGRMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbYIBADAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAIFfOlaagFrl71+jq6OKidbWFSE+Q4FqROvdgIONth+8kSK//Y/4ihuE4Ymvzn5ceE3S/iBSQQMjyvb+s2TWbQYDwcp129OPIbD9epdr4tJOUNiSojw7BHwYRiPh58S1xGlFgHFXwrEBb3dgNbMUa+u4qectsMAXpVHnD9wIyfmHMYIBmjCCAZYCAQEwgZQwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tAgEAMAkGBSsOAwIaBQCgXTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0xMzA2MTcxMDUwMTdaMCMGCSqGSIb3DQEJBDEWBBRziaGZd05x/anpxTJypCrQLy34PDANBgkqhkiG9w0BAQEFAASBgGEGJ2bSXcAk+BjFAw/JB6piIwJrt1i2sVd8/NfXsWBDhrfLpJPX/ipMEh5e7EG2K0QRFB5w5uCy4Lz1PYW7VFPGq9snsqyqqfMrq9oXQ/yPqF91R3kE6lnSdnYmHOrazDFwrN1aaxO3boVOKSf+xaY/y2+oXHgdw7nDghgk7kdn-----END PKCS7-----
+">
+<input type="image" src="<?php echo get_template_directory_uri() . '/admin/images/coffee.png' ?>" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
+<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
+</form>
+
+ </div>
+ </div><!-- inside -->
+ </div><!-- donate -->
+
+ <div class="postbox export non-essential-option" style="overflow:hidden;">
+ <div class="head-wrap">
+ <div title="Click to toggle" class="handlediv"><br /></div>
+ <h3 class="hndle"><?php _e( 'Import/Export Settings', 'mantra' ); ?></h3>
+ </div><!-- head-wrap -->
+ <div class="panel-wrap inside">
+ <form action="" method="post">
+ <?php wp_nonce_field('mantra-export', 'mantra-export'); ?>
+ <input type="hidden" name="mantra_export" value="true" />
+ <input type="submit" class="button" value="<?php _e('Export Theme options', 'mantra'); ?>" />
+ <p style="display:block;float:left;clear:left;margin-top:0;"><?php _e("It's that easy: a mouse click away - the ability to export your Mantra settings and save them on your computer. Feeling safer? You should!","mantra"); ?></p>
+ </form>
+ <br />
+ <form action="" method="post">
+ <input type="hidden" name="mantra_import" value="true" />
+ <input type="submit" class="button" value="<?php _e('Import Theme options', 'mantra'); ?>" />
+ <p style="display:block;float:left;clear:left;margin-top:0;"><?php _e(" Without the import, the export would just be a fool's exercise. Make sure you have the exported file ready and see you after the mouse click.","mantra"); ?></p>
+ </form>
+ </div><!-- inside -->
+ </div><!-- export -->
+
+
+ <div class="postbox news" >
+ <div>
+ <h3 class="hndle"><?php _e( 'Mantra Latest News', 'mantra' ); ?></h3>
+ </div>
+ <div class="panel-wrap inside" style="height:200px;overflow:auto;">
+ <?php
+ $mantra_news = fetch_feed( array( 'http://www.cryoutcreations.eu/cat/mantra/feed') );
+ if ( ! is_wp_error( $mantra_news ) ) {
+ $maxitems = $mantra_news->get_item_quantity( 10 );
+ $news_items = $mantra_news->get_items( 0, $maxitems );
+ }
+ ?>
+ <ul class="news-list">
+ <?php if ( $maxitems == 0 ) : echo '<li>' . __( 'No news items.', 'mantra' ) . '</li>'; else :
+ foreach( $news_items as $news_item ) : ?>
+ <li>
+ <a class="news-header" href='<?php echo esc_url( $news_item->get_permalink() ); ?>'><?php echo esc_html( $news_item->get_title() ); ?></a><br />
+ <span class="news-item-date"><?php _e('Posted on','mantra');echo $news_item->get_date(' j F Y, H:i'); ?></span><br />
+ <?php echo mantra_truncate_words(strip_tags( $news_item->get_description() ),40,'...') ; ?>
+ <br><a class="news-read" href='<?php echo esc_url( $news_item->get_permalink() ); ?>'>Read more »</a>
+ </li>
+ <?php endforeach; endif; ?>
+ </ul>
+ </div><!-- inside -->
+ </div><!-- news -->
+
+
+</div><!-- righty -->
+</div><!-- wrap -->
+
+<script>
+
+function startfarb(a,b) {
+ jQuery(b).css('display','none');
+ jQuery(b).farbtastic(a);
+
+ jQuery(a).click(function() {
+ if(jQuery(b).css('display') == 'none') {
+ jQuery(b).parents('div:eq(0)').addClass('ui-accordion-content-overflow');
+ jQuery(b).css('display','inline-block').hide().show(300);
+ }
+ });
+
+ jQuery(document).mousedown( function() {
+ jQuery(b).hide(700, function(){ jQuery(b).parents('div:eq(0)').removeClass('ui-accordion-content-overflow'); });
+ // todo: find a better way to remove class after the fade on IEs
+ });
+}
+
+function tooltip_terain() {
+jQuery('#accordion small').parent('div').append('<a class="tooltip"><img src="<?php echo get_template_directory_uri(); ?>/images/icon-tooltip.png" /></a>').
+ each(function() {
+ //jQuery(this).children('a.tooltip').attr('title',jQuery(this).children('small').html() );
+ var tooltip_info = jQuery(this).children('small').html();
+ jQuery(this).children('.tooltip').tooltip({content : tooltip_info});
+ jQuery(this).children('.tooltip').tooltip( "option", "items", "a" );
+ //jQuery(this).children('.tooltip').tooltip( "option", "show", "false");
+ jQuery(this).children('.tooltip').tooltip( "option", "hide", "false");
+ jQuery(this).children('small').remove();
+ if (!jQuery(this).hasClass('slmini') && !jQuery(this).hasClass('slidercontent') && !jQuery(this).hasClass('slideDivs')) jQuery(this).addClass('tooltip_div');
+ });
+}
+
+function coloursel(el){
+ var id = "#"+jQuery(el).attr('id');
+ jQuery(id+"2").hide();
+ var bgcolor = jQuery(id).val();
+ if (bgcolor <= "#666666") { jQuery(id).css('color','#ffffff'); } else { jQuery(id).css('color','#000000'); };
+ jQuery(id).css('background-color',jQuery(id).val());
+}
+
+function vercomp(ver, req) {
+ var v = ver.split('.');
+ var q = req.split('.');
+ for (var i = 0; i < v.length; ++i) {
+ if (q.length == i) { return true; } // v is bigger
+ if (parseInt(v[i]) == parseInt(q[i])) { continue; } // nothing to do here, move along
+ else if (parseInt(v[i]) > parseInt(q[i])) { return true; } // v is bigger
+ else { return false; } // q is bigger
+ }
+ if (v.length != q.length) { return false; } // q is bigger
+ return true; // v = q;
+}
+
+jQuery(document).ready(function(){
+ //var _jQueryVer = parseFloat('.'+jQuery().jquery.replace(/\./g, '')); // jQuery version as float, eg: 0.183
+ //var _jQueryUIVer = parseFloat('.'+jQuery.ui.version.replace(/\./g, '')); // jQuery UI version as float, eg: 0.192
+ //if (_jQueryUIVer >= 0.190) {
+ if (vercomp(jQuery.ui.version,"1.9.0")) {
+ // tooltip function is included since jQuery UI 1.9.0
+ tooltip_terain();
+ startfarb("#mantra_backcolor","#mantra_backcolor2");
+ startfarb("#mantra_headercolor","#mantra_headercolor2");
+ startfarb("#mantra_contentbg","#mantra_contentbg2");
+ startfarb("#mantra_menubg","#mantra_menubg2");
+ startfarb("#mantra_s1bg","#mantra_s1bg2");
+ startfarb("#mantra_s2bg","#mantra_s2bg2");
+ startfarb("#mantra_prefootercolor","#mantra_prefootercolor2");
+ startfarb("#mantra_footercolor","#mantra_footercolor2");
+ startfarb("#mantra_titlecolor","#mantra_titlecolor2");
+ startfarb("#mantra_descriptioncolor","#mantra_descriptioncolor2");
+ startfarb("#mantra_contentcolor","#mantra_contentcolor2");
+ startfarb("#mantra_linkscolor","#mantra_linkscolor2");
+ startfarb("#mantra_hovercolor","#mantra_hovercolor2");
+ startfarb("#mantra_headtextcolor","#mantra_headtextcolor2");
+ startfarb("#mantra_headtexthover","#mantra_headtexthover2");
+ startfarb("#mantra_sideheadbackcolor","#mantra_sideheadbackcolor2");
+ startfarb("#mantra_sideheadtextcolor","#mantra_sideheadtextcolor2");
+ startfarb("#mantra_footerheader","#mantra_footerheader2");
+ startfarb("#mantra_footertext","#mantra_footertext2");
+ startfarb("#mantra_footerhover","#mantra_footerhover2");
+ startfarb("#mantra_fpsliderbordercolor","#mantra_fpsliderbordercolor2");
+ startfarb("#mantra_fronttitlecolor","#mantra_fronttitlecolor2");
+ } else {
+ jQuery("#mantra_backcolor").addClass('colorthingy');
+ jQuery("#mantra_headercolor").addClass('colorthingy');
+ jQuery("#mantra_contentbg").addClass('colorthingy');
+ jQuery("#mantra_menubg").addClass('colorthingy');
+ jQuery("#mantra_s1bg").addClass('colorthingy');
+ jQuery("#mantra_s2bg").addClass('colorthingy');
+ jQuery("#mantra_prefootercolor").addClass('colorthingy');
+ jQuery("#mantra_footercolor").addClass('colorthingy');
+ jQuery("#mantra_titlecolor").addClass('colorthingy');
+ jQuery("#mantra_descriptioncolor").addClass('colorthingy');
+ jQuery("#mantra_contentcolor").addClass('colorthingy');
+ jQuery("#mantra_linkscolor").addClass('colorthingy');
+ jQuery("#mantra_hovercolor").addClass('colorthingy');
+ jQuery("#mantra_headtextcolor").addClass('colorthingy');
+ jQuery("#mantra_sideheadbackcolor").addClass('colorthingy');
+ jQuery("#mantra_sideheadtextcolor").addClass('colorthingy');
+ jQuery("#mantra_footerheader").addClass('colorthingy');
+ jQuery("#mantra_footertext").addClass('colorthingy');
+ jQuery("#mantra_headtexthover").addClass('colorthingy');
+ jQuery("#mantra_footerhover").addClass('colorthingy');
+ jQuery("#mantra_fpsliderbordercolor").addClass('colorthingy');
+ jQuery("#mantra_fronttitlecolor").addClass('colorthingy');
+ jQuery('.colorthingy').each(function(){
+ id = "#"+jQuery(this).attr('id');
+ jQuery(this).on('keyup',function(){coloursel(this)});
+ coloursel(this);
+ });
+ // inform the user about the old partially unsupported version
+ jQuery("#jsAlert").after("<div class='updated fade' style='clear:left; font-size: 16px;'><p>Mantra has detected you are running an old version of Wordpress (jQuery) and will be running in compatibility mode. Some features may not work correctly. Consider updating your Wordpress to the latest version.</p></div>");
+ }
+
+});
+
+jQuery('#jsAlert').hide();
+</script>
+
+<?php } // mantra_page_fn()
+?>
diff --git a/themes/mantra/admin/sanitize.php b/themes/mantra/admin/sanitize.php new file mode 100644 index 00000000..30ed0b67 --- /dev/null +++ b/themes/mantra/admin/sanitize.php @@ -0,0 +1,237 @@ +<?php
+
+/*
+ *
+ * Settings arrays
+ *
+ */
+
+/* Font family arrays */
+
+ $fontSans = array("Segoe UI, Arial, sans-serif",
+ "Verdana, Geneva, sans-serif " ,
+ "Geneva, sans-serif ",
+ "Helvetica Neue, Arial, Helvetica, sans-serif",
+ "Helvetica, sans-serif" ,
+ "Century Gothic, AppleGothic, sans-serif",
+ "Futura, Century Gothic, AppleGothic, sans-serif",
+ "Calibri, Arian, sans-serif",
+ "Myriad Pro, Myriad,Arial, sans-serif",
+ "Trebuchet MS, Arial, Helvetica, sans-serif" ,
+ "Gill Sans, Calibri, Trebuchet MS, sans-serif",
+ "Impact, Haettenschweiler, Arial Narrow Bold, sans-serif ",
+ "Tahoma, Geneva, sans-serif" ,
+ "Arial, Helvetica, sans-serif" ,
+ "Arial Black, Gadget, sans-serif",
+ "Lucida Sans Unicode, Lucida Grande, sans-serif ");
+
+ $fontSerif = array("Georgia, Times New Roman, Times, serif" ,
+ "Times New Roman, Times, serif",
+ "Cambria, Georgia, Times, Times New Roman, serif",
+ "Palatino Linotype, Book Antiqua, Palatino, serif",
+ "Book Antiqua, Palatino, serif",
+ "Palatino, serif",
+ "Baskerville, Times New Roman, Times, serif",
+ "Bodoni MT, serif",
+ "Copperplate Light, Copperplate Gothic Light, serif",
+ "Garamond, Times New Roman, Times, serif");
+
+ $fontMono = array( "Courier New, Courier, monospace" ,
+ "Lucida Console, Monaco, monospace",
+ "Consolas, Lucida Console, Monaco, monospace",
+ "Monaco, monospace");
+
+ $fontCursive = array( "Lucida Casual, Comic Sans MS , cursive ",
+ "Brush Script MT,Phyllis,Lucida Handwriting,cursive",
+ "Phyllis,Lucida Handwriting,cursive",
+ "Lucida Handwriting,cursive",
+ "Comic Sans MS, cursive");
+
+/* Social media links */
+
+ $socialNetworks = array ("Amazon", "Delicious", "DeviantArt", "Digg", "Etsy", "Facebook", "Flickr", "Google", "GoodReads", "GooglePlus",
+ "IMDb", "Instagram", "LastFM", "LinkedIn", "Mail", "MySpace", "Picasa", "Pinterest", "Reddit", "RSS", "Skype",
+ "SoundCloud", "StumbleUpon", "Technorati", "Tumblr", "Twitch", "Twitter", "Vimeo", "VK", "WordPress",
+ "Xing", "Yahoo", "Yelp", "YouTube" );
+
+
+
+
+if (!function_exists ('ma_options_validate') ) :
+/*
+ *
+ * Validate user data
+ *
+ */
+function ma_options_validate($input) {
+global $mantra_defaults;
+ // Sanitize the texbox input
+
+/*** 1 ***/
+ if(isset($input['mantra_sidewidth']) && is_numeric($input['mantra_sidewidth']) && $input['mantra_sidewidth']>=500 && $input['mantra_sidewidth'] <=1760) {} else {$input['mantra_sidewidth']=$mantra_defaults['mantra_sidewidth']; }
+ if(isset($input['mantra_sidebar']) && is_numeric($input['mantra_sidebar']) && $input['mantra_sidebar']>=220 && $input['mantra_sidebar'] <=800) {} else {$input['mantra_sidebar']=$mantra_defaults['mantra_sidebar']; }
+
+ if(isset($input['mantra_sidewidthRel']) && is_numeric($input['mantra_sidewidthRel']) && $input['mantra_sidewidthRel']>=40 && $input['mantra_sidewidthRel'] <=80) {} else {$input['mantra_sidewidthRel']=$mantra_defaults['mantra_sidewidthRel']; }
+ if(isset($input['mantra_sidebarRel']) && is_numeric($input['mantra_sidebarRel']) && $input['mantra_sidebarRel']>=20 && $input['mantra_sidebarRel'] <=50) {} else {$input['mantra_sidebarRel']=$mantra_defaults['mantra_sidebarRel']; }
+
+
+ $input['mantra_hheight'] = intval(wp_kses_data($input['mantra_hheight']));
+
+ $input['mantra_copyright'] = trim(wp_kses_post($input['mantra_copyright']));
+
+ $input['mantra_backcolor'] = wp_kses_data($input['mantra_backcolor']);
+ $input['mantra_headercolor'] = wp_kses_data($input['mantra_headercolor']);
+ $input['mantra_contentbg'] = wp_kses_data($input['mantra_contentbg']);
+ $input['mantra_menubg'] = wp_kses_data($input['mantra_menubg']);
+ $input['mantra_s1bg'] = wp_kses_data($input['mantra_s1bg']);
+ $input['mantra_s2bg'] = wp_kses_data($input['mantra_s2bg']);
+ $input['mantra_prefootercolor'] = wp_kses_data($input['mantra_prefootercolor']);
+ $input['mantra_footercolor'] = wp_kses_data($input['mantra_footercolor']);
+ $input['mantra_titlecolor'] = wp_kses_data($input['mantra_titlecolor']);
+ $input['mantra_descriptioncolor'] = wp_kses_data($input['mantra_descriptioncolor']);
+ $input['mantra_contentcolor'] = wp_kses_data($input['mantra_contentcolor']);
+ $input['mantra_linkscolor'] = wp_kses_data($input['mantra_linkscolor']);
+ $input['mantra_hovercolor'] = wp_kses_data($input['mantra_hovercolor']);
+ $input['mantra_headtextcolor'] = wp_kses_data($input['mantra_headtextcolor']);
+ $input['mantra_headtexthover'] = wp_kses_data($input['mantra_headtexthover']);
+ $input['mantra_sideheadbackcolor'] = wp_kses_data($input['mantra_sideheadbackcolor']);
+ $input['mantra_sideheadtextcolor'] = wp_kses_data($input['mantra_sideheadtextcolor']);
+ $input['mantra_footerheader'] = wp_kses_data($input['mantra_footerheader']);
+ $input['mantra_footertext'] = wp_kses_data($input['mantra_footertext']);
+ $input['mantra_footerhover'] = wp_kses_data($input['mantra_footerhover']);
+
+ $input['mantra_excerptwords'] = intval(wp_kses_data($input['mantra_excerptwords']));
+ $input['mantra_excerptdots'] = wp_kses_data($input['mantra_excerptdots']);
+ $input['mantra_excerptcont'] = wp_kses_data($input['mantra_excerptcont']);
+
+ $input['mantra_fwidth'] = intval(wp_kses_data($input['mantra_fwidth']));
+ $input['mantra_fheight'] = intval(wp_kses_data($input['mantra_fheight']));
+
+/*** 2 ***/
+
+ $cryout_special_terms = array('mailto:','callto://');
+ $cryout_special_keys = array('Mail', 'Skype');
+ for ($i=1;$i<10;$i+=2) {
+ $j=$i+1;
+
+ if (in_array($input['mantra_social'.$i],$cryout_special_keys)) :
+ $input['mantra_social'.$j] = wp_kses_data(str_replace($cryout_special_terms,'',$input['mantra_social'.$j]));
+ if ($input['mantra_social'.$i]=='Mail') {$input['mantra_social'.$j]='mailto:'.$input['mantra_social'.$j];};
+ if ($input['mantra_social'.$i]=='Skype') {$input['mantra_social'.$j]='callto://'.$input['mantra_social'.$j];};
+ else :
+ $input['mantra_social'.$j] = esc_url_raw($input['mantra_social'.$j]);
+ endif;
+
+ }
+
+ $input['mantra_favicon'] = esc_url_raw($input['mantra_favicon']);
+ $input['mantra_logoupload'] = esc_url_raw($input['mantra_logoupload']);
+ $input['mantra_headermargintop'] = intval(wp_kses_data($input['mantra_headermargintop']));
+ $input['mantra_headermarginleft'] = intval(wp_kses_data($input['mantra_headermarginleft']));
+
+ $input['mantra_customcss'] = wp_kses_post(trim($input['mantra_customcss']));
+ $input['mantra_customjs'] = wp_kses_post(trim($input['mantra_customjs']));
+ $input['mantra_seo_home_desc'] = wp_kses_post(trim($input['mantra_seo_home_desc']));
+
+ $input['mantra_googlefont'] = trim(wp_kses_data($input['mantra_googlefont']));
+ $input['mantra_googlefonttitle'] = trim(wp_kses_data($input['mantra_googlefonttitle']));
+ $input['mantra_googlefontside'] = trim(wp_kses_data($input['mantra_googlefontside']));
+ $input['mantra_googlefontsubheader'] = trim(wp_kses_data($input['mantra_googlefontsubheader']));
+
+ if($input['mantra_googlefont']) {
+ $mantra_googlefont2 = $input['mantra_googlefont'];
+ $mantra_googlefont2= preg_replace( '/\s+/', '+', $mantra_googlefont2 );
+ $mantra_googlefont2= "http://fonts.googleapis.com/css?family=".$mantra_googlefont2;
+ }
+ if($input['mantra_googlefonttitle']) {
+ $mantra_googlefonttitle2 = $input['mantra_googlefonttitle'];
+ $mantra_googlefonttitle2= preg_replace( '/\s+/', '+', $mantra_googlefonttitle2 );
+ $mantra_googlefonttitle2= "http://fonts.googleapis.com/css?family=".$mantra_googlefonttitle2;
+ }
+ if($input['mantra_googlefontside']) {
+ $mantra_googlefontside2 = $input['mantra_googlefontside'];
+ $mantra_googlefontside2= preg_replace( '/\s+/', '+', $mantra_googlefontside2 );
+ $mantra_googlefontside2= "http://fonts.googleapis.com/css?family=".$mantra_googlefontside2;
+ }
+ if($input['mantra_googlefontsubheader']) {
+ $mantra_googlefontsubheader2 = $input['mantra_googlefontsubheader'];
+ $mantra_googlefontsubheader2= preg_replace( '/\s+/', '+', $mantra_googlefontsubheader2 );
+ $mantra_googlefontsubheader2= "http://fonts.googleapis.com/css?family=".$mantra_googlefontsubheader2;
+ }
+
+ $input['mantra_googlefont2'] = $mantra_googlefont2;
+ $input['mantra_googlefonttitle2'] = $mantra_googlefonttitle2;
+ $input['mantra_googlefontside2'] = $mantra_googlefontside2;
+ $input['mantra_googlefontsubheader2'] = $mantra_googlefontsubheader2;
+
+ $input['mantra_frontpostscount'] = intval(wp_kses_data($input['mantra_frontpostscount']));
+
+ $input['mantra_fpsliderborderwidth'] = intval(wp_kses_data($input['mantra_fpsliderborderwidth']));
+
+ $input['mantra_slideNumber'] = intval(wp_kses_data($input['mantra_slideNumber']));
+ $input['mantra_slideSpecific'] = wp_kses_data($input['mantra_slideSpecific']);
+
+ $input['mantra_fpsliderwidth'] = intval(wp_kses_data($input['mantra_fpsliderwidth']));
+ $input['mantra_fpsliderheight'] = intval(wp_kses_data($input['mantra_fpsliderheight']));
+
+/** 3 ***/
+ $input['mantra_sliderimg1'] = wp_kses_data($input['mantra_sliderimg1']);
+ $input['mantra_slidertitle1'] = wp_kses_data($input['mantra_slidertitle1']);
+ $input['mantra_slidertext1'] = wp_kses_post($input['mantra_slidertext1']);
+ $input['mantra_sliderlink1'] = esc_url_raw($input['mantra_sliderlink1']);
+ $input['mantra_sliderimg2'] = wp_kses_data($input['mantra_sliderimg2']);
+ $input['mantra_slidertitle2'] = wp_kses_data($input['mantra_slidertitle2']);
+ $input['mantra_slidertext2'] = wp_kses_post($input['mantra_slidertext2']);
+ $input['mantra_sliderlink2'] = esc_url_raw($input['mantra_sliderlink2']);
+ $input['mantra_sliderimg3'] = wp_kses_data($input['mantra_sliderimg3']);
+ $input['mantra_slidertitle3'] = wp_kses_data($input['mantra_slidertitle3']);
+ $input['mantra_slidertext3'] = wp_kses_post($input['mantra_slidertext3']);
+ $input['mantra_sliderlink3'] = esc_url_raw($input['mantra_sliderlink3']);
+ $input['mantra_sliderimg4'] = wp_kses_data($input['mantra_sliderimg4']);
+ $input['mantra_slidertitle4'] = wp_kses_data($input['mantra_slidertitle4']);
+ $input['mantra_slidertext4'] = wp_kses_post($input['mantra_slidertext4']);
+ $input['mantra_sliderlink4'] = esc_url_raw($input['mantra_sliderlink4']);
+ $input['mantra_sliderimg5'] = wp_kses_data($input['mantra_sliderimg5']);
+ $input['mantra_slidertitle5'] = wp_kses_data($input['mantra_slidertitle5']);
+ $input['mantra_slidertext5'] = wp_kses_post($input['mantra_slidertext5']);
+ $input['mantra_sliderlink5'] = esc_url_raw($input['mantra_sliderlink5']);
+
+ $input['mantra_colimageheight'] = intval(wp_kses_data($input['mantra_colimageheight']));
+
+/** 4 **/
+ $input['mantra_columnimg1'] = wp_kses_data($input['mantra_columnimg1']);
+ $input['mantra_columntitle1'] = wp_kses_data($input['mantra_columntitle1']);
+ $input['mantra_columntext1'] = wp_kses_post($input['mantra_columntext1']);
+ $input['mantra_columnlink1'] = esc_url_raw($input['mantra_columnlink1']);
+ $input['mantra_columnimg2'] = wp_kses_data($input['mantra_columnimg2']);
+ $input['mantra_columntitle2'] = wp_kses_data($input['mantra_columntitle2']);
+ $input['mantra_columntext2'] = wp_kses_post($input['mantra_columntext2']);
+ $input['mantra_columnlink2'] = esc_url_raw($input['mantra_columnlink2']);
+ $input['mantra_columnimg3'] = wp_kses_data($input['mantra_columnimg3']);
+ $input['mantra_columntitle3'] = wp_kses_data($input['mantra_columntitle3']);
+ $input['mantra_columntext3'] = wp_kses_post($input['mantra_columntext3']);
+ $input['mantra_columnlink3'] = esc_url_raw($input['mantra_columnlink3']);
+ $input['mantra_columnimg4'] = wp_kses_data($input['mantra_columnimg4']);
+ $input['mantra_columntitle4'] = wp_kses_data($input['mantra_columntitle4']);
+ $input['mantra_columntext4'] = wp_kses_post($input['mantra_columntext4']);
+ $input['mantra_columnlink4'] = esc_url_raw($input['mantra_columnlink4']);
+
+ $input['mantra_columnreadmore'] = wp_kses($input['mantra_columnreadmore'],'');
+
+ $input['mantra_fronttext1'] = wp_kses_data($input['mantra_fronttext1']);
+ $input['mantra_fronttext2'] = wp_kses_data($input['mantra_fronttext2']);
+ $input['mantra_fpsliderbordercolor'] = wp_kses_data($input['mantra_fpsliderbordercolor']);
+ $input['mantra_fronttitlecolor'] = wp_kses_data($input['mantra_fronttitlecolor']);
+ $input['mantra_fronttext3'] = trim( wp_kses_post($input['mantra_fronttext3']));
+ $input['mantra_fronttext4'] = trim (wp_kses_post($input['mantra_fronttext4']));
+
+ $resetDefault = ( ! empty( $input['mantra_defaults']) ? true : false );
+
+ if ($resetDefault) {$input=$mantra_defaults;}
+
+ return $input; // return validated input
+
+}
+
+endif;
+?>
diff --git a/themes/mantra/admin/settings.php b/themes/mantra/admin/settings.php new file mode 100644 index 00000000..6d9d0fe2 --- /dev/null +++ b/themes/mantra/admin/settings.php @@ -0,0 +1,2105 @@ +<?php
+// Callback functions
+
+// General suboptions description
+
+function cryout_section_layout_fn() {
+
+// echo "<p>".__("Settings for adjusting your blog's layout.", "mantra")."</p>";
+}
+
+function cryout_section_presentation_fn() {
+
+// echo "<p>".__("Settings for adjusting your blog's layout.", "mantra")."</p>";
+}
+
+function cryout_section_header_fn() {
+
+// echo "<p>".__("Settings for adjusting your blog's layout.", "mantra")."</p>";
+}
+
+
+function cryout_section_text_fn() {
+ //echo "<p>".__("All text related customization options.", "mantra")."</p>";
+}
+
+function cryout_section_graphics_fn() {
+// echo "<p>".__("Settings for hiding or showing different graphics.", "mantra")."</p>";
+}
+
+function cryout_section_post_fn() {
+ //echo "<p>".__("Settings for hiding or showing different post tags.", "mantra")."</p>";
+}
+
+function cryout_section_excerpt_fn() {
+// echo "<p>".__("Settings for post excerpts", "mantra")."</p>";
+}
+
+function cryout_section_appereance_fn() {
+// echo "<p>".__("Set text and background colors.", "mantra")."</p>";
+}
+
+
+function cryout_section_featured_fn() {
+// echo "<p>".__("Insert the addreses for your social media. Leave blank if not the case.
+// Please type the whole address (including <i>http://</i> ) Example : <u>http://www.facebook.com</u>.", "mantra")."</p>";
+}
+
+function cryout_section_social_fn() {
+// echo "<p>".__("Insert the addreses for your social media. Leave blank if not the case.
+// Please type the whole address (including <i>http://</i> ) Example : <u>http://www.facebook.com</u>.", "mantra")."</p>";
+}
+
+function cryout_section_misc_fn() {
+
+}
+
+////////////////////////////////
+//// LAYOUT SETTINGS ///////////
+////////////////////////////////
+
+
+// RADIO-BUTTON - Name: ma_options[side]
+function cryout_setting_side_fn() {
+global $mantra_options;
+ $items = array("1c", "2cSr", "2cSl", "3cSr" , "3cSl", "3cSs");
+ $layout_text["1c"] = __("One column (no sidebars)","mantra");
+ $layout_text["2cSr"] = __("Two columns, sidebar on the right","mantra");
+ $layout_text["2cSl"] = __("Two columns, sidebar on the left","mantra");
+ $layout_text["3cSr"] = __("Three columns, sidebars on the right","mantra");
+ $layout_text["3cSl"] = __("Three columns, sidebars on the left","mantra");
+ $layout_text["3cSs"] = __("Three columns, one sidebar on each side","mantra");
+
+// For backward compatibility;
+ if ($mantra_options['mantra_side'] == 'Disable') $mantra_options['mantra_side'] = '1c';
+ if ($mantra_options['mantra_side'] == 'Right') $mantra_options['mantra_side'] = '2cSr';
+ if ($mantra_options['mantra_side'] == 'Left') $mantra_options['mantra_side'] = '2cSl';
+
+
+ foreach($items as $item) {
+
+ $checkedClass = ($mantra_options['mantra_side']==$item) ? ' checkedClass' : '';
+ echo "<label id='$item' class='layouts $checkedClass'><input ";
+ checked($mantra_options['mantra_side'],$item);
+ echo " value='$item' onClick=\"changeBorder('$item','layouts');\" name='ma_options[mantra_side]' type='radio' /><img title='$layout_text[$item]' src='".get_template_directory_uri()."/admin/images/".$item.".png'/></label>";
+ }
+ echo "<div><small>".__("Choose your layout. Possible options are: <br> No sidebar, a single sidebar on either left of right, two sidebars on either left or
+ right and two sidebars on each side.","mantra")."</small></div>";
+}
+
+ //SLIDER - Name: ma_options[sidewidth]
+function cryout_setting_sidewidth_fn()
+ {
+global $mantra_options;
+ $items = array ("Absolute" , "Relative");
+ $itemsare = array( __("Absolute","mantra"), __("Relative *DEPRECATED","mantra"));
+ echo __("Dimensions to use: ","mantra")." <select id='mantra_dimselect' name='ma_options[mantra_dimselect]'>";
+foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_dimselect'],$item);
+ echo ">$itemsare[$id]</option>";
+}
+echo "</select>";
+?>
+<script>
+
+jQuery(document).ready(function() {
+
+ jQuery( "#slider-range" ).slider({
+ range: true,
+ step:10,
+ min: 0,
+ max: 1980,
+ values: [ <?php echo $mantra_options['mantra_sidewidth'] ?>, <?php echo ($mantra_options['mantra_sidewidth']+$mantra_options['mantra_sidebar']); ?> ],
+ slide: function( event, ui ) {
+ range=ui.values[ 1 ] - ui.values[ 0 ];
+ if (ui.values[ 0 ]<500) {ui.values[ 0 ]=500; return false;};
+ if( range<220 || range>800 ){ ui.values[ 1 ] = <?php echo $mantra_options['mantra_sidebar']+$mantra_options['mantra_sidewidth'];?>; return false; };
+ jQuery( "#mantra_sidewidth" ).val( ui.values[ 0 ] );
+ jQuery( "#mantra_sidebar" ).val( ui.values[ 1 ] - ui.values[ 0 ] );
+ jQuery( "#totalsize" ).html( ui.values[ 1 ]);
+ jQuery( "#contentsize" ).html( ui.values[ 0 ]);jQuery( "#barsize" ).html( ui.values[ 1 ]-ui.values[ 0 ]);
+ var percentage = parseInt( jQuery( "#slider-range .ui-slider-range" ).css('width') );
+ var leftwidth = parseInt(jQuery( "#slider-range .ui-slider-range" ).position().left );
+ jQuery( "#barb" ).css('left',-80+leftwidth+percentage/2+"px");
+ jQuery( "#contentb" ).css('left',-50+leftwidth/2+"px");
+ jQuery( "#totalb" ).css('left',-100+(percentage+leftwidth)/2+"px");
+ }
+ });
+
+ jQuery( "#mantra_sidewidth" ).val( <?php echo $mantra_options['mantra_sidewidth'];?> );
+ jQuery( "#mantra_sidebar" ).val( <?php echo $mantra_options['mantra_sidebar'];?> );
+ var percentage = <?php echo ($mantra_options['mantra_sidebar']/1980)*100;?> ;
+ var leftwidth = <?php echo ($mantra_options['mantra_sidewidth']/1980)*100;?> ;
+ jQuery( "#barb" ).css('left',-18+leftwidth+percentage/2+"%");
+ jQuery( "#contentb" ).css('left',-8+leftwidth/2+"%");
+ jQuery( "#totalb" ).css('left',-20+(percentage+leftwidth)/2+"%");
+
+});
+
+jQuery(function() {
+
+ jQuery( "#slider-rangeRel" ).slider({
+ range: true,
+ step:1,
+ min: 0,
+ max: 100,
+ values: [ <?php echo $mantra_options['mantra_sidewidthRel'] ?>, <?php echo ($mantra_options['mantra_sidewidthRel']+$mantra_options['mantra_sidebarRel']); ?> ],
+ slide: function( event, ui ) {
+ range=ui.values[ 1 ] - ui.values[ 0 ];
+ if (ui.values[ 0 ]<40) {ui.values[ 0 ]=40; return false;};
+ if( range<20 || range>50 ){ ui.values[ 1 ] = <?php echo $mantra_options['mantra_sidebarRel']+$mantra_options['mantra_sidewidthRel'];?>; return false; };
+ jQuery( "#mantra_sidewidthRel" ).val( ui.values[ 0 ] );
+ jQuery( "#mantra_sidebarRel" ).val( ui.values[ 1 ] - ui.values[ 0 ] );
+ jQuery( "#totalsizeRel" ).html( ui.values[ 1 ]);
+ jQuery( "#contentsizeRel" ).html( ui.values[ 0 ]);jQuery( "#barsizeRel" ).html( ui.values[ 1 ]-ui.values[ 0 ]);
+ var percentageRel = parseInt( jQuery( "#slider-rangeRel .ui-slider-range" ).css('width') );
+ var leftwidthRel = parseInt( jQuery( "#slider-rangeRel .ui-slider-range" ).position().left );
+ jQuery( "#barbRel" ).css('left',-80+leftwidthRel+percentageRel/2+"px");
+ jQuery( "#contentbRel" ).css('left',-50+leftwidthRel/2+"px");
+ jQuery( "#totalbRel" ).css('left',-100+(percentageRel+leftwidthRel)/2+"px");
+ }
+ });
+
+ jQuery( "#mantra_sidewidthRel" ).val( <?php echo $mantra_options['mantra_sidewidthRel'];?> );
+ jQuery( "#mantra_sidebarRel" ).val( <?php echo $mantra_options['mantra_sidebarRel'];?> );
+ var percentageRel = <?php echo $mantra_options['mantra_sidebarRel'];?> ;
+ var leftwidthRel = <?php echo $mantra_options['mantra_sidewidthRel'];?> ;
+ jQuery( "#barbRel" ).css('left',-18+leftwidthRel+percentageRel/2+"%");
+ jQuery( "#contentbRel" ).css('left',-8+leftwidthRel/2+"%");
+ jQuery( "#totalbRel" ).css('left',-20+(percentageRel+leftwidthRel)/2+"%");
+});
+
+
+</script>
+
+<div id="absolutedim">
+
+ <b id="contentb" style="display:block;float:left;position:absolute;margin-top:-20px;"><?php _e("Content =","mantra");?> <span id="contentsize"><?php echo $mantra_options['mantra_sidewidth'];?></span>px</b>
+ <b id="barb" style="margin-left:40px;color:#F6A828;display:block;float:left;position:absolute;margin-top:-20px;" ><?php _e("Sidebar(s) =","mantra");?> <span id="barsize"><?php echo $mantra_options['mantra_sidebar'];?></span>px</b>
+ <b id="totalb" style="margin-left:40px;color:#999;display:block;float:left;position:absolute;margin-top:12px;" >^——— <?php _e("Total width =","mantra");?> <span id="totalsize"><?php echo $mantra_options['mantra_sidewidth']+ $mantra_options['mantra_sidebar'];?></span>px ———^</b>
+
+<p>
+ <?php echo "<input type='hidden' name='ma_options[mantra_sidewidth]' id='mantra_sidewidth' />";
+ echo "<input type='hidden' name='ma_options[mantra_sidebar]' id='mantra_sidebar' />";?>
+</p>
+<div id="slider-range"></div>
+
+ <?php
+ echo "<br><div><small>".__("Select the width of your <b>content</b> and <b>sidebar(s)</b>.
+ While the content cannot be less than 500px wide, the sidebar area is at least 220px and no more than 800px.<br />
+ If you went for a 3 column area ( with 2 sidebars) they will each have half the selected width.","mantra")."</small></div>"; ?>
+
+
+</div><!-- End absolutedim -->
+
+<div id="relativedim">
+
+ <b id="contentbRel" style="display:block;float:left;position:absolute;margin-top:-20px;"><?php _e("Content =","mantra");?> <span id="contentsizeRel"><?php echo $mantra_options['mantra_sidewidthRel'];?></span>%</b>
+ <b id="barbRel" style="margin-left:40px;color:#F6A828;display:block;float:left;position:absolute;margin-top:-20px;" ><?php _e("Sidebar(s) =","mantra");?> <span id="barsizeRel"><?php echo $mantra_options['mantra_sidebarRel'];?></span>%</b>
+ <b id="totalbRel" style="margin-left:40px;color:#999;display:block;float:left;position:absolute;margin-top:12px;" >^——— <?php _e("Total width =","mantra");?> <span id="totalsizeRel"><?php echo $mantra_options['mantra_sidewidthRel']+$mantra_options['mantra_sidebarRel'];?></span>% ———^</b>
+
+<p>
+ <?php echo "<input type='hidden' name='ma_options[mantra_sidewidthRel]' id='mantra_sidewidthRel' />";
+ echo "<input type='hidden' name='ma_options[mantra_sidebarRel]' id='mantra_sidebarRel' />";?>
+
+</p>
+<div id="slider-rangeRel"></div>
+ <?php
+ echo "<br><div><small>".__("Select the width of your <b>content</b> and <b>sidebar(s)</b>.
+ These are realtive dimmensions - relative to the user's browser. The total width is a percentage of the browser's width.<br />
+ While the content cannot be less than 40% wide, the sidebar area is at least 20% and no more than 50%.<br />
+ If you went for a 3 column area ( with 2 sidebars) they will each have half the selected width.","mantra")."</small></div>"; ?>
+</div><!-- End relativedim -->
+<?php
+
+ }
+
+
+//CHECKBOX - Name: ma_options[mobile]
+function cryout_setting_mobile_fn() {
+ global $mantra_options;
+ $items = array ("Enable" , "Disable");
+ $itemsare = array( __("Enable","mantra"), __("Disable","mantra"));
+ echo "<select id='mantra_mobile' name='ma_options[mantra_mobile]'>";
+ foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_mobile'],$item);
+ echo ">$itemsare[$id]</option>";
+ }
+ echo "</select>";
+ $checkedClass = ($mantra_options['mantra_hcontain']=='1') ? ' checkedClass' : '';
+ echo "<div><small>".__("Enable to make Mantra fully responsive. The layout and general sizes of your blog will adjust depending on what device and what resolution it is viewed in.<br> Do not disable unless you have a good reason to.","mantra")."</small></div>";
+}
+
+
+
+////////////////////////////////
+//// PRESENTATION SETTINGS /////////////
+////////////////////////////////
+
+
+//CHECKBOX - Name: ma_options[frontpage]
+function cryout_setting_frontpage_fn() {
+ global $mantra_options;
+ $items = array ("Enable" , "Disable");
+ $itemsare = array( __("Enable","mantra"), __("Disable","mantra"));
+ echo "<select id='mantra_frontpage' name='ma_options[mantra_frontpage]'>";
+foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_frontpage'],$item);
+ echo ">$itemsare[$id]</option>";
+}
+ echo "</select>";
+ echo "<div><small>".__("Enable the presentation front-page. This will become your new home page. It has a slider and columns for presentation
+ text and images.<br>If you have this enabled but don't see a Presentation page then go to <a href='options-reading.php'> Settings » Reading </a> and make sure you have selected <strong>Front Page Displays</strong> as <Strong>Your Latest Posts</strong>.","mantra")."</small></div>";
+
+}
+
+function cryout_setting_frontposts_fn() {
+ global $mantra_options;
+ $items = array ("Enable" , "Disable");
+ $itemsare = array( __("Enable","mantra"), __("Disable","mantra"));
+ echo "<select id='mantra_frontposts' name='ma_options[mantra_frontposts]'>";
+ foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_frontposts'],$item);
+ echo ">$itemsare[$id]</option>";
+ }
+ echo "</select> ";
+ echo "<input type='text' id='mantra_frontpostscount' name='ma_options[mantra_frontpostscount]' size='3' value='";
+ echo $mantra_options['mantra_frontpostscount']."'> ".__('posts','mantra');
+ echo "<div><small>".__("Enable to display latest posts on the presentation page, below the columns. Sticky posts are always displayed and not counted.","mantra")."</small></div>";
+}
+
+//CHECKBOX - Name: ma_options[frontslider]
+function cryout_setting_frontslider_fn() {
+ global $mantra_options;
+
+
+ echo "<div class='slmini'><b>".__("Slider Dimensions:","mantra")."</b> ";
+ echo "<input id='mantra_fpsliderwidth' name='ma_options[mantra_fpsliderwidth]' size='4' type='text' value='".esc_attr( $mantra_options['mantra_fpsliderwidth'] )."' /> px (".__("width","mantra").") <strong>X</strong> ";
+ echo "<input id='mantra_fpsliderheight' name='ma_options[mantra_fpsliderheight]' size='4' type='text' value='".esc_attr( $mantra_options['mantra_fpsliderheight'] )."' /> px (".__("height","mantra").")";
+ echo "<small>".__("The dimensions of your slider. Make sure your images are of the same size.","mantra")."</small></div>";
+
+ echo "<div class='slmini'><b>".__("Animation:","mantra")."</b> ";
+ $items = array ("random" , "fold", "fade", "slideInRight", "slideInLeft", "sliceDown", "sliceDownLeft", "sliceUp", "sliceUpLeft", "sliceUpDown" , "sliceUpDownLeft", "boxRandom", "boxRain", "boxRainReverse", "boxRainGrow" , "boxRainGrowReverse");
+ $itemsare = array( __("Random","mantra"), __("Fold","mantra"), __("Fade","mantra"), __("SlideInRight","mantra"), __("SlideInLeft","mantra"), __("SliceDown","mantra"), __("SliceDownLeft","mantra"), __("SliceUp","mantra"), __("SliceUpLeft","mantra"), __("SliceUpDown","mantra"), __("SliceUpDownLeft","mantra"), __("BoxRandom","mantra"), __("BoxRain","mantra"), __("BoxRainReverse","mantra"), __("BoxRainGrow","mantra"), __("BoxRainGrowReverse","mantra"));
+ echo "<select id='mantra_fpslideranim' name='ma_options[mantra_fpslideranim]'>";
+ foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_fpslideranim'],$item);
+ echo ">$itemsare[$id]</option>";
+}
+ echo "</select>";
+ echo "<small>".__("The transition effect your slider will have.","mantra")."</small></div>";
+
+ echo "<div class='slmini'><b>".__("Border Settings:","mantra")."</b> ";
+ echo __('Width' ,'mantra').": <input id='mantra_fpsliderborderwidth' name='ma_options[mantra_fpsliderborderwidth]' size='2' type='text' value='".esc_attr( $mantra_options['mantra_fpsliderborderwidth'] )."' /> px / ";
+ echo __('Color','mantra').': <input type="text" id="mantra_fpsliderbordercolor" name="ma_options[mantra_fpsliderbordercolor]" style="width:100px;" value="'.esc_attr( $mantra_options['mantra_fpsliderbordercolor'] ).'" />';
+ echo '<div id="mantra_fpsliderbordercolor2"></div>';
+ echo "<small>".__("The width and color of the slider's border.","mantra")."</small></div>";
+
+ echo "<div class='slmini'><b>".__("Animation Time:","mantra")."</b> ";
+ echo "<input id='mantra_fpslidertime' name='ma_options[mantra_fpslidertime]' size='4' type='text' value='".esc_attr( $mantra_options['mantra_fpslidertime'] )."' /> ".__("milliseconds","mantra");
+ echo "<small>".__("The time in which the transition animation will take place.","mantra")."</small></div>";
+
+ echo "<div class='slmini'><b>".__("Pause Time:","mantra")."</b> ";
+ echo "<input id='mantra_fpsliderpause' name='ma_options[mantra_fpsliderpause]' size='4' type='text' value='".esc_attr( $mantra_options['mantra_fpsliderpause'] )."' /> ".__("milliseconds","mantra");
+ echo "<small>".__("The time in which a slide will be still and visible.","mantra")."</small></div>";
+
+
+ echo "<div class='slmini'><b>".__("Slider navigation:","mantra")."</b> ";
+ $items = array ("Numbers" , "Bullets" ,"None");
+ $itemsare = array( __("Numbers","mantra"), __("Bullets","mantra"), __("None","mantra"));
+ echo "<select id='mantra_fpslidernav' name='ma_options[mantra_fpslidernav]'>";
+ foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_fpslidernav'],$item);
+ echo ">$itemsare[$id]</option>";
+}
+ echo "</select>";
+ echo "<small>".__("Your slider navigation type. Shown under the slider.","mantra")."</small></div>";
+
+ echo "<div class='slmini'><b>".__("Slider arrows:","mantra")."</b> ";
+ $items = array ("Always Visible" , "Visible on Hover" ,"Hidden");
+ $itemsare = array( __("Always Visible","mantra"), __("Visible on Hover","mantra"), __("Hidden","mantra"));
+ echo "<select id='mantra_fpsliderarrows' name='ma_options[mantra_fpsliderarrows]'>";
+ foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_fpsliderarrows'],$item);
+ echo ">$itemsare[$id]</option>";
+}
+ echo "</select>";
+ echo "<small>".__("The Left and Right arrows on your slider","mantra")."</small></div>";
+
+?>
+
+<script>
+var $categoryName;
+
+jQuery(document).ready(function(){
+ jQuery('#categ-dropdown').change(function(){
+ $categoryName=this.options[this.selectedIndex].value.replace(/\/category\/archives\//i,"");
+ doAjaxRequest();
+ });
+
+});
+function doAjaxRequest(){
+ // here is where the request will happen
+ jQuery.ajax({
+ url: ajaxurl,
+ data:{
+ 'action':'do_ajax',
+ 'fn':'get_latest_posts',
+ 'count':10,
+ 'categName':$categoryName
+ },
+ dataType: 'JSON',
+ success:function(data){
+ jQuery('#post-dropdown').html(data);
+
+
+ },
+ error: function(errorThrown){
+ alert('error');
+ console.log(errorThrown);
+ }
+
+ });
+
+}
+</script>
+<!--
+<select name="categ-dropdown" id="categ-dropdown" multiple='multiple' >
+ <option value=""><?php echo esc_attr(__('Select Category','mantra')); ?></option>
+ <?php
+ $categories= get_categories();
+ foreach ($categories as $category) {
+ $option = '<option value="/category/archives/'.$category->category_nicename.'">';
+ $option .= $category->cat_name;
+ $option .= ' ('.$category->category_count.')';
+ $option .= '</option>';
+ echo $option;
+ }
+ ?>
+</select>
+<select name="post-dropdown" id="post-dropdown">
+</select>
+-->
+
+<?php
+
+}
+
+//CHECKBOX - Name: ma_options[frontslider2]
+function cryout_setting_frontslider2_fn() {
+ global $mantra_options;
+?>
+
+<?php
+$items = array("Custom Slides", "Latest Posts", "Random Posts", "Sticky Posts", "Latest Posts from Category" , "Random Posts from Category", "Specific Posts");
+ $itemsare = array( __("Custom Slides","mantra"), __("Latest Posts","mantra"), __("Random Posts","mantra"),__("Sticky Posts","mantra"), __("Latest Posts from Category","mantra"), __("Random Posts from Category","mantra"), __("Specific Posts","mantra"));
+ echo "<strong> Select the content you want to load in your slides: </strong> ";
+ echo "<select id='mantra_slideType' name='ma_options[mantra_slideType]'>";
+foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_slideType'],$item);
+ echo ">$itemsare[$id]</option>";
+}
+ echo "</select>";
+ echo "<div><small>".__("Your slides' content. Only the image is required, all other fields are optional. Only the slides with an image selected will become acitve and visible in the live slider.","mantra")."</small></div>";
+
+?>
+
+<div id="sliderLatestPosts" class="slideDivs">
+<span><?php _e('Latest posts will be loaded into the slider.','mantra'); ?> </span>
+</div>
+
+<div id="sliderRandomPosts" class="slideDivs">
+<span><?php _e('Random posts will be loaded into the slider.','mantra'); ?> </span>
+</div>
+
+<div id="sliderLatestCateg" class="slideDivs">
+<span><?php _e('Latest posts from the category you choose will be loaded in the slider.','mantra'); ?> </span>
+
+</div>
+
+<div id="sliderRandomCateg" class="slideDivs">
+<span><?php _e('Random posts from the category you choose will be loaded into the slider.','mantra'); ?> </span>
+</div>
+
+<div id="sliderStickyPosts" class="slideDivs">
+<span><?php _e('Only sticky posts will be loaded into the slider.','mantra'); ?> </span>
+</div>
+
+<div id="sliderSpecificPosts" class="slideDivs">
+<span><?php _e('List the post IDs you want to display (separated by a comma): ','mantra'); ?> </span>
+ <input id='mantra_slideSpecific' name='ma_options[mantra_slideSpecific]' size='44' type='text' value='<?php echo esc_attr( $mantra_options['mantra_slideSpecific'] ) ?>' />
+</div>
+
+<div id="slider-category">
+<span><?php _e('<br> Choose the cateogry: ','mantra'); ?> </span>
+<select id="mantra_slideCateg" name='ma_options[mantra_slideCateg]' >
+ <option value=""><?php echo esc_attr(__('Select Category','mantra')); ?></option>
+ <?php echo $mantra_options["mantra_slideCateg"];
+ $categories= get_categories();
+ foreach ($categories as $category) {
+ $option = '<option value="'.$category->category_nicename.'" ';
+ $option .= selected($mantra_options["mantra_slideCateg"], $category->category_nicename, false).' >';
+ $option .= $category->cat_name;
+ $option .= ' ('.$category->category_count.')';
+ $option .= '</option>';
+ echo $option;
+ }
+ ?>
+</select>
+</div>
+
+<span id="slider-post-number"><?php _e('Number of posts to show:','mantra'); ?>
+ <input id='mantra_slideNumber' name='ma_options[mantra_slideNumber]' size='3' type='text' value='<?php echo esc_attr( $mantra_options['mantra_slideNumber'] ) ?>' />
+ </span>
+
+
+<div id="sliderCustomSlides" class="slideDivs">
+<div class="slidebox">
+<h4 class="slidetitle" ><?php _e("Slide 1","mantra");?> </h4>
+<div class="slidercontent">
+<h5><?php _e("Image","mantra");?></h5>
+<input type="text" value="<?php echo esc_url($mantra_options['mantra_sliderimg1']); ?>" name="ma_options[mantra_sliderimg1]" id="mantra_sliderimg1" class="slideimages" />
+<span class="description"><a href="#" class="upload_image_button button"><?php _e( 'Select / Upload Image', 'mantra' );?></a> </span>
+<h5> <?php _e("Title","mantra");?> </h5>
+<input id='mantra_slidertitle1' name='ma_options[mantra_slidertitle1]' size='50' type='text' value='<?php echo esc_attr( $mantra_options['mantra_slidertitle1'] ) ?>' />
+<h5> <?php _e("Text","mantra");?> </h5>
+<textarea id='mantra_slidertext1' name='ma_options[mantra_slidertext1]' rows='3' cols='50' type='textarea' ><?php echo esc_attr($mantra_options['mantra_slidertext1']) ?></textarea>
+<h5> <?php _e("Link","mantra");?> </h5>
+<input id='mantra_sliderlink1' name='ma_options[mantra_sliderlink1]' size='50' type='text' value='<?php echo esc_url( $mantra_options['mantra_sliderlink1'] ) ?>' />
+</div>
+</div>
+
+<div class="slidebox">
+<h4 class="slidetitle" > <?php _e("Slide 2","mantra");?> </h4>
+<div class="slidercontent">
+<h5><?php _e("Image","mantra");?></h5>
+<input type="text" value="<?php echo esc_url($mantra_options['mantra_sliderimg2']); ?>" name="ma_options[mantra_sliderimg2]" id="mantra_sliderimg2" class="slideimages" />
+<span class="description"><a href="#" class="upload_image_button button"><?php _e( 'Select / Upload Image', 'mantra' );?></a> </span>
+<h5> <?php _e("Title","mantra");?> </h5>
+<input id='mantra_slidertitle2' name='ma_options[mantra_slidertitle2]' size='50' type='text' value='<?php echo esc_attr( $mantra_options['mantra_slidertitle2'] ) ?>' />
+<h5> <?php _e("Text","mantra");?> </h5>
+<textarea id='mantra_slidertext2' name='ma_options[mantra_slidertext2]' rows='3' cols='50' type='textarea' ><?php echo esc_attr($mantra_options['mantra_slidertext2']) ?></textarea>
+<h5> <?php _e("Link","mantra");?> </h5>
+<input id='mantra_sliderlink2' name='ma_options[mantra_sliderlink2]' size='50' type='text' value='<?php echo esc_url( $mantra_options['mantra_sliderlink2'] ) ?>' />
+</div>
+</div>
+
+<div class="slidebox">
+<h4 class="slidetitle" > <?php _e("Slide 3","mantra");?> </h4>
+<div class="slidercontent">
+<h5><?php _e("Image","mantra");?></h5>
+<input type="text" value="<?php echo esc_url($mantra_options['mantra_sliderimg3']); ?>" name="ma_options[mantra_sliderimg3]" id="mantra_sliderimg3" class="slideimages" />
+<span class="description"><a href="#" class="upload_image_button button"><?php _e( 'Select / Upload Image', 'mantra' );?></a> </span>
+<h5> <?php _e("Title","mantra");?> </h5>
+<input id='mantra_slidertitle3' name='ma_options[mantra_slidertitle3]' size='50' type='text' value='<?php echo esc_attr( $mantra_options['mantra_slidertitle3'] ) ?>' />
+<h5> <?php _e("Text","mantra");?> </h5>
+<textarea id='mantra_slidertext3' name='ma_options[mantra_slidertext3]' rows='3' cols='50' type='textarea' ><?php echo esc_attr($mantra_options['mantra_slidertext3']) ?></textarea>
+<h5> <?php _e("Link","mantra");?> </h5>
+<input id='mantra_sliderlink3' name='ma_options[mantra_sliderlink3]' size='50' type='text' value='<?php echo esc_url( $mantra_options['mantra_sliderlink3'] ) ?>' />
+</div>
+</div>
+
+<div class="slidebox">
+<h4 class="slidetitle" > <?php _e("Slide 4","mantra");?> </h4>
+<div class="slidercontent">
+<h5><?php _e("Image","mantra");?></h5>
+<input type="text" value="<?php echo esc_url($mantra_options['mantra_sliderimg4']); ?>" name="ma_options[mantra_sliderimg4]" id="mantra_sliderimg4" class="slideimages" />
+<span class="description"><a href="#" class="upload_image_button button"><?php _e( 'Select / Upload Image', 'mantra' );?></a> </span>
+<h5> <?php _e("Title","mantra");?> </h5>
+<input id='mantra_slidertitle4' name='ma_options[mantra_slidertitle4]' size='50' type='text' value='<?php echo esc_attr( $mantra_options['mantra_slidertitle4'] ) ?>' />
+<h5> <?php _e("Text","mantra");?> </h5>
+<textarea id='mantra_slidertext4' name='ma_options[mantra_slidertext4]' rows='3' cols='50' type='textarea' ><?php echo esc_attr($mantra_options['mantra_slidertext4']) ?></textarea>
+<h5> <?php _e("Link","mantra");?> </h5>
+<input id='mantra_sliderlink4' name='ma_options[mantra_sliderlink4]' size='50' type='text' value='<?php echo esc_url( $mantra_options['mantra_sliderlink4'] ) ?>' />
+</div>
+</div>
+
+<div class="slidebox">
+<h4 class="slidetitle" > <?php _e("Slide 5","mantra");?></h4>
+<div class="slidercontent">
+<h5><?php _e("Image","mantra");?></h5>
+<input type="text" value="<?php echo esc_url($mantra_options['mantra_sliderimg5']); ?>" name="ma_options[mantra_sliderimg5]" id="mantra_sliderimg5" class="slideimages" />
+<span class="description"><a href="#" class="upload_image_button button"><?php _e( 'Select / Upload Image', 'mantra' );?></a> </span>
+<h5> <?php _e("Title","mantra");?> </h5>
+<input id='mantra_slidertitle5' name='ma_options[mantra_slidertitle5]' size='50' type='text' value='<?php echo esc_attr( $mantra_options['mantra_slidertitle5'] ) ?>' />
+<h5> <?php _e("Text","mantra");?> </h5>
+<textarea id='mantra_slidertext5' name='ma_options[mantra_slidertext5]' rows='3' cols='50' type='textarea' ><?php echo esc_attr($mantra_options['mantra_slidertext5']) ?></textarea>
+<h5> <?php _e("Link","mantra");?> </h5>
+<input id='mantra_sliderlink5' name='ma_options[mantra_sliderlink5]' size='50' type='text' value='<?php echo esc_url( $mantra_options['mantra_sliderlink5'] ) ?>' />
+</div>
+</div>
+
+</div> <!-- customSlides -->
+<?php
+}
+
+//CHECKBOX - Name: ma_options[frontcolumns]
+function cryout_setting_frontcolumns_fn() {
+ global $mantra_options;
+
+echo "<div class='slmini'><b>".__("Number of columns:","mantra")."</b> ";
+ $items = array ("0" ,"1", "2" , "3" , "4");
+ echo "<select id='mantra_nrcolumns' name='ma_options[mantra_nrcolumns]'>";
+foreach($items as $item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_nrcolumns'],$item);
+ echo ">$item</option>";
+}
+ echo "</select></div>";
+
+echo "<div class='slmini'><b>".__("Image Height:","mantra")."</b> ";
+ echo "<input id='mantra_colimageheight' name='ma_options[mantra_colimageheight]' size='4' type='text' value='".esc_attr( $mantra_options['mantra_colimageheight'] )."' /> px </div>";
+?>
+<div class='slmini'><b><?php _e("Read more text:","mantra");?></b>
+<input id='mantra_columnreadmore' name='ma_options[mantra_columnreadmore]' size='30' type='text' value='<?php echo esc_attr( $mantra_options['mantra_columnreadmore'] ) ?>' />
+<?php
+ echo "<small>".__("The linked text that appears at the bottom of all the columns. You can delete all text inside if you don't want it.","mantra")."</small></div>";
+
+?>
+<div class="slidebox">
+<h4 class="slidetitle" > <?php _e("1st Column","mantra");?> </h4>
+<div class="slidercontent">
+<h5><?php _e("Image","mantra");?></h5>
+<input type="text" value="<?php echo esc_url($mantra_options['mantra_columnimg1']); ?>" name="ma_options[mantra_columnimg1]" id="mantra_columnimg1" class="slideimages" />
+<span class="description"><a href="#" class="upload_image_button button"><?php _e( 'Select / Upload Image', 'mantra' );?></a> </span>
+<h5> <?php _e("Title","mantra");?> </h5>
+<input id='mantra_columntitle1' name='ma_options[mantra_columntitle1]' size='50' type='text' value='<?php echo esc_attr( $mantra_options['mantra_columntitle1'] ) ?>' />
+<h5> <?php _e("Text","mantra");?> </h5>
+<textarea id='mantra_columntext1' name='ma_options[mantra_columntext1]' rows='3' cols='50' type='textarea' ><?php echo esc_attr($mantra_options['mantra_columntext1']) ?></textarea>
+<h5> <?php _e("Link","mantra");?> </h5>
+<input id='mantra_columnlink1' name='ma_options[mantra_columnlink1]' size='50' type='text' value='<?php echo esc_url( $mantra_options['mantra_columnlink1'] ) ?>' />
+</div>
+</div>
+
+<div class="slidebox">
+<h4 class="slidetitle" > <?php _e("2nd Column","mantra");?></h4>
+<div class="slidercontent">
+<h5><?php _e("Image","mantra");?></h5>
+<input type="text" value="<?php echo esc_url($mantra_options['mantra_columnimg2']); ?>" name="ma_options[mantra_columnimg2]" id="mantra_columnimg2" class="slideimages" />
+<span class="description"><a href="#" class="upload_image_button button"><?php _e( 'Select / Upload Image', 'mantra' );?></a> </span>
+<h5> <?php _e("Title","mantra");?> </h5>
+<input id='mantra_columntitle2' name='ma_options[mantra_columntitle2]' size='50' type='text' value='<?php echo esc_attr( $mantra_options['mantra_columntitle2'] ) ?>' />
+<h5> <?php _e("Text","mantra");?> </h5>
+<textarea id='mantra_columntext2' name='ma_options[mantra_columntext2]' rows='3' cols='50' type='textarea' ><?php echo esc_attr($mantra_options['mantra_columntext2']) ?></textarea>
+<h5> <?php _e("Link","mantra");?> </h5>
+<input id='mantra_columnlink2' name='ma_options[mantra_columnlink2]' size='50' type='text' value='<?php echo esc_url( $mantra_options['mantra_columnlink2'] ) ?>' />
+</div>
+</div>
+
+<div class="slidebox">
+<h4 class="slidetitle" > <?php _e("3rd Column","mantra");?> </h4>
+<div class="slidercontent">
+<h5><?php _e("Image","mantra");?></h5>
+<input type="text" value="<?php echo esc_url($mantra_options['mantra_columnimg3']); ?>" name="ma_options[mantra_columnimg3]" id="mantra_columnimg3" class="slideimages" />
+<span class="description"><a href="#" class="upload_image_button button"><?php _e( 'Select / Upload Image', 'mantra' );?></a> </span>
+<h5> Title </h5>
+<input id='mantra_columntitle3' name='ma_options[mantra_columntitle3]' size='50' type='text' value='<?php echo esc_attr( $mantra_options['mantra_columntitle3'] ) ?>' />
+<h5> <?php _e("Text","mantra");?> </h5>
+<textarea id='mantra_columntext3' name='ma_options[mantra_columntext3]' rows='3' cols='50' type='textarea' ><?php echo esc_attr($mantra_options['mantra_columntext3']) ?></textarea>
+<h5> <?php _e("Link","mantra");?> </h5>
+<input id='mantra_columnlink3' name='ma_options[mantra_columnlink3]' size='50' type='text' value='<?php echo esc_url( $mantra_options['mantra_columnlink3'] ) ?>' />
+</div>
+</div>
+
+<div class="slidebox">
+<h4 class="slidetitle" > <?php _e("4th Column","mantra");?> </h4>
+<div class="slidercontent">
+<h5><?php _e("Image","mantra");?></h5>
+<input type="text" value="<?php echo esc_url($mantra_options['mantra_columnimg4']); ?>" name="ma_options[mantra_columnimg4]" id="mantra_columnimg4" class="slideimages" />
+<span class="description"><a href="#" class="upload_image_button button"><?php _e( 'Select / Upload Image', 'mantra' );?></a> </span>
+<h5> <?php _e("Title","mantra");?> </h5>
+<input id='mantra_columntitle4' name='ma_options[mantra_columntitle4]' size='50' type='text' value='<?php echo esc_attr( $mantra_options['mantra_columntitle4'] ) ?>' />
+<h5> <?php _e("Text","mantra");?> </h5>
+<textarea id='mantra_columntext4' name='ma_options[mantra_columntext4]' rows='3' cols='50' type='textarea' ><?php echo esc_attr($mantra_options['mantra_columntext4']) ?></textarea>
+<h5> <?php _e("Link","mantra");?> </h5>
+<input id='mantra_columnlink4' name='ma_options[mantra_columnlink4]' size='50' type='text' value='<?php echo esc_url( $mantra_options['mantra_columnlink4'] ) ?>' />
+</div>
+</div>
+
+<?php
+}
+
+
+//CHECKBOX - Name: ma_options[fronttext]
+function cryout_setting_fronttext_fn() {
+ global $mantra_options;
+
+echo "<div class='slidebox'><h4 class='slidetitle'> ".__("Extra Text","mantra")." </h4><div class='slidercontent'> ";
+
+echo "<div style='width:100%;'><span>Text for the Presentation Page</span><small>".__("More text for your front page. The top title is above the slider, the second title between the slider and the columns and 2 more rows of text under the columns.
+ It's all optional so leave any input field empty if it's not required. ","mantra")."</small></div>";
+
+ echo "<h5>".__("Top Title","mantra")."</h5><br><input id='mantra_fronttext1' name='ma_options[mantra_fronttext1]' size='50' type='text' value='".esc_attr( $mantra_options['mantra_fronttext1'] )."' />";
+echo "<h5>".__("Second Title","mantra")."</h5> ";
+ echo "<input id='mantra_fronttext2' name='ma_options[mantra_fronttext2]' size='50' type='text' value='".esc_attr( $mantra_options['mantra_fronttext2'] )."' />";
+
+echo "<h5>".__("Title color","mantra")."</h5> ";
+ echo '<input type="text" id="mantra_fronttitlecolor" name="ma_options[mantra_fronttitlecolor]" style="width:100px;display:block;float:none;" value="'.esc_attr( $mantra_options['mantra_fronttitlecolor'] ).'" />';
+ echo '<div id="mantra_fronttitlecolor2"></div>';
+
+echo "<h5>".__("Bottom Text 1","mantra")."</h5> ";
+ echo "<textarea id='mantra_fronttext3' name='ma_options[mantra_fronttext3]' rows='3' cols='50' type='textarea' >".esc_attr($mantra_options['mantra_fronttext3'])." </textarea>";
+echo "<h5>".__("Bottom Text 2","mantra")." </h5> ";
+ echo "<textarea id='mantra_fronttext4' name='ma_options[mantra_fronttext4]' rows='3' cols='50' type='textarea' >".esc_attr($mantra_options['mantra_fronttext4'])." </textarea></div></div>";
+
+
+
+
+
+
+echo "<div class='slidebox'><h4 class='slidetitle'>".__("Hide areas","mantra")." </h4><div class='slidercontent'>";
+
+echo "<div style='width:100%;'>".__("Choose the areas to hide on the first page.","mantra")."</div>";
+
+ $items = array( "FronHeader", "FrontMenu", "FrontWidget" , "FrontFooter","FrontBack");
+
+ $checkedClass0 = ($mantra_options['mantra_fronthideheader']=='1') ? ' checkedClass0' : '';
+ $checkedClass1 = ($mantra_options['mantra_fronthidemenu']=='1') ? ' checkedClass1' : '';
+ $checkedClass2 = ($mantra_options['mantra_fronthidewidget']=='1') ? ' checkedClass2' : '';
+ $checkedClass3 = ($mantra_options['mantra_fronthidefooter']=='1') ? ' checkedClass3' : '';
+ $checkedClass4 = ($mantra_options['mantra_fronthideback']=='1') ? ' checkedClass4' : '';
+
+ echo " <label id='$items[0]' for='$items[0]$items[0]' class='hideareas $checkedClass0'><input ";
+ checked($mantra_options['mantra_fronthideheader'],'1');
+ echo "value='1' id='$items[0]$items[0]' name='ma_options[mantra_fronthideheader]' type='checkbox' /> ".__("Hide the header area (image or background color).","mantra")." </label>";
+
+ echo " <label id='$items[1]' for='$items[1]$items[1]' class='hideareas $checkedClass1'><input ";
+ checked($mantra_options['mantra_fronthidemenu'],'1');
+ echo "value='1' id='$items[1]$items[1]' name='ma_options[mantra_fronthidemenu]' type='checkbox' /> ".__("Hide the main menu (the top navigation tabs).","mantra")." </label>";
+
+ echo " <label id='$items[2]' for='$items[2]$items[2]' class='hideareas $checkedClass2'><input ";
+ checked($mantra_options['mantra_fronthidewidget'],'1');
+ echo "value='1' id='$items[2]$items[2]' name='ma_options[mantra_fronthidewidget]' type='checkbox' /> ".__("Hide the footer widgets. ","mantra")." </label>";
+
+ echo " <label id='$items[3]' for='$items[3]$items[3]' class='hideareas $checkedClass3'><input ";
+ checked($mantra_options['mantra_fronthidefooter'],'1');
+ echo "value='1' id='$items[3]$items[3]' name='ma_options[mantra_fronthidefooter]' type='checkbox' /> ".__("Hide the footer (copyright area).","mantra")." </label>";
+
+ echo " <label id='$items[4]' for='$items[4]$items[4]' class='hideareas $checkedClass4'><input ";
+ checked($mantra_options['mantra_fronthideback'],'1');
+ echo "value='1' id='$items[4]$items[4]' name='ma_options[mantra_fronthideback]' type='checkbox' /> ".__("Hide the white color. Only the background color remains.","mantra")." </label>";
+
+
+echo "</div></div>";
+
+
+}
+
+
+//////////////////////////////
+/////HEADER SETTINGS//////////
+/////////////////////////////
+
+ //SELECT - Name: ma_options[hheight]
+function cryout_setting_hheight_fn() {
+ global $mantra_options;?>
+<input id='mantra_hheight' name='ma_options[mantra_hheight]' size='4' type='text' value='<?php echo esc_attr( intval($mantra_options['mantra_hheight'] )) ?>' /> px
+<?php
+$totally = $mantra_options['mantra_sidebar']+$mantra_options['mantra_sidewidth']+50;
+
+echo "<div><small>".__("Select the header's height. After saving the settings make sure you reupload a new header image (if you're using one). The header's width will be = ","mantra").$totally."px.</small></div>";
+}
+
+function cryout_setting_himage_fn() {
+ global $mantra_options;
+ $checkedClass = ($mantra_options['mantra_hcenter']=='1') ? ' checkedClass' : '';
+ $checkedClass2 = ($mantra_options['mantra_hratio']=='1') ? ' checkedClass' : '';
+ echo "<a href=\"?page=custom-header\" class=\"button\" target=\"_blank\">".__('Define header image')."</a>";
+ echo "<div><small>".__("The header image should not be used to display logos.<br> Enable ratio preservation to force the header image aspect ratio. Keep in mind that short images will become very small on mobile devices.","mantra")."</small></div>";
+ echo "<br><label id='hcenter' for='mantra_hcenter' class='socialsdisplay $checkedClass'><input ";
+ checked($mantra_options['mantra_hcenter'],'1');
+ echo " value='1' id='mantra_hcenter' name='ma_options[mantra_hcenter]' type='checkbox'/> Center the header image horizontally </label>";
+
+ echo " <label id='hratio' for='mantra_hratio' class='socialsdisplay $checkedClass2'><input ";
+ checked($mantra_options['mantra_hratio'],'1');
+ echo " value='1' id='mantra_hratio' name='ma_options[mantra_hratio]' type='checkbox' style='margin-left:10px;'/> Keep header image aspect ratio </label>";
+
+}
+
+//CHECKBOX - Name: ma_options[menurounded]
+function cryout_setting_menurounded_fn() {
+ global $mantra_options;
+ $items = array ("Enable" , "Disable");
+ $itemsare = array( __("Enable","mantra"), __("Disable","mantra"));
+ echo "<select id='mantra_menurounded' name='ma_options[mantra_menurounded]'>";
+foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_menurounded'],$item);
+ echo ">$itemsare[$id]</option>";
+}
+ echo "</select>";
+ echo "<div><small>".__("Enable or disable the round corners for the main menu items.","mantra")."</small></div>";
+
+}
+
+//CHECKBOX - Name: ma_options[linkheader]
+function cryout_setting_siteheader_fn() {
+ global $mantra_options;
+ $items = array ("Site Title and Description" , "Custom Logo" , "Clickable header image" , "Empty");
+ $itemsare = array( __("Site Title and Description","mantra"), __("Custom Logo","mantra"), __("Clickable header image","mantra"), __("Empty","mantra"));
+ echo "<select id='mantra_siteheader' name='ma_options[mantra_siteheader]'>";
+foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_siteheader'],$item);
+ echo ">$itemsare[$id]</option>";
+}
+ echo "</select>";
+ echo "<div><small>".__("Choose what to display inside your header area.","mantra")."</small></div>";
+}
+
+// TEXTBOX - Name: ma_options[favicon]
+function cryout_setting_logoupload_fn() {
+ global $mantra_options;
+ echo '<div>';
+?>
+ <img src='<?php echo ($mantra_options['mantra_logoupload']!='')? esc_url($mantra_options['mantra_logoupload']):get_template_directory_uri().'/admin/images/placeholder.gif'; ?>' class="imagebox" style="display:;max-height:60px" /><br>
+<input type="text" size='60' value="<?php echo esc_url($mantra_options['mantra_logoupload']); ?>" name="ma_options[mantra_logoupload]" id="mantra_logoupload" class="header_upload_inputs slideimages" />
+<?php echo "<div><small>".__("Custom Logo upload. The logo will appear over the heder image if you have used one.","mantra")."</small></div>"; ?>
+<span class="description"><br><a href="#" class="upload_image_button button"><?php _e( 'Select / Upload Image', 'mantra' );?></a> </span>
+</div>
+
+<?php
+}
+
+function cryout_setting_headermargin_fn() {
+ global $mantra_options;?>
+<input id='mantra_headermargintop' name='ma_options[mantra_headermargintop]' size='4' type='text' value='<?php echo esc_attr( intval($mantra_options['mantra_headermargintop'] )) ?>' /> px <?php echo __("top","mantra");?>
+<input id='mantra_headermarginleft' name='ma_options[mantra_headermarginleft]' size='4' type='text' value='<?php echo esc_attr( intval($mantra_options['mantra_headermarginleft'] )) ?>' /> px <?php echo __("left","mantra");?>
+<?php
+
+echo "<div><small>".__("Select the top spacing for the header. Use it to better position your site title and description or custom logo inside the header. ","mantra")."</small></div>";
+}
+
+// TEXTBOX - Name: ma_options[favicon]
+function cryout_setting_favicon_fn() {
+ global $mantra_options;
+ echo '<div>';
+?>
+ <img src='<?php echo ($mantra_options['mantra_favicon']!='')? esc_url($mantra_options['mantra_favicon']):get_template_directory_uri().'/admin/images/placeholder.gif'; ?>' class="imagebox" width="64" height="64"/><br>
+<input type="text" size='60' value="<?php echo esc_url($mantra_options['mantra_favicon']); ?>" name="ma_options[mantra_favicon]" id="mantra_favicon" class="header_upload_inputs slideimages" />
+<?php echo "<div><small>".__("Limitations: It has to be an image. It should be max 64x64 pixels in dimensions. Recommended file extensions .ico and .png. <br/><b>Note that some browsers do not display the changed favicon instantly.</b>","mantra")."</small></div>"; ?>
+<span class="description"><br><a href="#" class="upload_image_button button"><?php _e( 'Select / Upload Image', 'mantra' );?></a> </span>
+</div>
+
+<?php
+}
+
+
+////////////////////////////////
+//// TEXT SETTINGS /////////////
+////////////////////////////////
+
+//SELECT - Name: ma_options[fontsize]
+function cryout_setting_fontsize_fn() {
+ global $mantra_options;
+ $items =array ("12px", "13px" , "14px" , "15px" , "16px", "17px", "18px");
+ echo "<select id='mantra_fontsize' name='ma_options[mantra_fontsize]'>";
+ foreach($items as $item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_fontsize'],$item);
+ echo ">$item</option>";
+}
+ echo "</select>";
+ echo "<div><small>".__("Select the font size you'll use in your blog. Pages, posts and comments will be affected. Buttons, Headers and Side menus will remain the same.","mantra")."</small></div>";
+}
+
+
+//SELECT - Name: ma_options[fontfamily]
+function cryout_setting_fontfamily_fn() {
+ global $mantra_options;
+ global $fontSans, $fontSerif, $fontMono, $fontCursive;
+
+ echo "<select id='mantra_fontfamily' name='ma_options[mantra_fontfamily]'>";
+ echo "<optgroup label='Sans-Serif'>";
+foreach($fontSans as $item) {
+ echo "<option style='font-family:$item;' value='$item'";
+ selected($mantra_options['mantra_fontfamily'],$item);
+ echo ">$item</option>";
+}
+ echo "</optgroup>";
+
+ echo "<optgroup label='Serif'>";
+foreach($fontSerif as $item) {
+
+ echo "<option style='font-family:$item;' value='$item'";
+ selected($mantra_options['mantra_fontfamily'],$item);
+ echo ">$item</option>";
+}
+ echo "</optgroup>";
+
+ echo "<optgroup label='MonoSpace'>";
+foreach($fontMono as $item) {
+ echo "<option style='font-family:$item;' value='$item'";
+ selected($mantra_options['mantra_fontfamily'],$item);
+ echo ">$item</option>";
+}
+ echo "</optgroup>";
+
+ echo "<optgroup label='Cursive'>";
+foreach($fontCursive as $item) {
+ echo "<option style='font-family:$item;' value='$item'";
+ selected($mantra_options['mantra_fontfamily'],$item);
+ echo ">$item</option>";
+}
+ echo "</optgroup>";
+ echo "</select>";
+
+ echo "<div><small>".__("Select the font family you'll use in your blog. All content text will be affected (including menu buttons). ","mantra")."</small></div><br>";
+ echo '<input class="googlefonts" type="text" size="45" value="'.esc_attr($mantra_options['mantra_googlefont']).'" name="ma_options[mantra_googlefont]" id="mantra_googlefont" />';
+ echo "<div><small>".__("Or insert your Google Font below. Please only isert the <strong>name</strong> of the font.<br /> Ex: Marko One. Go to <a href='http://www.google.com/webfonts' > google fonts </a> for some font inspiration.","mantra")."</small></div>";
+
+
+}
+
+//SELECT - Name: ma_options[fonttitle]
+function cryout_setting_fonttitle_fn() {
+ global $mantra_options;
+ global $fontSans, $fontSerif, $fontMono, $fontCursive;
+
+ echo "<select id='mantra_fonttitle' name='ma_options[mantra_fonttitle]'>";
+ echo "<option value='Default'";
+ selected($mantra_options['mantra_fonttitle'],'Defaut');
+ echo ">Default</option>";
+ echo "<optgroup label='Sans-Serif'>";
+foreach($fontSans as $item) {
+ echo "<option style='font-family:$item;' value='$item'";
+ selected($mantra_options['mantra_fonttitle'],$item);
+ echo ">$item</option>";
+}
+ echo "</optgroup>";
+
+ echo "<optgroup label='Serif'>";
+foreach($fontSerif as $item) {
+
+ echo "<option style='font-family:$item;' value='$item'";
+ selected($mantra_options['mantra_fonttitle'],$item);
+ echo ">$item</option>";
+}
+ echo "</optgroup>";
+
+ echo "<optgroup label='MonoSpace'>";
+foreach($fontMono as $item) {
+ echo "<option style='font-family:$item;' value='$item'";
+ selected($mantra_options['mantra_fonttitle'],$item);
+ echo ">$item";
+}
+ echo "</optgroup>";
+
+ echo "<optgroup label='Cursive'>";
+foreach($fontCursive as $item) {
+ echo "<option style='font-family:$item;' value='$item'";
+ selected($mantra_options['mantra_fonttitle'],$item);
+ echo ">$item</option>";
+}
+ echo "</optgroup>";
+ echo "</select>";
+ echo "<div><small>".__("Select the font family you want for your titles. It will affect post titles and page titles. Leave 'Default' and the general font you selected will be used.","mantra")."</small></div><br>";
+
+ echo '<input class="googlefonts" type="text" size="45" value="'.esc_attr($mantra_options['mantra_googlefonttitle']).'" name="ma_options[mantra_googlefonttitle]" id="mantra_googlefonttitle" />';
+ echo "<div><small>".__("Or insert your Google Font below. Please only isert the <strong>name</strong> of the font.<br /> Ex: Marko One. Go to <a href='http://www.google.com/webfonts' > google fonts </a> for some font inspiration.","mantra")."</small></div>";
+
+
+
+
+}
+
+//SELECT - Name: ma_options[fontside]
+function cryout_setting_fontside_fn() {
+ global $mantra_options;
+ global $fontSans, $fontSerif, $fontMono, $fontCursive;
+
+ echo "<select id='mantra_fontside' name='ma_options[mantra_fontside]'>";
+ echo "<option value='Default'";
+ selected($mantra_options['mantra_fonttitle'],'Defaut');
+ echo ">Default</option>";
+ echo "<optgroup label='Sans-Serif'>";
+foreach($fontSans as $item) {
+ echo "<option style='font-family:$item;' value='$item'";
+ selected($mantra_options['mantra_fontside'],$item);
+ echo ">$item</option>";
+}
+ echo "</optgroup>";
+
+ echo "<optgroup label='Serif'>";
+foreach($fontSerif as $item) {
+
+ echo "<option style='font-family:$item;' value='$item'";
+ selected($mantra_options['mantra_fontside'],$item);
+ echo ">$item</option>";
+}
+ echo "</optgroup>";
+
+ echo "<optgroup label='MonoSpace'>";
+foreach($fontMono as $item) {
+ echo "<option style='font-family:$item;' value='$item'";
+ selected($mantra_options['mantra_fontside'],$item);
+ echo ">$item</option>";
+}
+ echo "</optgroup>";
+
+ echo "<optgroup label='Cursive'>";
+foreach($fontCursive as $item) {
+ echo "<option style='font-family:$item;' value='$item'";
+ selected($mantra_options['mantra_fontside'],$item);
+ echo ">$item</option>";
+}
+ echo "</optgroup>";
+ echo "</select>";
+ echo "<div><small>".__("Select the font family you want your sidebar(s) to have. Text in sidebars will be affected, including any widgets. Leave 'Default' and the general font you selected will be used.","mantra")."</small></div><br>";
+ echo '<input class="googlefonts" type="text" size="45" value="'.esc_attr($mantra_options['mantra_googlefontside']).'" name="ma_options[mantra_googlefontside]" id="mantra_googlefontside" />';
+ echo "<div><small>".__("Or insert your Google Font below. Please only isert the <strong>name</strong> of the font.<br /> Ex: Marko One. Go to <a href='http://www.google.com/webfonts' > google fonts </a> for some font inspiration.","mantra")."</small></div>";
+
+
+
+}
+
+
+//SELECT - Name: ma_options[fontsubheader]
+function cryout_setting_fontsubheader_fn() {
+ global $mantra_options;
+ global $fontSans, $fontSerif, $fontMono, $fontCursive;
+
+ echo "<select id='mantra_fontsubheader' name='ma_options[mantra_fontsubheader]'>";
+ echo "<option value='Default'";
+ selected($mantra_options['mantra_fonttitle'],'Defaut');
+ echo ">Default</option>";
+ echo "<optgroup label='Sans-Serif'>";
+foreach($fontSans as $item) {
+ echo "<option style='font-family:$item;' value='$item'";
+ selected($mantra_options['mantra_fontsubheader'],$item);
+ echo ">$item</option>";
+}
+ echo "</optgroup>";
+
+ echo "<optgroup label='Serif'>";
+foreach($fontSerif as $item) {
+
+ echo "<option style='font-family:$item;' value='$item'";
+ selected($mantra_options['mantra_fontsubheader'],$item);
+ echo ">$item</option>";
+}
+ echo "</optgroup>";
+
+ echo "<optgroup label='MonoSpace'>";
+foreach($fontMono as $item) {
+ echo "<option style='font-family:$item;' value='$item'";
+ selected($mantra_options['mantra_fontsubheader'],$item);
+ echo ">$item</option>";
+}
+ echo "</optgroup>";
+
+ echo "<optgroup label='Cursive'>";
+foreach($fontCursive as $item) {
+ echo "<option style='font-family:$item;' value='$item'";
+ selected($mantra_options['mantra_fontsubheader'],$item);
+ echo ">$item</option>";
+}
+ echo "</optgroup>";
+ echo "</select>";
+ echo "<div><small>".__("Select the font family you want your headings to have (h1 - h6 tags will be affected). Leave 'Default' and the general font you selected will be used.","mantra")."</small></div><br>";
+
+ echo '<input class="googlefonts" type="text" size="45" value="'.esc_attr($mantra_options['mantra_googlefontsubheader']).'" name="ma_options[mantra_googlefontsubheader]" id="mantra_googlefontsubheader" />';
+ echo "<div><small>".__("Or insert your Google Font below. Please only isert the <strong>name</strong> of the font.<br /> Ex: Marko One. Go to <a href='http://www.google.com/webfonts' > google fonts </a> for some font inspiration.","mantra")."</small></div>";
+
+
+}
+
+//SELECT - Name: ma_options[headfontsize]
+function cryout_setting_headfontsize_fn() {
+ global $mantra_options;
+ $items = array ("Default" , "14px" , "16px" , "18px" , "20px", "22px" , "24px" , "26px" , "28px" , "30px" , "32px" , "34px" , "36px", "38px" , "40px");
+ $itemsare = array( __("Default","mantra") ,"14px" , "16px" , "18px" , "20px", "22px" , "24px" , "26px" , "28px" , "30px" , "32px" , "34px" , "36px", "38px" , "40px");
+ echo "<select id='mantra_headfontsize' name='ma_options[mantra_headfontsize]'>";
+foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_headfontsize'],$item);
+ echo ">$item</option>";
+}
+ echo "</select>";
+ echo "<div><small>".__("Post Header Font size. Leave 'Default' for normal settings (size value will be as set in the CSS).","mantra")."</small></div>";
+}
+
+//SELECT - Name: ma_options[sidefontsize]
+function cryout_setting_sidefontsize_fn() {
+ global $mantra_options;
+ $items = array ("Default" , "8px" , "9px" , "10px" , "11px", "12px" , "13px" , "14px" , "15px" , "16px" , "17px" , "18px");
+ $itemsare = array( __("Default","mantra") , "8px" , "9px" , "10px" , "11px", "12px" , "13px" , "14px" , "15px" , "16px" , "17px" , "18px");
+ echo "<select id='mantra_sidefontsize' name='ma_options[mantra_sidefontsize]'>";
+foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_sidefontsize'],$item);
+ echo ">$item</option>";
+}
+ echo "</select>";
+ echo "<div><small>".__("Sidebar Font size. Leave 'Default' for normal settings (size value will be as set in the CSS).","mantra")."</small></div>";
+}
+
+//SELECT - Name: ma_options[textalign]
+function cryout_setting_textalign_fn() {
+ global $mantra_options;
+ $items = array ("Default" , "Left" , "Right" , "Justify" , "Center");
+ $itemsare = array( __("Default","mantra"), __("Left","mantra"), __("Right","mantra"), __("Justify","mantra"), __("Center","mantra"));
+ echo "<select id='mantra_textalign' name='ma_options[mantra_textalign]'>";
+foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_textalign'],$item);
+ echo ">$itemsare[$id]</option>";
+}
+ echo "</select>";
+ echo "<div><small>".__("This overwrites the text alignment in posts and pages. Leave 'Default' for normal settings (alignment will remain as declared in posts, comments etc.).","mantra")."</small></div>";
+}
+
+//SELECT - Name: ma_options[parindent]
+function cryout_setting_parmargin_fn() {
+ global $mantra_options;
+ $items = array ("0.0em", "0.5em", "1.0em" , "1.1em" , "1.2em" , "1.3em" , "1.4em", "1.5em", "1.6em", "1.7em");
+ echo "<select id='mantra_parmargin' name='ma_options[mantra_parmargin]'>";
+foreach($items as $item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_parmargin'],$item);
+ echo ">$item</option>";
+}
+ echo "</select>";
+ echo "<div><small>".__("Choose the spacing between paragraphs.","mantra")."</small></div>";
+}
+
+
+//SELECT - Name: ma_options[parindent]
+function cryout_setting_parindent_fn() {
+ global $mantra_options;
+ $items = array ("0px" , "5px" , "10px" , "15px" , "20px");
+ echo "<select id='mantra_parindent' name='ma_options[mantra_parindent]'>";
+foreach($items as $item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_parindent'],$item);
+ echo ">$item</option>";
+}
+ echo "</select>";
+ echo "<div><small>".__("Choose the indent for your paragraphs.","mantra")."</small></div>";
+}
+
+
+//CHECKBOX - Name: ma_options[headerindent]
+function cryout_setting_headerindent_fn() {
+ global $mantra_options;
+ $items = array ("Enable" , "Disable");
+ $itemsare = array( __("Enable","mantra"), __("Disable","mantra"));
+ echo "<select id='mantra_headerindent' name='ma_options[mantra_headerindent]'>";
+foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_headerindent'],$item);
+ echo ">$itemsare[$id]</option>";
+}
+ echo "</select>";
+ echo "<div><small>".__("Disable the default header and title indent (left margin).","mantra")."</small></div>";
+}
+
+//SELECT - Name: ma_options[lineheight]
+function cryout_setting_lineheight_fn() {
+ global $mantra_options;
+ $items = array ("Default" ,"0.8em" , "0.9em", "1.0em" , "1.1em" , "1.2em" , "1.3em", "1.4em" , "1.5em" , "1.6em" , "1.7em" , "1.8em" , "1.9em" , "2.0em");
+ $itemsare = array( __("Default","mantra"),"0.8em" , "0.9em", "1.0em" , "1.1em" , "1.2em" , "1.3em", "1.4em" , "1.5em" , "1.6em" , "1.7em" , "1.8em" , "1.9em" , "2.0em");
+ echo "<select id='mantra_lineheight' name='ma_options[mantra_lineheight]'>";
+foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_lineheight'],$item);
+ echo ">$itemsare[$id]</option>";
+}
+ echo "</select>";
+ echo "<div><small>".__("Text line height. The height between 2 rows of text. Leave 'Default' for normal settings (size value will be as set in the CSS).","mantra")."</small></div>";
+}
+
+//SELECT - Name: ma_options[wordspace]
+function cryout_setting_wordspace_fn() {
+ global $mantra_options;
+ $items = array ("Default" ,"-3px" , "-2px", "-1px" , "0px" , "1px" , "2px", "3px" , "4px" , "5px" , "10px");
+ $itemsare = array( __("Default","mantra"),"-3px" , "-2px", "-1px" , "0px" , "1px" , "2px", "3px" , "4px" , "5px" , "10px");
+ echo "<select id='mantra_wordspace' name='ma_options[mantra_wordspace]'>";
+foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_wordspace'],$item);
+ echo ">$itemsare[$id]</option>";
+}
+ echo "</select>";
+ echo "<div><small>".__("The space between <i>words</i>. Leave 'Default' for normal settings (size value will be as set in the CSS).","mantra")."</small></div>";
+}
+
+//SELECT - Name: ma_options[letterspace]
+function cryout_setting_letterspace_fn() {
+ global $mantra_options;
+ $items = array ("Default" ,"-0.05em" , "-0.04em", "-0.03em" , "-0.02em" , "-0.01em" , "0.01em", "0.02em" , "0.03em" , "0.04em" , "0.05em");
+ $itemsare = array( __("Default","mantra"),"-0.05em" , "-0.04em", "-0.03em" , "-0.02em" , "-0.01em" , "0.01em", "0.02em" , "0.03em" , "0.04em" , "0.05em");
+ echo "<select id='mantra_letterspace' name='ma_options[mantra_letterspace]'>";
+foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_letterspace'],$item);
+ echo ">$itemsare[$id]</option>";
+}
+ echo "</select>";
+ echo "<div><small>".__("The space between <i>letters</i>. Leave 'Default' for normal settings (size value will be as set in the CSS).","mantra")."</small></div>";
+}
+
+
+
+//CHECKBOX - Name: ma_options[textshadow]
+function cryout_setting_textshadow_fn() {
+ global $mantra_options;
+ $items = array ("Enable" , "Disable");
+ $itemsare = array( __("Enable","mantra"), __("Disable","mantra"));
+ echo "<select id='mantra_textshadow' name='ma_options[mantra_textshadow]'>";
+foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_textshadow'],$item);
+ echo ">$itemsare[$id]</option>";
+}
+ echo "</select>";
+ echo "<div><small>".__("Disable the default text shadow on headers and titles.","mantra")."</small></div>";
+}
+
+////////////////////////////////
+//// APPEREANCE SETTINGS ///////
+////////////////////////////////
+
+function cryout_setting_sitebackground_fn() {
+ echo "<a href=\"?page=custom-background\" class=\"button\" target=\"_blank\">".__('Define background image')."</a>";
+} // cryout_setting_sitebackground_fn()
+
+
+//TEXT - Name: ma_options[backcolor]
+function cryout_setting_backcolor_fn() {
+ global $mantra_options;
+ echo '<input type="text" id="mantra_backcolor" name="ma_options[mantra_backcolor]" value="'.esc_attr( $mantra_options['mantra_backcolor'] ).'" />';
+ echo '<div id="mantra_backcolor2"></div>';
+ echo "<div><small>".__("Background color (Default value is 444444).","mantra")."</small></div>";
+}
+
+//TEXT - Name: ma_options[headercolor]
+function cryout_setting_headercolor_fn() {
+ global $mantra_options;
+ echo '<input type="text" id="mantra_headercolor" name="ma_options[mantra_headercolor]" value="'.esc_attr( $mantra_options['mantra_headercolor'] ).'" />';
+ echo '<div id="mantra_headercolor2"></div>';
+ echo "<div><small>".__("Header background color (Default value is 333333). You can delete all inside text for no background color.","mantra")."</small></div>";
+}
+
+function cryout_setting_contentbg_fn() {
+ global $mantra_options;
+ echo '<input type="text" id="mantra_contentbg" name="ma_options[mantra_contentbg]" value="'.esc_attr( $mantra_options['mantra_contentbg'] ).'" />';
+ echo '<div id="mantra_contentbg2"></div>';
+ echo "<div><small>".__("Content background color (Default value is FFFFFF). Works best with really light colors.","mantra")."</small></div>";
+}
+
+function cryout_setting_menubg_fn() {
+ global $mantra_options;
+ echo '<input type="text" id="mantra_menubg" name="ma_options[mantra_menubg]" value="'.esc_attr( $mantra_options['mantra_menubg'] ).'" />';
+ echo '<div id="mantra_menubg2"></div>';
+ echo "<div><small>".__("Main menu background color (Default value is FAFAFA). Should be the same color as the content bg or something just as light.","mantra")."</small></div>";
+}
+
+function cryout_setting_first_sidebar_fn() {
+ global $mantra_options;
+ echo '<input type="text" id="mantra_s1bg" name="ma_options[mantra_s1bg]" value="'.esc_attr( $mantra_options['mantra_s1bg'] ).'" />';
+ echo '<div id="mantra_s1bg2"></div>';
+ echo "<div><small>".__("First sidebar background color (Default is no color for a transparent sidebar).","mantra")."</small></div>";
+}
+
+function cryout_setting_second_sidebar_fn() {
+ global $mantra_options;
+ echo '<input type="text" id="mantra_s2bg" name="ma_options[mantra_s2bg]" value="'.esc_attr( $mantra_options['mantra_s2bg'] ).'" />';
+ echo '<div id="mantra_s2bg2"></div>';
+ echo "<div><small>".__("Second sidebar background color (Default is no color for a transparent sidebar).","mantra")."</small></div>";
+}
+
+//TEXT - Name: ma_options[prefootercolor]
+function cryout_setting_prefootercolor_fn() {
+ global $mantra_options;
+ echo '<input type="text" id="mantra_prefootercolor" name="ma_options[mantra_prefootercolor]" value="'.esc_attr( $mantra_options['mantra_prefootercolor'] ).'" />';
+ echo '<div id="mantra_prefootercolor2"></div>';
+ echo "<div><small>".__("Footer widget-area background color. (Default value is 171717).","mantra")."</small></div>";
+}
+
+//TEXT - Name: ma_options[footercolor]
+function cryout_setting_footercolor_fn() {
+ global $mantra_options;
+ echo '<input type="text" id="mantra_footercolor" name="ma_options[mantra_footercolor]" value="'.esc_attr( $mantra_options['mantra_footercolor'] ).'" />';
+ echo '<div id="mantra_footercolor2"></div>';
+ echo "<div><small>".__("Footer background color (Default value is 222222).","mantra")."</small></div>";
+}
+
+//TEXT - Name: ma_options[titlecolor]
+function cryout_setting_titlecolor_fn() {
+ global $mantra_options;
+ echo '<input type="text" id="mantra_titlecolor" name="ma_options[mantra_titlecolor]" value="'.esc_attr( $mantra_options['mantra_titlecolor'] ).'" />';
+ echo '<div id="mantra_titlecolor2"></div>';
+ echo "<div><small>".__("Your blog's title color (Default value is 0D85CC).","mantra")."</small></div>";
+}
+
+//TEXT - Name: ma_options[descriptioncolor]
+function cryout_setting_descriptioncolor_fn() {
+ global $mantra_options;
+ echo '<input type="text" id="mantra_descriptioncolor" name="ma_options[mantra_descriptioncolor]" value="'.esc_attr( $mantra_options['mantra_descriptioncolor'] ).'" />';
+ echo '<div id="mantra_descriptioncolor2"></div>';
+ echo "<div><small>".__("Your blog's description color(Default value is 222222).","mantra")."</small></div>";
+}
+
+//TEXT - Name: ma_options[contentcolor]
+function cryout_setting_contentcolor_fn() {
+ global $mantra_options;
+ echo '<input type="text" id="mantra_contentcolor" name="ma_options[mantra_contentcolor]" value="'.esc_attr( $mantra_options['mantra_contentcolor'] ).'" />';
+ echo '<div id="mantra_contentcolor2"></div>';
+ echo "<div><small>".__("Content Text Color (Default value is 333333).","mantra")."</small></div>";
+}
+
+//TEXT - Name: ma_options[linkscolor]
+function cryout_setting_linkscolor_fn() {
+ global $mantra_options;
+ echo '<input type="text" id="mantra_linkscolor" name="ma_options[mantra_linkscolor]" value="'.esc_attr( $mantra_options['mantra_linkscolor'] ).'" />';
+ echo '<div id="mantra_linkscolor2"></div>';
+ echo "<div><small>".__("Links color (Default value is 0D85CC).","mantra")."</small></div>";
+}
+
+//TEXT - Name: ma_options[hovercolor]
+function cryout_setting_hovercolor_fn() {
+ global $mantra_options;
+ echo '<input type="text" id="mantra_hovercolor" name="ma_options[mantra_hovercolor]" value="'.esc_attr( $mantra_options['mantra_hovercolor'] ).'" />';
+ echo '<div id="mantra_hovercolor2"></div>';
+ echo "<div><small>".__("Links color on mouse over (Default value is 333333).","mantra")."</small></div>";
+}
+
+//TEXT - Name: ma_options[headtextcolor]
+function cryout_setting_headtextcolor_fn() {
+ global $mantra_options;
+ echo '<input type="text" id="mantra_headtextcolor" name="ma_options[mantra_headtextcolor]" value="'.esc_attr( $mantra_options['mantra_headtextcolor'] ).'" />';
+ echo '<div id="mantra_headtextcolor2"></div>';
+ echo "<div><small>".__("Post Header Text Color (Default value is 333333).","mantra")."</small></div>";
+}
+
+//TEXT - Name: ma_options[headtexthover]
+function cryout_setting_headtexthover_fn() {
+ global $mantra_options;
+ echo '<input type="text" id="mantra_headtexthover" name="ma_options[mantra_headtexthover]" value="'.esc_attr( $mantra_options['mantra_headtexthover'] ).'" />';
+ echo '<div id="mantra_headtexthover2"></div>';
+ echo "<div><small>".__("Post Header Text Color on Mouse over (Default value is 000000).","mantra")."</small></div>";
+}
+
+//TEXT - Name: ma_options[sideheadbackcolor]
+function cryout_setting_sideheadbackcolor_fn() {
+ global $mantra_options;
+ echo '<input type="text" id="mantra_sideheadbackcolor" name="ma_options[mantra_sideheadbackcolor]" value="'.esc_attr( $mantra_options['mantra_sideheadbackcolor'] ).'" />';
+ echo '<div id="mantra_sideheadbackcolor2"></div>';
+ echo "<div><small>".__("Sidebar Header Background color (Default value is 444444).","mantra")."</small></div>";
+
+}
+
+//TEXT - Name: ma_options[sideheadtextcolor]
+function cryout_setting_sideheadtextcolor_fn() {
+ global $mantra_options;
+ echo '<input type="text" id="mantra_sideheadtextcolor" name="ma_options[mantra_sideheadtextcolor]" value="'.esc_attr( $mantra_options['mantra_sideheadtextcolor'] ).'" />';
+ echo '<div id="mantra_sideheadtextcolor2"></div>';
+ echo "<div><small>".__("Sidebar Header Text Color(Default value is 2EA5FD).","mantra")."</small></div>";
+}
+
+//TEXT - Name: ma_options[footerheader]
+function cryout_setting_footerheader_fn() {
+ global $mantra_options;
+ echo '<input type="text" id="mantra_footerheader" name="ma_options[mantra_footerheader]" value="'.esc_attr( $mantra_options['mantra_footerheader'] ).'" />';
+ echo '<div id="mantra_footerheader2"></div>';
+ echo "<div><small>".__("Footer Widget Text Color (Default value is 0D85CC).","mantra")."</small></div>";
+}
+
+//TEXT - Name: ma_options[footertext]
+function cryout_setting_footertext_fn() {
+ global $mantra_options;
+ echo '<input type="text" id="mantra_footertext" name="ma_options[mantra_footertext]" value="'.esc_attr( $mantra_options['mantra_footertext'] ).'" />';
+ echo '<div id="mantra_footertext2"></div>';
+ echo "<div><small>".__("Footer Widget Link Color (Default value is 666666).","mantra")."</small></div>";
+}
+
+//TEXT - Name: ma_options[footerhover]
+function cryout_setting_footerhover_fn() {
+ global $mantra_options;
+ echo '<input type="text" id="mantra_footerhover" name="ma_options[mantra_footerhover]" value="'.esc_attr( $mantra_options['mantra_footerhover'] ).'" />';
+ echo '<div id="mantra_footerhover2"></div>';
+ echo "<div><small>".__("Footer Widget Link Color on Mouse Over (Default value is 888888).","mantra")."</small></div>";
+}
+
+
+////////////////////////////////
+//// GRAPHICS SETTINGS /////////
+////////////////////////////////
+
+
+
+//CHECKBOX - Name: ma_options[breadcrumbs]
+function cryout_setting_breadcrumbs_fn() {
+ global $mantra_options;
+ $items = array ("Enable" , "Disable");
+ $itemsare = array( __("Enable","mantra"), __("Disable","mantra"));
+ echo "<select id='mantra_breadcrumbs' name='ma_options[mantra_breadcrumbs]'>";
+foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_breadcrumbs'],$item);
+ echo ">$itemsare[$id]</option>";
+}
+ echo "</select>";
+ echo "<div><small>".__("Show breadcrumbs at the top of the content area. Breadcrumbs are a form of navigation that keeps track of your location withtin the site.","mantra")."</small></div>";
+}
+
+//CHECKBOX - Name: ma_options[pagination]
+function cryout_setting_pagination_fn() {
+ global $mantra_options;
+ $items = array ("Enable" , "Disable");
+ $itemsare = array( __("Enable","mantra"), __("Disable","mantra"));
+ echo "<select id='mantra_pagination' name='ma_options[mantra_pagination]'>";
+foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_pagination'],$item);
+ echo ">$itemsare[$id]</option>";
+}
+ echo "</select>";
+ echo "<div><small>".__("Show numbered pagination. Where there is more than one page, instead of the bottom <b>Older Posts</b> and <b>Newer posts</b> links you have a numbered pagination. ","mantra")."</small></div>";
+}
+
+function cryout_setting_menualign_fn() {
+ global $mantra_options;
+ $items = array ("left", "center", "right");
+ $itemsare = array( __("Left","mantra"), __("Center","mantra"), __("Right","mantra"));
+ echo "<select id='mantra_menualign' name='ma_options[mantra_menualign]'>";
+foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_menualign'],$item);
+ echo ">$itemsare[$id]</option>";
+}
+ echo "</select>";
+ echo "<div><small>".__("Select the desired main menu items alignment. Center option is only valid for single line menus.","mantra")."</small></div>";
+}
+
+//SELECT - Name: ma_options[caption]
+function cryout_setting_caption_fn() {
+global $mantra_options;
+ $items = array ("White" , "Light" , "Light Gray" , "Gray" , "Dark Gray" , "Black");
+ $itemsare = array( __("White","mantra"), __("Light","mantra"), __("Light Gray","mantra"), __("Gray","mantra"), __("Dark Gray","mantra"), __("Black","mantra"));
+ echo "<select id='mantra_caption' name='ma_options[mantra_caption]'>";
+foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_caption'],$item);
+ echo ">$itemsare[$id]</option>";
+}
+ echo "</select>";
+ echo "<div><small>".__("This setting changes the look of your captions. Images that are not inserted through captions will not be affected.","mantra")."</small></div>";
+}
+
+// RADIO-BUTTON - Name: ma_options[image]
+function cryout_setting_image_fn() {
+ global $mantra_options;
+ $items = array("None", "One", "Two", "Three" , "Four", "Five", "Six", "Seven");
+ foreach($items as $item) {
+
+ $checkedClass = ($mantra_options['mantra_image']==$item) ? ' checkedClass' : '';
+
+ echo " <label id='$item' for='$item$item' class='images $checkedClass'><input ";
+ checked($mantra_options['mantra_image'],$item);
+ echo "value='$item' id='$item$item' onClick=\"changeBorder('$item','images');\" name='ma_options[mantra_image]' type='radio' /><img id='image$item' src='".get_template_directory_uri()."/admin/images/testimg.png'/></label>";
+ }
+
+ echo "<div><small>".__("The border around your inserted images. ","mantra")."</small></div>";
+}
+
+// RADIO-BUTTON - Name: ma_options[pin]
+function cryout_setting_pin_fn() {
+global $mantra_options;
+ $items = array("mantra_dot", "Pin1", "Pin2", "Pin3" , "Pin4", "Pin5");
+ foreach($items as $item) {
+ $none='';
+ if ($item == 'mantra_dot') { $none='None'; }
+ $checkedClass = ($mantra_options['mantra_pin']==$item) ? ' checkedClass' : '';
+ echo "<label id='$item' class='pins $checkedClass'><input ";
+ checked($mantra_options['mantra_pin'],$item);
+ echo " value='$item' onClick=\"changeBorder('$item','pins');\" name='ma_options[mantra_pin]' type='radio' />$none<img style='margin-left:10px;margin-right:10px;' src='".get_template_directory_uri()."/images/pins/".$item.".png'/></label>";
+ }
+ echo "<div><small>".__("The image on top of your captions. ","mantra")."</small></div>";
+}
+
+// RADIO-BUTTON - Name: ma_options[sidebullet]
+function cryout_setting_sidebullet_fn() {
+ global $mantra_options;
+ $items = array("mantra_dot2", "arrow_black", "arrow_white", "bullet_dark" , "bullet_gray", "bullet_light", "square_dark", "square_white", "triangle_dark" , "triangle_gray", "triangle_white");
+ foreach($items as $item) {
+ $none='';
+ if ($item == 'mantra_dot2') { $none='None'; }
+ $checkedClass = ($mantra_options['mantra_sidebullet']==$item) ? ' checkedClass' : '';
+ echo "<label id='$item' class='sidebullets $checkedClass'><input ";
+ checked($mantra_options['mantra_sidebullet'],$item);
+ echo " value='$item' onClick=\"changeBorder('$item','sidebullets');\" name='ma_options[mantra_sidebullet]' type='radio' />$none<img style='margin-left:10px;margin-right:10px;' src='".get_template_directory_uri()."/images/bullets/".$item.".png'/></label>";
+ }
+ echo "<div><small>".__("The sidebar list bullets. ","mantra")."</small></div>";
+}
+
+
+
+//CHECKBOX - Name: ma_options[metaback]
+function cryout_setting_metaback_fn() {
+ global $mantra_options;
+ $items = array ("Gray" , "White", "None");
+ $itemsare = array( __("Gray","mantra"), __("White","mantra"), __("None","mantra"));
+ echo "<select id='mantra_metaback' name='ma_options[mantra_metaback]'>";
+foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_metaback'],$item);
+ echo ">$itemsare[$id]</option>";
+}
+ echo "</select>";
+ echo "<div><small>".__("The background for your post-metas area (under your post tiltes). Gray by default.","mantra")."</small></div>";
+
+}
+
+//CHECKBOX - Name: ma_options[postseparator]
+function cryout_setting_postseparator_fn() {
+ global $mantra_options;
+ $items = array ("Show" , "Hide");
+ $itemsare = array( __("Show","mantra"), __("Hide","mantra"));
+ echo "<select id='mantra_postseparator' name='ma_options[mantra_postseparator]'>";
+foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_postseparator'],$item);
+ echo ">$itemsare[$id]</option>";
+}
+ echo "</select>";
+ echo "<div><small>".__("Hide or show a horizontal rule to separate posts.","mantra")."</small></div>";
+
+}
+
+//CHECKBOX - Name: ma_options[contentlist]
+function cryout_setting_contentlist_fn() {
+ global $mantra_options;
+ $items = array ("Show" , "Hide");
+ $itemsare = array( __("Show","mantra"), __("Hide","mantra"));
+ echo "<select id='mantra_contentlist' name='ma_options[mantra_contentlist]'>";
+foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_contentlist'],$item);
+ echo ">$itemsare[$id]</option>";
+}
+ echo "</select>";
+ echo "<div><small>".__("Hide or show bullets next to lists that are in your content area (posts, pages etc.).","mantra")."</small></div>";
+
+}
+
+
+//CHECKBOX - Name: ma_options[pagetitle]
+function cryout_setting_pagetitle_fn() {
+ global $mantra_options;
+ $items = array ("Show" , "Hide");
+ $itemsare = array( __("Show","mantra"), __("Hide","mantra"));
+ echo "<select id='mantra_pagetitle' name='ma_options[mantra_pagetitle]'>";
+foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_pagetitle'],$item);
+ echo ">$itemsare[$id]</option>";
+}
+ echo "</select>";
+ echo "<div><small>".__("Hide or show Page titles on any <i>created</i> pages. ","mantra")."</small></div>";
+}
+
+//CHECKBOX - Name: ma_options[categtitle]
+function cryout_setting_categtitle_fn() {
+ global $mantra_options;
+ $items = array ("Show" , "Hide");
+ $itemsare = array( __("Show","mantra"), __("Hide","mantra"));
+ echo "<select id='mantra_categtitle' name='ma_options[mantra_categtitle]'>";
+foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_categtitle'],$item);
+ echo ">$itemsare[$id]</option>";
+}
+ echo "</select>";
+ echo "<div><small>".__("Hide or show Page titles on <i>Category</i> Pages. ","mantra")."</small></div>";
+}
+
+//CHECKBOX - Name: ma_options[tables]
+function cryout_setting_tables_fn() {
+ global $mantra_options;
+ $items = array ("Enable" , "Disable");
+ $itemsare = array( __("Enable","mantra"), __("Disable","mantra"));
+ echo "<select id='mantra_tables' name='ma_options[mantra_tables]'>";
+foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_tables'],$item);
+ echo ">$itemsare[$id]</option>";
+}
+ echo "</select>";
+ echo "<div><small>".__("Hide table borders and background color.","mantra")."</small></div>";
+}
+
+//CHECKBOX - Name: ma_options[comtext]
+function cryout_setting_comtext_fn() {
+ global $mantra_options;
+ $items = array ("Show" , "Hide");
+ $itemsare = array( __("Show","mantra"), __("Hide","mantra"));
+ echo "<select id='mantra_comtext' name='ma_options[mantra_comtext]'>";
+foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_comtext'],$item);
+ echo ">$itemsare[$id]</option>";
+}
+ echo "</select>";
+ echo "<div><small>".__("Hide the explanatory text under the comments form. (starts with <i>You may use these HTML tags and attributes:...</i>).","mantra")."</small></div>";
+}
+
+//CHECKBOX - Name: ma_options[comclosed]
+function cryout_setting_comclosed_fn() {
+ global $mantra_options;
+ $items = array ("Show" , "Hide in posts", "Hide in pages", "Hide everywhere");
+ $itemsare = array( __("Show","mantra"), __("Hide in posts","mantra"), __("Hide in pages","mantra"), __("Hide everywhere","mantra"));
+ echo "<select id='mantra_comclosed' name='ma_options[mantra_comclosed]'>";
+foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_comclosed'],$item);
+ echo ">$itemsare[$id]</option>";
+}
+ echo "</select>";
+ echo "<div><small>".__("Hide the <b>Comments are closed</b> text that by default shows up on pages or posts with the comments disabled.","mantra")."</small></div>";
+}
+
+
+//CHECKBOX - Name: ma_options[comoff]
+function cryout_setting_comoff_fn() {
+ global $mantra_options;
+ $items = array ("Show" , "Hide");
+ $itemsare = array( __("Show","mantra"), __("Hide","mantra"));
+ echo "<select id='mantra_comoff' name='ma_options[mantra_comoff]'>";
+foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_comoff'],$item);
+ echo ">$itemsare[$id]</option>";
+}
+ echo "</select>";
+ echo "<div><small>".__("Hide the <b>Comments off</b> text next to posts that have comments disabled.","mantra")."</small></div>";
+}
+
+
+//CHECKBOX - Name: ma_options[backtop]
+function cryout_setting_backtop_fn() {
+ global $mantra_options;
+ $items = array ("Enable" , "Disable");
+ $itemsare = array( __("Enable","mantra"), __("Disable","mantra"));
+ echo "<select id='mantra_backtop' name='ma_options[mantra_backtop]'>";
+foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_backtop'],$item);
+ echo ">$itemsare[$id]</option>";
+}
+ echo "</select>";
+ echo "<div><small>".__("Enable the Back to Top button. The button appears after scrolling the page down.","mantra")."</small></div>";
+}
+
+
+////////////////////////////////
+//// POST SETTINGS /////////////
+////////////////////////////////
+
+//CHECKBOX - Name: ma_options[postdate]
+function cryout_setting_postcomlink_fn() {
+ global $mantra_options;
+ $items = array ("Show" , "Hide");
+ $itemsare = array( __("Show","mantra"), __("Hide","mantra"));
+ echo "<select id='mantra_postcomlink' name='ma_options[mantra_postcomlink]'>";
+foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_postcomlink'],$item);
+ echo ">$itemsare[$id]</option>";
+}
+ echo "</select>";
+ echo "<div><small>".__("Hide or show the <strong>Leave a comment</strong> or <strong>x Comments</strong> next to posts or post excerpts.","mantra")."</small></div>";
+}
+
+//CHECKBOX - Name: ma_options[postdate]
+function cryout_setting_postdate_fn() {
+ global $mantra_options;
+ $items = array ("Show" , "Hide");
+ $itemsare = array( __("Show","mantra"), __("Hide","mantra"));
+ echo "<select id='mantra_postdate' name='ma_options[mantra_postdate]'>";
+foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_postdate'],$item);
+ echo ">$itemsare[$id]</option>";
+}
+ echo "</select>";
+ echo "<div><small>".__("Hide or show the post date.","mantra")."</small></div>";
+}
+
+//CHECKBOX - Name: ma_options[posttime]
+function cryout_setting_posttime_fn() {
+ global $mantra_options;
+ $items = array ("Show" , "Hide");
+ $itemsare = array( __("Show","mantra"), __("Hide","mantra"));
+ echo "<select id='mantra_posttime' name='ma_options[mantra_posttime]'>";
+foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_posttime'],$item);
+ echo ">$itemsare[$id]</option>";
+}
+ echo "</select>";
+ echo "<div><small>".__("Show the post time with the date. Time will not be visible if the Post Date is hidden.","mantra")."</small></div>";
+}
+
+//CHECKBOX - Name: ma_options[postauthor]
+function cryout_setting_postauthor_fn() {
+ global $mantra_options;
+ $items = array ("Show" , "Hide");
+ $itemsare = array( __("Show","mantra"), __("Hide","mantra"));
+ echo "<select id='mantra_postauthor' name='ma_options[mantra_postauthor]'>";
+foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_postauthor'],$item);
+ echo ">$itemsare[$id]</option>";
+}
+ echo "</select>";
+ echo "<div><small>".__("Hide or show the post author.","mantra")."</small></div>";
+}
+
+//CHECKBOX - Name: ma_options[postcateg]
+function cryout_setting_postcateg_fn() {
+ global $mantra_options;
+ $items = array ("Show" , "Hide");
+ $itemsare = array( __("Show","mantra"), __("Hide","mantra"));
+ echo "<select id='mantra_postcateg' name='ma_options[mantra_postcateg]'>";
+foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_postcateg'],$item);
+ echo ">$itemsare[$id]</option>";
+}
+ echo "</select>";
+ echo "<div><small>".__("Hide the post category.","mantra")."</small></div>";
+}
+
+//CHECKBOX - Name: ma_options[postbook]
+function cryout_setting_postbook_fn() {
+ global $mantra_options;
+ $items = array ("Show" , "Hide");
+ $itemsare = array( __("Show","mantra"), __("Hide","mantra"));
+ echo "<select id='mantra_postbook' name='ma_options[mantra_postbook]'>";
+foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_postbook'],$item);
+ echo ">$itemsare[$id]</option>";
+}
+ echo "</select>";
+ echo "<div><small>".__("Hide the 'Bookmark permalink'.","mantra")."</small></div>";
+}
+
+//CHECKBOX - Name: ma_options[postmetas]
+function cryout_setting_postmetas_fn() {
+ global $mantra_options;
+ $items = array ("Show" , "Hide");
+ $itemsare = array( __("Show","mantra"), __("Hide","mantra"));
+ echo "<select id='mantra_postmetas' name='ma_options[mantra_postmetas]'>";
+foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_postmetas'],$item);
+ echo ">$itemsare[$id]</option>";
+}
+ echo "</select>";
+ echo "<div><small>".__("Hide the meta bar. All meta info in it will be hidden.","mantra")."</small></div>";
+}
+
+//CHECKBOX - Name: ma_options[posttag]
+function cryout_setting_posttag_fn() {
+ global $mantra_options;
+ $items = array ("Show" , "Hide");
+ $itemsare = array( __("Show","mantra"), __("Hide","mantra"));
+ echo "<select id='mantra_posttag' name='ma_options[mantra_posttag]'>";
+foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_posttag'],$item);
+ echo ">$itemsare[$id]</option>";
+}
+ echo "</select>";
+ echo "<div><small>".__("Hide the post tags.","mantra")."</small></div>";
+}
+
+
+////////////////////////////////
+//// EXCERPT SETTINGS /////////////
+////////////////////////////////
+
+
+//CHECKBOX - Name: ma_options[excerpthome]
+function cryout_setting_excerpthome_fn() {
+ global $mantra_options;
+ $items = array ("Excerpt" , "Full Post");
+ $itemsare = array( __("Excerpt","mantra"), __("Full Post","mantra"));
+ echo "<select id='mantra_excerpthome' name='ma_options[mantra_excerpthome]'>";
+foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_excerpthome'],$item);
+ echo ">$itemsare[$id]</option>";
+}
+ echo "</select>";
+ echo "<div><small>".__("Excerpts on the main page. Only standard posts will be affected. All other post formats (aside, image, chat, quote etc.) have their specific formating.","mantra")."</small></div>";
+}
+
+//CHECKBOX - Name: ma_options[excerptsticky]
+function cryout_setting_excerptsticky_fn() {
+ global $mantra_options;
+ $items = array ("Excerpt" , "Full Post");
+ $itemsare = array( __("Excerpt","mantra"), __("Full Post","mantra"));
+ echo "<select id='mantra_excerptsticky' name='ma_options[mantra_excerptsticky]'>";
+foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_excerptsticky'],$item);
+ echo ">$itemsare[$id]</option>";
+}
+ echo "</select>";
+ echo "<div><small>".__("Choose if you want the sticky posts on your home page to be visible in full or just the excerpts. ","mantra")."</small></div>";
+}
+
+
+//CHECKBOX - Name: ma_options[excerptarchive]
+function cryout_setting_excerptarchive_fn() {
+ global $mantra_options;
+ $items = array ("Excerpt" , "Full Post");
+ $itemsare = array( __("Excerpt","mantra"), __("Full Post","mantra"));
+ echo "<select id='mantra_excerptarchive' name='ma_options[mantra_excerptarchive]'>";
+foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_excerptarchive'],$item);
+ echo ">$itemsare[$id]</option>";
+}
+ echo "</select>";
+ echo "<div><small>".__("Excerpts on archive, categroy and search pages. Same as above, only standard posts will be affected.","mantra")."</small></div>";
+}
+
+
+// TEXTBOX - Name: ma_options[excerptwords]
+function cryout_setting_excerptwords_fn() {
+ global $mantra_options;
+ echo "<input id='mantra_excerptwords' name='ma_options[mantra_excerptwords]' size='6' type='text' value='".esc_attr( $mantra_options['mantra_excerptwords'] )."' />";
+ echo "<div><small>".__("The number of words an excerpt will have. When that number is reached the post will be interrupted by a <i>Continue reading</i> link that
+ will take the reader to the full post page.","mantra")."</small></div>";
+}
+
+//CHECKBOX - Name: ma_options[magazinelayout]
+function cryout_setting_magazinelayout_fn() {
+ global $mantra_options;
+ $items = array ("Enable" , "Disable");
+ $itemsare = array( __("Enable","mantra"), __("Disable","mantra"));
+ echo "<select id='mantra_magazinelayout' name='ma_options[mantra_magazinelayout]'>";
+foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_magazinelayout'],$item);
+ echo ">$itemsare[$id]</option>";
+}
+ echo "</select>";
+ echo "<div><small>".__("Enable the Magazine Layout. This layout applies to pages with posts and shows 2 posts per row.","mantra")."</small></div>";
+}
+
+// TEXTBOX - Name: ma_options[excerptdots]
+function cryout_setting_excerptdots_fn() {
+ global $mantra_options;
+ echo "<input id='mantra_excerptdots' name='ma_options[mantra_excerptdots]' size='40' type='text' value='".esc_attr( $mantra_options['mantra_excerptdots'] )."' />";
+ echo "<div><small>".__("Replaces the three dots ('[...])' that are appended automatically to excerpts.","mantra")."</small></div>";
+}
+
+// TEXTBOX - Name: ma_options[excerptcont]
+function cryout_setting_excerptcont_fn() {
+ global $mantra_options;
+ echo "<input id='mantra_excerptcont' name='ma_options[mantra_excerptcont]' size='40' type='text' value='".esc_attr( $mantra_options['mantra_excerptcont'] )."' />";
+ echo "<div><small>".__("Edit the 'Continue Reading' link added to your post excerpts.","mantra")."</small></div>";
+}
+
+//CHECKBOX - Name: ma_options[excerpttags]
+function cryout_setting_excerpttags_fn() {
+ global $mantra_options;
+ $items = array ("Enable" , "Disable");
+ $itemsare = array( __("Enable","mantra"), __("Disable","mantra"));
+ echo "<select id='mantra_excerpttags' name='ma_options[mantra_excerpttags]'>";
+foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_excerpttags'],$item);
+ echo ">$itemsare[$id]</option>";
+}
+ echo "</select>";
+ echo "<div><small>".__("By default WordPress excerpts remove all HTML tags (".htmlspecialchars('<pre>, <a>, <b>')." and all others) and only clean text is left in the excerpt.
+Enabling this option allows HTML tags to remain in excerpts so all your default formating will be kept.<br /> <b>Just a warning: </b>If HTML tags are enabled, you have to make sure
+they are not left open. So if within your post you have an opened HTML tag but the except ends before that tag closes, the rest of the site will be contained in that HTML tag. -- Leave 'Disable' if unsure -- ","mantra")."</small></div>";
+}
+
+
+////////////////////////////////
+/// FEATURED IMAGE SETTINGS ////
+////////////////////////////////
+
+
+//CHECKBOX - Name: ma_options[fpost]
+function cryout_setting_fpost_fn() {
+ global $mantra_options;
+ $items = array ("Enable" , "Disable");
+ $itemsare = array( __("Enable","mantra"), __("Disable","mantra"));
+ echo "<select id='mantra_fpost' name='ma_options[mantra_fpost]'>";
+foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_fpost'],$item);
+ echo ">$itemsare[$id]</option>";
+}
+ echo "</select>";
+ $checkedClass = ($mantra_options['mantra_fpostlink']=='1') ? ' checkedClass' : '';
+
+
+ echo " <label style='border:none;margin-left:10px;' id='$items[0]' for='$items[0]$items[0]' class='socialsdisplay $checkedClass'><input type='hidden' name='ma_options[mantra_fpostlink]' value='0' /><input ";
+ checked($mantra_options['mantra_fpostlink'],'1');
+ echo "value='1' id='$items[0]$items[0]' name='ma_options[mantra_fpostlink]' type='checkbox' /> Link the thumbail to the post </label>";
+
+
+ echo "<div><small>".__("Show featured images as thumbnails on posts. The images must be selected for each post in the Featured Image section.","mantra")."</small></div>";
+}
+
+//CHECKBOX - Name: ma_options[fauto]
+function cryout_setting_fauto_fn() {
+ global $mantra_options;
+ $items = array ("Enable" , "Disable");
+ $itemsare = array( __("Enable","mantra"), __("Disable","mantra"));
+ echo "<select id='mantra_fauto' name='ma_options[mantra_fauto]'>";
+foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_fauto'],$item);
+ echo ">$itemsare[$id]</option>";
+}
+ echo "</select>";
+ echo "<div><small>".__("Show the first image that you inserted in a post as a thumbnail. If you enable this option, the first image in your post will be used even if you selected a Featured Image in you post.","mantra")."</small></div>";
+}
+
+
+//CHECKBOX - Name: ma_options[falign]
+function cryout_setting_falign_fn() {
+ global $mantra_options;
+ $items = array ("Left" , "Center", "Right");
+ $itemsare = array( __("Left","mantra"), __("Center","mantra"), __("Right","mantra"));
+ echo "<select id='mantra_falign' name='ma_options[mantra_falign]'>";
+foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_falign'],$item);
+ echo ">$itemsare[$id]</option>";
+}
+ echo "</select>";
+ echo "<div><small>".__("Thumbnail alignment.","mantra")."</small></div>";
+}
+
+
+// TEXTBOX - Name: ma_options[fwidth]
+function cryout_setting_fsize_fn() {
+ global $mantra_options;
+ echo "<input id='mantra_fwidth' name='ma_options[mantra_fwidth]' size='4' type='text' value='".esc_attr( $mantra_options['mantra_fwidth'] )."' />px (width) <b>X</b> ";
+ echo "<input id='mantra_fheight' name='ma_options[mantra_fheight]' size='4' type='text' value='".esc_attr( $mantra_options['mantra_fheight'] )."' />px (height)";
+
+ $checkedClass = ($mantra_options['mantra_fcrop']=='1') ? ' checkedClass' : '';
+
+ echo " <label id='fcrop' for='mantra_fcrop' class='socialsdisplay $checkedClass'><input ";
+ checked($mantra_options['mantra_fcrop'],'1');
+ echo "value='1' id='mantra_fcrop' name='ma_options[mantra_fcrop]' type='checkbox' /> Crop images to exact size. </label>";
+
+
+ echo "<div><small>".__("The size you want the thumbnails to have (in pixels). By default imges will be scaled with aspect ratio kept. Choose to crop the images if you want the exact size.","mantra")."</small></div>";
+}
+
+
+//CHECKBOX - Name: ma_options[fheader]
+function cryout_setting_fheader_fn() {
+ global $mantra_options;
+ $items = array ("Enable" , "Disable");
+ $itemsare = array( __("Enable","mantra"), __("Disable","mantra"));
+ echo "<select id='mantra_fheader' name='ma_options[mantra_fheader]'>";
+foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_fheader'],$item);
+ echo ">$itemsare[$id]</option>";
+}
+ echo "</select>";
+ echo "<div><small>".__("Show featured images on headers. The header will be replaced with a featured image if you selected it as a Featured Image in the post and
+ and if it is bigger or at least equal to the current header size.","mantra")."</small></div>";
+}
+
+
+////////////////////////
+/// SOCIAL SETTINGS ////
+////////////////////////
+
+// TEXTBOX - Name: ma_options[social1]
+
+
+
+function cryout_setting_social_master($i) {
+ $cryout_special_keys = array('Mail', 'Skype');
+ $cryout_social_small = array (
+ '',__('Select your desired Social network from the left dropdown menu and insert your corresponding address in the right input field. (ex: <i>http://www.facebook.com/yourname</i> )','mantra'),
+ '',__("You can insert up to 5 different social sites and addresses.",'mantra'),
+ '',__("There are a total of 27 social networks to choose from. ",'mantra'),
+ '',__("You can leave any number of inputs empty. " ,'mantra'),
+ '',__("You can choose the same social media any number of times. ",'mantra')
+ );
+ $j=$i+1;
+ global $mantra_options, $socialNetworks;
+ echo "<select id='mantra_social$i' name='ma_options[mantra_social$i]'>";
+ foreach($socialNetworks as $item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_social'.$i],$item);
+ echo ">$item</option>";
+ }
+ echo "</select><span class='address_span'> » </span>";
+
+ if (in_array($mantra_options['mantra_social'.$i],$cryout_special_keys)) :
+ $cryout_current_social = esc_html( $mantra_options['mantra_social'.$j] );
+ else :
+ $cryout_current_social = esc_url( $mantra_options['mantra_social'.$j] );
+ endif;
+
+ echo "<input id='mantra_social$j' name='ma_options[mantra_social$j]' size='32' type='text' value='$cryout_current_social' />";
+ echo "<div><small>".$cryout_social_small[$i]."</small></div>";
+}
+
+
+
+function cryout_setting_socials1_fn() {
+ cryout_setting_social_master(1);
+}
+
+function cryout_setting_socials2_fn() {
+ cryout_setting_social_master(3);
+}
+
+// TEXTBOX - Name: ma_options[social3]
+function cryout_setting_socials3_fn() {
+cryout_setting_social_master(5);
+}
+
+// TEXTBOX - Name: ma_options[social4]
+function cryout_setting_socials4_fn() {
+cryout_setting_social_master(7);
+}
+
+// TEXTBOX - Name: ma_options[social5]
+function cryout_setting_socials5_fn() {
+cryout_setting_social_master(9);
+}
+
+// TEXTBOX - Name: ma_options[socialsdisplay]
+function cryout_setting_socialsdisplay_fn() {
+global $mantra_options;
+ $items = array( "Header", "CLeft", "CRight" , "Footer");
+
+ $checkedClass0 = ($mantra_options['mantra_socialsdisplay0']=='1') ? ' checkedClass0' : '';
+ $checkedClass1 = ($mantra_options['mantra_socialsdisplay1']=='1') ? ' checkedClass1' : '';
+ $checkedClass2 = ($mantra_options['mantra_socialsdisplay2']=='1') ? ' checkedClass2' : '';
+ $checkedClass3 = ($mantra_options['mantra_socialsdisplay3']=='1') ? ' checkedClass3' : '';
+
+ echo " <label id='$items[0]' for='$items[0]$items[0]' class='socialsdisplay $checkedClass0'><input ";
+ checked($mantra_options['mantra_socialsdisplay0'],'1');
+ echo "value='1' id='$items[0]$items[0]' name='ma_options[mantra_socialsdisplay0]' type='checkbox' /> Top right corner of header </label>";
+
+ echo " <label id='$items[1]' for='$items[1]$items[1]' class='socialsdisplay $checkedClass1'><input ";
+ checked($mantra_options['mantra_socialsdisplay1'],'1');
+ echo "value='1' id='$items[1]$items[1]' name='ma_options[mantra_socialsdisplay1]' type='checkbox' /> Under menu - left side </label>";
+
+ echo " <label id='$items[2]' for='$items[2]$items[2]' class='socialsdisplay $checkedClass2'><input ";
+ checked($mantra_options['mantra_socialsdisplay2'],'1');
+ echo "value='1' id='$items[2]$items[2]' name='ma_options[mantra_socialsdisplay2]' type='checkbox' /> Under menu - right side </label>";
+
+ echo " <label id='$items[3]' for='$items[3]$items[3]' class='socialsdisplay $checkedClass3'><input ";
+ checked($mantra_options['mantra_socialsdisplay3'],'1');
+ echo "value='1' id='$items[3]$items[3]' name='ma_options[mantra_socialsdisplay3]' type='checkbox' /> In the footer (smaller icons) </label>";
+
+
+
+ echo "<div><p><small>".__("Choose the <b>areas</b> where to display the social icons.","mantra")."</small></p></div>";
+}
+
+
+////////////////////////
+/// MISC SETTINGS ////
+////////////////////////
+
+
+// TEXTBOX - Name: ma_options[copyright]
+function cryout_setting_copyright_fn() {
+ global $mantra_options;
+ echo "<textarea id='mantra_copyright' name='ma_options[mantra_copyright]' rows='3' cols='70' type='textarea' >".esc_textarea($mantra_options['mantra_copyright'])." </textarea>";
+ echo "<div><small>".__("Insert custom text or HTML code that will appear last in you footer. <br /> You can use HTML to insert links, images and special characters like © .","mantra")."</small></div>";
+}
+
+
+// TEXTBOX - Name: ma_options[customcss]
+function cryout_setting_customcss_fn() {
+ global $mantra_options;
+ echo "<textarea id='mantra_customcss' name='ma_options[mantra_customcss]' rows='8' cols='70' type='textarea' >".esc_textarea(htmlspecialchars_decode($mantra_options['mantra_customcss'], ENT_QUOTES))." </textarea>";
+ echo "<div><small>".__("Insert your custom CSS here. Any CSS declarations made here will overwrite Mantra's (even the custom options specified right here in the Mantra Settings page). <br> Your custom CSS will be preserved when updating the theme.<br> The <style> tags are not needed.","mantra")."</small></div>";
+}
+
+// TEXTBOX - Name: ma_options[customjs]
+function cryout_setting_customjs_fn() {
+ global $mantra_options;
+ echo "<textarea id='mantra_customjs' name='ma_options[mantra_customjs]' rows='8' cols='70' type='textarea' >".esc_textarea(htmlspecialchars_decode($mantra_options['mantra_customjs'], ENT_QUOTES))." </textarea>";
+ echo "<div><small>".__("Insert your custom Javascript code here. (Google Analytics and any other forms of Analytic software).<br> The <script> tags are not needed.","mantra")."</small></div>";
+}
+function cryout_setting_seo_fn() {
+ global $mantra_options;
+ $items = array ("Enable" , "Disable");
+ $itemsare = array( __("Enable","mantra"), __("Disable","mantra"));
+ echo "<select id='mantra_seo' name='ma_options[mantra_seo]'>";
+foreach($items as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_seo'],$item);
+ echo ">$itemsare[$id]</option>";
+}
+ echo "</select>";
+ echo "<div><small>".__("Enable Mantra's Search Engine Optimization. This is enabled by default and should only be disabled if you are using a SEO plugin.","mantra")."</small></div>";
+ echo "<br><small> All title tags are handled automatically by Mantra. </small>";
+
+ echo "<div class='slmini'>";
+ echo "<b> Homepage Meta Description </b>";
+ echo "<textarea id='mantra_seo_home_desc' name='ma_options[mantra_seo_home_desc]' rows='2' cols=50' type='textarea' >{$mantra_options['mantra_seo_home_desc']} </textarea>";
+ echo "<small> This is unique and you should fill this in. Describe your site the best you can and try not to go over 160 characters. </small>";
+ echo "</div>";
+
+ echo "<div class='slmini'>";
+ echo "<b> Meta Descriptions for all other pages: </b>";
+ $moreitems = array ("Auto" , "Manual");
+ $moreitemsare = array( __("Auto","mantra"), __("Manual","mantra"));
+ echo "<select id='mantra_seo_gen_desc' name='ma_options[mantra_seo_gen_desc]'>";
+ foreach($moreitems as $id=>$item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_seo_gen_desc'],$item);
+ echo ">$moreitemsare[$id]</option>";
+ }
+ echo "</select>";
+ echo "<small> <u>Auto</u> - Mantra will automatically add post expcerpts to 'page' and 'post' meta descriptions.<br>
+ <u>Manual</u> - you will enable a new custom field in your post/page admin section where you can type the exact description you want for every post and page.</small>";
+ echo "</div>";
+
+ echo "<small>For category pages, the actual category descriptions will be used. Go to Posts > Categories and you can fill in a description for every category you have. </small>";
+
+ echo "<div class='slmini'>";
+ echo "<b>Post Author</b>";
+ $authors=wp_list_authors (array("echo"=>false,"html"=> false));
+ $authors_array = explode ("," , $authors);
+ array_unshift($authors_array,"Do not use");
+ echo "<select id='mantra_seo_author' name='ma_options[mantra_seo_author]'>";
+ foreach($authors_array as $item) {
+ echo "<option value='$item'";
+ selected($mantra_options['mantra_seo_author'],$item);
+ echo ">$item</option>";
+}
+ echo "</select>";
+
+
+ echo "<small> If you want to show an author in the meta tags. </small>";
+ echo "</div>";
+
+}
+?>
\ No newline at end of file |