summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2016-08-23 20:11:24 -0400
committerAnthony G. Basile <blueness@gentoo.org>2016-08-23 20:11:24 -0400
commite04e494fa17cd2b010185b7f30a032857406316d (patch)
treed01d0a211ae1a06f7c3076366a2666609666da7c
parentUpdate plugin wordpress-importer to 0.6.3 (diff)
downloadblogs-gentoo-e04e494fa17cd2b010185b7f30a032857406316d.tar.gz
blogs-gentoo-e04e494fa17cd2b010185b7f30a032857406316d.tar.bz2
blogs-gentoo-e04e494fa17cd2b010185b7f30a032857406316d.zip
Update theme mantra to 2.6.0
-rw-r--r--themes/mantra/404.php62
-rw-r--r--themes/mantra/admin/admin-functions.php450
-rw-r--r--themes/mantra/admin/css/admin.css1296
-rw-r--r--themes/mantra/admin/custom-styles.php598
-rw-r--r--themes/mantra/admin/defaults.php424
-rw-r--r--themes/mantra/admin/js/accordion-slider.js190
-rw-r--r--themes/mantra/admin/js/admin.js434
-rw-r--r--themes/mantra/admin/main.php958
-rw-r--r--themes/mantra/admin/sanitize.php478
-rw-r--r--themes/mantra/admin/settings.php4112
-rw-r--r--themes/mantra/archive.php150
-rw-r--r--themes/mantra/attachment.php238
-rw-r--r--themes/mantra/author.php182
-rw-r--r--themes/mantra/category.php134
-rw-r--r--themes/mantra/comments.php106
-rw-r--r--themes/mantra/content-aside.php100
-rw-r--r--themes/mantra/content-chat.php102
-rw-r--r--themes/mantra/content-frontpage.php72
-rw-r--r--themes/mantra/content-gallery.php154
-rw-r--r--themes/mantra/content-image.php88
-rw-r--r--themes/mantra/content-link.php102
-rw-r--r--themes/mantra/content-page.php60
-rw-r--r--themes/mantra/content-quote.php96
-rw-r--r--themes/mantra/content-status.php100
-rw-r--r--themes/mantra/content.php166
-rw-r--r--themes/mantra/editor-style-rtl.css110
-rw-r--r--themes/mantra/editor-style.css572
-rw-r--r--themes/mantra/footer.php76
-rw-r--r--themes/mantra/functions.php52
-rw-r--r--themes/mantra/header.php116
-rw-r--r--themes/mantra/includes/tgm.php7342
-rw-r--r--themes/mantra/includes/theme-comments.php284
-rw-r--r--themes/mantra/includes/theme-frontpage.php474
-rw-r--r--themes/mantra/includes/theme-functions.php960
-rw-r--r--themes/mantra/includes/theme-hooks.php318
-rw-r--r--themes/mantra/includes/theme-loop.php608
-rw-r--r--themes/mantra/includes/theme-setup.php862
-rw-r--r--themes/mantra/includes/theme-styles.php264
-rw-r--r--themes/mantra/index.php112
-rw-r--r--themes/mantra/js/PIE/PIE.js174
-rw-r--r--themes/mantra/js/PIE/PIE.php36
-rw-r--r--themes/mantra/js/PIE/PIE_uncompressed.js8946
-rw-r--r--themes/mantra/js/frontend.js510
-rw-r--r--themes/mantra/js/jqueryui/css/ui-lightness/jquery-ui-1.8.16.custom.css1134
-rw-r--r--themes/mantra/js/nivo-slider.js18
-rw-r--r--themes/mantra/languages/_mantra.po4644
-rw-r--r--themes/mantra/languages/cs_CZ.po5222
-rw-r--r--themes/mantra/languages/da_DK.po4850
-rw-r--r--themes/mantra/languages/de_DE.mobin41890 -> 0 bytes
-rw-r--r--themes/mantra/languages/de_DE.po2461
-rw-r--r--themes/mantra/languages/el.po4336
-rw-r--r--themes/mantra/languages/es_ES.mobin50716 -> 0 bytes
-rw-r--r--themes/mantra/languages/es_ES.po2219
-rw-r--r--themes/mantra/languages/fa_IR.po3840
-rw-r--r--themes/mantra/languages/fr_FR.mobin58536 -> 0 bytes
-rw-r--r--themes/mantra/languages/fr_FR.po2617
-rw-r--r--themes/mantra/languages/he_IL.po3778
-rw-r--r--themes/mantra/languages/hu_HU.po4596
-rw-r--r--themes/mantra/languages/it_IT.mobin51078 -> 0 bytes
-rw-r--r--themes/mantra/languages/it_IT.po2331
-rw-r--r--themes/mantra/languages/ja.po4176
-rw-r--r--themes/mantra/languages/ja_JP.po4176
-rw-r--r--themes/mantra/languages/nb_NO.po3638
-rw-r--r--themes/mantra/languages/nl_NL.mobin40887 -> 0 bytes
-rw-r--r--themes/mantra/languages/nl_NL.po2456
-rw-r--r--themes/mantra/languages/pl_PL.po4246
-rw-r--r--themes/mantra/languages/pt_BR.po4270
-rw-r--r--themes/mantra/languages/ru_RU.mobin64420 -> 0 bytes
-rw-r--r--themes/mantra/languages/ru_RU.po2313
-rw-r--r--themes/mantra/languages/tr_TR.po4194
-rw-r--r--themes/mantra/languages/zh_CN.po3690
-rw-r--r--themes/mantra/license.txt562
-rw-r--r--themes/mantra/page.php68
-rw-r--r--themes/mantra/readme.txt627
-rw-r--r--themes/mantra/rtl.css804
-rw-r--r--themes/mantra/search.php106
-rw-r--r--themes/mantra/searchform.php20
-rw-r--r--themes/mantra/sidebar-footer.php118
-rw-r--r--themes/mantra/sidebar.php290
-rw-r--r--themes/mantra/single.php146
-rw-r--r--themes/mantra/style-mobile.css388
-rw-r--r--themes/mantra/style.css5333
-rw-r--r--themes/mantra/tag.php136
-rw-r--r--themes/mantra/template-blog.php108
-rw-r--r--themes/mantra/template-onecolumn.php78
-rw-r--r--themes/mantra/template-page-with-intro.php108
-rw-r--r--themes/mantra/template-threecolumns-center.php50
-rw-r--r--themes/mantra/template-threecolumns-left.php50
-rw-r--r--themes/mantra/template-threecolumns-right.php50
-rw-r--r--themes/mantra/template-twocolumns-left.php50
-rw-r--r--themes/mantra/template-twocolumns-right.php50
91 files changed, 51300 insertions, 65715 deletions
diff --git a/themes/mantra/404.php b/themes/mantra/404.php
index cd47c44f..150ee244 100644
--- a/themes/mantra/404.php
+++ b/themes/mantra/404.php
@@ -1,32 +1,32 @@
-<?php
-/**
- * The template for displaying 404 pages (Not Found).
- *
- * @package Cryout Creations
- * @subpackage mantra
- * @since mantra 0.5
- */
-
-get_header(); ?>
-
- <div id="container">
-
- <div id="content" role="main">
-
- <div id="post-0" class="post error404 not-found">
- <h1 class="entry-title"><?php _e( 'Not Found', 'mantra' ); ?></h1>
- <div class="entry-content">
- <p><?php _e( 'Apologies, but the page you requested could not be found. Perhaps searching will help.', 'mantra' ); ?></p>
- <div class="contentsearch"><?php get_search_form(); ?></div>
- </div><!-- .entry-content -->
- </div><!-- #post-0 -->
-
- </div><!-- #content -->
-<?php get_sidebar(); ?>
- </div><!-- #container -->
- <script type="text/javascript">
- // focus on search field after it has loaded
- document.getElementById('s') && document.getElementById('s').focus();
- </script>
-
+<?php
+/**
+ * The template for displaying 404 pages (Not Found).
+ *
+ * @package Cryout Creations
+ * @subpackage mantra
+ * @since mantra 0.5
+ */
+
+get_header(); ?>
+
+ <div id="container">
+
+ <div id="content" role="main">
+
+ <div id="post-0" class="post error404 not-found">
+ <h1 class="entry-title"><?php _e( 'Not Found', 'mantra' ); ?></h1>
+ <div class="entry-content">
+ <p><?php _e( 'Apologies, but the page you requested could not be found. Perhaps searching will help.', 'mantra' ); ?></p>
+ <div class="contentsearch"><?php get_search_form(); ?></div>
+ </div><!-- .entry-content -->
+ </div><!-- #post-0 -->
+
+ </div><!-- #content -->
+<?php get_sidebar(); ?>
+ </div><!-- #container -->
+ <script type="text/javascript">
+ // focus on search field after it has loaded
+ document.getElementById('s') && document.getElementById('s').focus();
+ </script>
+
<?php get_footer(); ?> \ No newline at end of file
diff --git a/themes/mantra/admin/admin-functions.php b/themes/mantra/admin/admin-functions.php
index 22e77a6c..a7d8b83e 100644
--- a/themes/mantra/admin/admin-functions.php
+++ b/themes/mantra/admin/admin-functions.php
@@ -1,226 +1,226 @@
-<?php
-
-function mantra_theme_settings_placeholder() {
- if (function_exists('mantra_theme_settings_restore') ):
- mantra_theme_settings_restore();
- else:
-?>
- <div id="mantra-settings-placeholder">
- <h3>Where are the theme settings?</h3>
- <p>Following the <a href="https://make.wordpress.org/themes/2015/04/21/this-weeks-meeting-important-information-regarding-theme-options/" target="_blank">Wordpress Theme Review Guidelines</a>, starting with Mantra v2.5 we had to remove the settings page from the theme and transfer all the settings to the <a href="http://codex.wordpress.org/Appearance_Customize_Screen" target="_blank">Customizer</a> interface.</p>
- <p>However, we feel that the Customizer interface does not provide the right medium (in space of terms and usability) for our existing theme options. We've created our settings with a certain layout that is not yet compatible with the Customizer interface.</p>
- <p>As an alternative solution that allows us to keep updating and improving our theme we have moved the settings functionality to the separate <a href="https://wordpress.org/plugins/cryout-theme-settings/" target="_blank">Cryout Serious Theme Settings</a> plugin. To restore the theme settings page to previous functionality, all you need to do is install this free plugin with a couple of clicks.</p>
- <h3>How do I restore the settings?</h3>
- <p><strong>Navigate <a href="themes.php?page=mantra-extra-plugins">to this page</a> to install and activate the Cryout Serious Theme Settings plugin, then return here to find the settings page in all its past glory.</strong></p>
- <p>The plugin is compatible with all our themes that are affected by this change and only needs to be installed once.</p>
- <p>If you already have the plugin installed make sure you have it updated to the latest available version.</p>
- </div>
-<?php
- endif;
-} // mantra_theme_settings_placeholder()
-
-/**
- * Export Mantra settings to file
- */
-
-function mantra_export_options(){
-
- if (ob_get_contents()) 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 = size_format( $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;
-}
-
-// Synchronizing the tinymce width with the content width
-add_filter('tiny_mce_before_init', 'mantra_dynamic_editor_styles', 10);
-function mantra_dynamic_editor_styles($settings){
- $settings['content_css'] .= ",".admin_url('admin-ajax.php') ."/?action=dynamic_styles";
- return $settings;
-}
-
-// add wp_ajax callback
-add_action('wp_ajax_dynamic_styles', 'mantra_dynamic_styles_callback');
-function mantra_dynamic_styles_callback(){
- global $mantra_options;
- echo "html .mceContentBody , .mceContentBody img {max-width:".$mantra_options['mantra_sidewidth']."px;}";
-}
+<?php
+
+function mantra_theme_settings_placeholder() {
+ if (function_exists('mantra_theme_settings_restore') ):
+ mantra_theme_settings_restore();
+ else:
+?>
+ <div id="mantra-settings-placeholder">
+ <h3>Where are the theme settings?</h3>
+ <p>Following the <a href="https://make.wordpress.org/themes/2015/04/21/this-weeks-meeting-important-information-regarding-theme-options/" target="_blank">Wordpress Theme Review Guidelines</a>, starting with Mantra v2.5 we had to remove the settings page from the theme and transfer all the settings to the <a href="http://codex.wordpress.org/Appearance_Customize_Screen" target="_blank">Customizer</a> interface.</p>
+ <p>However, we feel that the Customizer interface does not provide the right medium (in space of terms and usability) for our existing theme options. We've created our settings with a certain layout that is not yet compatible with the Customizer interface.</p>
+ <p>As an alternative solution that allows us to keep updating and improving our theme we have moved the settings functionality to the separate <a href="https://wordpress.org/plugins/cryout-theme-settings/" target="_blank">Cryout Serious Theme Settings</a> plugin. To restore the theme settings page to previous functionality, all you need to do is install this free plugin with a couple of clicks.</p>
+ <h3>How do I restore the settings?</h3>
+ <p><strong>Navigate <a href="themes.php?page=mantra-extra-plugins">to this page</a> to install and activate the Cryout Serious Theme Settings plugin, then return here to find the settings page in all its past glory.</strong></p>
+ <p>The plugin is compatible with all our themes that are affected by this change and only needs to be installed once.</p>
+ <p>If you already have the plugin installed make sure you have it updated to the latest available version.</p>
+ </div>
+<?php
+ endif;
+} // mantra_theme_settings_placeholder()
+
+/**
+ * Export Mantra settings to file
+ */
+
+function mantra_export_options(){
+
+ if (ob_get_contents()) 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 = size_format( $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;
+}
+
+// Synchronizing the tinymce width with the content width
+add_filter('tiny_mce_before_init', 'mantra_dynamic_editor_styles', 10);
+function mantra_dynamic_editor_styles($settings){
+ $settings['content_css'] .= ",".admin_url('admin-ajax.php') ."/?action=dynamic_styles";
+ return $settings;
+}
+
+// add wp_ajax callback
+add_action('wp_ajax_dynamic_styles', 'mantra_dynamic_styles_callback');
+function mantra_dynamic_styles_callback(){
+ global $mantra_options;
+ echo "html .mceContentBody , .mceContentBody img {max-width:".$mantra_options['mantra_sidewidth']."px;}";
+}
?> \ No newline at end of file
diff --git a/themes/mantra/admin/css/admin.css b/themes/mantra/admin/css/admin.css
index 7f20e131..7da46631 100644
--- a/themes/mantra/admin/css/admin.css
+++ b/themes/mantra/admin/css/admin.css
@@ -1,648 +1,648 @@
- /* 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 */
-
-.form-table, .form-table td, .form-table th, .form-table td p, .form-wrap label {
-font-size:13px;
-}
-
-
-#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;
-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 {
-margin:0px auto;
-font-family:Segoe UI,Calibri, Arial !important;
-display:block;
-float:none;
-border:10px solid #FFF;
--moz-box-sizing:border-box;
--webkit-box-sizing:border-box;
-box-sizing:border-box;
-}
-
-#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, #accordion h2 {
-border:none;
-background-image:none;
-background:#F5F5F5;
-margin:0;
-padding:8px;
-clear:both;
-display:block;
-float:none;
-font-size: 17px ;
-padding-left:30px ;
-font-weight:normal;
-text-transform:uppercase;
-color:#555;
-border-top:1px solid #FFF;
-border-bottom:1px solid #E5E5E5;
-line-height: 1.3;
--moz-border-radius:0;
--webkit-border-radius:0;
-border-radius:0;
-transition:background ease .3s;
-}
-
-#accordion h3:hover, #accordion h2:hover {
-background:#FFF;
-}
-
-#accordion select option {
-font-size:1.1em;
-}
-
-.form-table th, .form-wrap label {
- color: #444 !important;
-font-size: 15px;
-font-weight:normal;
-text-transform:uppercase;
-background:#F7F7F7;
-border-bottom:1px solid #FFF;
-padding:10px;
-}
-
-.form-table tr {
-border-bottom:1px solid #F7F7F7;
-}
-
-.form-table tr:last-child {
-border-bottom:none;
-}
-
-.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;
-padding:3px 5px;
-}
-
- #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;
-}
-
-.layouts img, .images img {
-pointer-events: none;
-}
-
-
-.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;
-padding:6px;
-}
-
-#accordion > * {
-display:none;
-}
-
-#accordion > h3, #accordion > h2 {
-display:block;
-}
-
-.ui-accordion-content {
-background:#FFF !important;
-margin-bottom:10px !important;
-border:none !important;
-overflow: hidden;
-padding:1em !important;
-}
-.ui-accordion .ui-accordion-content { overflow: hidden !important;padding:0 !important; }
-.ui-accordion .ui-accordion-content-overflow { overflow: visible !important; }
-
-.ui-state-active {
- background:#444 !important;
- color:#FFF !important;
- border:none !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;
-}
-
-.slmini {
-background:#F9F9F9;
-border-bottom:1px solid #E7E7E7;
-padding:15px 5px 15px 10px;
-}
-
-.slmini b {
-width:130px;
-display:inline-block;
-float:left;
-text-transform:uppercase;
-font-weight:normal;
-font-style:italic;
-}
-
-.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 {
-text-decoration:none;
-clear:both;
-padding:2px 4px;
-display:block;
-float:none;
-}
-
-
-.wp-core-ui .button, .wp-core-ui .button-secondary {
-background:#FFF;
-text-transform:uppercase;
--moz-border-radius:0;
--webkit-border-radius:0;
-border-radius:0;
-border-bottom:1px solid #555;
-}
-
-.wp-core-ui .button:hover, .wp-core-ui .button-secondary:hover {
-border-bottom:1px solid #000;
-}
-
-#submitDiv input.button {
-font-size:13px !important;
-padding:4px 10px !important;
-height:auto;
-text-transform:uppercase;
-border-bottom:3px solid #555;
-}
-
-.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:97px;
- margin-top:-17px;
- }
-
-#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:#000000;
-text-transform:uppercase;
-}
-
-#admin_links a:hover {
-color:#C47D09;
-}
-
-.wrap div.updated, .wrap div.error {
-margin-left: 15px; margin-right: 15px;
-margin-top: 20px; }
-
-#jsAlert {
-margin: 0 15px 10px;
-background-color: #F4F8FA;
-border-color: #BCE8F1; border-style: solid; border-radius: 0; border-width: 0 0 0 3px;
-padding:5px 10px;
-}
-
-/* FB button fix */
-
-.fb-like.fb_iframe_widget > span {
- vertical-align: baseline !important;
-}
-.twitter-follow-button.twitter-follow-button {
- margin:0 8px;
-}
-
-#mantra-settings-placeholder {
- background: #fff;
- padding: 0 10px 10px 10px; }
-
-#mantra-settings-placeholder h3 {
- background: #444;
- color: #fff;
- text-transform: uppercase;
- font-weight: 400;
- padding: 10px;
- margin: 0 -10px;
- font-size: 14px; }
-
-#mantra-settings-placeholder a {
- color: #24C1BB; }
-
+ /* 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 */
+
+.form-table, .form-table td, .form-table th, .form-table td p, .form-wrap label {
+font-size:13px;
+}
+
+
+#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;
+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 {
+margin:0px auto;
+font-family:Segoe UI,Calibri, Arial !important;
+display:block;
+float:none;
+border:10px solid #FFF;
+-moz-box-sizing:border-box;
+-webkit-box-sizing:border-box;
+box-sizing:border-box;
+}
+
+#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, #accordion h2 {
+border:none;
+background-image:none;
+background:#F5F5F5;
+margin:0;
+padding:8px;
+clear:both;
+display:block;
+float:none;
+font-size: 17px ;
+padding-left:30px ;
+font-weight:normal;
+text-transform:uppercase;
+color:#555;
+border-top:1px solid #FFF;
+border-bottom:1px solid #E5E5E5;
+line-height: 1.3;
+-moz-border-radius:0;
+-webkit-border-radius:0;
+border-radius:0;
+transition:background ease .3s;
+}
+
+#accordion h3:hover, #accordion h2:hover {
+background:#FFF;
+}
+
+#accordion select option {
+font-size:1.1em;
+}
+
+.form-table th, .form-wrap label {
+ color: #444 !important;
+font-size: 15px;
+font-weight:normal;
+text-transform:uppercase;
+background:#F7F7F7;
+border-bottom:1px solid #FFF;
+padding:10px;
+}
+
+.form-table tr {
+border-bottom:1px solid #F7F7F7;
+}
+
+.form-table tr:last-child {
+border-bottom:none;
+}
+
+.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;
+padding:3px 5px;
+}
+
+ #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;
+}
+
+.layouts img, .images img {
+pointer-events: none;
+}
+
+
+.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;
+padding:6px;
+}
+
+#accordion > * {
+display:none;
+}
+
+#accordion > h3, #accordion > h2 {
+display:block;
+}
+
+.ui-accordion-content {
+background:#FFF !important;
+margin-bottom:10px !important;
+border:none !important;
+overflow: hidden;
+padding:1em !important;
+}
+.ui-accordion .ui-accordion-content { overflow: hidden !important;padding:0 !important; }
+.ui-accordion .ui-accordion-content-overflow { overflow: visible !important; }
+
+.ui-state-active {
+ background:#444 !important;
+ color:#FFF !important;
+ border:none !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;
+}
+
+.slmini {
+background:#F9F9F9;
+border-bottom:1px solid #E7E7E7;
+padding:15px 5px 15px 10px;
+}
+
+.slmini b {
+width:130px;
+display:inline-block;
+float:left;
+text-transform:uppercase;
+font-weight:normal;
+font-style:italic;
+}
+
+.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 {
+text-decoration:none;
+clear:both;
+padding:2px 4px;
+display:block;
+float:none;
+}
+
+
+.wp-core-ui .button, .wp-core-ui .button-secondary {
+background:#FFF;
+text-transform:uppercase;
+-moz-border-radius:0;
+-webkit-border-radius:0;
+border-radius:0;
+border-bottom:1px solid #555;
+}
+
+.wp-core-ui .button:hover, .wp-core-ui .button-secondary:hover {
+border-bottom:1px solid #000;
+}
+
+#submitDiv input.button {
+font-size:13px !important;
+padding:4px 10px !important;
+height:auto;
+text-transform:uppercase;
+border-bottom:3px solid #555;
+}
+
+.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:97px;
+ margin-top:-17px;
+ }
+
+#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:#000000;
+text-transform:uppercase;
+}
+
+#admin_links a:hover {
+color:#C47D09;
+}
+
+.wrap div.updated, .wrap div.error {
+margin-left: 15px; margin-right: 15px;
+margin-top: 20px; }
+
+#jsAlert {
+margin: 0 15px 10px;
+background-color: #F4F8FA;
+border-color: #BCE8F1; border-style: solid; border-radius: 0; border-width: 0 0 0 3px;
+padding:5px 10px;
+}
+
+/* FB button fix */
+
+.fb-like.fb_iframe_widget > span {
+ vertical-align: baseline !important;
+}
+.twitter-follow-button.twitter-follow-button {
+ margin:0 8px;
+}
+
+#mantra-settings-placeholder {
+ background: #fff;
+ padding: 0 10px 10px 10px; }
+
+#mantra-settings-placeholder h3 {
+ background: #444;
+ color: #fff;
+ text-transform: uppercase;
+ font-weight: 400;
+ padding: 10px;
+ margin: 0 -10px;
+ font-size: 14px; }
+
+#mantra-settings-placeholder a {
+ color: #24C1BB; }
+
diff --git a/themes/mantra/admin/custom-styles.php b/themes/mantra/admin/custom-styles.php
index 0e59bd8b..5851283a 100644
--- a/themes/mantra/admin/custom-styles.php
+++ b/themes/mantra/admin/custom-styles.php
@@ -1,299 +1,299 @@
-<?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 ;}
-<?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, .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 .menu-header, div.menu { 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, .entry-meta2 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, #content .entry-header div.entry-meta2 > * {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
+<?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 ;}
+<?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) { ?> body, .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, .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 .menu-header, div.menu { 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 time.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, .entry-meta2 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, #content .entry-header div.entry-meta2 > * {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>';
+ }
+}
+?>
diff --git a/themes/mantra/admin/defaults.php b/themes/mantra/admin/defaults.php
index 3ba7d711..7164994e 100644
--- a/themes/mantra/admin/defaults.php
+++ b/themes/mantra/admin/defaults.php
@@ -1,213 +1,213 @@
-<?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_zoom" => 0,
-"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 the caption 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.cryoutcreations.eu" >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 is 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.cryoutcreations.eu">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 is 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" => " &hellip;",
-"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" => "Facebook",
-"mantra_social2" => "#",
-"mantra_social3" => "Twitter",
-"mantra_social4" => "#",
-"mantra_social5" => "RSS",
-"mantra_social6" => "#",
-"mantra_social7" => "",
-"mantra_social8" => "",
-"mantra_social9" => "",
-"mantra_social10" => "",
-"mantra_socialsdisplay0" => "1",
-"mantra_socialsdisplay1" => "",
-"mantra_socialsdisplay2" => "",
-"mantra_socialsdisplay3" => "1",
-
-"mantra_copyright" => "",
-"mantra_customcss" => "/* Mantra Custom CSS */ ",
-"mantra_customjs" => "");
-
+<?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_zoom" => 0,
+"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 the caption 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.cryoutcreations.eu" >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 is 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.cryoutcreations.eu">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 is 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" => " &hellip;",
+"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" => "Facebook",
+"mantra_social2" => "#",
+"mantra_social3" => "Twitter",
+"mantra_social4" => "#",
+"mantra_social5" => "RSS",
+"mantra_social6" => "#",
+"mantra_social7" => "",
+"mantra_social8" => "",
+"mantra_social9" => "",
+"mantra_social10" => "",
+"mantra_socialsdisplay0" => "1",
+"mantra_socialsdisplay1" => "",
+"mantra_socialsdisplay2" => "",
+"mantra_socialsdisplay3" => "1",
+
+"mantra_copyright" => "",
+"mantra_customcss" => "/* Mantra Custom CSS */ ",
+"mantra_customjs" => "");
+
?> \ No newline at end of file
diff --git a/themes/mantra/admin/js/accordion-slider.js b/themes/mantra/admin/js/accordion-slider.js
index e43b28a8..7ef838ca 100644
--- a/themes/mantra/admin/js/accordion-slider.js
+++ b/themes/mantra/admin/js/accordion-slider.js
@@ -1,96 +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);
+/*!
+ * 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
index c3002104..884bd820 100644
--- a/themes/mantra/admin/js/admin.js
+++ b/themes/mantra/admin/js/admin.js
@@ -1,218 +1,218 @@
-/*!
- * Admin js
- */
-
-function media_upload( button_class) {
- if (!window.wp || !window.wp.media || !window.wp.media.editor || !window.wp.media.editor.send || !window.wp.media.editor.send.attachment) return;
- var _custom_media = true,
- _orig_send_attachment = wp.media.editor.send.attachment;
- jQuery('body').on('click',button_class, function(e) {
- uploadparent = jQuery(this).closest('div');
- var button_id ='#'+jQuery(this).attr('id');
- /* console.log(button_id); */
- var self = jQuery(button_id);
- var send_attachment_bkp = wp.media.editor.send.attachment;
- var button = jQuery(button_id);
- /* var id = button.attr('id').replace('_button', ''); */
- _custom_media = true;
- wp.media.editor.send.attachment = function(props, attachment){
- if ( _custom_media ) {
- /* jQuery('.custom_media_id').val(attachment.id); */
- uploadparent.find('.slideimages').val(attachment.url);
- uploadparent.find('.imagebox').attr('src',attachment.url);
- /* jQuery('.custom_media_image').attr('src',attachment.url).css('display','block'); */
- } else {
- return _orig_send_attachment.apply( button_id, [props, attachment] );
- }
- }
- wp.media.editor.open(button);
- return false;
- });
-}
-
-jQuery(document).ready(function() {
-
-var uploadparent = 0;
- media_upload( '.upload_image_button' );
-
-// 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() {
- if (jQuery( "#accordion h2" ).length > 0) {
- // wordpress 4.4+ changed headings to h2
- jQuery( "#accordion" ).accordion({
- header: 'h2',
- heightStyle: "content",
- collapsible: true,
- navigation: true,
- active: false
- });
- } else {
- 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;
-}
-
-/* FB like button */
-(function(d, s, id) {
- var js, fjs = d.getElementsByTagName(s)[0];
- if (d.getElementById(id)) return;
- js = d.createElement(s); js.id = id;
- js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.0";
- fjs.parentNode.insertBefore(js, fjs);
-}(document, 'script', 'facebook-jssdk'));
-
-/* Twitter follow button */
-window.twttr = (function (d, s, id) {
- var t, js, fjs = d.getElementsByTagName(s)[0];
- if (d.getElementById(id)) return;
- js = d.createElement(s); js.id = id;
- js.src= "https://platform.twitter.com/widgets.js";
- fjs.parentNode.insertBefore(js, fjs);
- return window.twttr || (t = { _e: [], ready: function (f) { t._e.push(f) } });
-}(document, "script", "twitter-wjs"));
-
+/*!
+ * Admin js
+ */
+
+function media_upload( button_class) {
+ if (!window.wp || !window.wp.media || !window.wp.media.editor || !window.wp.media.editor.send || !window.wp.media.editor.send.attachment) return;
+ var _custom_media = true,
+ _orig_send_attachment = wp.media.editor.send.attachment;
+ jQuery('body').on('click',button_class, function(e) {
+ uploadparent = jQuery(this).closest('div');
+ var button_id ='#'+jQuery(this).attr('id');
+ /* console.log(button_id); */
+ var self = jQuery(button_id);
+ var send_attachment_bkp = wp.media.editor.send.attachment;
+ var button = jQuery(button_id);
+ /* var id = button.attr('id').replace('_button', ''); */
+ _custom_media = true;
+ wp.media.editor.send.attachment = function(props, attachment){
+ if ( _custom_media ) {
+ /* jQuery('.custom_media_id').val(attachment.id); */
+ uploadparent.find('.slideimages').val(attachment.url);
+ uploadparent.find('.imagebox').attr('src',attachment.url);
+ /* jQuery('.custom_media_image').attr('src',attachment.url).css('display','block'); */
+ } else {
+ return _orig_send_attachment.apply( button_id, [props, attachment] );
+ }
+ }
+ wp.media.editor.open(button);
+ return false;
+ });
+}
+
+jQuery(document).ready(function() {
+
+var uploadparent = 0;
+ media_upload( '.upload_image_button' );
+
+// 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() {
+ if (jQuery( "#accordion h2" ).length > 0) {
+ // wordpress 4.4+ changed headings to h2
+ jQuery( "#accordion" ).accordion({
+ header: 'h2',
+ heightStyle: "content",
+ collapsible: true,
+ navigation: true,
+ active: false
+ });
+ } else {
+ 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;
+}
+
+/* FB like button */
+(function(d, s, id) {
+ var js, fjs = d.getElementsByTagName(s)[0];
+ if (d.getElementById(id)) return;
+ js = d.createElement(s); js.id = id;
+ js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.0";
+ fjs.parentNode.insertBefore(js, fjs);
+}(document, 'script', 'facebook-jssdk'));
+
+/* Twitter follow button */
+window.twttr = (function (d, s, id) {
+ var t, js, fjs = d.getElementsByTagName(s)[0];
+ if (d.getElementById(id)) return;
+ js = d.createElement(s); js.id = id;
+ js.src= "https://platform.twitter.com/widgets.js";
+ fjs.parentNode.insertBefore(js, fjs);
+ return window.twttr || (t = { _e: [], ready: function (f) { t._e.push(f) } });
+}(document, "script", "twitter-wjs"));
+
/* FIN */ \ No newline at end of file
diff --git a/themes/mantra/admin/main.php b/themes/mantra/admin/main.php
index fe8e7ff6..978afbd5 100644
--- a/themes/mantra/admin/main.php
+++ b/themes/mantra/admin/main.php
@@ -1,479 +1,479 @@
-<?php
-// Frontend
-require_once(get_template_directory() . "/admin/defaults.php"); // default options
-require_once(get_template_directory() . "/admin/custom-styles.php"); // custom styling
-
-// Admin side
-if( is_admin() ) {
- require_once(get_template_directory() . "/admin/settings.php"); // theme settings
- require_once(get_template_directory() . "/admin/admin-functions.php"); // admin side functions
- require_once(get_template_directory() . "/admin/sanitize.php"); // settings sanitizers
-}
-
-// 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' ); // hooked by the settings plugin
-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', NULL, _CRYOUT_THEME_VERSION );
- wp_register_style( 'jquery-ui-style',get_template_directory_uri() . '/js/jqueryui/css/ui-lightness/jquery-ui-1.8.16.custom.css', NULL, _CRYOUT_THEME_VERSION );
- 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 already 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'), _CRYOUT_THEME_VERSION );
- wp_enqueue_script('cryout_accordion');
- }
-
- // For the WP uploader
- if(function_exists('wp_enqueue_media')) {
- wp_enqueue_media();
- } else {
- 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', NULL, _CRYOUT_THEME_VERSION );
- wp_enqueue_script('cryout-admin-js');
-}
-
-// The settings sections. 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', 'mantra-page');
- add_settings_section('header_section', __('Header Settings','mantra'), 'cryout_section_header_fn', 'mantra-page');
- add_settings_section('presentation_section', __('Presentation Page','mantra'), 'cryout_section_presentation_fn', 'mantra-page');
- add_settings_section('text_section', __('Text Settings','mantra'), 'cryout_section_text_fn', 'mantra-page');
- add_settings_section('appereance_section',__('Color Settings','mantra') , 'cryout_section_appereance_fn', 'mantra-page');
- add_settings_section('graphics_section', __('Graphics Settings','mantra') , 'cryout_section_graphics_fn', 'mantra-page');
- add_settings_section('post_section', __('Post Information Settings','mantra') , 'cryout_section_post_fn', 'mantra-page');
- add_settings_section('excerpt_section', __('Post Excerpt Settings','mantra') , 'cryout_section_excerpt_fn', 'mantra-page');
- add_settings_section('featured_section', __('Featured Image Settings','mantra') , 'cryout_section_featured_fn', 'mantra-page');
- add_settings_section('socials_section', __('Social Media Settings','mantra') , 'cryout_section_social_fn', 'mantra-page');
- add_settings_section('misc_section', __('Miscellaneous Settings','mantra') , 'cryout_section_misc_fn', 'mantra-page');
-
-/*** layout ***/
- add_settings_field('mantra_side', __('Main Layout','mantra') , 'cryout_setting_side_fn', 'mantra-page', 'layout_section');
- add_settings_field('mantra_sidewidth', __('Content / Sidebar Width','mantra') , 'cryout_setting_sidewidth_fn', 'mantra-page', 'layout_section');
- add_settings_field('mantra_mobile', __('Responsiveness','mantra') , 'cryout_setting_mobile_fn', 'mantra-page', 'layout_section');
-/*** presentation ***/
-
- add_settings_field('mantra_frontpage', __('Enable Presentation Page','mantra') , 'cryout_setting_frontpage_fn', 'mantra-page', 'presentation_section');
- add_settings_field('mantra_frontposts', __('Show Posts on Presentation Page','mantra') , 'cryout_setting_frontposts_fn', 'mantra-page', 'presentation_section');
- add_settings_field('mantra_frontslider', __('Slider Settings','mantra') , 'cryout_setting_frontslider_fn', 'mantra-page', 'presentation_section');
- add_settings_field('mantra_frontslider2', __('Slides','mantra') , 'cryout_setting_frontslider2_fn', 'mantra-page', 'presentation_section');
- add_settings_field('mantra_frontcolumns', __('Presentation Page Columns','mantra') , 'cryout_setting_frontcolumns_fn', 'mantra-page', 'presentation_section');
- add_settings_field('mantra_fronttext', __('Extras','mantra') , 'cryout_setting_fronttext_fn', 'mantra-page', 'presentation_section');
-
-/*** header ***/
- add_settings_field('mantra_hheight', __('Header Height','mantra') , 'cryout_setting_hheight_fn', 'mantra-page', 'header_section');
- add_settings_field('mantra_himage', __('Header Image','mantra') , 'cryout_setting_himage_fn', 'mantra-page', 'header_section');
- add_settings_field('mantra_siteheader', __('Site Header','mantra') , 'cryout_setting_siteheader_fn', 'mantra-page', 'header_section');
- add_settings_field('mantra_logoupload', __('Custom Logo Upload','mantra') , 'cryout_setting_logoupload_fn', 'mantra-page', 'header_section');
- add_settings_field('mantra_headermargin', __('Header Spacing','mantra') , 'cryout_setting_headermargin_fn', 'mantra-page', 'header_section');
- add_settings_field('mantra_menurounded', __('Rounded Menu Corners','mantra') , 'cryout_setting_menurounded_fn', 'mantra-page', 'header_section');
- add_settings_field('mantra_favicon', __('FavIcon Upload','mantra') , 'cryout_setting_favicon_fn', 'mantra-page', 'header_section');
-/*** text ***/
- add_settings_field('mantra_fontfamily', __('General Font','mantra') , 'cryout_setting_fontfamily_fn', 'mantra-page', 'text_section');
- add_settings_field('mantra_fontsize', __('General Font Size','mantra') , 'cryout_setting_fontsize_fn', 'mantra-page', 'text_section');
- add_settings_field('mantra_fonttitle', __('Post Title Font ','mantra') , 'cryout_setting_fonttitle_fn', 'mantra-page', 'text_section');
- add_settings_field('mantra_headfontsize', __('Post Title Font Size','mantra') , 'cryout_setting_headfontsize_fn', 'mantra-page', 'text_section');
- add_settings_field('mantra_fontside', __('Sidebar Font','mantra') , 'cryout_setting_fontside_fn', 'mantra-page', 'text_section');
- add_settings_field('mantra_sidefontsize', __('SideBar Font Size','mantra') , 'cryout_setting_sidefontsize_fn', 'mantra-page', 'text_section');
- add_settings_field('mantra_fontsubheader', __('Headings Font','mantra') , 'cryout_setting_fontsubheader_fn', 'mantra-page', 'text_section');
- add_settings_field('mantra_textalign', __('Force Text Align','mantra') , 'cryout_setting_textalign_fn', 'mantra-page', 'text_section');
- add_settings_field('mantra_parmargin', __('Paragraph spacing','mantra') , 'cryout_setting_parmargin_fn', 'mantra-page', 'text_section');
- add_settings_field('mantra_parindent', __('Paragraph indent','mantra') , 'cryout_setting_parindent_fn', 'mantra-page', 'text_section');
- add_settings_field('mantra_headerindent', __('Header indent','mantra') , 'cryout_setting_headerindent_fn', 'mantra-page', 'text_section');
- add_settings_field('mantra_lineheight', __('Line Height','mantra') , 'cryout_setting_lineheight_fn', 'mantra-page', 'text_section');
- add_settings_field('mantra_wordspace', __('Word spacing','mantra') , 'cryout_setting_wordspace_fn', 'mantra-page', 'text_section');
- add_settings_field('mantra_letterspace', __('Letter spacing','mantra') , 'cryout_setting_letterspace_fn', 'mantra-page', 'text_section');
- add_settings_field('mantra_textshadow', __('Text shadow','mantra') , 'cryout_setting_textshadow_fn', 'mantra-page', 'text_section');
-/*** appereance ***/
- add_settings_field('mantra_sitebackground', __('Background Image','mantra') , 'cryout_setting_sitebackground_fn', 'mantra-page', 'appereance_section');
- add_settings_field('mantra_backcolor', __('Background Color','mantra') , 'cryout_setting_backcolor_fn', 'mantra-page', 'appereance_section');
- add_settings_field('mantra_headercolor', __('Header (Banner and Menu) Background Color','mantra') , 'cryout_setting_headercolor_fn', 'mantra-page', 'appereance_section');
- add_settings_field('mantra_contentbg', __('Content Background Color','mantra') , 'cryout_setting_contentbg_fn', 'mantra-page', 'appereance_section');
- add_settings_field('mantra_menubg', __('Menu Items Background Color','mantra') , 'cryout_setting_menubg_fn', 'mantra-page', 'appereance_section');
- add_settings_field('mantra_s1bg', __('First Sidebar Background Color','mantra') , 'cryout_setting_first_sidebar_fn', 'mantra-page', 'appereance_section');
- add_settings_field('mantra_s2bg', __('Second Sidebar Background Color','mantra') , 'cryout_setting_second_sidebar_fn', 'mantra-page', 'appereance_section');
-
- add_settings_field('mantra_titlecolor', __('Site Title Color','mantra') , 'cryout_setting_titlecolor_fn', 'mantra-page', 'appereance_section');
- add_settings_field('mantra_descriptioncolor', __('Site Description Color','mantra') , 'cryout_setting_descriptioncolor_fn', 'mantra-page', 'appereance_section');
-
- add_settings_field('mantra_contentcolor', __('Content Text Color','mantra') , 'cryout_setting_contentcolor_fn', 'mantra-page', 'appereance_section');
- add_settings_field('mantra_linkscolor', __('Links Color','mantra') , 'cryout_setting_linkscolor_fn', 'mantra-page', 'appereance_section');
- add_settings_field('mantra_hovercolor', __('Links Hover Color','mantra') , 'cryout_setting_hovercolor_fn', 'mantra-page', 'appereance_section');
- add_settings_field('mantra_headtextcolor',__( 'Post Title Color','mantra') , 'cryout_setting_headtextcolor_fn', 'mantra-page', 'appereance_section');
- add_settings_field('mantra_headtexthover', __('Post Title Hover Color','mantra') , 'cryout_setting_headtexthover_fn', 'mantra-page', 'appereance_section');
- add_settings_field('mantra_sideheadbackcolor', __('Sidebar Header Background Color','mantra') , 'cryout_setting_sideheadbackcolor_fn', 'mantra-page', 'appereance_section');
- add_settings_field('mantra_sideheadtextcolor', __('Sidebar Header Text Color','mantra') , 'cryout_setting_sideheadtextcolor_fn', 'mantra-page', 'appereance_section');
- add_settings_field('mantra_prefootercolor', __('Footer Widget Background Color','mantra') , 'cryout_setting_prefootercolor_fn', 'mantra-page', 'appereance_section');
- add_settings_field('mantra_footercolor', __('Footer Background Color','mantra') , 'cryout_setting_footercolor_fn', 'mantra-page', 'appereance_section');
- add_settings_field('mantra_footerheader', __('Footer Widget Header Text Color','mantra') , 'cryout_setting_footerheader_fn', 'mantra-page', 'appereance_section');
- add_settings_field('mantra_footertext', __('Footer Widget Link Color','mantra') , 'cryout_setting_footertext_fn', 'mantra-page', 'appereance_section');
- add_settings_field('mantra_footerhover', __('Footer Widget Hover Color','mantra') , 'cryout_setting_footerhover_fn', 'mantra-page', 'appereance_section');
-/*** graphics ***/
- add_settings_field('mantra_breadcrumbs', __('Breadcrumbs','mantra') , 'cryout_setting_breadcrumbs_fn', 'mantra-page', 'graphics_section');
- add_settings_field('mantra_pagination', __('Pagination','mantra') , 'cryout_setting_pagination_fn', 'mantra-page', 'graphics_section');
- add_settings_field('mantra_menualign', __('Main Menu Alignment','mantra') , 'cryout_setting_menualign_fn', 'mantra-page', 'graphics_section');
- add_settings_field('mantra_image', __('Post Images Border','mantra') , 'cryout_setting_image_fn', 'mantra-page', 'graphics_section');
- add_settings_field('mantra_caption', __('Caption Border','mantra') , 'cryout_setting_caption_fn', 'mantra-page', 'graphics_section');
- add_settings_field('mantra_pin', __('Caption Pin','mantra') , 'cryout_setting_pin_fn', 'mantra-page', 'graphics_section');
- add_settings_field('mantra_sidebullet', __('Sidebar Menu Bullets','mantra') , 'cryout_setting_sidebullet_fn', 'mantra-page', 'graphics_section');
- add_settings_field('mantra_metaback', __('Meta Area Background','mantra') , 'cryout_setting_metaback_fn', 'mantra-page', 'graphics_section');
- add_settings_field('mantra_postseparator', __('Post Separator','mantra') , 'cryout_setting_postseparator_fn', 'mantra-page', 'graphics_section');
- add_settings_field('mantra_contentlist', __('Content List Bullets','mantra') , 'cryout_setting_contentlist_fn', 'mantra-page', 'graphics_section');
- add_settings_field('mantra_pagetitle', __('Page Titles','mantra') , 'cryout_setting_pagetitle_fn', 'mantra-page', 'graphics_section');
- add_settings_field('mantra_categetitle', __('Category Page Titles','mantra') , 'cryout_setting_categtitle_fn', 'mantra-page', 'graphics_section');
- add_settings_field('mantra_tables', __('Hide Tables','mantra') , 'cryout_setting_tables_fn', 'mantra-page', 'graphics_section');
- add_settings_field('mantra_backtop', __('Back to Top button','mantra') , 'cryout_setting_backtop_fn', 'mantra-page', 'graphics_section');
- add_settings_field('mantra_comtext', __('Text Under Comments','mantra') , 'cryout_setting_comtext_fn', 'mantra-page', 'graphics_section');
- add_settings_field('mantra_comclosed', __('Comments are closed text','mantra') , 'cryout_setting_comclosed_fn', 'mantra-page', 'graphics_section');
- add_settings_field('mantra_comoff', __('Comments off','mantra') , 'cryout_setting_comoff_fn', 'mantra-page', 'graphics_section');
-/*** post metas***/
- add_settings_field('mantra_postcomlink', __('Post Comments Link','mantra') , 'cryout_setting_postcomlink_fn', 'mantra-page', 'post_section');
- add_settings_field('mantra_postdate', __('Post Date','mantra') , 'cryout_setting_postdate_fn', 'mantra-page', 'post_section');
- add_settings_field('mantra_posttime', __('Post Time','mantra') , 'cryout_setting_posttime_fn', 'mantra-page', 'post_section');
- add_settings_field('mantra_postauthor', __('Post Author','mantra') , 'cryout_setting_postauthor_fn', 'mantra-page', 'post_section');
- add_settings_field('mantra_postcateg', __('Post Category','mantra') , 'cryout_setting_postcateg_fn', 'mantra-page', 'post_section');
- add_settings_field('mantra_postmetas', __('Meta Bar','mantra') , 'cryout_setting_postmetas_fn', 'mantra-page', 'post_section');
- add_settings_field('mantra_posttag', __('Post Tags','mantra') , 'cryout_setting_posttag_fn', 'mantra-page', 'post_section');
- add_settings_field('mantra_postbook', __('Post Permalink','mantra') , 'cryout_setting_postbook_fn', 'mantra-page', 'post_section');
-/*** post exceprts***/
- add_settings_field('mantra_excerpthome', __('Post Excerpts on Home Page','mantra') , 'cryout_setting_excerpthome_fn', 'mantra-page', 'excerpt_section');
- add_settings_field('mantra_excerptsticky', __('Affect Sticky Posts','mantra') , 'cryout_setting_excerptsticky_fn', 'mantra-page', 'excerpt_section');
- add_settings_field('mantra_excerptarchive', __('Post Excerpts on Archive and Category Pages','mantra') , 'cryout_setting_excerptarchive_fn', 'mantra-page', 'excerpt_section');
- add_settings_field('mantra_excerptwords', __('Number of Words for Post Excerpts ','mantra') , 'cryout_setting_excerptwords_fn', 'mantra-page', 'excerpt_section');
- add_settings_field('mantra_magazinelayout', __('Magazine Layout','mantra') , 'cryout_setting_magazinelayout_fn', 'mantra-page', 'excerpt_section');
- add_settings_field('mantra_excerptdots', __('Excerpt suffix','mantra') , 'cryout_setting_excerptdots_fn', 'mantra-page', 'excerpt_section');
- add_settings_field('mantra_excerptcont', __('Continue reading link text ','mantra') , 'cryout_setting_excerptcont_fn', 'mantra-page', 'excerpt_section');
- add_settings_field('mantra_excerpttags', __('HTML tags in Excerpts','mantra') , 'cryout_setting_excerpttags_fn', 'mantra-page', 'excerpt_section');
-/*** featured ***/
- add_settings_field('mantra_fpost', __('Featured Images as POST Thumbnails ','mantra') , 'cryout_setting_fpost_fn', 'mantra-page', 'featured_section');
- add_settings_field('mantra_fauto', __('Auto Select Images From Posts ','mantra') , 'cryout_setting_fauto_fn', 'mantra-page', 'featured_section');
- add_settings_field('mantra_falign', __('Thumbnails Alignment ','mantra') , 'cryout_setting_falign_fn', 'mantra-page', 'featured_section');
- add_settings_field('mantra_fsize', __('Thumbnails Size ','mantra') , 'cryout_setting_fsize_fn', 'mantra-page', 'featured_section');
- add_settings_field('mantra_fheader', __('Featured Images as HEADER Images ','mantra') , 'cryout_setting_fheader_fn', 'mantra-page', 'featured_section');
-/*** socials ***/
- add_settings_field('mantra_socials1', __('Link nr. 1','mantra') , 'cryout_setting_socials1_fn', 'mantra-page', 'socials_section');
- add_settings_field('mantra_socials2', __('Link nr. 2','mantra') , 'cryout_setting_socials2_fn', 'mantra-page', 'socials_section');
- add_settings_field('mantra_socials3', __('Link nr. 3','mantra') , 'cryout_setting_socials3_fn', 'mantra-page', 'socials_section');
- add_settings_field('mantra_socials4', __('Link nr. 4','mantra') , 'cryout_setting_socials4_fn', 'mantra-page', 'socials_section');
- add_settings_field('mantra_socials5', __('Link nr. 5','mantra') , 'cryout_setting_socials5_fn', 'mantra-page', 'socials_section');
- add_settings_field('mantra_socialshow', __('Socials display','mantra') , 'cryout_setting_socialsdisplay_fn', 'mantra-page', 'socials_section');
-/*** misc ***/
- add_settings_field('mantra_copyright', __('Custom Footer Text','mantra') , 'cryout_setting_copyright_fn', 'mantra-page', 'misc_section');
- add_settings_field('mantra_customcss', __('Custom CSS','mantra') , 'cryout_setting_customcss_fn', 'mantra-page', 'misc_section');
- add_settings_field('mantra_customjs', __('Custom JavaScript','mantra') , 'cryout_setting_customjs_fn', 'mantra-page', '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 -->
-<h2 id="empty-placeholder-heading-for-wp441-notice-forced-move"></h2>
-
-<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>
-
-<?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="jsAlert" class=""><b>Checking jQuery functionality...</b><br/><em>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.
-The Parabola Settings page cannot function without jQuery. </em></div>
-
- <div id="main-options">
- <?php
- mantra_theme_settings_placeholder();
- $mantra_theme_data = get_transient( 'mantra_theme_info'); ?>
- <span id="version">
- Mantra v<?php echo _CRYOUT_THEME_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="_blank">
- <input type="hidden" name="cmd" value="_donations">
- <input type="hidden" name="business" value="KYL26KAN4PJC8">
- <input type="hidden" name="item_name" value="Cryout Creations / Mantra Theme donation">
- <input type="hidden" name="currency_code" value="EUR">
- <input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_SM.gif:NonHosted">
- <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>
- <p>Or socially smother, caress and embrace us:</p>
- <div style="display:table;float:none;margin:0 auto;">
- <div id="fb-root"></div><div class="fb-like" data-href="https://www.facebook.com/CryoutCreations" data-layout="button" data-action="like" data-show-faces="false" data-share="false"></div>
- <a href="https://twitter.com/cryoutcreations" class="twitter-follow-button" data-show-count="false" data-show-screen-name="false">Follow @cryoutcreations</a>
- <script src="https://apis.google.com/js/platform.js" async defer></script> <div class="g-plusone" data-href="https://plus.google.com/+CryoutcreationsEuCR2" data-size="medium" data-annotation="none"></div>
- </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') );
- $maxitems = 0;
- if ( ! is_wp_error( $mantra_news ) ) {
- $maxitems = $mantra_news->get_item_quantity( 10 );
- $news_items = $mantra_news->get_items( 0, (int)$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'); ?></span><br />
- <a class="news-read" href='<?php echo esc_url( $news_item->get_permalink() ); ?>'>Read more &raquo;</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()
-?>
+<?php
+// Frontend
+require_once(get_template_directory() . "/admin/defaults.php"); // default options
+require_once(get_template_directory() . "/admin/custom-styles.php"); // custom styling
+
+// Admin side
+if( is_admin() ) {
+ require_once(get_template_directory() . "/admin/settings.php"); // theme settings
+ require_once(get_template_directory() . "/admin/admin-functions.php"); // admin side functions
+ require_once(get_template_directory() . "/admin/sanitize.php"); // settings sanitizers
+}
+
+// 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' ); // hooked by the settings plugin
+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', NULL, _CRYOUT_THEME_VERSION );
+ wp_register_style( 'jquery-ui-style',get_template_directory_uri() . '/js/jqueryui/css/ui-lightness/jquery-ui-1.8.16.custom.css', NULL, _CRYOUT_THEME_VERSION );
+ 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 already 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'), _CRYOUT_THEME_VERSION );
+ wp_enqueue_script('cryout_accordion');
+ }
+
+ // For the WP uploader
+ if(function_exists('wp_enqueue_media')) {
+ wp_enqueue_media();
+ } else {
+ 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', NULL, _CRYOUT_THEME_VERSION );
+ wp_enqueue_script('cryout-admin-js');
+}
+
+// The settings sections. 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', 'mantra-page');
+ add_settings_section('header_section', __('Header Settings','mantra'), 'cryout_section_header_fn', 'mantra-page');
+ add_settings_section('presentation_section', __('Presentation Page','mantra'), 'cryout_section_presentation_fn', 'mantra-page');
+ add_settings_section('text_section', __('Text Settings','mantra'), 'cryout_section_text_fn', 'mantra-page');
+ add_settings_section('appereance_section',__('Color Settings','mantra') , 'cryout_section_appereance_fn', 'mantra-page');
+ add_settings_section('graphics_section', __('Graphics Settings','mantra') , 'cryout_section_graphics_fn', 'mantra-page');
+ add_settings_section('post_section', __('Post Information Settings','mantra') , 'cryout_section_post_fn', 'mantra-page');
+ add_settings_section('excerpt_section', __('Post Excerpt Settings','mantra') , 'cryout_section_excerpt_fn', 'mantra-page');
+ add_settings_section('featured_section', __('Featured Image Settings','mantra') , 'cryout_section_featured_fn', 'mantra-page');
+ add_settings_section('socials_section', __('Social Media Settings','mantra') , 'cryout_section_social_fn', 'mantra-page');
+ add_settings_section('misc_section', __('Miscellaneous Settings','mantra') , 'cryout_section_misc_fn', 'mantra-page');
+
+/*** layout ***/
+ add_settings_field('mantra_side', __('Main Layout','mantra') , 'cryout_setting_side_fn', 'mantra-page', 'layout_section');
+ add_settings_field('mantra_sidewidth', __('Content / Sidebar Width','mantra') , 'cryout_setting_sidewidth_fn', 'mantra-page', 'layout_section');
+ add_settings_field('mantra_mobile', __('Responsiveness','mantra') , 'cryout_setting_mobile_fn', 'mantra-page', 'layout_section');
+/*** presentation ***/
+
+ add_settings_field('mantra_frontpage', __('Enable Presentation Page','mantra') , 'cryout_setting_frontpage_fn', 'mantra-page', 'presentation_section');
+ add_settings_field('mantra_frontposts', __('Show Posts on Presentation Page','mantra') , 'cryout_setting_frontposts_fn', 'mantra-page', 'presentation_section');
+ add_settings_field('mantra_frontslider', __('Slider Settings','mantra') , 'cryout_setting_frontslider_fn', 'mantra-page', 'presentation_section');
+ add_settings_field('mantra_frontslider2', __('Slides','mantra') , 'cryout_setting_frontslider2_fn', 'mantra-page', 'presentation_section');
+ add_settings_field('mantra_frontcolumns', __('Presentation Page Columns','mantra') , 'cryout_setting_frontcolumns_fn', 'mantra-page', 'presentation_section');
+ add_settings_field('mantra_fronttext', __('Extras','mantra') , 'cryout_setting_fronttext_fn', 'mantra-page', 'presentation_section');
+
+/*** header ***/
+ add_settings_field('mantra_hheight', __('Header Height','mantra') , 'cryout_setting_hheight_fn', 'mantra-page', 'header_section');
+ add_settings_field('mantra_himage', __('Header Image','mantra') , 'cryout_setting_himage_fn', 'mantra-page', 'header_section');
+ add_settings_field('mantra_siteheader', __('Site Header','mantra') , 'cryout_setting_siteheader_fn', 'mantra-page', 'header_section');
+ add_settings_field('mantra_logoupload', __('Custom Logo Upload','mantra') , 'cryout_setting_logoupload_fn', 'mantra-page', 'header_section');
+ add_settings_field('mantra_headermargin', __('Header Spacing','mantra') , 'cryout_setting_headermargin_fn', 'mantra-page', 'header_section');
+ add_settings_field('mantra_menurounded', __('Rounded Menu Corners','mantra') , 'cryout_setting_menurounded_fn', 'mantra-page', 'header_section');
+ add_settings_field('mantra_favicon', __('FavIcon Upload','mantra') , 'cryout_setting_favicon_fn', 'mantra-page', 'header_section');
+/*** text ***/
+ add_settings_field('mantra_fontfamily', __('General Font','mantra') , 'cryout_setting_fontfamily_fn', 'mantra-page', 'text_section');
+ add_settings_field('mantra_fontsize', __('General Font Size','mantra') , 'cryout_setting_fontsize_fn', 'mantra-page', 'text_section');
+ add_settings_field('mantra_fonttitle', __('Post Title Font ','mantra') , 'cryout_setting_fonttitle_fn', 'mantra-page', 'text_section');
+ add_settings_field('mantra_headfontsize', __('Post Title Font Size','mantra') , 'cryout_setting_headfontsize_fn', 'mantra-page', 'text_section');
+ add_settings_field('mantra_fontside', __('Sidebar Font','mantra') , 'cryout_setting_fontside_fn', 'mantra-page', 'text_section');
+ add_settings_field('mantra_sidefontsize', __('SideBar Font Size','mantra') , 'cryout_setting_sidefontsize_fn', 'mantra-page', 'text_section');
+ add_settings_field('mantra_fontsubheader', __('Headings Font','mantra') , 'cryout_setting_fontsubheader_fn', 'mantra-page', 'text_section');
+ add_settings_field('mantra_textalign', __('Force Text Align','mantra') , 'cryout_setting_textalign_fn', 'mantra-page', 'text_section');
+ add_settings_field('mantra_parmargin', __('Paragraph spacing','mantra') , 'cryout_setting_parmargin_fn', 'mantra-page', 'text_section');
+ add_settings_field('mantra_parindent', __('Paragraph indent','mantra') , 'cryout_setting_parindent_fn', 'mantra-page', 'text_section');
+ add_settings_field('mantra_headerindent', __('Header indent','mantra') , 'cryout_setting_headerindent_fn', 'mantra-page', 'text_section');
+ add_settings_field('mantra_lineheight', __('Line Height','mantra') , 'cryout_setting_lineheight_fn', 'mantra-page', 'text_section');
+ add_settings_field('mantra_wordspace', __('Word spacing','mantra') , 'cryout_setting_wordspace_fn', 'mantra-page', 'text_section');
+ add_settings_field('mantra_letterspace', __('Letter spacing','mantra') , 'cryout_setting_letterspace_fn', 'mantra-page', 'text_section');
+ add_settings_field('mantra_textshadow', __('Text shadow','mantra') , 'cryout_setting_textshadow_fn', 'mantra-page', 'text_section');
+/*** appereance ***/
+ add_settings_field('mantra_sitebackground', __('Background Image','mantra') , 'cryout_setting_sitebackground_fn', 'mantra-page', 'appereance_section');
+ add_settings_field('mantra_backcolor', __('Background Color','mantra') , 'cryout_setting_backcolor_fn', 'mantra-page', 'appereance_section');
+ add_settings_field('mantra_headercolor', __('Header (Banner and Menu) Background Color','mantra') , 'cryout_setting_headercolor_fn', 'mantra-page', 'appereance_section');
+ add_settings_field('mantra_contentbg', __('Content Background Color','mantra') , 'cryout_setting_contentbg_fn', 'mantra-page', 'appereance_section');
+ add_settings_field('mantra_menubg', __('Menu Items Background Color','mantra') , 'cryout_setting_menubg_fn', 'mantra-page', 'appereance_section');
+ add_settings_field('mantra_s1bg', __('First Sidebar Background Color','mantra') , 'cryout_setting_first_sidebar_fn', 'mantra-page', 'appereance_section');
+ add_settings_field('mantra_s2bg', __('Second Sidebar Background Color','mantra') , 'cryout_setting_second_sidebar_fn', 'mantra-page', 'appereance_section');
+
+ add_settings_field('mantra_titlecolor', __('Site Title Color','mantra') , 'cryout_setting_titlecolor_fn', 'mantra-page', 'appereance_section');
+ add_settings_field('mantra_descriptioncolor', __('Site Description Color','mantra') , 'cryout_setting_descriptioncolor_fn', 'mantra-page', 'appereance_section');
+
+ add_settings_field('mantra_contentcolor', __('Content Text Color','mantra') , 'cryout_setting_contentcolor_fn', 'mantra-page', 'appereance_section');
+ add_settings_field('mantra_linkscolor', __('Links Color','mantra') , 'cryout_setting_linkscolor_fn', 'mantra-page', 'appereance_section');
+ add_settings_field('mantra_hovercolor', __('Links Hover Color','mantra') , 'cryout_setting_hovercolor_fn', 'mantra-page', 'appereance_section');
+ add_settings_field('mantra_headtextcolor',__( 'Post Title Color','mantra') , 'cryout_setting_headtextcolor_fn', 'mantra-page', 'appereance_section');
+ add_settings_field('mantra_headtexthover', __('Post Title Hover Color','mantra') , 'cryout_setting_headtexthover_fn', 'mantra-page', 'appereance_section');
+ add_settings_field('mantra_sideheadbackcolor', __('Sidebar Header Background Color','mantra') , 'cryout_setting_sideheadbackcolor_fn', 'mantra-page', 'appereance_section');
+ add_settings_field('mantra_sideheadtextcolor', __('Sidebar Header Text Color','mantra') , 'cryout_setting_sideheadtextcolor_fn', 'mantra-page', 'appereance_section');
+ add_settings_field('mantra_prefootercolor', __('Footer Widget Background Color','mantra') , 'cryout_setting_prefootercolor_fn', 'mantra-page', 'appereance_section');
+ add_settings_field('mantra_footercolor', __('Footer Background Color','mantra') , 'cryout_setting_footercolor_fn', 'mantra-page', 'appereance_section');
+ add_settings_field('mantra_footerheader', __('Footer Widget Header Text Color','mantra') , 'cryout_setting_footerheader_fn', 'mantra-page', 'appereance_section');
+ add_settings_field('mantra_footertext', __('Footer Widget Link Color','mantra') , 'cryout_setting_footertext_fn', 'mantra-page', 'appereance_section');
+ add_settings_field('mantra_footerhover', __('Footer Widget Hover Color','mantra') , 'cryout_setting_footerhover_fn', 'mantra-page', 'appereance_section');
+/*** graphics ***/
+ add_settings_field('mantra_breadcrumbs', __('Breadcrumbs','mantra') , 'cryout_setting_breadcrumbs_fn', 'mantra-page', 'graphics_section');
+ add_settings_field('mantra_pagination', __('Pagination','mantra') , 'cryout_setting_pagination_fn', 'mantra-page', 'graphics_section');
+ add_settings_field('mantra_menualign', __('Main Menu Alignment','mantra') , 'cryout_setting_menualign_fn', 'mantra-page', 'graphics_section');
+ add_settings_field('mantra_image', __('Post Images Border','mantra') , 'cryout_setting_image_fn', 'mantra-page', 'graphics_section');
+ add_settings_field('mantra_caption', __('Caption Border','mantra') , 'cryout_setting_caption_fn', 'mantra-page', 'graphics_section');
+ add_settings_field('mantra_pin', __('Caption Pin','mantra') , 'cryout_setting_pin_fn', 'mantra-page', 'graphics_section');
+ add_settings_field('mantra_sidebullet', __('Sidebar Menu Bullets','mantra') , 'cryout_setting_sidebullet_fn', 'mantra-page', 'graphics_section');
+ add_settings_field('mantra_metaback', __('Meta Area Background','mantra') , 'cryout_setting_metaback_fn', 'mantra-page', 'graphics_section');
+ add_settings_field('mantra_postseparator', __('Post Separator','mantra') , 'cryout_setting_postseparator_fn', 'mantra-page', 'graphics_section');
+ add_settings_field('mantra_contentlist', __('Content List Bullets','mantra') , 'cryout_setting_contentlist_fn', 'mantra-page', 'graphics_section');
+ add_settings_field('mantra_pagetitle', __('Page Titles','mantra') , 'cryout_setting_pagetitle_fn', 'mantra-page', 'graphics_section');
+ add_settings_field('mantra_categetitle', __('Category Page Titles','mantra') , 'cryout_setting_categtitle_fn', 'mantra-page', 'graphics_section');
+ add_settings_field('mantra_tables', __('Hide Tables','mantra') , 'cryout_setting_tables_fn', 'mantra-page', 'graphics_section');
+ add_settings_field('mantra_backtop', __('Back to Top button','mantra') , 'cryout_setting_backtop_fn', 'mantra-page', 'graphics_section');
+ add_settings_field('mantra_comtext', __('Text Under Comments','mantra') , 'cryout_setting_comtext_fn', 'mantra-page', 'graphics_section');
+ add_settings_field('mantra_comclosed', __('Comments are closed text','mantra') , 'cryout_setting_comclosed_fn', 'mantra-page', 'graphics_section');
+ add_settings_field('mantra_comoff', __('Comments off','mantra') , 'cryout_setting_comoff_fn', 'mantra-page', 'graphics_section');
+/*** post metas***/
+ add_settings_field('mantra_postcomlink', __('Post Comments Link','mantra') , 'cryout_setting_postcomlink_fn', 'mantra-page', 'post_section');
+ add_settings_field('mantra_postdate', __('Post Date','mantra') , 'cryout_setting_postdate_fn', 'mantra-page', 'post_section');
+ add_settings_field('mantra_posttime', __('Post Time','mantra') , 'cryout_setting_posttime_fn', 'mantra-page', 'post_section');
+ add_settings_field('mantra_postauthor', __('Post Author','mantra') , 'cryout_setting_postauthor_fn', 'mantra-page', 'post_section');
+ add_settings_field('mantra_postcateg', __('Post Category','mantra') , 'cryout_setting_postcateg_fn', 'mantra-page', 'post_section');
+ add_settings_field('mantra_postmetas', __('Meta Bar','mantra') , 'cryout_setting_postmetas_fn', 'mantra-page', 'post_section');
+ add_settings_field('mantra_posttag', __('Post Tags','mantra') , 'cryout_setting_posttag_fn', 'mantra-page', 'post_section');
+ add_settings_field('mantra_postbook', __('Post Permalink','mantra') , 'cryout_setting_postbook_fn', 'mantra-page', 'post_section');
+/*** post exceprts***/
+ add_settings_field('mantra_excerpthome', __('Post Excerpts on Home Page','mantra') , 'cryout_setting_excerpthome_fn', 'mantra-page', 'excerpt_section');
+ add_settings_field('mantra_excerptsticky', __('Affect Sticky Posts','mantra') , 'cryout_setting_excerptsticky_fn', 'mantra-page', 'excerpt_section');
+ add_settings_field('mantra_excerptarchive', __('Post Excerpts on Archive and Category Pages','mantra') , 'cryout_setting_excerptarchive_fn', 'mantra-page', 'excerpt_section');
+ add_settings_field('mantra_excerptwords', __('Number of Words for Post Excerpts ','mantra') , 'cryout_setting_excerptwords_fn', 'mantra-page', 'excerpt_section');
+ add_settings_field('mantra_magazinelayout', __('Magazine Layout','mantra') , 'cryout_setting_magazinelayout_fn', 'mantra-page', 'excerpt_section');
+ add_settings_field('mantra_excerptdots', __('Excerpt suffix','mantra') , 'cryout_setting_excerptdots_fn', 'mantra-page', 'excerpt_section');
+ add_settings_field('mantra_excerptcont', __('Continue reading link text ','mantra') , 'cryout_setting_excerptcont_fn', 'mantra-page', 'excerpt_section');
+ add_settings_field('mantra_excerpttags', __('HTML tags in Excerpts','mantra') , 'cryout_setting_excerpttags_fn', 'mantra-page', 'excerpt_section');
+/*** featured ***/
+ add_settings_field('mantra_fpost', __('Featured Images as POST Thumbnails ','mantra') , 'cryout_setting_fpost_fn', 'mantra-page', 'featured_section');
+ add_settings_field('mantra_fauto', __('Auto Select Images From Posts ','mantra') , 'cryout_setting_fauto_fn', 'mantra-page', 'featured_section');
+ add_settings_field('mantra_falign', __('Thumbnails Alignment ','mantra') , 'cryout_setting_falign_fn', 'mantra-page', 'featured_section');
+ add_settings_field('mantra_fsize', __('Thumbnails Size ','mantra') , 'cryout_setting_fsize_fn', 'mantra-page', 'featured_section');
+ add_settings_field('mantra_fheader', __('Featured Images as HEADER Images ','mantra') , 'cryout_setting_fheader_fn', 'mantra-page', 'featured_section');
+/*** socials ***/
+ add_settings_field('mantra_socials1', __('Link nr. 1','mantra') , 'cryout_setting_socials1_fn', 'mantra-page', 'socials_section');
+ add_settings_field('mantra_socials2', __('Link nr. 2','mantra') , 'cryout_setting_socials2_fn', 'mantra-page', 'socials_section');
+ add_settings_field('mantra_socials3', __('Link nr. 3','mantra') , 'cryout_setting_socials3_fn', 'mantra-page', 'socials_section');
+ add_settings_field('mantra_socials4', __('Link nr. 4','mantra') , 'cryout_setting_socials4_fn', 'mantra-page', 'socials_section');
+ add_settings_field('mantra_socials5', __('Link nr. 5','mantra') , 'cryout_setting_socials5_fn', 'mantra-page', 'socials_section');
+ add_settings_field('mantra_socialshow', __('Socials display','mantra') , 'cryout_setting_socialsdisplay_fn', 'mantra-page', 'socials_section');
+/*** misc ***/
+ add_settings_field('mantra_copyright', __('Custom Footer Text','mantra') , 'cryout_setting_copyright_fn', 'mantra-page', 'misc_section');
+ add_settings_field('mantra_customcss', __('Custom CSS','mantra') , 'cryout_setting_customcss_fn', 'mantra-page', 'misc_section');
+ add_settings_field('mantra_customjs', __('Custom JavaScript','mantra') , 'cryout_setting_customjs_fn', 'mantra-page', '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 -->
+<h2 id="empty-placeholder-heading-for-wp441-notice-forced-move"></h2>
+
+<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/wordpress-themes/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>
+
+<?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="jsAlert" class=""><b>Checking jQuery functionality...</b><br/><em>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.
+The Parabola Settings page cannot function without jQuery. </em></div>
+
+ <div id="main-options">
+ <?php
+ mantra_theme_settings_placeholder();
+ $mantra_theme_data = get_transient( 'mantra_theme_info'); ?>
+ <span id="version">
+ Mantra v<?php echo _CRYOUT_THEME_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="_blank">
+ <input type="hidden" name="cmd" value="_donations">
+ <input type="hidden" name="business" value="KYL26KAN4PJC8">
+ <input type="hidden" name="item_name" value="Cryout Creations / Mantra Theme donation">
+ <input type="hidden" name="currency_code" value="EUR">
+ <input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_SM.gif:NonHosted">
+ <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>
+ <p>Or socially smother, caress and embrace us:</p>
+ <div style="display:table;float:none;margin:0 auto;">
+ <div id="fb-root"></div><div class="fb-like" data-href="https://www.facebook.com/CryoutCreations" data-layout="button" data-action="like" data-show-faces="false" data-share="false"></div>
+ <a href="https://twitter.com/cryoutcreations" class="twitter-follow-button" data-show-count="false" data-show-screen-name="false">Follow @cryoutcreations</a>
+ <script src="https://apis.google.com/js/platform.js" async defer></script> <div class="g-plusone" data-href="https://plus.google.com/+CryoutcreationsEuCR2" data-size="medium" data-annotation="none"></div>
+ </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/wordpress-themes/mantra/feed') );
+ $maxitems = 0;
+ if ( ! is_wp_error( $mantra_news ) ) {
+ $maxitems = $mantra_news->get_item_quantity( 10 );
+ $news_items = $mantra_news->get_items( 0, (int)$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'); ?></span><br />
+ <a class="news-read" href='<?php echo esc_url( $news_item->get_permalink() ); ?>'>Read more &raquo;</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
index a95a7c9e..f41f3387 100644
--- a/themes/mantra/admin/sanitize.php
+++ b/themes/mantra/admin/sanitize.php
@@ -1,239 +1,239 @@
-<?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", "Dailymotion", "Delicious", "DeviantArt", "Digg", "Etsy", "Facebook", "Flickr",
- "Google", "GoodReads", "GooglePlus", "IMDb", "Instagram", "LastFM", "LinkedIn", "Mail",
- "MySpace", "Picasa", "Pinterest", "Reddit", "RSS", "Skype", "Steam", "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']; }
-
- if (isset($input['mantra_zoom'])) $input['mantra_zoom'] = "1"; else $input['mantra_zoom'] = 0;
-
- $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;
- }
- for ($i=0;$i<=5;$i++) {
- if (!isset($input['mantra_socialsdisplay'.$i])) {$input['mantra_socialsdisplay'.$i] = "0";}
- }
-
- $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_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= "//fonts.googleapis.com/css?family=".$mantra_googlefont2;
- $input['mantra_googlefont2'] = $mantra_googlefont2;
- } else $input['mantra_googlefont2'] = '';
- if($input['mantra_googlefonttitle']) {
- $mantra_googlefonttitle2 = $input['mantra_googlefonttitle'];
- $mantra_googlefonttitle2= preg_replace( '/\s+/', '+', $mantra_googlefonttitle2 );
- $mantra_googlefonttitle2= "//fonts.googleapis.com/css?family=".$mantra_googlefonttitle2;
- $input['mantra_googlefonttitle2'] = $mantra_googlefonttitle2;
- } else $input['mantra_googlefonttitle2'] = '';
- if($input['mantra_googlefontside']) {
- $mantra_googlefontside2 = $input['mantra_googlefontside'];
- $mantra_googlefontside2= preg_replace( '/\s+/', '+', $mantra_googlefontside2 );
- $mantra_googlefontside2= "//fonts.googleapis.com/css?family=".$mantra_googlefontside2;
- $input['mantra_googlefontside2'] = $mantra_googlefontside2;
- } else $input['mantra_googlefontside2'] = '';
- if($input['mantra_googlefontsubheader']) {
- $mantra_googlefontsubheader2 = $input['mantra_googlefontsubheader'];
- $mantra_googlefontsubheader2= preg_replace( '/\s+/', '+', $mantra_googlefontsubheader2 );
- $mantra_googlefontsubheader2= "//fonts.googleapis.com/css?family=".$mantra_googlefontsubheader2;
- $input['mantra_googlefontsubheader2'] = $mantra_googlefontsubheader2;
- } else $input['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;
-?>
+<?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", "Dailymotion", "Delicious", "DeviantArt", "Digg", "Etsy", "Facebook", "Flickr",
+ "Google", "GoodReads", "GooglePlus", "IMDb", "Instagram", "LastFM", "LinkedIn", "Mail",
+ "MySpace", "Picasa", "Pinterest", "Reddit", "RSS", "Skype", "Steam", "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']; }
+
+ if (isset($input['mantra_zoom'])) $input['mantra_zoom'] = "1"; else $input['mantra_zoom'] = 0;
+
+ $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;
+ }
+ for ($i=0;$i<=5;$i++) {
+ if (!isset($input['mantra_socialsdisplay'.$i])) {$input['mantra_socialsdisplay'.$i] = "0";}
+ }
+
+ $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_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= "//fonts.googleapis.com/css?family=".$mantra_googlefont2;
+ $input['mantra_googlefont2'] = $mantra_googlefont2;
+ } else $input['mantra_googlefont2'] = '';
+ if($input['mantra_googlefonttitle']) {
+ $mantra_googlefonttitle2 = $input['mantra_googlefonttitle'];
+ $mantra_googlefonttitle2= preg_replace( '/\s+/', '+', $mantra_googlefonttitle2 );
+ $mantra_googlefonttitle2= "//fonts.googleapis.com/css?family=".$mantra_googlefonttitle2;
+ $input['mantra_googlefonttitle2'] = $mantra_googlefonttitle2;
+ } else $input['mantra_googlefonttitle2'] = '';
+ if($input['mantra_googlefontside']) {
+ $mantra_googlefontside2 = $input['mantra_googlefontside'];
+ $mantra_googlefontside2= preg_replace( '/\s+/', '+', $mantra_googlefontside2 );
+ $mantra_googlefontside2= "//fonts.googleapis.com/css?family=".$mantra_googlefontside2;
+ $input['mantra_googlefontside2'] = $mantra_googlefontside2;
+ } else $input['mantra_googlefontside2'] = '';
+ if($input['mantra_googlefontsubheader']) {
+ $mantra_googlefontsubheader2 = $input['mantra_googlefontsubheader'];
+ $mantra_googlefontsubheader2= preg_replace( '/\s+/', '+', $mantra_googlefontsubheader2 );
+ $mantra_googlefontsubheader2= "//fonts.googleapis.com/css?family=".$mantra_googlefontsubheader2;
+ $input['mantra_googlefontsubheader2'] = $mantra_googlefontsubheader2;
+ } else $input['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
index ed038549..c60c29c2 100644
--- a/themes/mantra/admin/settings.php
+++ b/themes/mantra/admin/settings.php
@@ -1,2057 +1,2057 @@
-<?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;" >^&mdash;&mdash;&mdash; <?php _e("Total width =","mantra");?> <span id="totalsize"><?php echo $mantra_options['mantra_sidewidth']+ $mantra_options['mantra_sidebar'];?></span>px &mdash;&mdash;&mdash;^</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;" >^&mdash;&mdash;&mdash; <?php _e("Total width =","mantra");?> <span id="totalsizeRel"><?php echo $mantra_options['mantra_sidewidthRel']+$mantra_options['mantra_sidebarRel'];?></span>% &mdash;&mdash;&mdash;^</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>";
-
- echo " <label style='border:none;margin-left:10px;' for='mantra_zoom' class='socialsdisplay'><input ";
- checked($mantra_options['mantra_zoom'],'1');
- echo " value='". $mantra_options['mantra_zoom'] ."' id='mantra_zoom' name='ma_options[mantra_zoom]' type='checkbox' /> Allow zoom </label>";
-
- 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 &raquo; Reading </a> and make sure you have selected <strong>Front Page Displays</strong> as <Strong>Your Latest Posts</strong>.","mantra")."</small></div>";
- if ($mantra_options['mantra_frontpage'] == 'Enable' && get_option('show_on_front') != 'posts') {
- printf ( '<div class="slmini" style="color:#cb5920;">'.__('You have enabled the Presentation Page but your WordPress\' <em>Front page displays</em> option is set to use a static page. WordPress guidelines require that the static page option have priority over theme options.<br> Go to %1$s and set the <em>Front page displays</em> option to <em><strong>Your latest posts</strong></em> to display the presentation page.',"mantra").'</div>', '<a href="/wp-admin/options-reading.php" > Settings &raquo; Reading</a>');
- };
-
-}
-
-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 "<em>".__("Select the content you want to load in your slides:","mantra")." </em> ";
- 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','mantra')."</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");?> &nbsp; &nbsp;
-<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','mantra')."</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>".sprintf(__("By default WordPress excerpts remove all HTML tags (%s 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 -- </small></div>","mantra"),htmlspecialchars('<pre>, <a>, <b>') );
-}
-
-
-////////////////////////////////
-/// 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'> &raquo; </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 &copy .","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 &ltstyle&gt 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 &ltscript&gt tags are not needed.","mantra")."</small></div>";
-}
+<?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;" >^&mdash;&mdash;&mdash; <?php _e("Total width =","mantra");?> <span id="totalsize"><?php echo $mantra_options['mantra_sidewidth']+ $mantra_options['mantra_sidebar'];?></span>px &mdash;&mdash;&mdash;^</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;" >^&mdash;&mdash;&mdash; <?php _e("Total width =","mantra");?> <span id="totalsizeRel"><?php echo $mantra_options['mantra_sidewidthRel']+$mantra_options['mantra_sidebarRel'];?></span>% &mdash;&mdash;&mdash;^</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>";
+
+ echo " <label style='border:none;margin-left:10px;' for='mantra_zoom' class='socialsdisplay'><input ";
+ checked($mantra_options['mantra_zoom'],'1');
+ echo " value='". $mantra_options['mantra_zoom'] ."' id='mantra_zoom' name='ma_options[mantra_zoom]' type='checkbox' /> Allow zoom </label>";
+
+ 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 &raquo; Reading </a> and make sure you have selected <strong>Front Page Displays</strong> as <Strong>Your Latest Posts</strong>.","mantra")."</small></div>";
+ if ($mantra_options['mantra_frontpage'] == 'Enable' && get_option('show_on_front') != 'posts') {
+ printf ( '<div class="slmini" style="color:#cb5920;">'.__('You have enabled the Presentation Page but your WordPress\' <em>Front page displays</em> option is set to use a static page. WordPress guidelines require that the static page option have priority over theme options.<br> Go to %1$s and set the <em>Front page displays</em> option to <em><strong>Your latest posts</strong></em> to display the presentation page.',"mantra").'</div>', '<a href="/wp-admin/options-reading.php" > Settings &raquo; Reading</a>');
+ };
+
+}
+
+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 "<em>".__("Select the content you want to load in your slides:","mantra")." </em> ";
+ 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','mantra')."</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");?> &nbsp; &nbsp;
+<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','mantra')."</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>".sprintf(__("By default WordPress excerpts remove all HTML tags (%s 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 -- </small></div>","mantra"),htmlspecialchars('<pre>, <a>, <b>') );
+}
+
+
+////////////////////////////////
+/// 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'> &raquo; </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 &copy .","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 &ltstyle&gt 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 &ltscript&gt tags are not needed.","mantra")."</small></div>";
+}
?> \ No newline at end of file
diff --git a/themes/mantra/archive.php b/themes/mantra/archive.php
index bd14c3e3..bc644e7c 100644
--- a/themes/mantra/archive.php
+++ b/themes/mantra/archive.php
@@ -1,76 +1,76 @@
-<?php
-/**
- * The template for displaying Archive pages.
- *
- * Used to display archive-type pages if nothing more specific matches a query.
- * For example, puts together date-based pages if no date.php file exists.
- *
- * Learn more: http://codex.wordpress.org/Template_Hierarchy
- *
- * @package Cryout Creations
- * @subpackage Mantra
- * @since Mantra 1.0
- */
-
-get_header(); ?>
-
- <section id="container">
- <div id="content" role="main">
-
- <?php cryout_before_content_hook(); ?>
-
- <?php if ( have_posts() ) : ?>
-
- <header class="page-header">
- <h1 class="page-title">
- <?php if ( is_day() ) : ?>
- <?php printf( __( 'Daily Archives: %s', 'mantra' ), '<span>' . get_the_date() . '</span>' ); ?>
- <?php elseif ( is_month() ) : ?>
- <?php printf( __( 'Monthly Archives: %s', 'mantra' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'mantra' ) ) . '</span>' ); ?>
- <?php elseif ( is_year() ) : ?>
- <?php printf( __( 'Yearly Archives: %s', 'mantra' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'mantra' ) ) . '</span>' ); ?>
- <?php else : ?>
- <?php _e( 'Blog Archives', 'mantra' ); ?>
- <?php endif; ?>
- </h1>
- </header>
-
- <?php mantra_content_nav( 'nav-above' ); ?>
-
- <?php /* Start the Loop */ ?>
- <?php while ( have_posts() ) : the_post(); ?>
-
- <?php
- /* Include the Post-Format-specific template for the content.
- * If you want to overload this in a child theme then include a file
- * called content-___.php (where ___ is the Post Format name) and that will be used instead.
- */
- get_template_part( 'content', get_post_format() );
- ?>
-
- <?php endwhile; ?>
-
- <?php if($mantra_pagination=="Enable") mantra_pagination(); else mantra_content_nav( 'nav-below' ); ?>
-
- <?php else : ?>
-
- <article id="post-0" class="post no-results not-found">
- <header class="entry-header">
- <h1 class="entry-title"><?php _e( 'Nothing Found', 'mantra' ); ?></h1>
- </header><!-- .entry-header -->
-
- <div class="entry-content">
- <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'mantra' ); ?></p>
- <?php get_search_form(); ?>
- </div><!-- .entry-content -->
- </article><!-- #post-0 -->
-
- <?php endif; ?>
-
- <?php cryout_after_content_hook(); ?>
- </div><!-- #content -->
- <?php get_sidebar(); ?>
- </section><!-- #primary -->
-
-
+<?php
+/**
+ * The template for displaying Archive pages.
+ *
+ * Used to display archive-type pages if nothing more specific matches a query.
+ * For example, puts together date-based pages if no date.php file exists.
+ *
+ * Learn more: http://codex.wordpress.org/Template_Hierarchy
+ *
+ * @package Cryout Creations
+ * @subpackage Mantra
+ * @since Mantra 1.0
+ */
+
+get_header(); ?>
+
+ <section id="container">
+ <div id="content" role="main">
+
+ <?php cryout_before_content_hook(); ?>
+
+ <?php if ( have_posts() ) : ?>
+
+ <header class="page-header">
+ <h1 class="page-title">
+ <?php if ( is_day() ) : ?>
+ <?php printf( __( 'Daily Archives: %s', 'mantra' ), '<span>' . get_the_date() . '</span>' ); ?>
+ <?php elseif ( is_month() ) : ?>
+ <?php printf( __( 'Monthly Archives: %s', 'mantra' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'mantra' ) ) . '</span>' ); ?>
+ <?php elseif ( is_year() ) : ?>
+ <?php printf( __( 'Yearly Archives: %s', 'mantra' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'mantra' ) ) . '</span>' ); ?>
+ <?php else : ?>
+ <?php _e( 'Blog Archives', 'mantra' ); ?>
+ <?php endif; ?>
+ </h1>
+ </header>
+
+ <?php mantra_content_nav( 'nav-above' ); ?>
+
+ <?php /* Start the Loop */ ?>
+ <?php while ( have_posts() ) : the_post(); ?>
+
+ <?php
+ /* Include the Post-Format-specific template for the content.
+ * If you want to overload this in a child theme then include a file
+ * called content-___.php (where ___ is the Post Format name) and that will be used instead.
+ */
+ get_template_part( 'content', get_post_format() );
+ ?>
+
+ <?php endwhile; ?>
+
+ <?php if($mantra_pagination=="Enable") mantra_pagination(); else mantra_content_nav( 'nav-below' ); ?>
+
+ <?php else : ?>
+
+ <article id="post-0" class="post no-results not-found">
+ <header class="entry-header">
+ <h1 class="entry-title"><?php _e( 'Nothing Found', 'mantra' ); ?></h1>
+ </header><!-- .entry-header -->
+
+ <div class="entry-content">
+ <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'mantra' ); ?></p>
+ <?php get_search_form(); ?>
+ </div><!-- .entry-content -->
+ </article><!-- #post-0 -->
+
+ <?php endif; ?>
+
+ <?php cryout_after_content_hook(); ?>
+ </div><!-- #content -->
+ <?php get_sidebar(); ?>
+ </section><!-- #primary -->
+
+
<?php get_footer(); ?> \ No newline at end of file
diff --git a/themes/mantra/attachment.php b/themes/mantra/attachment.php
index 6d2d3f73..be1ce096 100644
--- a/themes/mantra/attachment.php
+++ b/themes/mantra/attachment.php
@@ -1,119 +1,119 @@
-<?php
-/**
- * The template for displaying attachments.
- *
- * @package Cryout Creations
- * @subpackage mantra
- * @since mantra 0.5
- */
-
-get_header(); ?>
-
- <section id="container" class="single-attachment">
- <div id="content" role="main">
-
-<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
-
- <?php if ( ! empty( $post->post_parent ) ) : ?>
- <p class="page-title"><a href="<?php echo get_permalink( $post->post_parent ); ?>" title="<?php esc_attr( printf( __( 'Return to %s', 'mantra' ), get_the_title( $post->post_parent ) ) ); ?>" rel="gallery"><?php
- /* translators: %s - title of parent post */
- printf( '<span class="meta-nav">&laquo;</span> %s', get_the_title( $post->post_parent ) );
- ?></a></p>
- <?php endif; ?>
-
- <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
- <h2 class="entry-title"><?php the_title(); ?></h2>
-
- <div class="entry-meta">
- <?php
- printf('<span class="%1$s">'.__('By','mantra').'</span> %2$s',
- 'meta-prep meta-prep-author',
- sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s">%3$s</a></span>',
- get_author_posts_url( get_the_author_meta( 'ID' ) ),
- sprintf( esc_attr__( 'View all posts by %s', 'mantra' ), get_the_author() ),
- get_the_author()
- )
- );
- ?>
- <span class="meta-sep">|</span>
- <?php
- printf( '<span class="%1$s">'.__('Published','mantra').'</span> %2$s',
- 'meta-prep meta-prep-entry-date',
- sprintf( '<span class="entry-date"><abbr class="published" title="%1$s">%2$s</abbr></span>',
- esc_attr( get_the_time() ),
- get_the_date()
- )
- );
- if ( wp_attachment_is_image() ) {
- echo ' <span class="meta-sep">|</span> ';
- $metadata = wp_get_attachment_metadata();
- printf( __( 'Full size is %s pixels', 'mantra'),
- sprintf( '<a href="%1$s" title="%2$s">%3$s &times; %4$s</a>',
- wp_get_attachment_url(),
- esc_attr( __('Link to full-size image', 'mantra') ),
- $metadata['width'],
- $metadata['height']
- )
- );
- }
- ?>
- <?php edit_post_link( __( 'Edit', 'mantra' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
- </div><!-- .entry-meta -->
-
- <div class="entry-content">
- <div class="entry-attachment">
-<?php if ( wp_attachment_is_image() ) :
- $attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) );
- foreach ( $attachments as $k => $attachment ) {
- if ( $attachment->ID == $post->ID )
- break;
- }
- $k++;
- // If there is more than 1 image attachment in a gallery
- if ( count( $attachments ) > 1 ) {
- if ( isset( $attachments[ $k ] ) )
- // get the URL of the next image attachment
- $next_attachment_url = get_attachment_link( $attachments[ $k ]->ID );
- else
- // or get the URL of the first image attachment
- $next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID );
- } else {
- // or, if there's only 1 image attachment, get the URL of the image
- $next_attachment_url = wp_get_attachment_url();
- }
-?>
- <p class="attachment"><a href="<?php echo $next_attachment_url; ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php
- $attachment_size = apply_filters( 'mantra_attachment_size', 900 );
- echo wp_get_attachment_image( $post->ID, array( $attachment_size, 9999 ) ); // filterable image width with, essentially, no limit for image height.
- ?></a></p>
-
- <div id="nav-below" class="navigation">
- <div class="nav-previous">&laquo; <?php previous_image_link( false ); ?></div>
- <div class="nav-next"><?php next_image_link( false ); ?> &raquo;</div>
- </div><!-- #nav-below -->
-<?php else : ?>
- <a href="<?php echo wp_get_attachment_url(); ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php echo basename( get_permalink() ); ?></a>
-<?php endif; ?>
- </div><!-- .entry-attachment -->
- <div class="entry-caption"><?php if ( !empty( $post->post_excerpt ) ) the_excerpt(); ?></div>
-
-<?php the_content( __( 'Continue reading','mantra').' <span class="meta-nav">&rarr;</span>' ); ?>
-<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'mantra' ), 'after' => '</div>' ) ); ?>
-
- </div><!-- .entry-content -->
-
- <div class="entry-utility">
- <?php mantra_posted_in(); ?>
- <?php edit_post_link( __( 'Edit', 'mantra' ), ' <span class="edit-link">', '</span>' ); ?>
- </div><!-- .entry-utility -->
- </div><!-- #post-## -->
-
-<?php comments_template(); ?>
-
-<?php endwhile; ?>
-
- </div><!-- #content -->
-<?php // get_sidebar(); // sidebars disabled on attachment page; alt css used ?>
- </section><!-- #container -->
-
-<?php get_footer(); ?>
+<?php
+/**
+ * The template for displaying attachments.
+ *
+ * @package Cryout Creations
+ * @subpackage mantra
+ * @since mantra 0.5
+ */
+
+get_header(); ?>
+
+ <section id="container" class="single-attachment">
+ <div id="content" role="main">
+
+<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
+
+ <?php if ( ! empty( $post->post_parent ) ) : ?>
+ <p class="page-title"><a href="<?php echo get_permalink( $post->post_parent ); ?>" title="<?php esc_attr( printf( __( 'Return to %s', 'mantra' ), get_the_title( $post->post_parent ) ) ); ?>" rel="gallery"><?php
+ /* translators: %s - title of parent post */
+ printf( '<span class="meta-nav">&laquo;</span> %s', get_the_title( $post->post_parent ) );
+ ?></a></p>
+ <?php endif; ?>
+
+ <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
+ <h2 class="entry-title"><?php the_title(); ?></h2>
+
+ <div class="entry-meta">
+ <?php
+ printf('<span class="%1$s">'.__('By','mantra').'</span> %2$s',
+ 'meta-prep meta-prep-author',
+ sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s">%3$s</a></span>',
+ get_author_posts_url( get_the_author_meta( 'ID' ) ),
+ sprintf( esc_attr__( 'View all posts by %s', 'mantra' ), get_the_author() ),
+ get_the_author()
+ )
+ );
+ ?>
+ <span class="meta-sep">|</span>
+ <?php
+ printf( '<span class="%1$s">'.__('Published','mantra').'</span> %2$s',
+ 'meta-prep meta-prep-entry-date',
+ sprintf( '<span class="entry-date"><abbr class="published" title="%1$s">%2$s</abbr></span>',
+ esc_attr( get_the_time() ),
+ get_the_date()
+ )
+ );
+ if ( wp_attachment_is_image() ) {
+ echo ' <span class="meta-sep">|</span> ';
+ $metadata = wp_get_attachment_metadata();
+ printf( __( 'Full size is %s pixels', 'mantra'),
+ sprintf( '<a href="%1$s" title="%2$s">%3$s &times; %4$s</a>',
+ wp_get_attachment_url(),
+ esc_attr( __('Link to full-size image', 'mantra') ),
+ $metadata['width'],
+ $metadata['height']
+ )
+ );
+ }
+ ?>
+ <?php edit_post_link( __( 'Edit', 'mantra' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
+ </div><!-- .entry-meta -->
+
+ <div class="entry-content">
+ <div class="entry-attachment">
+<?php if ( wp_attachment_is_image() ) :
+ $attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) );
+ foreach ( $attachments as $k => $attachment ) {
+ if ( $attachment->ID == $post->ID )
+ break;
+ }
+ $k++;
+ // If there is more than 1 image attachment in a gallery
+ if ( count( $attachments ) > 1 ) {
+ if ( isset( $attachments[ $k ] ) )
+ // get the URL of the next image attachment
+ $next_attachment_url = get_attachment_link( $attachments[ $k ]->ID );
+ else
+ // or get the URL of the first image attachment
+ $next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID );
+ } else {
+ // or, if there's only 1 image attachment, get the URL of the image
+ $next_attachment_url = wp_get_attachment_url();
+ }
+?>
+ <p class="attachment"><a href="<?php echo $next_attachment_url; ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php
+ $attachment_size = apply_filters( 'mantra_attachment_size', 900 );
+ echo wp_get_attachment_image( $post->ID, array( $attachment_size, 9999 ) ); // filterable image width with, essentially, no limit for image height.
+ ?></a></p>
+
+ <div id="nav-below" class="navigation">
+ <div class="nav-previous">&laquo; <?php previous_image_link( false ); ?></div>
+ <div class="nav-next"><?php next_image_link( false ); ?> &raquo;</div>
+ </div><!-- #nav-below -->
+<?php else : ?>
+ <a href="<?php echo wp_get_attachment_url(); ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php echo basename( get_permalink() ); ?></a>
+<?php endif; ?>
+ </div><!-- .entry-attachment -->
+ <div class="entry-caption"><?php if ( !empty( $post->post_excerpt ) ) the_excerpt(); ?></div>
+
+<?php the_content( __( 'Continue reading','mantra').' <span class="meta-nav">&rarr;</span>' ); ?>
+<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'mantra' ), 'after' => '</div>' ) ); ?>
+
+ </div><!-- .entry-content -->
+
+ <div class="entry-utility">
+ <?php mantra_posted_in(); ?>
+ <?php edit_post_link( __( 'Edit', 'mantra' ), ' <span class="edit-link">', '</span>' ); ?>
+ </div><!-- .entry-utility -->
+ </div><!-- #post-## -->
+
+<?php comments_template(); ?>
+
+<?php endwhile; ?>
+
+ </div><!-- #content -->
+<?php // get_sidebar(); // sidebars disabled on attachment page; alt css used ?>
+ </section><!-- #container -->
+
+<?php get_footer(); ?>
diff --git a/themes/mantra/author.php b/themes/mantra/author.php
index 393a4297..c8423b99 100644
--- a/themes/mantra/author.php
+++ b/themes/mantra/author.php
@@ -1,92 +1,92 @@
-<?php
-/**
- * The template for displaying Author Archive pages.
- *
- * @package Cryout Creations
- * @subpackage Mantra
- * @since Mantra 1.0
- */
-
-get_header(); ?>
-
- <section id="container">
- <div id="content" role="main">
- <?php cryout_before_content_hook(); ?>
-
- <?php if ( have_posts() ) : ?>
-
- <?php
- /* Queue the first post, that way we know
- * what author we're dealing with (if that is the case).
- *
- * We reset this later so we can run the loop
- * properly with a call to rewind_posts().
- */
- the_post();
- ?>
-
- <header class="page-header">
- <h1 class="page-title author"><?php printf( __( 'Author Archives: %s', 'mantra' ), '<span class="vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( "ID" ) ) ) . '" title="' . esc_attr( get_the_author() ) . '" rel="me">' . get_the_author() . '</a></span>' ); ?></h1>
- </header>
-
- <?php
- /* Since we called the_post() above, we need to
- * rewind the loop back to the beginning that way
- * we can run the loop properly, in full.
- */
- rewind_posts();
- ?>
-
- <?php mantra_content_nav( 'nav-above' ); ?>
-
- <?php
- // If a user has filled out their description, show a bio on their entries.
- if ( get_the_author_meta( 'description' ) ) : ?>
- <div id="author-info">
- <div id="author-avatar">
- <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'mantra_author_bio_avatar_size', 60 ) ); ?>
- </div><!-- #author-avatar -->
- <div id="author-description">
- <h2><?php printf( __( 'About %s', 'mantra' ), get_the_author() ); ?></h2>
- <?php the_author_meta( 'description' ); ?>
- </div><!-- #author-description -->
- </div><!-- #entry-author-info -->
- <?php endif; ?>
-
- <?php /* Start the Loop */ ?>
- <?php while ( have_posts() ) : the_post(); ?>
-
- <?php
- /* Include the Post-Format-specific template for the content.
- * If you want to overload this in a child theme then include a file
- * called content-___.php (where ___ is the Post Format name) and that will be used instead.
- */
- get_template_part( 'content', get_post_format() );
- ?>
-
- <?php endwhile; ?>
-
- <?php if($mantra_pagination=="Enable") mantra_pagination(); else mantra_content_nav( 'nav-below' ); ?>
-
- <?php else : ?>
-
- <article id="post-0" class="post no-results not-found">
- <header class="entry-header">
- <h1 class="entry-title"><?php _e( 'Nothing Found', 'mantra' ); ?></h1>
- </header><!-- .entry-header -->
-
- <div class="entry-content">
- <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'mantra' ); ?></p>
- <?php get_search_form(); ?>
- </div><!-- .entry-content -->
- </article><!-- #post-0 -->
-
- <?php endif; ?>
-
- <?php cryout_after_content_hook(); ?>
- </div><!-- #content -->
- <?php get_sidebar(); ?>
- </section><!-- #primary -->
-
-
+<?php
+/**
+ * The template for displaying Author Archive pages.
+ *
+ * @package Cryout Creations
+ * @subpackage Mantra
+ * @since Mantra 1.0
+ */
+
+get_header(); ?>
+
+ <section id="container">
+ <div id="content" role="main">
+ <?php cryout_before_content_hook(); ?>
+
+ <?php if ( have_posts() ) : ?>
+
+ <?php
+ /* Queue the first post, that way we know
+ * what author we're dealing with (if that is the case).
+ *
+ * We reset this later so we can run the loop
+ * properly with a call to rewind_posts().
+ */
+ the_post();
+ ?>
+
+ <header class="page-header">
+ <h1 class="page-title author"><?php printf( __( 'Author Archives: %s', 'mantra' ), '<span class="vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( "ID" ) ) ) . '" title="' . esc_attr( get_the_author() ) . '" rel="me">' . get_the_author() . '</a></span>' ); ?></h1>
+ </header>
+
+ <?php
+ /* Since we called the_post() above, we need to
+ * rewind the loop back to the beginning that way
+ * we can run the loop properly, in full.
+ */
+ rewind_posts();
+ ?>
+
+ <?php mantra_content_nav( 'nav-above' ); ?>
+
+ <?php
+ // If a user has filled out their description, show a bio on their entries.
+ if ( get_the_author_meta( 'description' ) ) : ?>
+ <div id="author-info">
+ <div id="author-avatar">
+ <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'mantra_author_bio_avatar_size', 60 ) ); ?>
+ </div><!-- #author-avatar -->
+ <div id="author-description">
+ <h2><?php printf( __( 'About %s', 'mantra' ), get_the_author() ); ?></h2>
+ <?php the_author_meta( 'description' ); ?>
+ </div><!-- #author-description -->
+ </div><!-- #entry-author-info -->
+ <?php endif; ?>
+
+ <?php /* Start the Loop */ ?>
+ <?php while ( have_posts() ) : the_post(); ?>
+
+ <?php
+ /* Include the Post-Format-specific template for the content.
+ * If you want to overload this in a child theme then include a file
+ * called content-___.php (where ___ is the Post Format name) and that will be used instead.
+ */
+ get_template_part( 'content', get_post_format() );
+ ?>
+
+ <?php endwhile; ?>
+
+ <?php if($mantra_pagination=="Enable") mantra_pagination(); else mantra_content_nav( 'nav-below' ); ?>
+
+ <?php else : ?>
+
+ <article id="post-0" class="post no-results not-found">
+ <header class="entry-header">
+ <h1 class="entry-title"><?php _e( 'Nothing Found', 'mantra' ); ?></h1>
+ </header><!-- .entry-header -->
+
+ <div class="entry-content">
+ <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'mantra' ); ?></p>
+ <?php get_search_form(); ?>
+ </div><!-- .entry-content -->
+ </article><!-- #post-0 -->
+
+ <?php endif; ?>
+
+ <?php cryout_after_content_hook(); ?>
+ </div><!-- #content -->
+ <?php get_sidebar(); ?>
+ </section><!-- #primary -->
+
+
<?php get_footer(); ?> \ No newline at end of file
diff --git a/themes/mantra/category.php b/themes/mantra/category.php
index efe03b6b..39900cbd 100644
--- a/themes/mantra/category.php
+++ b/themes/mantra/category.php
@@ -1,67 +1,67 @@
-<?php
-/**
- * The template for displaying Category Archive pages.
- *
- * @package Cryout Creations
- * @subpackage Mantra
- * @since Mantra 1.0
- */
-
-get_header(); ?>
-
- <section id="container">
- <div id="content" role="main">
- <?php cryout_before_content_hook(); ?>
-
- <?php if ( have_posts() ) : ?>
-
- <header class="page-header">
- <h1 class="page-title"><?php
- printf( __( 'Category Archives: %s', 'mantra' ), '<span>' . single_cat_title( '', false ) . '</span>' );
- ?></h1>
-
- <?php
- $category_description = category_description();
- if ( ! empty( $category_description ) )
- echo apply_filters( 'category_archive_meta', '<div class="category-archive-meta">' . $category_description . '</div>' );
- ?>
- </header>
-
- <?php mantra_content_nav( 'nav-above' ); ?>
-
- <?php /* Start the Loop */ ?>
- <?php while ( have_posts() ) : the_post(); ?>
-
- <?php
- /* Include the Post-Format-specific template for the content.
- * If you want to overload this in a child theme then include a file
- * called content-___.php (where ___ is the Post Format name) and that will be used instead.
- */
- get_template_part( 'content', get_post_format() );
- ?>
-
- <?php endwhile; ?>
-
- <?php if($mantra_pagination=="Enable") mantra_pagination(); else mantra_content_nav( 'nav-below' ); ?>
-
- <?php else : ?>
-
- <article id="post-0" class="post no-results not-found">
- <header class="entry-header">
- <h1 class="entry-title"><?php _e( 'Nothing Found', 'mantra' ); ?></h1>
- </header><!-- .entry-header -->
-
- <div class="entry-content">
- <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'mantra' ); ?></p>
- <?php get_search_form(); ?>
- </div><!-- .entry-content -->
- </article><!-- #post-0 -->
-
- <?php endif; ?>
-
- <?php cryout_after_content_hook(); ?>
- </div><!-- #content -->
- <?php get_sidebar(); ?>
- </section><!-- #primary -->
-
-<?php get_footer(); ?>
+<?php
+/**
+ * The template for displaying Category Archive pages.
+ *
+ * @package Cryout Creations
+ * @subpackage Mantra
+ * @since Mantra 1.0
+ */
+
+get_header(); ?>
+
+ <section id="container">
+ <div id="content" role="main">
+ <?php cryout_before_content_hook(); ?>
+
+ <?php if ( have_posts() ) : ?>
+
+ <header class="page-header">
+ <h1 class="page-title"><?php
+ printf( __( 'Category Archives: %s', 'mantra' ), '<span>' . single_cat_title( '', false ) . '</span>' );
+ ?></h1>
+
+ <?php
+ $category_description = category_description();
+ if ( ! empty( $category_description ) )
+ echo apply_filters( 'category_archive_meta', '<div class="category-archive-meta">' . $category_description . '</div>' );
+ ?>
+ </header>
+
+ <?php mantra_content_nav( 'nav-above' ); ?>
+
+ <?php /* Start the Loop */ ?>
+ <?php while ( have_posts() ) : the_post(); ?>
+
+ <?php
+ /* Include the Post-Format-specific template for the content.
+ * If you want to overload this in a child theme then include a file
+ * called content-___.php (where ___ is the Post Format name) and that will be used instead.
+ */
+ get_template_part( 'content', get_post_format() );
+ ?>
+
+ <?php endwhile; ?>
+
+ <?php if($mantra_pagination=="Enable") mantra_pagination(); else mantra_content_nav( 'nav-below' ); ?>
+
+ <?php else : ?>
+
+ <article id="post-0" class="post no-results not-found">
+ <header class="entry-header">
+ <h1 class="entry-title"><?php _e( 'Nothing Found', 'mantra' ); ?></h1>
+ </header><!-- .entry-header -->
+
+ <div class="entry-content">
+ <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'mantra' ); ?></p>
+ <?php get_search_form(); ?>
+ </div><!-- .entry-content -->
+ </article><!-- #post-0 -->
+
+ <?php endif; ?>
+
+ <?php cryout_after_content_hook(); ?>
+ </div><!-- #content -->
+ <?php get_sidebar(); ?>
+ </section><!-- #primary -->
+
+<?php get_footer(); ?>
diff --git a/themes/mantra/comments.php b/themes/mantra/comments.php
index 4459314c..6f0da4a5 100644
--- a/themes/mantra/comments.php
+++ b/themes/mantra/comments.php
@@ -1,53 +1,53 @@
-<?php
-/**
- * The template for displaying Comments.
- *
- * The area of the page that contains both current comments
- * and the comment form. The actual display of comments is
- * handled by a callback to mantra_comment which is
- * located in the includes/theme-comments.php file.
- *
- * @package Cryout Creations
- * @subpackage mantra
- * @since mantra 0.5
- */
-?>
-
- <div id="comments">
-<?php if ( post_password_required() ) : ?>
- <p class="nopassword"><?php _e( 'This post is password protected. Enter the password to view any comments.', 'mantra' ); ?></p>
- </div><!-- #comments -->
-<?php
- /* Stop the rest of comments.php from being processed,
- * but don't kill the script entirely -- we still have
- * to fully load the template.
- */
- return;
- endif;
-?>
-
-<?php
- // You can start editing here -- including this comment!
-?>
-
-<?php if ( have_comments() ) :
-
- cryout_before_comments_hook(); ?>
-
- <ol class="commentlist">
-
- <?php cryout_comments_hook(); ?>
-
- </ol>
-
- <?php cryout_after_comments_hook();
-
-?><?php else : // or, if we don't have comments:
-
- cryout_nocomments_hook();
-
- endif; // end have_comments() ?>
-
-<?php comment_form(); ?>
-
-</div><!-- #comments -->
+<?php
+/**
+ * The template for displaying Comments.
+ *
+ * The area of the page that contains both current comments
+ * and the comment form. The actual display of comments is
+ * handled by a callback to mantra_comment which is
+ * located in the includes/theme-comments.php file.
+ *
+ * @package Cryout Creations
+ * @subpackage mantra
+ * @since mantra 0.5
+ */
+?>
+
+ <div id="comments">
+<?php if ( post_password_required() ) : ?>
+ <p class="nopassword"><?php _e( 'This post is password protected. Enter the password to view any comments.', 'mantra' ); ?></p>
+ </div><!-- #comments -->
+<?php
+ /* Stop the rest of comments.php from being processed,
+ * but don't kill the script entirely -- we still have
+ * to fully load the template.
+ */
+ return;
+ endif;
+?>
+
+<?php
+ // You can start editing here -- including this comment!
+?>
+
+<?php if ( have_comments() ) :
+
+ cryout_before_comments_hook(); ?>
+
+ <ol class="commentlist">
+
+ <?php cryout_comments_hook(); ?>
+
+ </ol>
+
+ <?php cryout_after_comments_hook();
+
+?><?php else : // or, if we don't have comments:
+
+ cryout_nocomments_hook();
+
+ endif; // end have_comments() ?>
+
+<?php comment_form(); ?>
+
+</div><!-- #comments -->
diff --git a/themes/mantra/content-aside.php b/themes/mantra/content-aside.php
index 22ecf32c..5b275d81 100644
--- a/themes/mantra/content-aside.php
+++ b/themes/mantra/content-aside.php
@@ -1,51 +1,49 @@
-<?php
-/**
- * The template for displaying posts in the Aside Post Format on index and archive pages
- *
- * Learn more: http://codex.wordpress.org/Post_Formats
- *
- * @package Cryout Creations
- * @subpackage Mantra
- * @since Mantra 0.5
- */
-?>
-
- <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
- <header class="entry-header">
- <hgroup>
- <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'mantra' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
- </hgroup>
- <?php cryout_post_title_hook(); ?>
- <div class="entry-meta2">
-<h3 class="entry-format"><?php _e( 'Aside', 'mantra' ); ?></h3>
- <?php mantra_posted_on(); ?>
- <?php /* if ( comments_open() && ! post_password_required() ) :*/ ?>
- <div class="comments-link">
- <?php mantra_comments_on(); ?>
- </div>
- <?php /* endif; */ ?><?php
- cryout_post_meta_hook(); ?>
- </div><!-- .entry-meta2 -->
-
- </header><!-- .entry-header -->
- <?php cryout_post_before_content_hook();
- ?><?php if ( is_search() ) : // Only display Excerpts for Search ?>
- <div class="entry-summary">
- <?php the_excerpt(); ?>
- </div><!-- .entry-summary -->
- <?php else : ?>
- <div class="entry-content">
- <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'mantra' ) ); ?>
- <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'mantra' ) . '</span>', 'after' => '</div>' ) ); ?>
- </div><!-- .entry-content -->
- <?php endif; ?><?php
- cryout_post_after_content_hook(); ?>
- <footer class="entry-meta2">
- <?php $tag_list = get_the_tag_list( '', ', ' );
-if ( $tag_list ) { ?>
- <span class="bl_tagg"><?php _e( 'Tagged','mantra'); print ' '.$tag_list; ?></span>
- <?php } ?>
- <?php edit_post_link( __( 'Edit', 'mantra' ), '<span class="edit-link">', '</span>' ); ?><?php
- cryout_post_footer_hook(); ?>
- </footer><!-- #entry-meta -->
- </article><!-- #post-<?php the_ID(); ?> -->
+<?php
+/**
+ * The template for displaying posts in the Aside Post Format on index and archive pages
+ *
+ * Learn more: http://codex.wordpress.org/Post_Formats
+ *
+ * @package Cryout Creations
+ * @subpackage Mantra
+ * @since Mantra 0.5
+ */
+?>
+
+ <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
+ <header class="entry-header">
+ <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'mantra' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
+ <?php cryout_post_title_hook(); ?>
+ <div class="entry-meta2">
+<h3 class="entry-format"><?php _e( 'Aside', 'mantra' ); ?></h3>
+ <?php mantra_posted_on(); ?>
+ <?php /* if ( comments_open() && ! post_password_required() ) :*/ ?>
+ <div class="comments-link">
+ <?php mantra_comments_on(); ?>
+ </div>
+ <?php /* endif; */ ?><?php
+ cryout_post_meta_hook(); ?>
+ </div><!-- .entry-meta2 -->
+
+ </header><!-- .entry-header -->
+ <?php cryout_post_before_content_hook();
+ ?><?php if ( is_search() ) : // Only display Excerpts for Search ?>
+ <div class="entry-summary">
+ <?php the_excerpt(); ?>
+ </div><!-- .entry-summary -->
+ <?php else : ?>
+ <div class="entry-content">
+ <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'mantra' ) ); ?>
+ <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'mantra' ) . '</span>', 'after' => '</div>' ) ); ?>
+ </div><!-- .entry-content -->
+ <?php endif; ?><?php
+ cryout_post_after_content_hook(); ?>
+ <footer class="entry-meta2">
+ <?php $tag_list = get_the_tag_list( '', ', ' );
+if ( $tag_list ) { ?>
+ <span class="bl_tagg"><?php _e( 'Tagged','mantra'); print ' '.$tag_list; ?></span>
+ <?php } ?>
+ <?php edit_post_link( __( 'Edit', 'mantra' ), '<span class="edit-link">', '</span>' ); ?><?php
+ cryout_post_footer_hook(); ?>
+ </footer><!-- #entry-meta -->
+ </article><!-- #post-<?php the_ID(); ?> -->
diff --git a/themes/mantra/content-chat.php b/themes/mantra/content-chat.php
index 5b629ab4..d85f0784 100644
--- a/themes/mantra/content-chat.php
+++ b/themes/mantra/content-chat.php
@@ -1,52 +1,50 @@
-<?php
-/**
- * The template for displaying posts in the Link Post Format on index and archive pages
- *
- * Learn more: http://codex.wordpress.org/Post_Formats
- *
- * @package Cryout Creations
- * @subpackage Mantra
- * @since Mantra 1.0
- */
-?>
-
- <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
- <header class="entry-header">
- <hgroup>
- <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'mantra' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
- </hgroup>
- <?php cryout_post_title_hook(); ?>
- <div class="entry-meta2">
- <h3 class="entry-format"><?php _e( 'Chat', 'mantra' ); ?></h3>
- <?php mantra_posted_on(); ?>
- <?php /* if ( comments_open() && ! post_password_required() ) :*/ ?>
- <div class="comments-link">
- <?php mantra_comments_on(); ?>
- </div>
- <?php /* endif; */ ?><?php
- cryout_post_meta_hook(); ?>
- </div><!-- .entry-meta -->
- </header><!-- .entry-header -->
- <?php cryout_post_before_content_hook();
- ?><?php if ( is_search() ) : // Only display Excerpts for Search ?>
- <div class="entry-summary">
- <?php the_excerpt(); ?>
- </div><!-- .entry-summary -->
- <?php else : ?>
- <div class="entry-content">
- <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'mantra' ) ); ?>
- <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'mantra' ) . '</span>', 'after' => '</div>' ) ); ?>
- </div><!-- .entry-content -->
- <?php endif; ?><?php
- cryout_post_after_content_hook(); ?>
- <footer class="entry-meta2">
- <?php $tag_list = get_the_tag_list( '', ', ' );
-if ( $tag_list ) { ?>
- <span class="bl_tagg"><?php _e( 'Tagged','mantra'); print ' '.$tag_list; ?></span>
- <?php } ?>
-
-
- <?php edit_post_link( __( 'Edit', 'mantra' ), '<span class="edit-link">', '</span>' ); ?><?php
- cryout_post_footer_hook(); ?>
- </footer><!-- #entry-meta -->
- </article><!-- #post-<?php the_ID(); ?> -->
+<?php
+/**
+ * The template for displaying posts in the Link Post Format on index and archive pages
+ *
+ * Learn more: http://codex.wordpress.org/Post_Formats
+ *
+ * @package Cryout Creations
+ * @subpackage Mantra
+ * @since Mantra 1.0
+ */
+?>
+
+ <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
+ <header class="entry-header">
+ <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'mantra' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
+ <?php cryout_post_title_hook(); ?>
+ <div class="entry-meta2">
+ <h3 class="entry-format"><?php _e( 'Chat', 'mantra' ); ?></h3>
+ <?php mantra_posted_on(); ?>
+ <?php /* if ( comments_open() && ! post_password_required() ) :*/ ?>
+ <div class="comments-link">
+ <?php mantra_comments_on(); ?>
+ </div>
+ <?php /* endif; */ ?><?php
+ cryout_post_meta_hook(); ?>
+ </div><!-- .entry-meta -->
+ </header><!-- .entry-header -->
+ <?php cryout_post_before_content_hook();
+ ?><?php if ( is_search() ) : // Only display Excerpts for Search ?>
+ <div class="entry-summary">
+ <?php the_excerpt(); ?>
+ </div><!-- .entry-summary -->
+ <?php else : ?>
+ <div class="entry-content">
+ <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'mantra' ) ); ?>
+ <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'mantra' ) . '</span>', 'after' => '</div>' ) ); ?>
+ </div><!-- .entry-content -->
+ <?php endif; ?><?php
+ cryout_post_after_content_hook(); ?>
+ <footer class="entry-meta2">
+ <?php $tag_list = get_the_tag_list( '', ', ' );
+if ( $tag_list ) { ?>
+ <span class="bl_tagg"><?php _e( 'Tagged','mantra'); print ' '.$tag_list; ?></span>
+ <?php } ?>
+
+
+ <?php edit_post_link( __( 'Edit', 'mantra' ), '<span class="edit-link">', '</span>' ); ?><?php
+ cryout_post_footer_hook(); ?>
+ </footer><!-- #entry-meta -->
+ </article><!-- #post-<?php the_ID(); ?> -->
diff --git a/themes/mantra/content-frontpage.php b/themes/mantra/content-frontpage.php
index b4784abc..1998135c 100644
--- a/themes/mantra/content-frontpage.php
+++ b/themes/mantra/content-frontpage.php
@@ -1,37 +1,37 @@
-<?php
-/**
- * @package Cryout Creations
- * @subpackage Mantra
- * @since 2.2
- */
-
-global $mantra_options;
-?>
- <section id="container">
- <div id="content" role="main" style="width:96%;">
- <?php if ( have_posts() ) : ?>
-
- <?php $the_query = new WP_Query( array('posts_per_page'=>$mantra_options['mantra_frontpostscount']) ); ?>
- <?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
-
- <?php global $more; $more=0; ?>
- <?php get_template_part( 'content', get_post_format() ); ?>
-
- <?php endwhile;
- wp_reset_postdata(); ?>
-
- <?php else : ?>
- <article id="post-0" class="post no-results not-found">
- <header class="entry-header">
- <h1 class="entry-title"><?php _e( 'Nothing Found', 'mantra' ); ?></h1>
- </header><!-- .entry-header -->
-
- <div class="entry-content">
- <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'mantra' ); ?></p>
- <?php get_search_form(); ?>
- </div><!-- .entry-content -->
- </article><!-- #post-0 -->
- <?php endif; ?>
- </div><!-- #content -->
- <?php //get_sidebar(); ?>
+<?php
+/**
+ * @package Cryout Creations
+ * @subpackage Mantra
+ * @since 2.2
+ */
+
+global $mantra_options;
+?>
+ <section id="container">
+ <div id="content" role="main" style="width:96%;">
+ <?php if ( have_posts() ) : ?>
+
+ <?php $the_query = new WP_Query( array('posts_per_page'=>$mantra_options['mantra_frontpostscount']) ); ?>
+ <?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
+
+ <?php global $more; $more=0; ?>
+ <?php get_template_part( 'content', get_post_format() ); ?>
+
+ <?php endwhile;
+ wp_reset_postdata(); ?>
+
+ <?php else : ?>
+ <article id="post-0" class="post no-results not-found">
+ <header class="entry-header">
+ <h1 class="entry-title"><?php _e( 'Nothing Found', 'mantra' ); ?></h1>
+ </header><!-- .entry-header -->
+
+ <div class="entry-content">
+ <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'mantra' ); ?></p>
+ <?php get_search_form(); ?>
+ </div><!-- .entry-content -->
+ </article><!-- #post-0 -->
+ <?php endif; ?>
+ </div><!-- #content -->
+ <?php //get_sidebar(); ?>
</section><!-- #container --> \ No newline at end of file
diff --git a/themes/mantra/content-gallery.php b/themes/mantra/content-gallery.php
index 04046799..2332eeda 100644
--- a/themes/mantra/content-gallery.php
+++ b/themes/mantra/content-gallery.php
@@ -1,78 +1,76 @@
-<?php
-/**
- * The template for displaying posts in the Gallery Post Format on index and archive pages
- *
- * Learn more: http://codex.wordpress.org/Post_Formats
- *
- * @package Cryout Creations
- * @subpackage Mantra
- * @since Mantra 1.0
- */
-
-$options = mantra_get_theme_options();
-foreach ($options as $key => $value) { ${"$key"} = $value ; }
-?>
-
-<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
- <header class="entry-header">
- <hgroup>
- <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'mantra' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
- </hgroup>
- <?php cryout_post_title_hook(); ?>
- <div class="entry-meta">
- <h3 class="entry-format"><?php _e( 'Gallery', 'mantra' ); ?></h3>
- <?php mantra_posted_on(); ?><?php
- cryout_post_meta_hook(); ?>
- </div><!-- .entry-meta -->
- </header><!-- .entry-header -->
- <?php cryout_post_before_content_hook();
- ?><?php if ( is_search() ) : // Only display Excerpts for search pages ?>
- <div class="entry-summary">
- <?php the_excerpt(); ?>
- </div><!-- .entry-summary -->
- <?php else : ?>
- <div class="entry-content">
- <?php
- /* $images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999 ) );
- if ( $images ) :
- $total_images = count( $images );
- $image = array_shift( $images );
- $image_img_tag = wp_get_attachment_image( $image->ID, 'thumbnail' );*/
- $images = mantra_get_gallery_images();
- if ( $images ) : $total_images = count( $images );
- $image = array_shift( $images );
-
- if (is_sticky() && $mantra_excerptsticky == "Full Post") $sticky_test=1; else $sticky_test=0;
- if ($mantra_excerpthome != "Full Post" && $sticky_test==0):
- /*?>
-
- <figure class="gallery-thumb">
- <a href="<?php the_permalink(); ?>"><?php echo $image_img_tag; ?></a>
- </figure><!-- .gallery-thumb -->
- */
- mantra_set_featured_thumb();
- ?>
- <p><em><?php printf( _n( 'This gallery contains <a %1$s>%2$s photo</a>.', 'This gallery contains <a %1$s>%2$s photos</a>.', $total_images, 'mantra' ),
- 'href="' . esc_url( get_permalink() ) . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'mantra' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"',
- number_format_i18n( $total_images )
- ); ?></em></p>
- <?php
- the_excerpt();
- else:
- the_content();
- endif; ?>
- <?php endif; ?>
- <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'mantra' ) . '</span>', 'after' => '</div>' ) ); ?>
- </div><!-- .entry-content -->
- <?php endif; ?><?php
- cryout_post_after_content_hook(); ?>
- <footer class="entry-meta2">
- <?php $tag_list = get_the_tag_list( '', ', ' );
-if ( $tag_list ) { ?>
- <span class="bl_tagg"><?php _e( 'Tagged','mantra'); print ' '.$tag_list; ?></span>
- <?php } ?>
-
- <?php edit_post_link( __( 'Edit', 'mantra' ), '<span class="edit-link">', '</span>' ); ?><?php
- cryout_post_footer_hook(); ?>
- </footer><!-- #entry-meta -->
-</article><!-- #post-<?php the_ID(); ?> -->
+<?php
+/**
+ * The template for displaying posts in the Gallery Post Format on index and archive pages
+ *
+ * Learn more: http://codex.wordpress.org/Post_Formats
+ *
+ * @package Cryout Creations
+ * @subpackage Mantra
+ * @since Mantra 1.0
+ */
+
+$options = mantra_get_theme_options();
+foreach ($options as $key => $value) { ${"$key"} = $value ; }
+?>
+
+<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
+ <header class="entry-header">
+ <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'mantra' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
+ <?php cryout_post_title_hook(); ?>
+ <div class="entry-meta">
+ <h3 class="entry-format"><?php _e( 'Gallery', 'mantra' ); ?></h3>
+ <?php mantra_posted_on(); ?><?php
+ cryout_post_meta_hook(); ?>
+ </div><!-- .entry-meta -->
+ </header><!-- .entry-header -->
+ <?php cryout_post_before_content_hook();
+ ?><?php if ( is_search() ) : // Only display Excerpts for search pages ?>
+ <div class="entry-summary">
+ <?php the_excerpt(); ?>
+ </div><!-- .entry-summary -->
+ <?php else : ?>
+ <div class="entry-content">
+ <?php
+ /* $images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999 ) );
+ if ( $images ) :
+ $total_images = count( $images );
+ $image = array_shift( $images );
+ $image_img_tag = wp_get_attachment_image( $image->ID, 'thumbnail' );*/
+ $images = mantra_get_gallery_images();
+ if ( $images ) : $total_images = count( $images );
+ $image = array_shift( $images );
+
+ if (is_sticky() && $mantra_excerptsticky == "Full Post") $sticky_test=1; else $sticky_test=0;
+ if ($mantra_excerpthome != "Full Post" && $sticky_test==0):
+ /*?>
+
+ <figure class="gallery-thumb">
+ <a href="<?php the_permalink(); ?>"><?php echo $image_img_tag; ?></a>
+ </figure><!-- .gallery-thumb -->
+ */
+ mantra_set_featured_thumb();
+ ?>
+ <p><em><?php printf( _n( 'This gallery contains <a %1$s>%2$s photo</a>.', 'This gallery contains <a %1$s>%2$s photos</a>.', $total_images, 'mantra' ),
+ 'href="' . esc_url( get_permalink() ) . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'mantra' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"',
+ number_format_i18n( $total_images )
+ ); ?></em></p>
+ <?php
+ the_excerpt();
+ else:
+ the_content();
+ endif; ?>
+ <?php endif; ?>
+ <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'mantra' ) . '</span>', 'after' => '</div>' ) ); ?>
+ </div><!-- .entry-content -->
+ <?php endif; ?><?php
+ cryout_post_after_content_hook(); ?>
+ <footer class="entry-meta2">
+ <?php $tag_list = get_the_tag_list( '', ', ' );
+if ( $tag_list ) { ?>
+ <span class="bl_tagg"><?php _e( 'Tagged','mantra'); print ' '.$tag_list; ?></span>
+ <?php } ?>
+
+ <?php edit_post_link( __( 'Edit', 'mantra' ), '<span class="edit-link">', '</span>' ); ?><?php
+ cryout_post_footer_hook(); ?>
+ </footer><!-- #entry-meta -->
+</article><!-- #post-<?php the_ID(); ?> -->
diff --git a/themes/mantra/content-image.php b/themes/mantra/content-image.php
index 86bf5ca2..c53ea855 100644
--- a/themes/mantra/content-image.php
+++ b/themes/mantra/content-image.php
@@ -1,45 +1,43 @@
-<?php
-/**
- * The template for displaying posts in the Image Post Format on index and archive pages
- *
- * Learn more: http://codex.wordpress.org/Post_Formats
- *
- * @package Cryout Creations
- * @subpackage Mantra
- * @since Mantra 1.0
- */
-?>
- <article id="post-<?php the_ID(); ?>" <?php post_class( 'indexed' ); ?>>
- <header class="entry-header">
- <hgroup>
- <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'mantra' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
- <?php cryout_post_title_hook(); ?>
- </hgroup>
- <div class="entry-meta2">
- <h3 class="entry-format"><?php _e( 'Image', 'mantra' ); ?></h3>
- <?php mantra_posted_on(); ?>
- <?php /* if ( comments_open() && ! post_password_required() ) :*/ ?>
- <div class="comments-link">
- <?php mantra_comments_on(); ?>
- </div>
- <?php /* endif; */ ?><?php
- cryout_post_meta_hook(); ?>
- </div><!-- .entry-meta -->
-
- </header><!-- .entry-header -->
-<?php cryout_post_before_content_hook(); ?>
- <div class="entry-content">
- <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'mantra' ) ); ?>
- <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'mantra' ) . '</span>', 'after' => '</div>' ) ); ?>
- </div><!-- .entry-content -->
-<?php cryout_post_after_content_hook(); ?>
- <footer class="entry-meta2">
- <?php $tag_list = get_the_tag_list( '', ', ' );
-if ( $tag_list ) { ?>
- <span class="bl_tagg"><?php _e( 'Tagged','mantra'); print ' '.$tag_list; ?></span>
- <?php } ?>
-
- <?php edit_post_link( __( 'Edit', 'mantra' ), '<span class="edit-link">', '</span>' ); ?><?php
- cryout_post_footer_hook(); ?>
- </footer><!-- #entry-meta -->
- </article><!-- #post-<?php the_ID(); ?> -->
+<?php
+/**
+ * The template for displaying posts in the Image Post Format on index and archive pages
+ *
+ * Learn more: http://codex.wordpress.org/Post_Formats
+ *
+ * @package Cryout Creations
+ * @subpackage Mantra
+ * @since Mantra 1.0
+ */
+?>
+ <article id="post-<?php the_ID(); ?>" <?php post_class( 'indexed' ); ?>>
+ <header class="entry-header">
+ <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'mantra' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
+ <?php cryout_post_title_hook(); ?>
+ <div class="entry-meta2">
+ <h3 class="entry-format"><?php _e( 'Image', 'mantra' ); ?></h3>
+ <?php mantra_posted_on(); ?>
+ <?php /* if ( comments_open() && ! post_password_required() ) :*/ ?>
+ <div class="comments-link">
+ <?php mantra_comments_on(); ?>
+ </div>
+ <?php /* endif; */ ?><?php
+ cryout_post_meta_hook(); ?>
+ </div><!-- .entry-meta -->
+
+ </header><!-- .entry-header -->
+<?php cryout_post_before_content_hook(); ?>
+ <div class="entry-content">
+ <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'mantra' ) ); ?>
+ <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'mantra' ) . '</span>', 'after' => '</div>' ) ); ?>
+ </div><!-- .entry-content -->
+<?php cryout_post_after_content_hook(); ?>
+ <footer class="entry-meta2">
+ <?php $tag_list = get_the_tag_list( '', ', ' );
+if ( $tag_list ) { ?>
+ <span class="bl_tagg"><?php _e( 'Tagged','mantra'); print ' '.$tag_list; ?></span>
+ <?php } ?>
+
+ <?php edit_post_link( __( 'Edit', 'mantra' ), '<span class="edit-link">', '</span>' ); ?><?php
+ cryout_post_footer_hook(); ?>
+ </footer><!-- #entry-meta -->
+ </article><!-- #post-<?php the_ID(); ?> -->
diff --git a/themes/mantra/content-link.php b/themes/mantra/content-link.php
index 4b309f24..e6f6493c 100644
--- a/themes/mantra/content-link.php
+++ b/themes/mantra/content-link.php
@@ -1,52 +1,50 @@
-<?php
-/**
- * The template for displaying posts in the Link Post Format on index and archive pages
- *
- * Learn more: http://codex.wordpress.org/Post_Formats
- *
- * @package Cryout Creations
- * @subpackage Mantra
- * @since Mantra 1.0
- */
-?>
-
- <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
- <header class="entry-header">
- <hgroup>
- <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'mantra' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
- </hgroup>
- <?php cryout_post_title_hook(); ?>
- <div class="entry-meta2">
- <h3 class="entry-format"><?php _e( 'Link', 'mantra' ); ?></h3>
- <?php mantra_posted_on(); ?>
- <?php /* if ( comments_open() && ! post_password_required() ) :*/ ?>
- <div class="comments-link">
- <?php mantra_comments_on(); ?>
- </div>
- <?php /* endif; */ ?><?php
- cryout_post_meta_hook(); ?>
- </div><!-- .entry-meta -->
- </header><!-- .entry-header -->
- <?php cryout_post_before_content_hook();
- ?><?php if ( is_search() ) : // Only display Excerpts for Search ?>
- <div class="entry-summary">
- <?php the_excerpt(); ?>
- </div><!-- .entry-summary -->
- <?php else : ?>
- <div class="entry-content">
- <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'mantra' ) ); ?>
- <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'mantra' ) . '</span>', 'after' => '</div>' ) ); ?>
- </div><!-- .entry-content -->
- <?php endif; ?><?php
- cryout_post_after_content_hook(); ?>
- <footer class="entry-meta2">
- <?php $tag_list = get_the_tag_list( '', ', ' );
-if ( $tag_list ) { ?>
- <span class="bl_tagg"><?php _e( 'Tagged','mantra'); print ' '.$tag_list; ?></span>
- <?php } ?>
-
-
- <?php edit_post_link( __( 'Edit', 'mantra' ), '<span class="edit-link">', '</span>' ); ?><?php
- cryout_post_footer_hook(); ?>
- </footer><!-- #entry-meta -->
- </article><!-- #post-<?php the_ID(); ?> -->
+<?php
+/**
+ * The template for displaying posts in the Link Post Format on index and archive pages
+ *
+ * Learn more: http://codex.wordpress.org/Post_Formats
+ *
+ * @package Cryout Creations
+ * @subpackage Mantra
+ * @since Mantra 1.0
+ */
+?>
+
+ <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
+ <header class="entry-header">
+ <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'mantra' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
+ <?php cryout_post_title_hook(); ?>
+ <div class="entry-meta2">
+ <h3 class="entry-format"><?php _e( 'Link', 'mantra' ); ?></h3>
+ <?php mantra_posted_on(); ?>
+ <?php /* if ( comments_open() && ! post_password_required() ) :*/ ?>
+ <div class="comments-link">
+ <?php mantra_comments_on(); ?>
+ </div>
+ <?php /* endif; */ ?><?php
+ cryout_post_meta_hook(); ?>
+ </div><!-- .entry-meta -->
+ </header><!-- .entry-header -->
+ <?php cryout_post_before_content_hook();
+ ?><?php if ( is_search() ) : // Only display Excerpts for Search ?>
+ <div class="entry-summary">
+ <?php the_excerpt(); ?>
+ </div><!-- .entry-summary -->
+ <?php else : ?>
+ <div class="entry-content">
+ <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'mantra' ) ); ?>
+ <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'mantra' ) . '</span>', 'after' => '</div>' ) ); ?>
+ </div><!-- .entry-content -->
+ <?php endif; ?><?php
+ cryout_post_after_content_hook(); ?>
+ <footer class="entry-meta2">
+ <?php $tag_list = get_the_tag_list( '', ', ' );
+if ( $tag_list ) { ?>
+ <span class="bl_tagg"><?php _e( 'Tagged','mantra'); print ' '.$tag_list; ?></span>
+ <?php } ?>
+
+
+ <?php edit_post_link( __( 'Edit', 'mantra' ), '<span class="edit-link">', '</span>' ); ?><?php
+ cryout_post_footer_hook(); ?>
+ </footer><!-- #entry-meta -->
+ </article><!-- #post-<?php the_ID(); ?> -->
diff --git a/themes/mantra/content-page.php b/themes/mantra/content-page.php
index 85eaaae3..17248f0c 100644
--- a/themes/mantra/content-page.php
+++ b/themes/mantra/content-page.php
@@ -1,30 +1,30 @@
-<?php
-/**
- *
- * Learn more: http://codex.wordpress.org/Post_Formats
- *
- * @package Cryout Creations
- * @subpackage Mantra
- */
-
-if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
-
- <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
- <?php if ( is_front_page() ) { ?>
- <h2 class="entry-title"><?php the_title(); ?></h2>
- <?php } else { ?>
- <h1 class="entry-title"><?php the_title(); ?></h1>
- <?php } ?>
-
- <div class="entry-content">
- <?php the_content(); ?>
- <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'mantra' ), 'after' => '</div>' ) ); ?>
- <?php edit_post_link( __( 'Edit', 'mantra' ), '<span class="edit-link">', '</span>' ); ?>
- </div><!-- .entry-content -->
- </div><!-- #post-## -->
-
- <?php if ( comments_open() ) { comments_template( '', true );} else { ?>
- <p class="nocomments2"><?php _e( 'Comments are closed.', 'mantra' ); ?></p>
-
-
-<?php } endwhile; ?>
+<?php
+/**
+ *
+ * Learn more: http://codex.wordpress.org/Post_Formats
+ *
+ * @package Cryout Creations
+ * @subpackage Mantra
+ */
+
+if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
+
+ <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
+ <?php if ( is_front_page() ) { ?>
+ <h2 class="entry-title"><?php the_title(); ?></h2>
+ <?php } else { ?>
+ <h1 class="entry-title"><?php the_title(); ?></h1>
+ <?php } ?>
+
+ <div class="entry-content">
+ <?php the_content(); ?>
+ <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'mantra' ), 'after' => '</div>' ) ); ?>
+ <?php edit_post_link( __( 'Edit', 'mantra' ), '<span class="edit-link">', '</span>' ); ?>
+ </div><!-- .entry-content -->
+ </div><!-- #post-## -->
+
+ <?php if ( comments_open() ) { comments_template( '', true );} else { ?>
+ <p class="nocomments2"><?php _e( 'Comments are closed.', 'mantra' ); ?></p>
+
+
+<?php } endwhile; ?>
diff --git a/themes/mantra/content-quote.php b/themes/mantra/content-quote.php
index 102f2911..b0105a79 100644
--- a/themes/mantra/content-quote.php
+++ b/themes/mantra/content-quote.php
@@ -1,49 +1,47 @@
-<?php
-/**
- * The default template for displaying posts in the Quote Post Format on index and archive pages
- *
- * @package Cryout Creations
- * @subpackage Mantra
- * @since Mantra 1.0
- */
-?>
-
- <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
- <header class="entry-header">
- <hgroup>
- <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'mantra' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
- </hgroup>
- <?php cryout_post_title_hook(); ?>
- <div class="entry-meta2">
- <h3 class="entry-format"><?php _e( 'Quote', 'mantra' ); ?></h3>
- <?php mantra_posted_on(); ?>
- <?php /* if ( comments_open() && ! post_password_required() ) :*/ ?>
- <div class="comments-link">
- <?php mantra_comments_on(); ?>
- </div>
- <?php /* endif; */ ?><?php
- cryout_post_meta_hook(); ?>
- </div><!-- .entry-meta -->
- </header><!-- .entry-header -->
- <?php cryout_post_before_content_hook();
- ?><?php if ( is_search() ) : // Only display Excerpts for Search ?>
- <div class="entry-summary">
- <?php the_excerpt(); ?>
- </div><!-- .entry-summary -->
- <?php else : ?>
- <div class="entry-content">
- <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'mantra' ) ); ?>
- <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'mantra' ) . '</span>', 'after' => '</div>' ) ); ?>
- </div><!-- .entry-content -->
- <?php endif; ?><?php
- cryout_post_after_content_hook(); ?>
- <footer class="entry-meta2">
- <?php $tag_list = get_the_tag_list( '', ', ' );
-if ( $tag_list ) { ?>
- <span class="bl_tagg"><?php _e( 'Tagged','mantra'); print ' '.$tag_list; ?></span>
- <?php } ?>
-
- <?php edit_post_link( __( 'Edit', 'mantra' ), '<span class="edit-link">', '</span>' ); ?><?php
- cryout_post_footer_hook(); ?>
- </footer><!-- #entry-meta -->
- </article><!-- #post-<?php the_ID(); ?> -->
+<?php
+/**
+ * The default template for displaying posts in the Quote Post Format on index and archive pages
+ *
+ * @package Cryout Creations
+ * @subpackage Mantra
+ * @since Mantra 1.0
+ */
+?>
+
+ <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
+ <header class="entry-header">
+ <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'mantra' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
+ <?php cryout_post_title_hook(); ?>
+ <div class="entry-meta2">
+ <h3 class="entry-format"><?php _e( 'Quote', 'mantra' ); ?></h3>
+ <?php mantra_posted_on(); ?>
+ <?php /* if ( comments_open() && ! post_password_required() ) :*/ ?>
+ <div class="comments-link">
+ <?php mantra_comments_on(); ?>
+ </div>
+ <?php /* endif; */ ?><?php
+ cryout_post_meta_hook(); ?>
+ </div><!-- .entry-meta -->
+ </header><!-- .entry-header -->
+ <?php cryout_post_before_content_hook();
+ ?><?php if ( is_search() ) : // Only display Excerpts for Search ?>
+ <div class="entry-summary">
+ <?php the_excerpt(); ?>
+ </div><!-- .entry-summary -->
+ <?php else : ?>
+ <div class="entry-content">
+ <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'mantra' ) ); ?>
+ <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'mantra' ) . '</span>', 'after' => '</div>' ) ); ?>
+ </div><!-- .entry-content -->
+ <?php endif; ?><?php
+ cryout_post_after_content_hook(); ?>
+ <footer class="entry-meta2">
+ <?php $tag_list = get_the_tag_list( '', ', ' );
+if ( $tag_list ) { ?>
+ <span class="bl_tagg"><?php _e( 'Tagged','mantra'); print ' '.$tag_list; ?></span>
+ <?php } ?>
+
+ <?php edit_post_link( __( 'Edit', 'mantra' ), '<span class="edit-link">', '</span>' ); ?><?php
+ cryout_post_footer_hook(); ?>
+ </footer><!-- #entry-meta -->
+ </article><!-- #post-<?php the_ID(); ?> -->
diff --git a/themes/mantra/content-status.php b/themes/mantra/content-status.php
index 45ee3f04..75d91d6b 100644
--- a/themes/mantra/content-status.php
+++ b/themes/mantra/content-status.php
@@ -1,51 +1,49 @@
-<?php
-/**
- * The template for displaying posts in the Status Post Format on index and archive pages
- *
- * Learn more: http://codex.wordpress.org/Post_Formats
- *
- * @package Cryout Creations
- * @subpackage Mantra
- */
-?>
-
- <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
- <header class="entry-header">
- <hgroup>
- <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'mantra' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
- </hgroup>
- <?php cryout_post_title_hook(); ?>
- </header><!-- .entry-header -->
-<?php cryout_post_before_content_hook();
- ?><?php if ( is_search() ) : // Only display Excerpts for Search ?>
- <div class="entry-summary">
- <?php the_excerpt(); ?>
- </div><!-- .entry-summary -->
- <?php else : ?>
- <div class="entry-content">
- <div class="avatar">
- <?php echo get_avatar( get_the_author_meta( 'ID' ), apply_filters( 'mantra_status_avatar', '65' ) ); ?>
- </div>
- <div class="entry-meta2">
- <h3 class="entry-format"><?php _e( 'Status', 'mantra' ); ?></h3>
- <?php mantra_posted_on(); ?>
- <?php /* if ( comments_open() && ! post_password_required() ) :*/ ?>
- <div class="comments-link">
- <?php mantra_comments_on(); ?>
- </div>
- <?php /* endif; */ ?>
- </div><!-- .entry-meta2 -->
- <div class="status_content"> <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'mantra' ) ); ?> </div>
- <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'mantra' ) . '</span>', 'after' => '</div>' ) ); ?>
- </div><!-- .entry-content -->
- <?php endif; ?><?php
- cryout_post_after_content_hook(); ?>
- <footer class="entry-meta3">
- <?php $tag_list = get_the_tag_list( '', ', ' );
-if ( $tag_list ) { ?>
- <span class="bl_tagg"><?php _e( 'Tagged','mantra'); print ' '.$tag_list; ?></span>
- <?php } ?>
- <?php edit_post_link( __( 'Edit', 'mantra' ), '<span class="edit-link">', '</span>' ); ?><?php
- cryout_post_footer_hook(); ?>
- </footer><!-- #entry-meta -->
- </article><!-- #post-<?php the_ID(); ?> -->
+<?php
+/**
+ * The template for displaying posts in the Status Post Format on index and archive pages
+ *
+ * Learn more: http://codex.wordpress.org/Post_Formats
+ *
+ * @package Cryout Creations
+ * @subpackage Mantra
+ */
+?>
+
+ <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
+ <header class="entry-header">
+ <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'mantra' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
+ <?php cryout_post_title_hook(); ?>
+ </header><!-- .entry-header -->
+<?php cryout_post_before_content_hook();
+ ?><?php if ( is_search() ) : // Only display Excerpts for Search ?>
+ <div class="entry-summary">
+ <?php the_excerpt(); ?>
+ </div><!-- .entry-summary -->
+ <?php else : ?>
+ <div class="entry-content">
+ <div class="avatar">
+ <?php echo get_avatar( get_the_author_meta( 'ID' ), apply_filters( 'mantra_status_avatar', '65' ) ); ?>
+ </div>
+ <div class="entry-meta2">
+ <h3 class="entry-format"><?php _e( 'Status', 'mantra' ); ?></h3>
+ <?php mantra_posted_on(); ?>
+ <?php /* if ( comments_open() && ! post_password_required() ) :*/ ?>
+ <div class="comments-link">
+ <?php mantra_comments_on(); ?>
+ </div>
+ <?php /* endif; */ ?>
+ </div><!-- .entry-meta2 -->
+ <div class="status_content"> <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'mantra' ) ); ?> </div>
+ <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'mantra' ) . '</span>', 'after' => '</div>' ) ); ?>
+ </div><!-- .entry-content -->
+ <?php endif; ?><?php
+ cryout_post_after_content_hook(); ?>
+ <footer class="entry-meta3">
+ <?php $tag_list = get_the_tag_list( '', ', ' );
+if ( $tag_list ) { ?>
+ <span class="bl_tagg"><?php _e( 'Tagged','mantra'); print ' '.$tag_list; ?></span>
+ <?php } ?>
+ <?php edit_post_link( __( 'Edit', 'mantra' ), '<span class="edit-link">', '</span>' ); ?><?php
+ cryout_post_footer_hook(); ?>
+ </footer><!-- #entry-meta -->
+ </article><!-- #post-<?php the_ID(); ?> -->
diff --git a/themes/mantra/content.php b/themes/mantra/content.php
index b23e5ef2..e8e266e6 100644
--- a/themes/mantra/content.php
+++ b/themes/mantra/content.php
@@ -1,83 +1,85 @@
-<?php
-/**
- * The default template for displaying content
- *
- * @package Cryout Creations
- * @subpackage Mantra
- * @since Mantra 1.0
- */
-
-$options= mantra_get_theme_options();
-foreach ($options as $key => $value) {
- ${"$key"} = $value ;
-}
-
-?><?php cryout_before_article_hook(); ?>
-
- <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
- <header class="entry-header">
- <hgroup>
- <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'mantra' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
- </hgroup>
- <?php cryout_post_title_hook();
- ?><?php if ( 'post' == get_post_type() ) : ?>
- <div class="entry-meta">
- <?php mantra_posted_on(); ?>
- <?php /* if ( comments_open() && ! post_password_required() ) :*/ ?>
- <div class="comments-link">
- <?php mantra_comments_on(); ?>
- </div>
- <?php /* endif; */ ?><?php
- cryout_post_meta_hook(); ?>
- </div><!-- .entry-meta -->
- <?php endif; ?>
-
-
- </header><!-- .entry-header -->
- <?php cryout_post_before_content_hook();
- ?><?php if ( is_archive() || is_search() ) : // Display excerpts for archives and search. ?>
-
- <?php if ($mantra_excerptarchive != "Full Post" ){ ?>
- <div class="entry-summary">
- <?php mantra_set_featured_thumb(); ?>
- <?php the_excerpt(); ?>
- </div><!-- .entry-summary -->
- <?php } else { ?>
- <div class="entry-content">
- <?php mantra_set_featured_thumb(); ?>
- <?php the_content(); ?>
- <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'mantra' ) . '</span>', 'after' => '</div>' ) ); ?>
- </div><!-- .entry-content -->
- <?php } ?>
-
- <?php else :
- if (is_sticky() && $mantra_excerptsticky == "Full Post") $sticky_test=1; else $sticky_test=0;
- if ($mantra_excerpthome != "Full Post" && $sticky_test==0){ ?>
-
-
- <div class="entry-summary">
- <?php mantra_set_featured_thumb(); ?>
- <?php the_excerpt(); ?>
- </div><!-- .entry-summary -->
- <?php } else { ?>
- <div class="entry-content">
- <?php the_content(); ?>
- <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'mantra' ) . '</span>', 'after' => '</div>' ) ); ?>
- </div><!-- .entry-content -->
- <?php }
-
- endif;
- cryout_post_after_content_hook(); ?>
- <footer class="entry-meta2">
- <?php $tag_list = get_the_tag_list( '', ', ' );
-if ( $tag_list ) { ?>
- <span class="bl_tagg"><?php _e( 'Tagged','mantra'); print ' '.$tag_list; ?></span>
- <?php } ?>
- <?php edit_post_link( __( 'Edit', 'mantra' ), '<span class="edit-link">', '</span>' ); ?><?php
- cryout_post_footer_hook(); ?>
- </footer><!-- #entry-meta -->
-
- </article><!-- #post-<?php the_ID(); ?> -->
-
-
+<?php
+/**
+ * The default template for displaying content
+ *
+ * @package Cryout Creations
+ * @subpackage Mantra
+ * @since Mantra 1.0
+ */
+
+$options= mantra_get_theme_options();
+foreach ($options as $key => $value) {
+ ${"$key"} = $value ;
+}
+
+?><?php cryout_before_article_hook(); ?>
+
+ <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
+ <header class="entry-header">
+ <h2 class="entry-title">
+ <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'mantra' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark">
+ <?php the_title(); ?>
+ </a>
+ </h2>
+ <?php cryout_post_title_hook();
+ ?><?php if ( 'post' == get_post_type() ) : ?>
+ <div class="entry-meta">
+ <?php mantra_posted_on(); ?>
+ <?php /* if ( comments_open() && ! post_password_required() ) :*/ ?>
+ <div class="comments-link">
+ <?php mantra_comments_on(); ?>
+ </div>
+ <?php /* endif; */ ?><?php
+ cryout_post_meta_hook(); ?>
+ </div><!-- .entry-meta -->
+ <?php endif; ?>
+
+
+ </header><!-- .entry-header -->
+ <?php cryout_post_before_content_hook();
+ ?><?php if ( is_archive() || is_search() ) : // Display excerpts for archives and search. ?>
+
+ <?php if ($mantra_excerptarchive != "Full Post" ){ ?>
+ <div class="entry-summary">
+ <?php mantra_set_featured_thumb(); ?>
+ <?php the_excerpt(); ?>
+ </div><!-- .entry-summary -->
+ <?php } else { ?>
+ <div class="entry-content">
+ <?php mantra_set_featured_thumb(); ?>
+ <?php the_content(); ?>
+ <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'mantra' ) . '</span>', 'after' => '</div>' ) ); ?>
+ </div><!-- .entry-content -->
+ <?php } ?>
+
+ <?php else :
+ if (is_sticky() && $mantra_excerptsticky == "Full Post") $sticky_test=1; else $sticky_test=0;
+ if ($mantra_excerpthome != "Full Post" && $sticky_test==0){ ?>
+
+
+ <div class="entry-summary">
+ <?php mantra_set_featured_thumb(); ?>
+ <?php the_excerpt(); ?>
+ </div><!-- .entry-summary -->
+ <?php } else { ?>
+ <div class="entry-content">
+ <?php the_content(); ?>
+ <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'mantra' ) . '</span>', 'after' => '</div>' ) ); ?>
+ </div><!-- .entry-content -->
+ <?php }
+
+ endif;
+ cryout_post_after_content_hook(); ?>
+ <footer class="entry-meta2">
+ <?php $tag_list = get_the_tag_list( '', ', ' );
+if ( $tag_list ) { ?>
+ <span class="bl_tagg"><?php _e( 'Tagged','mantra'); print ' '.$tag_list; ?></span>
+ <?php } ?>
+ <?php edit_post_link( __( 'Edit', 'mantra' ), '<span class="edit-link">', '</span>' ); ?><?php
+ cryout_post_footer_hook(); ?>
+ </footer><!-- #entry-meta -->
+
+ </article><!-- #post-<?php the_ID(); ?> -->
+
+
<?php cryout_after_article_hook(); ?> \ No newline at end of file
diff --git a/themes/mantra/editor-style-rtl.css b/themes/mantra/editor-style-rtl.css
index 7dd138e3..e44679af 100644
--- a/themes/mantra/editor-style-rtl.css
+++ b/themes/mantra/editor-style-rtl.css
@@ -1,56 +1,56 @@
-/*
-Theme Name: Mantra
-*/
-/*
-Used to style the TinyMCE editor.
-*/
-html .mceContentBody{
- direction:rtl;
- unicode-bidi:embed;
- float:right;
-}
-* {
- font-family: Arial, Tahoma, sans-serif;
-}
-/* Text elements */
-ul {
- margin: 0 -18px 18px 0;
-}
-ol {
- margin: 0 -18px 18px 0;
-}
-dd {
- margin-right: 0;
-}
-blockquote {
- font-style: normal;
-}
-table {
- text-align: right;
- margin: 0 0 24px -1px;
-}
-html .mceContentBody{
- direction:rtl;
- unicode-bidi:embed;
- float:right;
-}
-* {
- font-family: Arial, Tahoma, sans-serif;
-}
-/* Text elements */
-ul {
- margin: 0 -18px 18px 0;
-}
-ol {
- margin: 0 -18px 18px 0;
-}
-dd {
- margin-right: 0;
-}
-blockquote {
- font-style: normal;
-}
-table {
- text-align: right;
- margin: 0 0 24px -1px;
+/*
+Theme Name: Mantra
+*/
+/*
+Used to style the TinyMCE editor.
+*/
+html .mceContentBody{
+ direction:rtl;
+ unicode-bidi:embed;
+ float:right;
+}
+* {
+ font-family: Arial, Tahoma, sans-serif;
+}
+/* Text elements */
+ul {
+ margin: 0 -18px 18px 0;
+}
+ol {
+ margin: 0 -18px 18px 0;
+}
+dd {
+ margin-right: 0;
+}
+blockquote {
+ font-style: normal;
+}
+table {
+ text-align: right;
+ margin: 0 0 24px -1px;
+}
+html .mceContentBody{
+ direction:rtl;
+ unicode-bidi:embed;
+ float:right;
+}
+* {
+ font-family: Arial, Tahoma, sans-serif;
+}
+/* Text elements */
+ul {
+ margin: 0 -18px 18px 0;
+}
+ol {
+ margin: 0 -18px 18px 0;
+}
+dd {
+ margin-right: 0;
+}
+blockquote {
+ font-style: normal;
+}
+table {
+ text-align: right;
+ margin: 0 0 24px -1px;
} \ No newline at end of file
diff --git a/themes/mantra/editor-style.css b/themes/mantra/editor-style.css
index 7e0cfe6c..9eefb8bc 100644
--- a/themes/mantra/editor-style.css
+++ b/themes/mantra/editor-style.css
@@ -1,287 +1,287 @@
-/*
-Theme Name: Mantra
-*/
-/*
-Used to style the TinyMCE editor.
-*/
-
-* {
- font-family: Georgia, "Bitstream Charter", serif;
- color: #444;
- line-height: 1.5;
-}
-p,
-dl,
-td,
-th,
-ul,
-ol,
-blockquote {
- font-size: 16px;
-}
-tr th,
-thead th,
-label,
-tr th,
-thead th {
- font-family: "Helvetica Neue", Arial, Helvetica, "Nimbus Sans L", sans-serif;
-}
-pre {
- font-family: "Courier 10 Pitch", Courier, monospace;
-}
-code, code var {
- font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace;
-}
-body, input, textarea {
- font-size: 12px;
- line-height: 18px;
-}
-hr {
- background-color: #e7e7e7;
- border:0;
- height: 1px;
- margin-bottom: 18px;
- clear:both;
-}
-/* Text elements */
-p {
- margin-bottom: 18px;
-}
-ul {
- list-style: square;
- margin: 0 0 18px 1.5em;
-}
-ol {
- list-style: decimal;
- margin: 0 0 18px 1.5em;
-}
-ol ol {
- list-style:upper-alpha;
-}
-ol ol ol {
- list-style:lower-roman;
-}
-ol ol ol ol {
- list-style:lower-alpha;
-}
-ul ul,
-ol ol,
-ul ol,
-ol ul {
- margin-bottom:0;
-}
-dl {
- margin:0 0 24px 0;
-}
-dt {
- font-weight: bold;
-}
-dd {
- margin-bottom: 18px;
-}
-strong {
- font-weight: bold;
- color: #000;
-}
-cite,
-em,
-i {
- font-style: italic;
- border: none;
-}
-big {
- font-size: 131.25%;
-}
-ins {
- background: #ffffcc;
- border: none;
- color: #333;
-}
-del {
- text-decoration: line-through;
- color: #555;
-}
-blockquote {
- font-style: italic;
- padding: 0 3em;
-}
-blockquote cite,
-blockquote em,
-blockquote i {
- font-style: normal;
-}
-pre {
- background: #f7f7f7;
- color: #222;
- line-height: 18px;
- margin-bottom: 18px;
- padding: 1.5em;
-}
-abbr,
-acronym {
- border-bottom: 1px dotted #666;
- cursor: help;
-}
-ins {
- text-decoration: none;
-}
-sup,
-sub {
- height: 0;
- line-height: 1;
- vertical-align: baseline;
- position: relative;
- font-size: 10px;
-}
-sup {
- bottom: 1ex;
-}
-sub {
- top: .5ex;
-}
-a:link {
- color:#0066cc;
-}
-a:visited {
- color:#743399;
-}
-a:active,
-a:hover {
- color: #ff4b33;
-}
-p,
-ul,
-ol,
-dd,
-pre,
-hr {
- margin-bottom:24px;
-}
-ul ul,
-ol ol,
-ul ol,
-ol ul {
- margin-bottom:0;
-}
-pre,
-kbd,
-tt,
-var {
- font-size: 15px;
- line-height: 21px;
-}
-code {
- font-size: 13px;
-}
-strong,
-b,
-dt,
-th {
- color: #000;
-}
-h1,
-h2,
-h3,
-h4,
-h5,
-h6 {
- color: #000;
- margin: 0 0 20px 0;
- line-height: 1.5em;
- font-weight: normal;
-}
-h1 {
- font-size: 2.4em;
-}
-h2 {
- font-size: 1.8em;
-}
-h3 {
- font-size: 1.4em;
-}
-h4 {
- font-size: 1.2em;
-}
-h5 {
- font-size: 1em;
-}
-h6 {
- font-size: 0.9em;
-}
-table {
- border: 1px solid #e7e7e7 !important;
- text-align: left;
- margin: 0 -1px 24px 0;
- width: 100%;
- border-collapse: collapse;
- border-spacing: 0;
-}
-tr th,
-thead th {
- border: none !important;
- color: #888;
- font-size: 12px;
- font-weight: bold;
- line-height: 18px;
- padding: 9px 24px;
-}
-tr td {
- border: none !important;
- border-top: 1px solid #e7e7e7 !important;
- padding: 6px 24px;
-}
-
-
-img {
- margin: 0;
- height:auto;
-}
-.alignleft,
-img.alignleft {
- display: inline;
- float: left;
- margin-right: 24px;
- margin-top: 4px;
-}
-.alignright,
-img.alignright {
- display: inline;
- float: right;
- margin-left: 24px;
- margin-top: 4px;
-}
-.aligncenter,
-img.aligncenter {
- clear: both;
- display: block;
- margin-left: auto;
- margin-right: auto;
-}
-img.alignleft,
-img.alignright,
-img.aligncenter {
- margin-bottom: 12px;
-}
-.wp-caption {
- border: none;
- background: #f1f1f1;
- color: #888;
- font-size: 12px;
- line-height: 18px;
- text-align: center;
- margin-bottom: 20px;
- padding: 4px;
- -moz-border-radius: 0;
- -khtml-border-radius: 0;
- -webkit-border-radius: 0;
- border-radius: 0;
-}
-.wp-caption img {
- margin: 5px;
-}
-.wp-caption p.wp-caption-text {
- margin: 0 0 4px;
-}
-.wp-smiley {
- margin:0;
+/*
+Theme Name: Mantra
+*/
+/*
+Used to style the TinyMCE editor.
+*/
+
+* {
+ font-family: Georgia, "Bitstream Charter", serif;
+ color: #444;
+ line-height: 1.5;
+}
+p,
+dl,
+td,
+th,
+ul,
+ol,
+blockquote {
+ font-size: 16px;
+}
+tr th,
+thead th,
+label,
+tr th,
+thead th {
+ font-family: "Helvetica Neue", Arial, Helvetica, "Nimbus Sans L", sans-serif;
+}
+pre {
+ font-family: "Courier 10 Pitch", Courier, monospace;
+}
+code, code var {
+ font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace;
+}
+body, input, textarea {
+ font-size: 12px;
+ line-height: 18px;
+}
+hr {
+ background-color: #e7e7e7;
+ border:0;
+ height: 1px;
+ margin-bottom: 18px;
+ clear:both;
+}
+/* Text elements */
+p {
+ margin-bottom: 18px;
+}
+ul {
+ list-style: square;
+ margin: 0 0 18px 1.5em;
+}
+ol {
+ list-style: decimal;
+ margin: 0 0 18px 1.5em;
+}
+ol ol {
+ list-style:upper-alpha;
+}
+ol ol ol {
+ list-style:lower-roman;
+}
+ol ol ol ol {
+ list-style:lower-alpha;
+}
+ul ul,
+ol ol,
+ul ol,
+ol ul {
+ margin-bottom:0;
+}
+dl {
+ margin:0 0 24px 0;
+}
+dt {
+ font-weight: bold;
+}
+dd {
+ margin-bottom: 18px;
+}
+strong {
+ font-weight: bold;
+ color: #000;
+}
+cite,
+em,
+i {
+ font-style: italic;
+ border: none;
+}
+big {
+ font-size: 131.25%;
+}
+ins {
+ background: #ffffcc;
+ border: none;
+ color: #333;
+}
+del {
+ text-decoration: line-through;
+ color: #555;
+}
+blockquote {
+ font-style: italic;
+ padding: 0 3em;
+}
+blockquote cite,
+blockquote em,
+blockquote i {
+ font-style: normal;
+}
+pre {
+ background: #f7f7f7;
+ color: #222;
+ line-height: 18px;
+ margin-bottom: 18px;
+ padding: 1.5em;
+}
+abbr,
+acronym {
+ border-bottom: 1px dotted #666;
+ cursor: help;
+}
+ins {
+ text-decoration: none;
+}
+sup,
+sub {
+ height: 0;
+ line-height: 1;
+ vertical-align: baseline;
+ position: relative;
+ font-size: 10px;
+}
+sup {
+ bottom: 1ex;
+}
+sub {
+ top: .5ex;
+}
+a:link {
+ color:#0066cc;
+}
+a:visited {
+ color:#743399;
+}
+a:active,
+a:hover {
+ color: #ff4b33;
+}
+p,
+ul,
+ol,
+dd,
+pre,
+hr {
+ margin-bottom:24px;
+}
+ul ul,
+ol ol,
+ul ol,
+ol ul {
+ margin-bottom:0;
+}
+pre,
+kbd,
+tt,
+var {
+ font-size: 15px;
+ line-height: 21px;
+}
+code {
+ font-size: 13px;
+}
+strong,
+b,
+dt,
+th {
+ color: #000;
+}
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+ color: #000;
+ margin: 0 0 20px 0;
+ line-height: 1.5em;
+ font-weight: normal;
+}
+h1 {
+ font-size: 2.4em;
+}
+h2 {
+ font-size: 1.8em;
+}
+h3 {
+ font-size: 1.4em;
+}
+h4 {
+ font-size: 1.2em;
+}
+h5 {
+ font-size: 1em;
+}
+h6 {
+ font-size: 0.9em;
+}
+table {
+ border: 1px solid #e7e7e7 !important;
+ text-align: left;
+ margin: 0 -1px 24px 0;
+ width: 100%;
+ border-collapse: collapse;
+ border-spacing: 0;
+}
+tr th,
+thead th {
+ border: none !important;
+ color: #888;
+ font-size: 12px;
+ font-weight: bold;
+ line-height: 18px;
+ padding: 9px 24px;
+}
+tr td {
+ border: none !important;
+ border-top: 1px solid #e7e7e7 !important;
+ padding: 6px 24px;
+}
+
+
+img {
+ margin: 0;
+ height:auto;
+}
+.alignleft,
+img.alignleft {
+ display: inline;
+ float: left;
+ margin-right: 24px;
+ margin-top: 4px;
+}
+.alignright,
+img.alignright {
+ display: inline;
+ float: right;
+ margin-left: 24px;
+ margin-top: 4px;
+}
+.aligncenter,
+img.aligncenter {
+ clear: both;
+ display: block;
+ margin-left: auto;
+ margin-right: auto;
+}
+img.alignleft,
+img.alignright,
+img.aligncenter {
+ margin-bottom: 12px;
+}
+.wp-caption {
+ border: none;
+ background: #f1f1f1;
+ color: #888;
+ font-size: 12px;
+ line-height: 18px;
+ text-align: center;
+ margin-bottom: 20px;
+ padding: 4px;
+ -moz-border-radius: 0;
+ -khtml-border-radius: 0;
+ -webkit-border-radius: 0;
+ border-radius: 0;
+}
+.wp-caption img {
+ margin: 5px;
+}
+.wp-caption p.wp-caption-text {
+ margin: 0 0 4px;
+}
+.wp-smiley {
+ margin:0;
} \ No newline at end of file
diff --git a/themes/mantra/footer.php b/themes/mantra/footer.php
index 90b877c9..583b8f57 100644
--- a/themes/mantra/footer.php
+++ b/themes/mantra/footer.php
@@ -1,38 +1,38 @@
-<?php
-/**
- * The template for displaying the footer.
- *
- * Contains the closing of the id=main div and all content
- * after. Calls sidebar-footer.php for bottom widgets.
- *
- * @package Cryout Creations
- * @subpackage mantra
- * @since mantra 0.5
- */
-?> <div style="clear:both;"></div>
-
- </div> <!-- #forbottom -->
- </div><!-- #main -->
-
-
- <footer id="footer" role="contentinfo">
- <div id="colophon">
-
- <?php get_sidebar( 'footer' );?>
-
- </div><!-- #colophon -->
-
- <div id="footer2">
-
- <?php cryout_footer_hook(); ?>
-
- </div><!-- #footer2 -->
-
- </footer><!-- #footer -->
-
-</div><!-- #wrapper -->
-
-<?php wp_footer(); ?>
-
-</body>
-</html>
+<?php
+/**
+ * The template for displaying the footer.
+ *
+ * Contains the closing of the id=main div and all content
+ * after. Calls sidebar-footer.php for bottom widgets.
+ *
+ * @package Cryout Creations
+ * @subpackage mantra
+ * @since mantra 0.5
+ */
+?> <div style="clear:both;"></div>
+
+ </div> <!-- #forbottom -->
+ </div><!-- #main -->
+
+
+ <footer id="footer" role="contentinfo">
+ <div id="colophon">
+
+ <?php get_sidebar( 'footer' );?>
+
+ </div><!-- #colophon -->
+
+ <div id="footer2">
+
+ <?php cryout_footer_hook(); ?>
+
+ </div><!-- #footer2 -->
+
+ </footer><!-- #footer -->
+
+</div><!-- #wrapper -->
+
+<?php wp_footer(); ?>
+
+</body>
+</html>
diff --git a/themes/mantra/functions.php b/themes/mantra/functions.php
index c23cef67..ac65da81 100644
--- a/themes/mantra/functions.php
+++ b/themes/mantra/functions.php
@@ -1,26 +1,26 @@
-<?php
-/*
- * Functions file
- * Calls all other required files
- * PLEASE DO NOT EDIT THEME FILES - CREATE A CHILD THEME
- *
- * @package mantra
- */
-
-// theme specifics
-define ('_CRYOUT_THEME_NAME','mantra');
-define ('_CRYOUT_THEME_VERSION','2.5.0');
-
-require_once(get_template_directory() . "/admin/main.php"); // Load necessary admin files
-
-//Loading include fiels
-require_once(get_template_directory() . "/includes/theme-setup.php"); // Setup and init theme
-require_once(get_template_directory() . "/includes/theme-styles.php"); // Register and enqueue css styles and scripts
-require_once(get_template_directory() . "/includes/theme-loop.php"); // Loop related fiels
-require_once(get_template_directory() . "/includes/theme-frontpage.php"); // Frontpage generation
-require_once(get_template_directory() . "/includes/theme-comments.php"); // Theme comment functions
-require_once(get_template_directory() . "/includes/theme-functions.php"); // Theme misc functions
-require_once(get_template_directory() . "/includes/theme-hooks.php"); // Theme hooks
-require_once(get_template_directory() . "/includes/tgm.php"); // TGM-PA
-
-?> \ No newline at end of file
+<?php
+/*
+ * Functions file
+ * Calls all other required files
+ * PLEASE DO NOT EDIT THEME FILES - CREATE A CHILD THEME
+ *
+ * @package mantra
+ */
+
+// theme specifics
+define ('_CRYOUT_THEME_NAME','mantra');
+define ('_CRYOUT_THEME_VERSION','2.6.0');
+
+require_once(get_template_directory() . "/admin/main.php"); // Load necessary admin files
+
+//Loading include fiels
+require_once(get_template_directory() . "/includes/theme-setup.php"); // Setup and init theme
+require_once(get_template_directory() . "/includes/theme-styles.php"); // Register and enqueue css styles and scripts
+require_once(get_template_directory() . "/includes/theme-loop.php"); // Loop related fiels
+require_once(get_template_directory() . "/includes/theme-frontpage.php"); // Frontpage generation
+require_once(get_template_directory() . "/includes/theme-comments.php"); // Theme comment functions
+require_once(get_template_directory() . "/includes/theme-functions.php"); // Theme misc functions
+require_once(get_template_directory() . "/includes/theme-hooks.php"); // Theme hooks
+require_once(get_template_directory() . "/includes/tgm.php"); // TGM-PA
+
+?>
diff --git a/themes/mantra/header.php b/themes/mantra/header.php
index abbe539d..554dfb04 100644
--- a/themes/mantra/header.php
+++ b/themes/mantra/header.php
@@ -1,59 +1,59 @@
-<?php
-/**
- * The Header
- *
- * Displays all of the <head> section and everything up till <div id="main">
- *
- * @package Cryout Creations
- * @subpackage mantra
- * @since mantra 0.5
- */
- ?><!DOCTYPE html>
-<html <?php language_attributes(); ?>>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo( 'charset' ); ?>" />
-<?php cryout_seo_hook(); ?>
-<link rel="profile" href="http://gmpg.org/xfn/11" />
-<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
-<?php
- cryout_header_hook();
- wp_head(); ?>
-</head>
-<body <?php body_class(); ?>>
-
-<?php cryout_body_hook(); ?>
-
-<div id="wrapper" class="hfeed">
-
-<?php cryout_wrapper_hook(); ?>
-
-<header id="header">
-
- <div id="masthead">
-
- <div id="branding" role="banner" >
-
- <?php cryout_branding_hook();?>
- <div style="clear:both;"></div>
-
- </div><!-- #branding -->
-
- <nav id="access" class="jssafe" role="navigation">
-
- <?php cryout_access_hook();?>
-
- </nav><!-- #access -->
-
- </div><!-- #masthead -->
-
- <div style="clear:both;"> </div>
-
-</header><!-- #header -->
-<div id="main">
- <div id="forbottom" >
- <?php cryout_forbottom_hook(); ?>
-
- <div style="clear:both;"> </div>
-
- <?php cryout_breadcrumbs_hook();?>
+<?php
+/**
+ * The Header
+ *
+ * Displays all of the <head> section and everything up till <div id="main">
+ *
+ * @package Cryout Creations
+ * @subpackage mantra
+ * @since mantra 0.5
+ */
+ ?><!DOCTYPE html>
+<html <?php language_attributes(); ?>>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo( 'charset' ); ?>" />
+<?php cryout_seo_hook(); ?>
+<link rel="profile" href="http://gmpg.org/xfn/11" />
+<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
+<?php
+ cryout_header_hook();
+ wp_head(); ?>
+</head>
+<body <?php body_class(); ?>>
+
+<?php cryout_body_hook(); ?>
+
+<div id="wrapper" class="hfeed">
+
+<?php cryout_wrapper_hook(); ?>
+
+<header id="header">
+
+ <div id="masthead">
+
+ <div id="branding" role="banner" >
+
+ <?php cryout_branding_hook();?>
+ <div style="clear:both;"></div>
+
+ </div><!-- #branding -->
+
+ <nav id="access" class="jssafe" role="navigation">
+
+ <?php cryout_access_hook();?>
+
+ </nav><!-- #access -->
+
+ </div><!-- #masthead -->
+
+ <div style="clear:both;"> </div>
+
+</header><!-- #header -->
+<div id="main">
+ <div id="forbottom" >
+ <?php cryout_forbottom_hook(); ?>
+
+ <div style="clear:both;"> </div>
+
+ <?php cryout_breadcrumbs_hook();?>
\ No newline at end of file
diff --git a/themes/mantra/includes/tgm.php b/themes/mantra/includes/tgm.php
index cf9d89b8..9e7f8e78 100644
--- a/themes/mantra/includes/tgm.php
+++ b/themes/mantra/includes/tgm.php
@@ -1,3671 +1,3671 @@
-<?php
-
-add_action( 'tgmpa_register', 'cryout_settings_plugin' );
-
-function cryout_settings_plugin() {
-
- $plugins = array(
-
- array(
- 'name' => 'Cryout Serious Theme Settings',
- 'slug' => 'cryout-theme-settings',
- 'required' => false,
- 'version' => '0.5.6',
- //'force_activation' => true,
- //'force_deactivation' => true,
- ),
-
- );
-
- $config = array(
- 'default_path' => '', // Default absolute path to pre-packaged plugins.
- 'menu' => 'mantra-extra-plugins', // Menu slug.
- 'has_notices' => true, // Show admin notices or not.
- 'dismissable' => true, // If false, a user cannot dismiss the nag message.
- 'dismiss_msg' => '', // If 'dismissable' is false, this message will be output at top of nag.
- 'is_automatic' => true, // Automatically activate plugins after installation or not.
- 'message' => '', // Message to output right before the plugins table.
- 'strings' => array(
- 'page_title' => __( 'Recommended Plugins', 'cryout' ),
- 'menu_title' => ucwords(_CRYOUT_THEME_NAME) . __( ' Plugins', 'cryout' ),
- 'installing' => __( 'Installing Plugin: %s', 'cryout' ), // %s = plugin name.
- 'oops' => __( 'Something went wrong with the plugin API.', 'cryout' ),
- 'notice_can_install_required' => _n_noop( ucwords(_CRYOUT_THEME_NAME) . ' requires the following plugin: %1$s.', ucwords(_CRYOUT_THEME_NAME) . ' requires the following plugins: %1$s.', 'cryout' ), // %1$s = plugin name(s).
- 'notice_can_install_recommended' => _n_noop( ucwords(_CRYOUT_THEME_NAME) . ' recommends the following plugin: %1$s.', ucwords(_CRYOUT_THEME_NAME) . ' recommends the following plugins: %1$s.', 'cryout' ), // %1$s = plugin name(s).
- 'notice_cannot_install' => _n_noop( 'Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.', 'cryout' ), // %1$s = plugin name(s).
- 'notice_can_activate_required' => _n_noop( 'The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.', 'cryout' ), // %1$s = plugin name(s).
- 'notice_can_activate_recommended' => _n_noop( 'The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.', 'cryout' ), // %1$s = plugin name(s).
- 'notice_cannot_activate' => _n_noop( 'Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.', 'cryout' ), // %1$s = plugin name(s).
- 'notice_ask_to_update' => _n_noop( 'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.', 'cryout' ), // %1$s = plugin name(s).
- 'notice_cannot_update' => _n_noop( 'Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.', 'cryout' ), // %1$s = plugin name(s).
- 'install_link' => _n_noop( 'Begin installing plugin', 'Begin installing plugins', 'cryout' ),
- 'activate_link' => _n_noop( 'Begin activating plugin', 'Begin activating plugins', 'cryout' ),
- 'return' => __( 'Return to Required Plugins Installer', 'cryout' ),
- 'plugin_activated' => __( 'Plugin activated successfully.', 'cryout' ),
- 'complete' => __( 'All plugins installed and activated successfully. %s', 'cryout' ), // %s = dashboard link.
- 'nag_type' => 'updated' // Determines admin notice type - can only be 'updated', 'update-nag' or 'error'.
- )
- );
-
- tgmpa( $plugins, $config );
-
-}
-
-
-/***************** TGM class below *******************/
-
-/**
- * Plugin installation and activation for WordPress themes.
- *
- * Please note that this is a drop-in library for a theme or plugin.
- * The authors of this library (Thomas, Gary and Juliette) are NOT responsible
- * for the support of your plugin or theme. Please contact the plugin
- * or theme author for support.
- *
- * @package TGM-Plugin-Activation
- * @version 2.5.2
- * @link http://tgmpluginactivation.com/
- * @author Thomas Griffin, Gary Jones, Juliette Reinders Folmer
- * @copyright Copyright (c) 2011, Thomas Griffin
- * @license GPL-2.0+
- *
- * @wordpress-plugin
- * Plugin Name: TGM Plugin Activation
- * Plugin URI:
- * Description: Plugin installation and activation for WordPress themes.
- * Version: 2.5.2
- * Author: Thomas Griffin, Gary Jones, Juliette Reinders Folmer
- * Author URI: http://tgmpluginactivation.com/
- * Text Domain: tgmpa
- * Domain Path: /languages/
- * Copyright: 2011, Thomas Griffin
- */
-
-/*
- Copyright 2011 Thomas Griffin (thomasgriffinmedia.com)
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License, version 2, as
- published by the Free Software Foundation.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-if ( ! class_exists( 'TGM_Plugin_Activation' ) ) {
-
- /**
- * Automatic plugin installation and activation library.
- *
- * Creates a way to automatically install and activate plugins from within themes.
- * The plugins can be either bundled, downloaded from the WordPress
- * Plugin Repository or downloaded from another external source.
- *
- * @since 1.0.0
- *
- * @package TGM-Plugin-Activation
- * @author Thomas Griffin
- * @author Gary Jones
- */
- class TGM_Plugin_Activation {
- /**
- * TGMPA version number.
- *
- * @since 2.5.0
- *
- * @const string Version number.
- */
- const TGMPA_VERSION = '2.5.2';
-
- /**
- * Regular expression to test if a URL is a WP plugin repo URL.
- *
- * @const string Regex.
- *
- * @since 2.5.0
- */
- const WP_REPO_REGEX = '|^http[s]?://wordpress\.org/(?:extend/)?plugins/|';
-
- /**
- * Arbitrary regular expression to test if a string starts with a URL.
- *
- * @const string Regex.
- *
- * @since 2.5.0
- */
- const IS_URL_REGEX = '|^http[s]?://|';
-
- /**
- * Holds a copy of itself, so it can be referenced by the class name.
- *
- * @since 1.0.0
- *
- * @var TGM_Plugin_Activation
- */
- public static $instance;
-
- /**
- * Holds arrays of plugin details.
- *
- * @since 1.0.0
- *
- * @since 2.5.0 the array has the plugin slug as an associative key.
- *
- * @var array
- */
- public $plugins = array();
-
- /**
- * Holds arrays of plugin names to use to sort the plugins array.
- *
- * @since 2.5.0
- *
- * @var array
- */
- protected $sort_order = array();
-
- /**
- * Whether any plugins have the 'force_activation' setting set to true.
- *
- * @since 2.5.0
- *
- * @var bool
- */
- protected $has_forced_activation = false;
-
- /**
- * Whether any plugins have the 'force_deactivation' setting set to true.
- *
- * @since 2.5.0
- *
- * @var bool
- */
- protected $has_forced_deactivation = false;
-
- /**
- * Name of the unique ID to hash notices.
- *
- * @since 2.4.0
- *
- * @var string
- */
- public $id = 'tgmpa';
-
- /**
- * Name of the query-string argument for the admin page.
- *
- * @since 1.0.0
- *
- * @var string
- */
- protected $menu = 'tgmpa-install-plugins';
-
- /**
- * Parent menu file slug.
- *
- * @since 2.5.0
- *
- * @var string
- */
- public $parent_slug = 'themes.php';
-
- /**
- * Capability needed to view the plugin installation menu item.
- *
- * @since 2.5.0
- *
- * @var string
- */
- public $capability = 'edit_theme_options';
-
- /**
- * Default absolute path to folder containing bundled plugin zip files.
- *
- * @since 2.0.0
- *
- * @var string Absolute path prefix to zip file location for bundled plugins. Default is empty string.
- */
- public $default_path = '';
-
- /**
- * Flag to show admin notices or not.
- *
- * @since 2.1.0
- *
- * @var boolean
- */
- public $has_notices = true;
-
- /**
- * Flag to determine if the user can dismiss the notice nag.
- *
- * @since 2.4.0
- *
- * @var boolean
- */
- public $dismissable = true;
-
- /**
- * Message to be output above nag notice if dismissable is false.
- *
- * @since 2.4.0
- *
- * @var string
- */
- public $dismiss_msg = '';
-
- /**
- * Flag to set automatic activation of plugins. Off by default.
- *
- * @since 2.2.0
- *
- * @var boolean
- */
- public $is_automatic = false;
-
- /**
- * Optional message to display before the plugins table.
- *
- * @since 2.2.0
- *
- * @var string Message filtered by wp_kses_post(). Default is empty string.
- */
- public $message = '';
-
- /**
- * Holds configurable array of strings.
- *
- * Default values are added in the constructor.
- *
- * @since 2.0.0
- *
- * @var array
- */
- public $strings = array();
-
- /**
- * Holds the version of WordPress.
- *
- * @since 2.4.0
- *
- * @var int
- */
- public $wp_version;
-
- /**
- * Holds the hook name for the admin page.
- *
- * @since 2.5.0
- *
- * @var string
- */
- public $page_hook;
-
- /**
- * Adds a reference of this object to $instance, populates default strings,
- * does the tgmpa_init action hook, and hooks in the interactions to init.
- *
- * @internal This method should be `protected`, but as too many TGMPA implementations
- * haven't upgraded beyond v2.3.6 yet, this gives backward compatibility issues.
- * Reverted back to public for the time being.
- *
- * @since 1.0.0
- *
- * @see TGM_Plugin_Activation::init()
- */
- public function __construct() {
- // Set the current WordPress version.
- $this->wp_version = $GLOBALS['wp_version'];
-
- // Announce that the class is ready, and pass the object (for advanced use).
- do_action_ref_array( 'tgmpa_init', array( $this ) );
-
- // When the rest of WP has loaded, kick-start the rest of the class.
- add_action( 'init', array( $this, 'init' ) );
- }
-
- /**
- * Magic method to (not) set protected properties from outside of this class.
- *
- * @internal hackedihack... There is a serious bug in v2.3.2 - 2.3.6 where the `menu` property
- * is being assigned rather than tested in a conditional, effectively rendering it useless.
- * This 'hack' prevents this from happening.
- *
- * @see https://github.com/TGMPA/TGM-Plugin-Activation/blob/2.3.6/tgm-plugin-activation/class-tgm-plugin-activation.php#L1593
- *
- * @param string $name Name of an inaccessible property.
- * @param mixed $value Value to assign to the property.
- * @return void Silently fail to set the property when this is tried from outside of this class context.
- * (Inside this class context, the __set() method if not used as there is direct access.)
- */
- public function __set( $name, $value ) {
- return;
- }
-
- /**
- * Magic method to get the value of a protected property outside of this class context.
- *
- * @param string $name Name of an inaccessible property.
- * @return mixed The property value.
- */
- public function __get( $name ) {
- return $this->{$name};
- }
-
- /**
- * Initialise the interactions between this class and WordPress.
- *
- * Hooks in three new methods for the class: admin_menu, notices and styles.
- *
- * @since 2.0.0
- *
- * @see TGM_Plugin_Activation::admin_menu()
- * @see TGM_Plugin_Activation::notices()
- * @see TGM_Plugin_Activation::styles()
- */
- public function init() {
- /**
- * By default TGMPA only loads on the WP back-end and not in an Ajax call. Using this filter
- * you can overrule that behaviour.
- *
- * @since 2.5.0
- *
- * @param bool $load Whether or not TGMPA should load.
- * Defaults to the return of `is_admin() && ! defined( 'DOING_AJAX' )`.
- */
- if ( true !== apply_filters( 'tgmpa_load', ( is_admin() && ! defined( 'DOING_AJAX' ) ) ) ) {
- return;
- }
-
- // Load class strings.
- $this->strings = array(
- 'page_title' => __( 'Install Required Plugins', 'cryout' ),
- 'menu_title' => __( 'Install Plugins', 'cryout' ),
- 'installing' => __( 'Installing Plugin: %s', 'cryout' ),
- 'oops' => __( 'Something went wrong with the plugin API.', 'cryout' ),
- 'notice_can_install_required' => _n_noop(
- 'This theme requires the following plugin: %1$s.',
- 'This theme requires the following plugins: %1$s.',
- 'cryout'
- ),
- 'notice_can_install_recommended' => _n_noop(
- 'This theme recommends the following plugin: %1$s.',
- 'This theme recommends the following plugins: %1$s.',
- 'cryout'
- ),
- 'notice_cannot_install' => _n_noop(
- 'Sorry, but you do not have the correct permissions to install the %1$s plugin.',
- 'Sorry, but you do not have the correct permissions to install the %1$s plugins.',
- 'cryout'
- ),
- 'notice_ask_to_update' => _n_noop(
- 'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.',
- 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.',
- 'cryout'
- ),
- 'notice_ask_to_update_maybe' => _n_noop(
- 'There is an update available for: %1$s.',
- 'There are updates available for the following plugins: %1$s.',
- 'cryout'
- ),
- 'notice_cannot_update' => _n_noop(
- 'Sorry, but you do not have the correct permissions to update the %1$s plugin.',
- 'Sorry, but you do not have the correct permissions to update the %1$s plugins.',
- 'cryout'
- ),
- 'notice_can_activate_required' => _n_noop(
- 'The following required plugin is currently inactive: %1$s.',
- 'The following required plugins are currently inactive: %1$s.',
- 'cryout'
- ),
- 'notice_can_activate_recommended' => _n_noop(
- 'The following recommended plugin is currently inactive: %1$s.',
- 'The following recommended plugins are currently inactive: %1$s.',
- 'cryout'
- ),
- 'notice_cannot_activate' => _n_noop(
- 'Sorry, but you do not have the correct permissions to activate the %1$s plugin.',
- 'Sorry, but you do not have the correct permissions to activate the %1$s plugins.',
- 'cryout'
- ),
- 'install_link' => _n_noop(
- 'Begin installing plugin',
- 'Begin installing plugins',
- 'cryout'
- ),
- 'update_link' => _n_noop(
- 'Begin updating plugin',
- 'Begin updating plugins',
- 'cryout'
- ),
- 'activate_link' => _n_noop(
- 'Begin activating plugin',
- 'Begin activating plugins',
- 'cryout'
- ),
- 'return' => __( 'Return to Required Plugins Installer', 'cryout' ),
- 'dashboard' => __( 'Return to the dashboard', 'cryout' ),
- 'plugin_activated' => __( 'Plugin activated successfully.', 'cryout' ),
- 'activated_successfully' => __( 'The following plugin was activated successfully:', 'cryout' ),
- 'plugin_already_active' => __( 'No action taken. Plugin %1$s was already active.', 'cryout' ),
- 'plugin_needs_higher_version' => __( 'Plugin not activated. A higher version of %s is needed for this theme. Please update the plugin.', 'cryout' ),
- 'complete' => __( 'All plugins installed and activated successfully. %1$s', 'cryout' ),
- 'dismiss' => __( 'Dismiss this notice', 'cryout' ),
- 'contact_admin' => __( 'Please contact the administrator of this site for help.', 'cryout' ),
- );
-
- do_action( 'tgmpa_register' );
-
- /* After this point, the plugins should be registered and the configuration set. */
-
- // Proceed only if we have plugins to handle.
- if ( empty( $this->plugins ) || ! is_array( $this->plugins ) ) {
- return;
- }
-
- // Set up the menu and notices if we still have outstanding actions.
- if ( true !== $this->is_tgmpa_complete() ) {
- // Sort the plugins.
- array_multisort( $this->sort_order, SORT_ASC, $this->plugins );
-
- add_action( 'admin_menu', array( $this, 'admin_menu' ) );
- add_action( 'admin_head', array( $this, 'dismiss' ) );
-
- // Prevent the normal links from showing underneath a single install/update page.
- add_filter( 'install_plugin_complete_actions', array( $this, 'actions' ) );
- add_filter( 'update_plugin_complete_actions', array( $this, 'actions' ) );
-
- if ( $this->has_notices ) {
- add_action( 'admin_notices', array( $this, 'notices' ) );
- add_action( 'admin_init', array( $this, 'admin_init' ), 1 );
- add_action( 'admin_enqueue_scripts', array( $this, 'thickbox' ) );
- }
-
- add_action( 'load-plugins.php', array( $this, 'add_plugin_action_link_filters' ), 1 );
- }
-
- // Make sure things get reset on switch theme.
- add_action( 'switch_theme', array( $this, 'flush_plugins_cache' ) );
-
- if ( $this->has_notices ) {
- add_action( 'switch_theme', array( $this, 'update_dismiss' ) );
- }
-
- // Setup the force activation hook.
- if ( true === $this->has_forced_activation ) {
- add_action( 'admin_init', array( $this, 'force_activation' ) );
- }
-
- // Setup the force deactivation hook.
- if ( true === $this->has_forced_deactivation ) {
- add_action( 'switch_theme', array( $this, 'force_deactivation' ) );
- }
- }
-
- /**
- * Prevent activation of plugins which don't meet the minimum version requirement from the
- * WP native plugins page.
- *
- * @since 2.5.0
- */
- public function add_plugin_action_link_filters() {
- foreach ( $this->plugins as $slug => $plugin ) {
- if ( false === $this->can_plugin_activate( $slug ) ) {
- add_filter( 'plugin_action_links_' . $plugin['file_path'], array( $this, 'filter_plugin_action_links_activate' ), 20 );
- }
-
- if ( true === $plugin['force_activation'] ) {
- add_filter( 'plugin_action_links_' . $plugin['file_path'], array( $this, 'filter_plugin_action_links_deactivate' ), 20 );
- }
-
- if ( false !== $this->does_plugin_require_update( $slug ) ) {
- add_filter( 'plugin_action_links_' . $plugin['file_path'], array( $this, 'filter_plugin_action_links_update' ), 20 );
- }
- }
- }
-
- /**
- * Remove the 'Activate' link on the WP native plugins page if the plugin does not meet the
- * minimum version requirements.
- *
- * @since 2.5.0
- *
- * @param array $actions Action links.
- * @return array
- */
- public function filter_plugin_action_links_activate( $actions ) {
- unset( $actions['activate'] );
-
- return $actions;
- }
-
- /**
- * Remove the 'Deactivate' link on the WP native plugins page if the plugin has been set to force activate.
- *
- * @since 2.5.0
- *
- * @param array $actions Action links.
- * @return array
- */
- public function filter_plugin_action_links_deactivate( $actions ) {
- unset( $actions['deactivate'] );
-
- return $actions;
- }
-
- /**
- * Add a 'Requires update' link on the WP native plugins page if the plugin does not meet the
- * minimum version requirements.
- *
- * @since 2.5.0
- *
- * @param array $actions Action links.
- * @return array
- */
- public function filter_plugin_action_links_update( $actions ) {
- $actions['update'] = sprintf(
- '<a href="%1$s" title="%2$s" class="edit">%3$s</a>',
- esc_url( $this->get_tgmpa_status_url( 'update' ) ),
- esc_attr__( 'This plugin needs to be updated to be compatible with your theme.', 'cryout' ),
- esc_html__( 'Update Required', 'cryout' )
- );
-
- return $actions;
- }
-
- /**
- * Handles calls to show plugin information via links in the notices.
- *
- * We get the links in the admin notices to point to the TGMPA page, rather
- * than the typical plugin-install.php file, so we can prepare everything
- * beforehand.
- *
- * WP does not make it easy to show the plugin information in the thickbox -
- * here we have to require a file that includes a function that does the
- * main work of displaying it, enqueue some styles, set up some globals and
- * finally call that function before exiting.
- *
- * Down right easy once you know how...
- *
- * Returns early if not the TGMPA page.
- *
- * @since 2.1.0
- *
- * @global string $tab Used as iframe div class names, helps with styling
- * @global string $body_id Used as the iframe body ID, helps with styling
- *
- * @return null Returns early if not the TGMPA page.
- */
- public function admin_init() {
- if ( ! $this->is_tgmpa_page() ) {
- return;
- }
-
- if ( isset( $_REQUEST['tab'] ) && 'plugin-information' === $_REQUEST['tab'] ) {
- // Needed for install_plugin_information().
- require_once ABSPATH . 'wp-admin/includes/plugin-install.php';
-
- wp_enqueue_style( 'plugin-install' );
-
- global $tab, $body_id;
- $body_id = 'plugin-information';
- // @codingStandardsIgnoreStart
- $tab = 'plugin-information';
- // @codingStandardsIgnoreEnd
-
- install_plugin_information();
-
- exit;
- }
- }
-
- /**
- * Enqueue thickbox scripts/styles for plugin info.
- *
- * Thickbox is not automatically included on all admin pages, so we must
- * manually enqueue it for those pages.
- *
- * Thickbox is only loaded if the user has not dismissed the admin
- * notice or if there are any plugins left to install and activate.
- *
- * @since 2.1.0
- */
- public function thickbox() {
- if ( ! get_user_meta( get_current_user_id(), 'tgmpa_dismissed_notice_' . $this->id, true ) ) {
- add_thickbox();
- }
- }
-
- /**
- * Adds submenu page if there are plugin actions to take.
- *
- * This method adds the submenu page letting users know that a required
- * plugin needs to be installed.
- *
- * This page disappears once the plugin has been installed and activated.
- *
- * @since 1.0.0
- *
- * @see TGM_Plugin_Activation::init()
- * @see TGM_Plugin_Activation::install_plugins_page()
- *
- * @return null Return early if user lacks capability to install a plugin.
- */
- public function admin_menu() {
- // Make sure privileges are correct to see the page.
- if ( ! current_user_can( 'install_plugins' ) ) {
- return;
- }
-
- $args = apply_filters(
- 'tgmpa_admin_menu_args',
- array(
- 'parent_slug' => $this->parent_slug, // Parent Menu slug.
- 'page_title' => $this->strings['page_title'], // Page title.
- 'menu_title' => $this->strings['menu_title'], // Menu title.
- 'capability' => $this->capability, // Capability.
- 'menu_slug' => $this->menu, // Menu slug.
- 'function' => array( $this, 'install_plugins_page' ), // Callback.
- )
- );
-
- $this->add_admin_menu( $args );
- }
-
- /**
- * Add the menu item.
- *
- * @since 2.5.0
- *
- * @param array $args Menu item configuration.
- */
- protected function add_admin_menu( array $args ) {
- if ( has_filter( 'tgmpa_admin_menu_use_add_theme_page' ) ) {
- _deprecated_function( 'The "tgmpa_admin_menu_use_add_theme_page" filter', '2.5.0', esc_html__( 'Set the parent_slug config variable instead.', 'cryout' ) );
- }
-
- // modified to pass theme check requirement
- $this->page_hook = call_user_func( 'add_theme_page', $args['page_title'], $args['menu_title'], $args['capability'], $args['menu_slug'], $args['function'] );
- }
-
- /**
- * Echoes plugin installation form.
- *
- * This method is the callback for the admin_menu method function.
- * This displays the admin page and form area where the user can select to install and activate the plugin.
- * Aborts early if we're processing a plugin installation action.
- *
- * @since 1.0.0
- *
- * @return null Aborts early if we're processing a plugin installation action.
- */
- public function install_plugins_page() {
- // Store new instance of plugin table in object.
- $plugin_table = new TGMPA_List_Table;
-
- // Return early if processing a plugin installation action.
- if ( ( ( 'tgmpa-bulk-install' === $plugin_table->current_action() || 'tgmpa-bulk-update' === $plugin_table->current_action() ) && $plugin_table->process_bulk_actions() ) || $this->do_plugin_install() ) {
- return;
- }
-
- // Force refresh of available plugin information so we'll know about manual updates/deletes.
- wp_clean_plugins_cache( false );
-
- ?>
- <div class="tgmpa wrap">
- <h2><?php echo esc_html( get_admin_page_title() ); ?></h2>
- <?php $plugin_table->prepare_items(); ?>
-
- <?php
- if ( ! empty( $this->message ) && is_string( $this->message ) ) {
- echo wp_kses_post( $this->message );
- }
- ?>
- <?php $plugin_table->views(); ?>
-
- <form id="tgmpa-plugins" action="" method="post">
- <input type="hidden" name="tgmpa-page" value="<?php echo esc_attr( $this->menu ); ?>" />
- <input type="hidden" name="plugin_status" value="<?php echo esc_attr( $plugin_table->view_context ); ?>" />
- <?php $plugin_table->display(); ?>
- </form>
- </div>
- <?php
- }
-
- /**
- * Installs, updates or activates a plugin depending on the action link clicked by the user.
- *
- * Checks the $_GET variable to see which actions have been
- * passed and responds with the appropriate method.
- *
- * Uses WP_Filesystem to process and handle the plugin installation
- * method.
- *
- * @since 1.0.0
- *
- * @uses WP_Filesystem
- * @uses WP_Error
- * @uses WP_Upgrader
- * @uses Plugin_Upgrader
- * @uses Plugin_Installer_Skin
- * @uses Plugin_Upgrader_Skin
- *
- * @return boolean True on success, false on failure.
- */
- protected function do_plugin_install() {
- if ( empty( $_GET['plugin'] ) ) {
- return false;
- }
-
- // All plugin information will be stored in an array for processing.
- $slug = $this->sanitize_key( urldecode( $_GET['plugin'] ) );
-
- if ( ! isset( $this->plugins[ $slug ] ) ) {
- return false;
- }
-
- // Was an install or upgrade action link clicked?
- if ( ( isset( $_GET['tgmpa-install'] ) && 'install-plugin' === $_GET['tgmpa-install'] ) || ( isset( $_GET['tgmpa-update'] ) && 'update-plugin' === $_GET['tgmpa-update'] ) ) {
-
- $install_type = 'install';
- if ( isset( $_GET['tgmpa-update'] ) && 'update-plugin' === $_GET['tgmpa-update'] ) {
- $install_type = 'update';
- }
-
- check_admin_referer( 'tgmpa-' . $install_type, 'tgmpa-nonce' );
-
- // Pass necessary information via URL if WP_Filesystem is needed.
- $url = wp_nonce_url(
- add_query_arg(
- array(
- 'plugin' => urlencode( $slug ),
- 'tgmpa-' . $install_type => $install_type . '-plugin',
- ),
- $this->get_tgmpa_url()
- ),
- 'tgmpa-' . $install_type,
- 'tgmpa-nonce'
- );
-
- $method = ''; // Leave blank so WP_Filesystem can populate it as necessary.
-
- if ( false === ( $creds = request_filesystem_credentials( esc_url_raw( $url ), $method, false, false, array() ) ) ) {
- return true;
- }
-
- if ( ! WP_Filesystem( $creds ) ) {
- request_filesystem_credentials( esc_url_raw( $url ), $method, true, false, array() ); // Setup WP_Filesystem.
- return true;
- }
-
- /* If we arrive here, we have the filesystem. */
-
- // Prep variables for Plugin_Installer_Skin class.
- $extra = array();
- $extra['slug'] = $slug; // Needed for potentially renaming of directory name.
- $source = $this->get_download_url( $slug );
- $api = ( 'repo' === $this->plugins[ $slug ]['source_type'] ) ? $this->get_plugins_api( $slug ) : null;
- $api = ( false !== $api ) ? $api : null;
-
- $url = add_query_arg(
- array(
- 'action' => $install_type . '-plugin',
- 'plugin' => urlencode( $slug ),
- ),
- 'update.php'
- );
-
- if ( ! class_exists( 'Plugin_Upgrader', false ) ) {
- require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
- }
-
- $skin_args = array(
- 'type' => ( 'bundled' !== $this->plugins[ $slug ]['source_type'] ) ? 'web' : 'upload',
- 'title' => sprintf( $this->strings['installing'], $this->plugins[ $slug ]['name'] ),
- 'url' => esc_url_raw( $url ),
- 'nonce' => $install_type . '-plugin_' . $slug,
- 'plugin' => '',
- 'api' => $api,
- 'extra' => $extra,
- );
-
- if ( 'update' === $install_type ) {
- $skin_args['plugin'] = $this->plugins[ $slug ]['file_path'];
- $skin = new Plugin_Upgrader_Skin( $skin_args );
- } else {
- $skin = new Plugin_Installer_Skin( $skin_args );
- }
-
- // Create a new instance of Plugin_Upgrader.
- $upgrader = new Plugin_Upgrader( $skin );
-
- // Perform the action and install the plugin from the $source urldecode().
- add_filter( 'upgrader_source_selection', array( $this, 'maybe_adjust_source_dir' ), 1, 3 );
-
- if ( 'update' === $install_type ) {
- // Inject our info into the update transient.
- $to_inject = array( $slug => $this->plugins[ $slug ] );
- $to_inject[ $slug ]['source'] = $source;
- $this->inject_update_info( $to_inject );
-
- $upgrader->upgrade( $this->plugins[ $slug ]['file_path'] );
- } else {
- $upgrader->install( $source );
- }
-
- remove_filter( 'upgrader_source_selection', array( $this, 'maybe_adjust_source_dir' ), 1, 3 );
-
- // Make sure we have the correct file path now the plugin is installed/updated.
- $this->populate_file_path( $slug );
-
- // Only activate plugins if the config option is set to true and the plugin isn't
- // already active (upgrade).
- if ( $this->is_automatic && ! $this->is_plugin_active( $slug ) ) {
- $plugin_activate = $upgrader->plugin_info(); // Grab the plugin info from the Plugin_Upgrader method.
- if ( false === $this->activate_single_plugin( $plugin_activate, $slug, true ) ) {
- return true; // Finish execution of the function early as we encountered an error.
- }
- }
-
- $this->show_tgmpa_version();
-
- // Display message based on if all plugins are now active or not.
- if ( $this->is_tgmpa_complete() ) {
- echo '<p>', sprintf( esc_html( $this->strings['complete'] ), '<a href="' . esc_url( self_admin_url() ) . '">' . esc_html__( 'Return to the Dashboard', 'cryout' ) . '</a>' ), '</p>';
- echo '<style type="text/css">#adminmenu .wp-submenu li.current { display: none !important; }</style>';
- } else {
- echo '<p><a href="', esc_url( $this->get_tgmpa_url() ), '" target="_parent">', esc_html( $this->strings['return'] ), '</a></p>';
- }
-
- return true;
- } elseif ( isset( $this->plugins[ $slug ]['file_path'], $_GET['tgmpa-activate'] ) && 'activate-plugin' === $_GET['tgmpa-activate'] ) {
- // Activate action link was clicked.
- check_admin_referer( 'tgmpa-activate', 'tgmpa-nonce' );
-
- if ( false === $this->activate_single_plugin( $this->plugins[ $slug ]['file_path'], $slug ) ) {
- return true; // Finish execution of the function early as we encountered an error.
- }
- }
-
- return false;
- }
-
- /**
- * Inject information into the 'update_plugins' site transient as WP checks that before running an update.
- *
- * @since 2.5.0
- *
- * @param array $plugins The plugin information for the plugins which are to be updated.
- */
- public function inject_update_info( $plugins ) {
- $repo_updates = get_site_transient( 'update_plugins' );
-
- if ( ! is_object( $repo_updates ) ) {
- $repo_updates = new stdClass;
- }
-
- foreach ( $plugins as $slug => $plugin ) {
- $file_path = $plugin['file_path'];
-
- if ( empty( $repo_updates->response[ $file_path ] ) ) {
- $repo_updates->response[ $file_path ] = new stdClass;
- }
-
- // We only really need to set package, but let's do all we can in case WP changes something.
- $repo_updates->response[ $file_path ]->slug = $slug;
- $repo_updates->response[ $file_path ]->plugin = $file_path;
- $repo_updates->response[ $file_path ]->new_version = $plugin['version'];
- $repo_updates->response[ $file_path ]->package = $plugin['source'];
- if ( empty( $repo_updates->response[ $file_path ]->url ) && ! empty( $plugin['external_url'] ) ) {
- $repo_updates->response[ $file_path ]->url = $plugin['external_url'];
- }
- }
-
- set_site_transient( 'update_plugins', $repo_updates );
- }
-
- /**
- * Adjust the plugin directory name if necessary.
- *
- * The final destination directory of a plugin is based on the subdirectory name found in the
- * (un)zipped source. In some cases - most notably GitHub repository plugin downloads -, this
- * subdirectory name is not the same as the expected slug and the plugin will not be recognized
- * as installed. This is fixed by adjusting the temporary unzipped source subdirectory name to
- * the expected plugin slug.
- *
- * @since 2.5.0
- *
- * @param string $source Path to upgrade/zip-file-name.tmp/subdirectory/.
- * @param string $remote_source Path to upgrade/zip-file-name.tmp.
- * @param \WP_Upgrader $upgrader Instance of the upgrader which installs the plugin.
- * @return string $source
- */
- public function maybe_adjust_source_dir( $source, $remote_source, $upgrader ) {
- if ( ! $this->is_tgmpa_page() || ! is_object( $GLOBALS['wp_filesystem'] ) ) {
- return $source;
- }
-
- // Check for single file plugins.
- $source_files = array_keys( $GLOBALS['wp_filesystem']->dirlist( $remote_source ) );
- if ( 1 === count( $source_files ) && false === $GLOBALS['wp_filesystem']->is_dir( $source ) ) {
- return $source;
- }
-
- // Multi-file plugin, let's see if the directory is correctly named.
- $desired_slug = '';
-
- // Figure out what the slug is supposed to be.
- if ( false === $upgrader->bulk && ! empty( $upgrader->skin->options['extra']['slug'] ) ) {
- $desired_slug = $upgrader->skin->options['extra']['slug'];
- } else {
- // Bulk installer contains less info, so fall back on the info registered here.
- foreach ( $this->plugins as $slug => $plugin ) {
- if ( ! empty( $upgrader->skin->plugin_names[ $upgrader->skin->i ] ) && $plugin['name'] === $upgrader->skin->plugin_names[ $upgrader->skin->i ] ) {
- $desired_slug = $slug;
- break;
- }
- }
- unset( $slug, $plugin );
- }
-
- if ( ! empty( $desired_slug ) ) {
- $subdir_name = untrailingslashit( str_replace( trailingslashit( $remote_source ), '', $source ) );
-
- if ( ! empty( $subdir_name ) && $subdir_name !== $desired_slug ) {
- $from = untrailingslashit( $source );
- $to = trailingslashit( $remote_source ) . $desired_slug;
-
- if ( true === $GLOBALS['wp_filesystem']->move( $from, $to ) ) {
- return trailingslashit( $to );
- } else {
- return new WP_Error( 'rename_failed', esc_html__( 'The remote plugin package does not contain a folder with the desired slug and renaming did not work.', 'cryout' ) . ' ' . esc_html__( 'Please contact the plugin provider and ask them to package their plugin according to the WordPress guidelines.', 'cryout' ), array( 'found' => $subdir_name, 'expected' => $desired_slug ) );
- }
- } elseif ( empty( $subdir_name ) ) {
- return new WP_Error( 'packaged_wrong', esc_html__( 'The remote plugin package consists of more than one file, but the files are not packaged in a folder.', 'cryout' ) . ' ' . esc_html__( 'Please contact the plugin provider and ask them to package their plugin according to the WordPress guidelines.', 'cryout' ), array( 'found' => $subdir_name, 'expected' => $desired_slug ) );
- }
- }
-
- return $source;
- }
-
- /**
- * Activate a single plugin and send feedback about the result to the screen.
- *
- * @since 2.5.0
- *
- * @param string $file_path Path within wp-plugins/ to main plugin file.
- * @param string $slug Plugin slug.
- * @param bool $automatic Whether this is an automatic activation after an install. Defaults to false.
- * This determines the styling of the output messages.
- * @return bool False if an error was encountered, true otherwise.
- */
- protected function activate_single_plugin( $file_path, $slug, $automatic = false ) {
- if ( $this->can_plugin_activate( $slug ) ) {
- $activate = activate_plugin( $file_path );
-
- if ( is_wp_error( $activate ) ) {
- echo '<div id="message" class="error"><p>', wp_kses_post( $activate->get_error_message() ), '</p></div>',
- '<p><a href="', esc_url( $this->get_tgmpa_url() ), '" target="_parent">', esc_html( $this->strings['return'] ), '</a></p>';
-
- return false; // End it here if there is an error with activation.
- } else {
- if ( ! $automatic ) {
- // Make sure message doesn't display again if bulk activation is performed
- // immediately after a single activation.
- if ( ! isset( $_POST['action'] ) ) { // WPCS: CSRF OK.
- echo '<div id="message" class="updated"><p>', esc_html( $this->strings['activated_successfully'] ), ' <strong>', esc_html( $this->plugins[ $slug ]['name'] ), '.</strong></p></div>';
- }
- } else {
- // Simpler message layout for use on the plugin install page.
- echo '<p>', esc_html( $this->strings['plugin_activated'] ), '</p>';
- }
- }
- } elseif ( $this->is_plugin_active( $slug ) ) {
- // No simpler message format provided as this message should never be encountered
- // on the plugin install page.
- echo '<div id="message" class="error"><p>',
- sprintf(
- esc_html( $this->strings['plugin_already_active'] ),
- '<strong>' . esc_html( $this->plugins[ $slug ]['name'] ) . '</strong>'
- ),
- '</p></div>';
- } elseif ( $this->does_plugin_require_update( $slug ) ) {
- if ( ! $automatic ) {
- // Make sure message doesn't display again if bulk activation is performed
- // immediately after a single activation.
- if ( ! isset( $_POST['action'] ) ) { // WPCS: CSRF OK.
- echo '<div id="message" class="error"><p>',
- sprintf(
- esc_html( $this->strings['plugin_needs_higher_version'] ),
- '<strong>' . esc_html( $this->plugins[ $slug ]['name'] ) . '</strong>'
- ),
- '</p></div>';
- }
- } else {
- // Simpler message layout for use on the plugin install page.
- echo '<p>', sprintf( esc_html( $this->strings['plugin_needs_higher_version'] ), esc_html( $this->plugins[ $slug ]['name'] ) ), '</p>';
- }
- }
-
- return true;
- }
-
- /**
- * Echoes required plugin notice.
- *
- * Outputs a message telling users that a specific plugin is required for
- * their theme. If appropriate, it includes a link to the form page where
- * users can install and activate the plugin.
- *
- * Returns early if we're on the Install page.
- *
- * @since 1.0.0
- *
- * @global object $current_screen
- *
- * @return null Returns early if we're on the Install page.
- */
- public function notices() {
- // Remove nag on the install page / Return early if the nag message has been dismissed.
- if ( $this->is_tgmpa_page() || get_user_meta( get_current_user_id(), 'tgmpa_dismissed_notice_' . $this->id, true ) ) {
- return;
- }
-
- // Store for the plugin slugs by message type.
- $message = array();
-
- // Initialize counters used to determine plurality of action link texts.
- $install_link_count = 0;
- $update_link_count = 0;
- $activate_link_count = 0;
-
- foreach ( $this->plugins as $slug => $plugin ) {
- if ( $this->is_plugin_active( $slug ) && false === $this->does_plugin_have_update( $slug ) ) {
- continue;
- }
-
- if ( ! $this->is_plugin_installed( $slug ) ) {
- if ( current_user_can( 'install_plugins' ) ) {
- $install_link_count++;
-
- if ( true === $plugin['required'] ) {
- $message['notice_can_install_required'][] = $slug;
- } else {
- $message['notice_can_install_recommended'][] = $slug;
- }
- } else {
- // Need higher privileges to install the plugin.
- $message['notice_cannot_install'][] = $slug;
- }
- } else {
- if ( ! $this->is_plugin_active( $slug ) && $this->can_plugin_activate( $slug ) ) {
- if ( current_user_can( 'activate_plugins' ) ) {
- $activate_link_count++;
-
- if ( true === $plugin['required'] ) {
- $message['notice_can_activate_required'][] = $slug;
- } else {
- $message['notice_can_activate_recommended'][] = $slug;
- }
- } else {
- // Need higher privileges to activate the plugin.
- $message['notice_cannot_activate'][] = $slug;
- }
- }
-
- if ( $this->does_plugin_require_update( $slug ) || false !== $this->does_plugin_have_update( $slug ) ) {
-
- if ( current_user_can( 'install_plugins' ) ) {
- $update_link_count++;
-
- if ( $this->does_plugin_require_update( $slug ) ) {
- $message['notice_ask_to_update'][] = $slug;
- } elseif ( false !== $this->does_plugin_have_update( $slug ) ) {
- $message['notice_ask_to_update_maybe'][] = $slug;
- }
- } else {
- // Need higher privileges to update the plugin.
- $message['notice_cannot_update'][] = $slug;
- }
- }
- }
- }
- unset( $slug, $plugin );
-
- // If we have notices to display, we move forward.
- if ( ! empty( $message ) ) {
- krsort( $message ); // Sort messages.
- $rendered = '';
-
- // As add_settings_error() wraps the final message in a <p> and as the final message can't be
- // filtered, using <p>'s in our html would render invalid html output.
- $line_template = '<span style="display: block; margin: 0.5em 0.5em 0 0; clear: both;">%s</span>' . "\n";
-
- // If dismissable is false and a message is set, output it now.
- if ( ! $this->dismissable && ! empty( $this->dismiss_msg ) ) {
- $rendered .= sprintf( $line_template, wp_kses_post( $this->dismiss_msg ) );
- }
-
- // Render the individual message lines for the notice.
- foreach ( $message as $type => $plugin_group ) {
- $linked_plugins = array();
-
- // Get the external info link for a plugin if one is available.
- foreach ( $plugin_group as $plugin_slug ) {
- $linked_plugins[] = $this->get_info_link( $plugin_slug );
- }
- unset( $plugin_slug );
-
- $count = count( $plugin_group );
- $linked_plugins = array_map( array( 'TGMPA_Utils', 'wrap_in_em' ), $linked_plugins );
- $last_plugin = array_pop( $linked_plugins ); // Pop off last name to prep for readability.
- $imploded = empty( $linked_plugins ) ? $last_plugin : ( implode( ', ', $linked_plugins ) . ' ' . esc_html_x( 'and', 'plugin A *and* plugin B', 'cryout' ) . ' ' . $last_plugin );
-
- $rendered .= sprintf(
- $line_template,
- sprintf(
- translate_nooped_plural( $this->strings[ $type ], $count, 'cryout' ),
- $imploded,
- $count
- )
- );
-
- if ( 0 === strpos( $type, 'notice_cannot' ) ) {
- $rendered .= $this->strings['contact_admin'];
- }
- }
- unset( $type, $plugin_group, $linked_plugins, $count, $last_plugin, $imploded );
-
- // Setup action links.
- $action_links = array(
- 'install' => '',
- 'update' => '',
- 'activate' => '',
- 'dismiss' => $this->dismissable ? '<a href="' . esc_url( add_query_arg( 'tgmpa-dismiss', 'dismiss_admin_notices' ) ) . '" class="dismiss-notice" target="_parent">' . esc_html( $this->strings['dismiss'] ) . '</a>' : '',
- );
-
- $link_template = '<a href="%2$s">%1$s</a>';
-
- if ( current_user_can( 'install_plugins' ) ) {
- if ( $install_link_count > 0 ) {
- $action_links['install'] = sprintf(
- $link_template,
- translate_nooped_plural( $this->strings['install_link'], $install_link_count, 'cryout' ),
- esc_url( $this->get_tgmpa_status_url( 'install' ) )
- );
- }
- if ( $update_link_count > 0 ) {
- $action_links['update'] = sprintf(
- $link_template,
- translate_nooped_plural( $this->strings['update_link'], $update_link_count, 'cryout' ),
- esc_url( $this->get_tgmpa_status_url( 'update' ) )
- );
- }
- }
-
- if ( current_user_can( 'activate_plugins' ) && $activate_link_count > 0 ) {
- $action_links['activate'] = sprintf(
- $link_template,
- translate_nooped_plural( $this->strings['activate_link'], $activate_link_count, 'cryout' ),
- esc_url( $this->get_tgmpa_status_url( 'activate' ) )
- );
- }
-
- $action_links = apply_filters( 'tgmpa_notice_action_links', $action_links );
-
- $action_links = array_filter( (array) $action_links ); // Remove any empty array items.
-
- if ( ! empty( $action_links ) && is_array( $action_links ) ) {
- $action_links = sprintf( $line_template, implode( ' | ', $action_links ) );
- $rendered .= apply_filters( 'tgmpa_notice_rendered_action_links', $action_links );
- }
-
- // Register the nag messages and prepare them to be processed.
- if ( ! empty( $this->strings['nag_type'] ) ) {
- add_settings_error( 'tgmpa', 'tgmpa', $rendered, sanitize_html_class( strtolower( $this->strings['nag_type'] ) ) );
- } else {
- $nag_class = version_compare( $this->wp_version, '3.8', '<' ) ? 'updated' : 'update-nag';
- add_settings_error( 'tgmpa', 'tgmpa', $rendered, $nag_class );
- }
- }
-
- // Admin options pages already output settings_errors, so this is to avoid duplication.
- if ( 'options-general' !== $GLOBALS['current_screen']->parent_base ) {
- $this->display_settings_errors();
- }
- }
-
- /**
- * Display settings errors and remove those which have been displayed to avoid duplicate messages showing
- *
- * @since 2.5.0
- */
- protected function display_settings_errors() {
- global $wp_settings_errors;
-
- settings_errors( 'tgmpa' );
-
- foreach ( (array) $wp_settings_errors as $key => $details ) {
- if ( 'tgmpa' === $details['setting'] ) {
- unset( $wp_settings_errors[ $key ] );
- break;
- }
- }
- }
-
- /**
- * Add dismissable admin notices.
- *
- * Appends a link to the admin nag messages. If clicked, the admin notice disappears and no longer is visible to users.
- *
- * @since 2.1.0
- */
- public function dismiss() {
- if ( isset( $_GET['tgmpa-dismiss'] ) ) {
- update_user_meta( get_current_user_id(), 'tgmpa_dismissed_notice_' . $this->id, 1 );
- }
- }
-
- /**
- * Add individual plugin to our collection of plugins.
- *
- * If the required keys are not set or the plugin has already
- * been registered, the plugin is not added.
- *
- * @since 2.0.0
- *
- * @param array|null $plugin Array of plugin arguments or null if invalid argument.
- * @return null Return early if incorrect argument.
- */
- public function register( $plugin ) {
- if ( empty( $plugin['slug'] ) || empty( $plugin['name'] ) ) {
- return;
- }
-
- if ( empty( $plugin['slug'] ) || ! is_string( $plugin['slug'] ) || isset( $this->plugins[ $plugin['slug'] ] ) ) {
- return;
- }
-
- $defaults = array(
- 'name' => '', // String
- 'slug' => '', // String
- 'source' => 'repo', // String
- 'required' => false, // Boolean
- 'version' => '', // String
- 'force_activation' => false, // Boolean
- 'force_deactivation' => false, // Boolean
- 'external_url' => '', // String
- 'is_callable' => '', // String|Array.
- );
-
- // Prepare the received data.
- $plugin = wp_parse_args( $plugin, $defaults );
-
- // Standardize the received slug.
- $plugin['slug'] = $this->sanitize_key( $plugin['slug'] );
-
- // Forgive users for using string versions of booleans or floats for version number.
- $plugin['version'] = (string) $plugin['version'];
- $plugin['source'] = empty( $plugin['source'] ) ? 'repo' : $plugin['source'];
- $plugin['required'] = TGMPA_Utils::validate_bool( $plugin['required'] );
- $plugin['force_activation'] = TGMPA_Utils::validate_bool( $plugin['force_activation'] );
- $plugin['force_deactivation'] = TGMPA_Utils::validate_bool( $plugin['force_deactivation'] );
-
- // Enrich the received data.
- $plugin['file_path'] = $this->_get_plugin_basename_from_slug( $plugin['slug'] );
- $plugin['source_type'] = $this->get_plugin_source_type( $plugin['source'] );
-
- // Set the class properties.
- $this->plugins[ $plugin['slug'] ] = $plugin;
- $this->sort_order[ $plugin['slug'] ] = $plugin['name'];
-
- // Should we add the force activation hook ?
- if ( true === $plugin['force_activation'] ) {
- $this->has_forced_activation = true;
- }
-
- // Should we add the force deactivation hook ?
- if ( true === $plugin['force_deactivation'] ) {
- $this->has_forced_deactivation = true;
- }
- }
-
- /**
- * Determine what type of source the plugin comes from.
- *
- * @since 2.5.0
- *
- * @param string $source The source of the plugin as provided, either empty (= WP repo), a file path
- * (= bundled) or an external URL.
- * @return string 'repo', 'external', or 'bundled'
- */
- protected function get_plugin_source_type( $source ) {
- if ( 'repo' === $source || preg_match( self::WP_REPO_REGEX, $source ) ) {
- return 'repo';
- } elseif ( preg_match( self::IS_URL_REGEX, $source ) ) {
- return 'external';
- } else {
- return 'bundled';
- }
- }
-
- /**
- * Sanitizes a string key.
- *
- * Near duplicate of WP Core `sanitize_key()`. The difference is that uppercase characters *are*
- * allowed, so as not to break upgrade paths from non-standard bundled plugins using uppercase
- * characters in the plugin directory path/slug. Silly them.
- *
- * @see https://developer.wordpress.org/reference/hooks/sanitize_key/
- *
- * @since 2.5.0
- *
- * @param string $key String key.
- * @return string Sanitized key
- */
- public function sanitize_key( $key ) {
- $raw_key = $key;
- $key = preg_replace( '`[^A-Za-z0-9_-]`', '', $key );
-
- /**
- * Filter a sanitized key string.
- *
- * @since 3.0.0
- *
- * @param string $key Sanitized key.
- * @param string $raw_key The key prior to sanitization.
- */
- return apply_filters( 'tgmpa_sanitize_key', $key, $raw_key );
- }
-
- /**
- * Amend default configuration settings.
- *
- * @since 2.0.0
- *
- * @param array $config Array of config options to pass as class properties.
- */
- public function config( $config ) {
- $keys = array(
- 'id',
- 'default_path',
- 'has_notices',
- 'dismissable',
- 'dismiss_msg',
- 'menu',
- 'parent_slug',
- 'capability',
- 'is_automatic',
- 'message',
- 'strings',
- );
-
- foreach ( $keys as $key ) {
- if ( isset( $config[ $key ] ) ) {
- if ( is_array( $config[ $key ] ) ) {
- $this->$key = array_merge( $this->$key, $config[ $key ] );
- } else {
- $this->$key = $config[ $key ];
- }
- }
- }
- }
-
- /**
- * Amend action link after plugin installation.
- *
- * @since 2.0.0
- *
- * @param array $install_actions Existing array of actions.
- * @return array Amended array of actions.
- */
- public function actions( $install_actions ) {
- // Remove action links on the TGMPA install page.
- if ( $this->is_tgmpa_page() ) {
- return false;
- }
-
- return $install_actions;
- }
-
- /**
- * Flushes the plugins cache on theme switch to prevent stale entries
- * from remaining in the plugin table.
- *
- * @since 2.4.0
- *
- * @param bool $clear_update_cache Optional. Whether to clear the Plugin updates cache.
- * Parameter added in v2.5.0.
- */
- public function flush_plugins_cache( $clear_update_cache = true ) {
- wp_clean_plugins_cache( $clear_update_cache );
- }
-
- /**
- * Set file_path key for each installed plugin.
- *
- * @since 2.1.0
- *
- * @param string $plugin_slug Optional. If set, only (re-)populates the file path for that specific plugin.
- * Parameter added in v2.5.0.
- */
- public function populate_file_path( $plugin_slug = '' ) {
- if ( ! empty( $plugin_slug ) && is_string( $plugin_slug ) && isset( $this->plugins[ $plugin_slug ] ) ) {
- $this->plugins[ $plugin_slug ]['file_path'] = $this->_get_plugin_basename_from_slug( $plugin_slug );
- } else {
- // Add file_path key for all plugins.
- foreach ( $this->plugins as $slug => $values ) {
- $this->plugins[ $slug ]['file_path'] = $this->_get_plugin_basename_from_slug( $slug );
- }
- }
- }
-
- /**
- * Helper function to extract the file path of the plugin file from the
- * plugin slug, if the plugin is installed.
- *
- * @since 2.0.0
- *
- * @param string $slug Plugin slug (typically folder name) as provided by the developer.
- * @return string Either file path for plugin if installed, or just the plugin slug.
- */
- protected function _get_plugin_basename_from_slug( $slug ) {
- $keys = array_keys( $this->get_plugins() );
-
- foreach ( $keys as $key ) {
- if ( preg_match( '|^' . $slug . '/|', $key ) ) {
- return $key;
- }
- }
-
- return $slug;
- }
-
- /**
- * Retrieve plugin data, given the plugin name.
- *
- * Loops through the registered plugins looking for $name. If it finds it,
- * it returns the $data from that plugin. Otherwise, returns false.
- *
- * @since 2.1.0
- *
- * @param string $name Name of the plugin, as it was registered.
- * @param string $data Optional. Array key of plugin data to return. Default is slug.
- * @return string|boolean Plugin slug if found, false otherwise.
- */
- public function _get_plugin_data_from_name( $name, $data = 'slug' ) {
- foreach ( $this->plugins as $values ) {
- if ( $name === $values['name'] && isset( $values[ $data ] ) ) {
- return $values[ $data ];
- }
- }
-
- return false;
- }
-
- /**
- * Retrieve the download URL for a package.
- *
- * @since 2.5.0
- *
- * @param string $slug Plugin slug.
- * @return string Plugin download URL or path to local file or empty string if undetermined.
- */
- public function get_download_url( $slug ) {
- $dl_source = '';
-
- switch ( $this->plugins[ $slug ]['source_type'] ) {
- case 'repo':
- return $this->get_wp_repo_download_url( $slug );
- case 'external':
- return $this->plugins[ $slug ]['source'];
- case 'bundled':
- return $this->default_path . $this->plugins[ $slug ]['source'];
- }
-
- return $dl_source; // Should never happen.
- }
-
- /**
- * Retrieve the download URL for a WP repo package.
- *
- * @since 2.5.0
- *
- * @param string $slug Plugin slug.
- * @return string Plugin download URL.
- */
- protected function get_wp_repo_download_url( $slug ) {
- $source = '';
- $api = $this->get_plugins_api( $slug );
-
- if ( false !== $api && isset( $api->download_link ) ) {
- $source = $api->download_link;
- }
-
- return $source;
- }
-
- /**
- * Try to grab information from WordPress API.
- *
- * @since 2.5.0
- *
- * @param string $slug Plugin slug.
- * @return object Plugins_api response object on success, WP_Error on failure.
- */
- protected function get_plugins_api( $slug ) {
- static $api = array(); // Cache received responses.
-
- if ( ! isset( $api[ $slug ] ) ) {
- if ( ! function_exists( 'plugins_api' ) ) {
- require_once ABSPATH . 'wp-admin/includes/plugin-install.php';
- }
-
- $response = plugins_api( 'plugin_information', array( 'slug' => $slug, 'fields' => array( 'sections' => false ) ) );
-
- $api[ $slug ] = false;
-
- if ( is_wp_error( $response ) ) {
- wp_die( esc_html( $this->strings['oops'] ) );
- } else {
- $api[ $slug ] = $response;
- }
- }
-
- return $api[ $slug ];
- }
-
- /**
- * Retrieve a link to a plugin information page.
- *
- * @since 2.5.0
- *
- * @param string $slug Plugin slug.
- * @return string Fully formed html link to a plugin information page if available
- * or the plugin name if not.
- */
- public function get_info_link( $slug ) {
- if ( ! empty( $this->plugins[ $slug ]['external_url'] ) && preg_match( self::IS_URL_REGEX, $this->plugins[ $slug ]['external_url'] ) ) {
- $link = sprintf(
- '<a href="%1$s" target="_blank">%2$s</a>',
- esc_url( $this->plugins[ $slug ]['external_url'] ),
- esc_html( $this->plugins[ $slug ]['name'] )
- );
- } elseif ( 'repo' === $this->plugins[ $slug ]['source_type'] ) {
- $url = add_query_arg(
- array(
- 'tab' => 'plugin-information',
- 'plugin' => urlencode( $slug ),
- 'TB_iframe' => 'true',
- 'width' => '640',
- 'height' => '500',
- ),
- self_admin_url( 'plugin-install.php' )
- );
-
- $link = sprintf(
- '<a href="%1$s" class="thickbox">%2$s</a>',
- esc_url( $url ),
- esc_html( $this->plugins[ $slug ]['name'] )
- );
- } else {
- $link = esc_html( $this->plugins[ $slug ]['name'] ); // No hyperlink.
- }
-
- return $link;
- }
-
- /**
- * Determine if we're on the TGMPA Install page.
- *
- * @since 2.1.0
- *
- * @return boolean True when on the TGMPA page, false otherwise.
- */
- protected function is_tgmpa_page() {
- return isset( $_GET['page'] ) && $this->menu === $_GET['page'];
- }
-
- /**
- * Retrieve the URL to the TGMPA Install page.
- *
- * I.e. depending on the config settings passed something along the lines of:
- * http://example.com/wp-admin/themes.php?page=tgmpa-install-plugins
- *
- * @since 2.5.0
- *
- * @return string Properly encoded URL (not escaped).
- */
- public function get_tgmpa_url() {
- static $url;
-
- if ( ! isset( $url ) ) {
- $parent = $this->parent_slug;
- if ( false === strpos( $parent, '.php' ) ) {
- $parent = 'admin.php';
- }
- $url = add_query_arg(
- array(
- 'page' => urlencode( $this->menu ),
- ),
- self_admin_url( $parent )
- );
- }
-
- return $url;
- }
-
- /**
- * Retrieve the URL to the TGMPA Install page for a specific plugin status (view).
- *
- * I.e. depending on the config settings passed something along the lines of:
- * http://example.com/wp-admin/themes.php?page=tgmpa-install-plugins&plugin_status=install
- *
- * @since 2.5.0
- *
- * @param string $status Plugin status - either 'install', 'update' or 'activate'.
- * @return string Properly encoded URL (not escaped).
- */
- public function get_tgmpa_status_url( $status ) {
- return add_query_arg(
- array(
- 'plugin_status' => urlencode( $status ),
- ),
- $this->get_tgmpa_url()
- );
- }
-
- /**
- * Determine whether there are open actions for plugins registered with TGMPA.
- *
- * @since 2.5.0
- *
- * @return bool True if complete, i.e. no outstanding actions. False otherwise.
- */
- public function is_tgmpa_complete() {
- $complete = true;
- foreach ( $this->plugins as $slug => $plugin ) {
- if ( ! $this->is_plugin_active( $slug ) || false !== $this->does_plugin_have_update( $slug ) ) {
- $complete = false;
- break;
- }
- }
-
- return $complete;
- }
-
- /**
- * Check if a plugin is installed. Does not take must-use plugins into account.
- *
- * @since 2.5.0
- *
- * @param string $slug Plugin slug.
- * @return bool True if installed, false otherwise.
- */
- public function is_plugin_installed( $slug ) {
- $installed_plugins = $this->get_plugins(); // Retrieve a list of all installed plugins (WP cached).
-
- return ( ! empty( $installed_plugins[ $this->plugins[ $slug ]['file_path'] ] ) );
- }
-
- /**
- * Check if a plugin is active.
- *
- * @since 2.5.0
- *
- * @param string $slug Plugin slug.
- * @return bool True if active, false otherwise.
- */
- public function is_plugin_active( $slug ) {
- return ( ( ! empty( $this->plugins[ $slug ]['is_callable'] ) && is_callable( $this->plugins[ $slug ]['is_callable'] ) ) || is_plugin_active( $this->plugins[ $slug ]['file_path'] ) );
- }
-
- /**
- * Check if a plugin can be updated, i.e. if we have information on the minimum WP version required
- * available, check whether the current install meets them.
- *
- * @since 2.5.0
- *
- * @param string $slug Plugin slug.
- * @return bool True if OK to update, false otherwise.
- */
- public function can_plugin_update( $slug ) {
- // We currently can't get reliable info on non-WP-repo plugins - issue #380.
- if ( 'repo' !== $this->plugins[ $slug ]['source_type'] ) {
- return true;
- }
-
- $api = $this->get_plugins_api( $slug );
-
- if ( false !== $api && isset( $api->requires ) ) {
- return version_compare( $GLOBALS['wp_version'], $api->requires, '>=' );
- }
-
- // No usable info received from the plugins API, presume we can update.
- return true;
- }
-
- /**
- * Check if a plugin can be activated, i.e. is not currently active and meets the minimum
- * plugin version requirements set in TGMPA (if any).
- *
- * @since 2.5.0
- *
- * @param string $slug Plugin slug.
- * @return bool True if OK to activate, false otherwise.
- */
- public function can_plugin_activate( $slug ) {
- return ( ! $this->is_plugin_active( $slug ) && ! $this->does_plugin_require_update( $slug ) );
- }
-
- /**
- * Retrieve the version number of an installed plugin.
- *
- * @since 2.5.0
- *
- * @param string $slug Plugin slug.
- * @return string Version number as string or an empty string if the plugin is not installed
- * or version unknown (plugins which don't comply with the plugin header standard).
- */
- public function get_installed_version( $slug ) {
- $installed_plugins = $this->get_plugins(); // Retrieve a list of all installed plugins (WP cached).
-
- if ( ! empty( $installed_plugins[ $this->plugins[ $slug ]['file_path'] ]['Version'] ) ) {
- return $installed_plugins[ $this->plugins[ $slug ]['file_path'] ]['Version'];
- }
-
- return '';
- }
-
- /**
- * Check whether a plugin complies with the minimum version requirements.
- *
- * @since 2.5.0
- *
- * @param string $slug Plugin slug.
- * @return bool True when a plugin needs to be updated, otherwise false.
- */
- public function does_plugin_require_update( $slug ) {
- $installed_version = $this->get_installed_version( $slug );
- $minimum_version = $this->plugins[ $slug ]['version'];
-
- return version_compare( $minimum_version, $installed_version, '>' );
- }
-
- /**
- * Check whether there is an update available for a plugin.
- *
- * @since 2.5.0
- *
- * @param string $slug Plugin slug.
- * @return false|string Version number string of the available update or false if no update available.
- */
- public function does_plugin_have_update( $slug ) {
- // Presume bundled and external plugins will point to a package which meets the minimum required version.
- if ( 'repo' !== $this->plugins[ $slug ]['source_type'] ) {
- if ( $this->does_plugin_require_update( $slug ) ) {
- return $this->plugins[ $slug ]['version'];
- }
-
- return false;
- }
-
- $repo_updates = get_site_transient( 'update_plugins' );
-
- if ( isset( $repo_updates->response[ $this->plugins[ $slug ]['file_path'] ]->new_version ) ) {
- return $repo_updates->response[ $this->plugins[ $slug ]['file_path'] ]->new_version;
- }
-
- return false;
- }
-
- /**
- * Retrieve potential upgrade notice for a plugin.
- *
- * @since 2.5.0
- *
- * @param string $slug Plugin slug.
- * @return string The upgrade notice or an empty string if no message was available or provided.
- */
- public function get_upgrade_notice( $slug ) {
- // We currently can't get reliable info on non-WP-repo plugins - issue #380.
- if ( 'repo' !== $this->plugins[ $slug ]['source_type'] ) {
- return '';
- }
-
- $repo_updates = get_site_transient( 'update_plugins' );
-
- if ( ! empty( $repo_updates->response[ $this->plugins[ $slug ]['file_path'] ]->upgrade_notice ) ) {
- return $repo_updates->response[ $this->plugins[ $slug ]['file_path'] ]->upgrade_notice;
- }
-
- return '';
- }
-
- /**
- * Wrapper around the core WP get_plugins function, making sure it's actually available.
- *
- * @since 2.5.0
- *
- * @param string $plugin_folder Optional. Relative path to single plugin folder.
- * @return array Array of installed plugins with plugin information.
- */
- public function get_plugins( $plugin_folder = '' ) {
- if ( ! function_exists( 'get_plugins' ) ) {
- require_once ABSPATH . 'wp-admin/includes/plugin.php';
- }
-
- return get_plugins( $plugin_folder );
- }
-
- /**
- * Delete dismissable nag option when theme is switched.
- *
- * This ensures that the user(s) is/are again reminded via nag of required
- * and/or recommended plugins if they re-activate the theme.
- *
- * @since 2.1.1
- */
- public function update_dismiss() {
- delete_metadata( 'user', null, 'tgmpa_dismissed_notice_' . $this->id, null, true );
- }
-
- /**
- * Forces plugin activation if the parameter 'force_activation' is
- * set to true.
- *
- * This allows theme authors to specify certain plugins that must be
- * active at all times while using the current theme.
- *
- * Please take special care when using this parameter as it has the
- * potential to be harmful if not used correctly. Setting this parameter
- * to true will not allow the specified plugin to be deactivated unless
- * the user switches themes.
- *
- * @since 2.2.0
- */
- public function force_activation() {
- foreach ( $this->plugins as $slug => $plugin ) {
- if ( true === $plugin['force_activation'] ) {
- if ( ! $this->is_plugin_installed( $slug ) ) {
- // Oops, plugin isn't there so iterate to next condition.
- continue;
- } elseif ( $this->can_plugin_activate( $slug ) ) {
- // There we go, activate the plugin.
- activate_plugin( $plugin['file_path'] );
- }
- }
- }
- }
-
- /**
- * Forces plugin deactivation if the parameter 'force_deactivation'
- * is set to true.
- *
- * This allows theme authors to specify certain plugins that must be
- * deactivated upon switching from the current theme to another.
- *
- * Please take special care when using this parameter as it has the
- * potential to be harmful if not used correctly.
- *
- * @since 2.2.0
- */
- public function force_deactivation() {
- foreach ( $this->plugins as $slug => $plugin ) {
- // Only proceed forward if the parameter is set to true and plugin is active.
- if ( true === $plugin['force_deactivation'] && $this->is_plugin_active( $slug ) ) {
- deactivate_plugins( $plugin['file_path'] );
- }
- }
- }
-
- /**
- * Echo the current TGMPA version number to the page.
- */
- public function show_tgmpa_version() {
- echo '<p style="float: right; padding: 0em 1.5em 0.5em 0;"><strong><small>',
- esc_html( sprintf( _x( 'TGMPA v%s', '%s = version number', 'cryout' ), self::TGMPA_VERSION ) ),
- '</small></strong></p>';
- }
-
- /**
- * Returns the singleton instance of the class.
- *
- * @since 2.4.0
- *
- * @return object The TGM_Plugin_Activation object.
- */
- public static function get_instance() {
- if ( ! isset( self::$instance ) && ! ( self::$instance instanceof self ) ) {
- self::$instance = new self();
- }
-
- return self::$instance;
- }
- }
-
- if ( ! function_exists( 'load_tgm_plugin_activation' ) ) {
- /**
- * Ensure only one instance of the class is ever invoked.
- */
- function load_tgm_plugin_activation() {
- $GLOBALS['tgmpa'] = TGM_Plugin_Activation::get_instance();
- }
- }
-
- if ( did_action( 'plugins_loaded' ) ) {
- load_tgm_plugin_activation();
- } else {
- add_action( 'plugins_loaded', 'load_tgm_plugin_activation' );
- }
-}
-
-if ( ! function_exists( 'tgmpa' ) ) {
- /**
- * Helper function to register a collection of required plugins.
- *
- * @since 2.0.0
- * @api
- *
- * @param array $plugins An array of plugin arrays.
- * @param array $config Optional. An array of configuration values.
- */
- function tgmpa( $plugins, $config = array() ) {
- $instance = call_user_func( array( get_class( $GLOBALS['tgmpa'] ), 'get_instance' ) );
-
- foreach ( $plugins as $plugin ) {
- call_user_func( array( $instance, 'register' ), $plugin );
- }
-
- if ( ! empty( $config ) && is_array( $config ) ) {
- // Send out notices for deprecated arguments passed.
- if ( isset( $config['notices'] ) ) {
- _deprecated_argument( __FUNCTION__, '2.2.0', 'The `notices` config parameter was renamed to `has_notices` in TGMPA 2.2.0. Please adjust your configuration.' );
- if ( ! isset( $config['has_notices'] ) ) {
- $config['has_notices'] = $config['notices'];
- }
- }
-
- if ( isset( $config['parent_menu_slug'] ) ) {
- _deprecated_argument( __FUNCTION__, '2.4.0', 'The `parent_menu_slug` config parameter was removed in TGMPA 2.4.0. In TGMPA 2.5.0 an alternative was (re-)introduced. Please adjust your configuration. For more information visit the website: http://tgmpluginactivation.com/configuration/#h-configuration-options.' );
- }
- if ( isset( $config['parent_url_slug'] ) ) {
- _deprecated_argument( __FUNCTION__, '2.4.0', 'The `parent_url_slug` config parameter was removed in TGMPA 2.4.0. In TGMPA 2.5.0 an alternative was (re-)introduced. Please adjust your configuration. For more information visit the website: http://tgmpluginactivation.com/configuration/#h-configuration-options.' );
- }
-
- call_user_func( array( $instance, 'config' ), $config );
- }
- }
-}
-
-/**
- * WP_List_Table isn't always available. If it isn't available,
- * we load it here.
- *
- * @since 2.2.0
- */
-if ( ! class_exists( 'WP_List_Table' ) ) {
- require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php';
-}
-
-if ( ! class_exists( 'TGMPA_List_Table' ) ) {
-
- /**
- * List table class for handling plugins.
- *
- * Extends the WP_List_Table class to provide a future-compatible
- * way of listing out all required/recommended plugins.
- *
- * Gives users an interface similar to the Plugin Administration
- * area with similar (albeit stripped down) capabilities.
- *
- * This class also allows for the bulk install of plugins.
- *
- * @since 2.2.0
- *
- * @package TGM-Plugin-Activation
- * @author Thomas Griffin
- * @author Gary Jones
- */
- class TGMPA_List_Table extends WP_List_Table {
- /**
- * TGMPA instance.
- *
- * @since 2.5.0
- *
- * @var object
- */
- protected $tgmpa;
-
- /**
- * The currently chosen view.
- *
- * @since 2.5.0
- *
- * @var string One of: 'all', 'install', 'update', 'activate'
- */
- public $view_context = 'all';
-
- /**
- * The plugin counts for the various views.
- *
- * @since 2.5.0
- *
- * @var array
- */
- protected $view_totals = array(
- 'all' => 0,
- 'install' => 0,
- 'update' => 0,
- 'activate' => 0,
- );
-
- /**
- * References parent constructor and sets defaults for class.
- *
- * @since 2.2.0
- */
- public function __construct() {
- $this->tgmpa = call_user_func( array( get_class( $GLOBALS['tgmpa'] ), 'get_instance' ) );
-
- parent::__construct(
- array(
- 'singular' => 'plugin',
- 'plural' => 'plugins',
- 'ajax' => false,
- )
- );
-
- if ( isset( $_REQUEST['plugin_status'] ) && in_array( $_REQUEST['plugin_status'], array( 'install', 'update', 'activate' ), true ) ) {
- $this->view_context = sanitize_key( $_REQUEST['plugin_status'] );
- }
-
- add_filter( 'tgmpa_table_data_items', array( $this, 'sort_table_items' ) );
- }
-
- /**
- * Get a list of CSS classes for the <table> tag.
- *
- * Overruled to prevent the 'plural' argument from being added.
- *
- * @since 2.5.0
- *
- * @return array CSS classnames.
- */
- public function get_table_classes() {
- return array( 'widefat', 'fixed' );
- }
-
- /**
- * Gathers and renames all of our plugin information to be used by WP_List_Table to create our table.
- *
- * @since 2.2.0
- *
- * @return array $table_data Information for use in table.
- */
- protected function _gather_plugin_data() {
- // Load thickbox for plugin links.
- $this->tgmpa->admin_init();
- $this->tgmpa->thickbox();
-
- // Categorize the plugins which have open actions.
- $plugins = $this->categorize_plugins_to_views();
-
- // Set the counts for the view links.
- $this->set_view_totals( $plugins );
-
- // Prep variables for use and grab list of all installed plugins.
- $table_data = array();
- $i = 0;
-
- // Redirect to the 'all' view if no plugins were found for the selected view context.
- if ( empty( $plugins[ $this->view_context ] ) ) {
- $this->view_context = 'all';
- }
-
- foreach ( $plugins[ $this->view_context ] as $slug => $plugin ) {
- $table_data[ $i ]['sanitized_plugin'] = $plugin['name'];
- $table_data[ $i ]['slug'] = $slug;
- $table_data[ $i ]['plugin'] = '<strong>' . $this->