summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'themes/mantra')
-rw-r--r--themes/mantra/admin/admin-functions.php210
-rw-r--r--themes/mantra/admin/css/admin.css14
-rw-r--r--themes/mantra/admin/defaults.php17
-rw-r--r--themes/mantra/admin/images/icon-googleplus.pngbin1230 -> 0 bytes
-rw-r--r--themes/mantra/admin/images/icon-wporg.pngbin0 -> 9072 bytes
-rw-r--r--themes/mantra/admin/js/admin.js45
-rw-r--r--themes/mantra/admin/main.php106
-rw-r--r--themes/mantra/admin/sanitize.php1
-rw-r--r--themes/mantra/admin/settings.php149
-rw-r--r--themes/mantra/functions.php10
-rw-r--r--themes/mantra/header.php6
-rw-r--r--themes/mantra/includes/custom-styles.php44
-rw-r--r--themes/mantra/includes/tgm.php214
-rw-r--r--themes/mantra/includes/theme-comments.php21
-rw-r--r--themes/mantra/includes/theme-frontpage.php6
-rw-r--r--themes/mantra/includes/theme-functions.php42
-rw-r--r--themes/mantra/readme.txt29
-rw-r--r--themes/mantra/resources/css/style-mobile.css1
-rw-r--r--themes/mantra/resources/images/headers/mantra-thumbnail.pngbin0 -> 9163 bytes
-rw-r--r--themes/mantra/resources/images/headers/mantra.pngbin19384 -> 45841 bytes
-rw-r--r--themes/mantra/resources/images/headers/mantra_thumbnail.pngbin19341 -> 0 bytes
-rw-r--r--themes/mantra/resources/js/frontend.js98
-rw-r--r--themes/mantra/resources/js/nivo-slider.js669
-rw-r--r--themes/mantra/style.css6
24 files changed, 1051 insertions, 637 deletions
diff --git a/themes/mantra/admin/admin-functions.php b/themes/mantra/admin/admin-functions.php
deleted file mode 100644
index cf55c809..00000000
--- a/themes/mantra/admin/admin-functions.php
+++ /dev/null
@@ -1,210 +0,0 @@
-<?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;
- $name = 'mantrasettings-'.preg_replace("/[^a-z0-9-_]/i",'',str_replace("http://","",get_option('siteurl'))).'-'.date('Ymd-His').'.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;
-}
-
-// FIN \ No newline at end of file
diff --git a/themes/mantra/admin/css/admin.css b/themes/mantra/admin/css/admin.css
index 4b2ebd4a..f5bbc4fb 100644
--- a/themes/mantra/admin/css/admin.css
+++ b/themes/mantra/admin/css/admin.css
@@ -555,8 +555,8 @@ a.upload_image_button {
}
-.wp-core-ui .button,
-.wp-core-ui .button-secondary {
+.wp-core-ui #main-options .button,
+.wp-core-ui #main-options .button-secondary {
height: auto;
border: 2px solid #555;
padding: 5px 15px;
@@ -566,8 +566,8 @@ a.upload_image_button {
background: #FFF;
}
-.wp-core-ui .button:hover,
-.wp-core-ui .button-secondary:hover {
+.wp-core-ui #main-options .button:hover,
+.wp-core-ui #main-options .button-secondary:hover {
border-color: #000;
}
@@ -631,11 +631,15 @@ a.tooltip img {
vertical-align: bottom;
}
-.ui-tooltip {
+.ui-tooltip.ui-widget.ui-widget-content {
display: block;
max-width: 300px;
padding: 5px;
z-index: 3;
+ background: #fff !important;
+ opacity: 1;
+ font-size: 1em;
+ margin-top: -6px;
}
/* ADMIN HEADER AND LINKS */
diff --git a/themes/mantra/admin/defaults.php b/themes/mantra/admin/defaults.php
index 0668296f..f48d3f42 100644
--- a/themes/mantra/admin/defaults.php
+++ b/themes/mantra/admin/defaults.php
@@ -36,15 +36,15 @@ $mantra_defaults = array(
"mantra_slideNumber" => "3",
"mantra_slideSpecific" => "",
- "mantra_sliderimg1" => get_template_directory_uri()."/resources/images/slider/mantra-slider-1.jpg",
+ "mantra_sliderimg1" => esc_url( get_template_directory_uri() )."/resources/images/slider/mantra-slider-1.jpg",
"mantra_slidertitle1" => "This is the caption title",
"mantra_slidertext1" => "Maecenas mauris ante, mollis ac semper in, laoreet ac augue. Nunc ut turpis ipsum. Phasellus fringilla commodo tortor eu imperdiet. Etiam vehicula mollis pulvinar. In vestibulum eros et elit vehicula, eu egestas arcu feugiat. Lorem ipsum dolor sit amet, consectetur adipiscing.",
"mantra_sliderlink1" => "",
- "mantra_sliderimg2" => get_template_directory_uri()."/resources/images/slider/mantra-slider-2.jpg",
+ "mantra_sliderimg2" => esc_url( get_template_directory_uri() )."/resources/images/slider/mantra-slider-2.jpg",
"mantra_slidertitle2" => "This is yet another caption title",
- "mantra_slidertext2" => 'Phasellus sit amet diam a metus iaculis sollicitudin. Nulla sed risus quis justo malesuada <a href="http://www.cryoutcreations.eu" >elementum</a> ut nulla eget leo maximus. Proin maximus dolor vel mauris volutpat blandit. Mauris urna nunc, pellentesque vel mauris vitae, convallis rutrum felis.',
+ "mantra_slidertext2" => 'Phasellus sit amet diam a metus iaculis sollicitudin. Nulla sed risus quis justo malesuada <a href="#">elementum</a> ut nulla eget leo maximus. Proin maximus dolor vel mauris volutpat blandit. Mauris urna nunc, pellentesque vel mauris vitae, convallis rutrum felis.',
"mantra_sliderlink2" => "",
- "mantra_sliderimg3" => get_template_directory_uri()."/resources/images/slider/mantra-slider-3.jpg",
+ "mantra_sliderimg3" => esc_url( get_template_directory_uri() )."/resources/images/slider/mantra-slider-3.jpg",
"mantra_slidertitle3" => "A third example",
"mantra_slidertext3" => "Phasellus non sagittis nibh. <em>Curabitur</em> quis lacus congue magna dapibus elementum. Nulla eu nulla est. Cras faucibus orci ante, vel sollicitudin quam lacinia gravida. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus vel ligula efficitur massa condimentum consequat aliquam at lectus. Duis pellentesque, ante sed mattis tincidunt.",
"mantra_sliderlink3" => "",
@@ -61,15 +61,15 @@ $mantra_defaults = array(
"mantra_colimageheight" => "215",
"mantra_columnreadmore" => "Read more",
- "mantra_columnimg1" => get_template_directory_uri()."/resources/images/slider/mantra-column-1.jpg",
+ "mantra_columnimg1" => esc_url( get_template_directory_uri() )."/resources/images/slider/mantra-column-1.jpg",
"mantra_columntitle1" => "Customizable",
"mantra_columntext1" => "Aenean ut tempus quam, vitae ornare tellus. Suspendisse ligula nisi, vestibulum vitae suscipit nec, ornare eu lorem. Vestibulum tempor suscipit lacus nec vestibulum. Nullam convallis odio.",
"mantra_columnlink1" => "",
- "mantra_columnimg2" => get_template_directory_uri()."/resources/images/slider/mantra-column-2.jpg",
+ "mantra_columnimg2" => esc_url( get_template_directory_uri() )."/resources/images/slider/mantra-column-2.jpg",
"mantra_columntitle2" => "HTML5 and CSS3",
- "mantra_columntext2" => 'Phasellus sit amet diam a metus iaculis sollicitudin. Nulla sed risus quis justo malesuada <a href="http://www.cryoutcreations.eu" >elementum</a> ut nulla eget leo maximus. Proin maximus dolor vel mauris volutpat blandit.',
+ "mantra_columntext2" => 'Phasellus sit amet diam a metus iaculis sollicitudin. Nulla sed risus quis justo malesuada <a href="#">elementum</a> ut nulla eget leo maximus. Proin maximus dolor vel mauris volutpat blandit.',
"mantra_columnlink2" => "",
- "mantra_columnimg3" => get_template_directory_uri()."/resources/images/slider/mantra-column-3.jpg",
+ "mantra_columnimg3" => esc_url( get_template_directory_uri() )."/resources/images/slider/mantra-column-3.jpg",
"mantra_columntitle3" => "Responsive",
"mantra_columntext3" => "Phasellus non sagittis nibh. <em>Curabitur</em> quis lacus congue magna dapibus elementum. Etiam non pellentesque orci. Mauris urna nunc, pellentesque vel mauris vitae, convallis rutrum felis.",
"mantra_columnlink3" => "",
@@ -95,7 +95,6 @@ $mantra_defaults = array(
"mantra_hratio" => "",
"mantra_menurounded" => "Enable",
"mantra_logoupload" => "",
- "mantra_favicon" => "",
"mantra_siteheader" => "Site Title and Description",
"mantra_headermargintop" => "30",
"mantra_headermarginleft" => "30",
diff --git a/themes/mantra/admin/images/icon-googleplus.png b/themes/mantra/admin/images/icon-googleplus.png
deleted file mode 100644
index c606e8f0..00000000
--- a/themes/mantra/admin/images/icon-googleplus.png
+++ /dev/null
Binary files differ
diff --git a/themes/mantra/admin/images/icon-wporg.png b/themes/mantra/admin/images/icon-wporg.png
new file mode 100644
index 00000000..89f15950
--- /dev/null
+++ b/themes/mantra/admin/images/icon-wporg.png
Binary files differ
diff --git a/themes/mantra/admin/js/admin.js b/themes/mantra/admin/js/admin.js
index 462394f0..0b6aad1d 100644
--- a/themes/mantra/admin/js/admin.js
+++ b/themes/mantra/admin/js/admin.js
@@ -2,25 +2,22 @@
* Admin js
*/
-function media_upload( button_class) {
+function mantra_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;
+ _orig_send_attachment = wp.media.editor.send.attachment,
+ uploadparent = 0;
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] );
}
@@ -32,21 +29,20 @@ function media_upload( button_class) {
jQuery(document).ready(function() {
- var uploadparent = 0;
- media_upload( '.upload_image_button' );
+ mantra_media_upload( '.upload_image_button' );
// Show/hide slides
- jQuery('.slidetitle').click(function() {
+ jQuery('.slidetitle').on('click', function() {
jQuery(this).next().toggle("fast");
});
// Jquery confim window on reset to defaults
- jQuery('#mantra_defaults').click( function() {
+ jQuery('#mantra_defaults').on('click', function() {
if (!confirm('Reset Mantra Settings to Defaults?')) { return false; }
});
// Hide or show dimmensions
- jQuery('#mantra_dimselect').change(function() {
+ jQuery('#mantra_dimselect').on('change', function() {
if (jQuery('#mantra_dimselect option:selected').val()=="Absolute") {
jQuery('#relativedim').hide("normal");jQuery('#absolutedim').show("normal");
} else {
@@ -62,7 +58,7 @@ jQuery(document).ready(function() {
// Hide or show slider settings
- jQuery('#mantra_slideType').change(function() {
+ jQuery('#mantra_slideType').on('change',function() {
jQuery('.slideDivs').hide("normal");
switch (jQuery('#mantra_slideType option:selected').val()) {
@@ -126,7 +122,7 @@ jQuery(document).ready(function() {
else jQuery('#slider-post-number').hide();
//On change
- jQuery('#mantra_slideType').change(function(){
+ jQuery('#mantra_slideType').on('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" )
@@ -136,7 +132,7 @@ jQuery(document).ready(function() {
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
+ });//onchange function
@@ -230,7 +226,7 @@ function startfarb(a,b) {
jQuery(b).css('display','none');
jQuery(b).farbtastic(a);
- jQuery(a).click(function() {
+ jQuery(a).on('click', function() {
if(jQuery(b).css('display') == 'none') {
jQuery(b).parents('.ui-accordion-content').addClass('ui-accordion-content-overflow');
jQuery(b).css('display','inline-block').hide().show(300);
@@ -249,6 +245,7 @@ function tooltip_terain() {
jQuery(this).children('.tooltip').tooltip({content : tooltip_info});
jQuery(this).children('.tooltip').tooltip( "option", "items", "a" );
jQuery(this).children('.tooltip').tooltip( "option", "hide", "false");
+ jQuery(this).children('.tooltip').tooltip( "option", "position", { my: "left+15 center", at: "right center" } );
jQuery(this).children('small').remove();
if (!jQuery(this).hasClass('slmini') && !jQuery(this).hasClass('slidercontent') && !jQuery(this).hasClass('slideDivs')) jQuery(this).addClass('tooltip_div');
});
@@ -284,23 +281,5 @@ function changeBorder(idName, className) {
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 */
diff --git a/themes/mantra/admin/main.php b/themes/mantra/admin/main.php
index 8187cbf1..b58a617a 100644
--- a/themes/mantra/admin/main.php
+++ b/themes/mantra/admin/main.php
@@ -6,10 +6,13 @@ require_once(get_template_directory() . "/includes/custom-styles.php"); // cus
// 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
}
+/**
+ * Import/export functionality is part of the companion Theme Settings plugin
+ */
+
// Getting the theme options and making sure defaults are used if no values are set
function mantra_get_theme_options() {
global $mantra_defaults;
@@ -48,7 +51,7 @@ function mantra_admin_styles() {
// 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_script('farbtastic');
wp_enqueue_style( 'farbtastic' );
//jQuery accordion and slider libraries already included in WP
@@ -58,7 +61,7 @@ function mantra_admin_scripts() {
// 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_register_script('cryout_accordion', get_template_directory_uri() . '/admin/js/accordion-slider.js', array('jquery'), _CRYOUT_THEME_VERSION );
wp_enqueue_script('cryout_accordion');
}
@@ -118,7 +121,6 @@ function mantra_init_fn(){
add_settings_field('mantra_headermargin', __('Header Spacing','mantra') , 'cryout_setting_headermargin_fn', 'mantra-page', 'header_section');
add_settings_field('mantra_menualign', __('Main Menu Alignment','mantra') , 'cryout_setting_menualign_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');
@@ -218,6 +220,25 @@ function mantra_init_fn(){
add_settings_field('mantra_editorstyle', __('Editor Styling','mantra') , 'cryout_setting_editorstyle_fn', 'mantra-page', 'misc_section');
}
+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 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()
+
// Display the admin options page
function mantra_page_fn() {
// Load the import form page if the import button has been pressed
@@ -241,15 +262,15 @@ function mantra_page_fn() {
<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_header"><img src="<?php echo esc_url( 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>
+ <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>";
@@ -257,9 +278,6 @@ function mantra_page_fn() {
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 Settings page cannot function without jQuery.</em></div>
-
<div id="main-options">
<?php
mantra_theme_settings_placeholder();
@@ -287,7 +305,7 @@ The Settings page cannot function without jQuery.</em></div>
<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!">
+ <input type="image" src="<?php echo esc_url( 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>
@@ -295,69 +313,25 @@ The Settings page cannot function without jQuery.</em></div>
<p>Or socially smother, caress and embrace us:</p>
<div class="social-buttons">
<a href="https://www.facebook.com/cryoutcreations" target="_blank" title="Follow us on Facebook">
- <img src="<?php echo get_template_directory_uri() . '/admin/images/icon-facebook.png' ?>" alt="Facebook">
+ <img src="<?php echo esc_url( get_template_directory_uri() ) . '/admin/images/icon-facebook.png' ?>" alt="Facebook">
</a>
<a href="https://twitter.com/cryoutcreations" target="_blank" title="Follow us on Twitter">
- <img src="<?php echo get_template_directory_uri() . '/admin/images/icon-twitter.png' ?>" alt="Twitter">
+ <img src="<?php echo esc_url( get_template_directory_uri() ) . '/admin/images/icon-twitter.png' ?>" alt="Twitter">
</a>
- <a href="https://plus.google.com/106863427325889416242" target="_blank" title="Follow us on Google+">
- <img src="<?php echo get_template_directory_uri() . '/admin/images/icon-googleplus.png' ?>" alt="Google+">
+ <a href="https://profiles.wordpress.org/cryout-creations/" target="_blank" title="Check out our WordPress.org creations">
+ <img src="<?php echo esc_url( get_template_directory_uri() ) . '/admin/images/icon-wporg.png' ?>" alt="WordPress.org">
</a>
</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'); ?>" />
- </form>
- <form action="" method="post">
- <input type="hidden" name="mantra_import" value="true" />
- <input type="submit" class="button" value="<?php _e('Import Theme options', 'mantra'); ?>" />
- </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 -->
-
+ <?php do_action('mantra_after_righty'); ?>
</div><!-- righty -->
</div><!-- wrap -->
<script>
-var mantra_tooltip_icon_url = '<?php echo get_template_directory_uri(); ?>/resources/images/icon-tooltip.png'
+var mantra_tooltip_icon_url = '<?php echo esc_url( get_template_directory_uri() ) ?>/resources/images/icon-tooltip.png'
</script>
<?php } // mantra_page_fn()
diff --git a/themes/mantra/admin/sanitize.php b/themes/mantra/admin/sanitize.php
index 12b7492e..59507ded 100644
--- a/themes/mantra/admin/sanitize.php
+++ b/themes/mantra/admin/sanitize.php
@@ -135,7 +135,6 @@ function ma_options_validate($input) {
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']));
diff --git a/themes/mantra/admin/settings.php b/themes/mantra/admin/settings.php
index fba14efd..1f504348 100644
--- a/themes/mantra/admin/settings.php
+++ b/themes/mantra/admin/settings.php
@@ -178,8 +178,8 @@ 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 "<input id='mantra_fpsliderwidth' name='ma_options[mantra_fpsliderwidth]' size='4' type='text' value='".esc_html( $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_html( $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 id='sliderParameters'><div class='slmini'><b>".__("Animation:","mantra")."</b> ";
@@ -195,17 +195,17 @@ function cryout_setting_frontslider_fn() {
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 __('Width' ,'mantra').": <input id='mantra_fpsliderborderwidth' name='ma_options[mantra_fpsliderborderwidth]' size='2' type='text' value='".esc_html( $mantra_options['mantra_fpsliderborderwidth'] )."' /> px / ";
+ echo __('Color','mantra').': <input type="text" id="mantra_fpsliderbordercolor" name="ma_options[mantra_fpsliderbordercolor]" style="width:100px;" value="'.esc_html( $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 "<input id='mantra_fpslidertime' name='ma_options[mantra_fpslidertime]' size='4' type='text' value='".esc_html( $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 "<input id='mantra_fpsliderpause' name='ma_options[mantra_fpsliderpause]' size='4' type='text' value='".esc_html( $mantra_options['mantra_fpsliderpause'] )."' /> ".__("milliseconds","mantra");
echo "<small>".__("The time in which a slide will be still and visible.","mantra")."</small></div>";
@@ -238,7 +238,7 @@ function cryout_setting_frontslider_fn() {
var $categoryName;
jQuery(document).ready(function(){
- jQuery('#categ-dropdown').change(function(){
+ jQuery('#categ-dropdown').on('change',function(){
$categoryName=this.options[this.selectedIndex].value.replace(/\/category\/archives\//i,"");
doAjaxRequest();
});
@@ -285,7 +285,7 @@ function cryout_setting_frontslider2_fn() {
<div id="sliderShortcode" class="slideDivs">
<span><?php _e('Enter the desired slider plugin shortcode below:','mantra'); ?> </span>
-<input id='mantra_slideShortcode' name='ma_options[mantra_slideShortcode]' size='44' type='text' value='<?php echo esc_attr($mantra_options['mantra_slideShortcode'] ) ?>' />
+<input id='mantra_slideShortcode' name='ma_options[mantra_slideShortcode]' size='44' type='text' value='<?php echo esc_html($mantra_options['mantra_slideShortcode'] ) ?>' />
</div>
<div id="sliderLatestPosts" class="slideDivs">
@@ -311,13 +311,13 @@ function cryout_setting_frontslider2_fn() {
<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'] ) ?>' />
+ <input id='mantra_slideSpecific' name='ma_options[mantra_slideSpecific]' size='44' type='text' value='<?php echo esc_html( $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>
+ <option value=""><?php echo esc_html(__('Select Category','mantra')); ?></option>
<?php echo $mantra_options["mantra_slideCateg"];
$categories = get_categories();
foreach ($categories as $category) {
@@ -333,7 +333,7 @@ function cryout_setting_frontslider2_fn() {
</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'] ) ?>' />
+ <input id='mantra_slideNumber' name='ma_options[mantra_slideNumber]' size='3' type='text' value='<?php echo esc_html( $mantra_options['mantra_slideNumber'] ) ?>' />
</span>
@@ -346,9 +346,9 @@ function cryout_setting_frontslider2_fn() {
<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'] ) ?>' />
+ <input id='mantra_slidertitle1' name='ma_options[mantra_slidertitle1]' size='50' type='text' value='<?php echo esc_html( $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>
+ <textarea id='mantra_slidertext1' name='ma_options[mantra_slidertext1]' rows='3' cols='50' type='textarea' ><?php echo esc_html($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>
@@ -361,9 +361,9 @@ function cryout_setting_frontslider2_fn() {
<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'] ) ?>' />
+ <input id='mantra_slidertitle2' name='ma_options[mantra_slidertitle2]' size='50' type='text' value='<?php echo esc_html( $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>
+ <textarea id='mantra_slidertext2' name='ma_options[mantra_slidertext2]' rows='3' cols='50' type='textarea' ><?php echo esc_html($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>
@@ -376,9 +376,9 @@ function cryout_setting_frontslider2_fn() {
<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'] ) ?>' />
+ <input id='mantra_slidertitle3' name='ma_options[mantra_slidertitle3]' size='50' type='text' value='<?php echo esc_html( $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>
+ <textarea id='mantra_slidertext3' name='ma_options[mantra_slidertext3]' rows='3' cols='50' type='textarea' ><?php echo esc_html($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>
@@ -391,9 +391,9 @@ function cryout_setting_frontslider2_fn() {
<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'] ) ?>' />
+ <input id='mantra_slidertitle4' name='ma_options[mantra_slidertitle4]' size='50' type='text' value='<?php echo esc_html( $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>
+ <textarea id='mantra_slidertext4' name='ma_options[mantra_slidertext4]' rows='3' cols='50' type='textarea' ><?php echo esc_html($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>
@@ -406,9 +406,9 @@ function cryout_setting_frontslider2_fn() {
<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'] ) ?>' />
+ <input id='mantra_slidertitle5' name='ma_options[mantra_slidertitle5]' size='50' type='text' value='<?php echo esc_html( $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>
+ <textarea id='mantra_slidertext5' name='ma_options[mantra_slidertext5]' rows='3' cols='50' type='textarea' ><?php echo esc_html($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>
@@ -432,10 +432,10 @@ function cryout_setting_frontcolumns_fn() {
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>";
+ echo "<input id='mantra_colimageheight' name='ma_options[mantra_colimageheight]' size='4' type='text' value='".esc_html( $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'] ) ?>' />
+ <input id='mantra_columnreadmore' name='ma_options[mantra_columnreadmore]' size='30' type='text' value='<?php echo esc_html( $mantra_options['mantra_columnreadmore'] ) ?>' />
<small><?php _e("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">
@@ -445,9 +445,9 @@ function cryout_setting_frontcolumns_fn() {
<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'] ) ?>' />
+ <input id='mantra_columntitle1' name='ma_options[mantra_columntitle1]' size='50' type='text' value='<?php echo esc_html( $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>
+ <textarea id='mantra_columntext1' name='ma_options[mantra_columntext1]' rows='3' cols='50' type='textarea' ><?php echo esc_html($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>
@@ -460,9 +460,9 @@ function cryout_setting_frontcolumns_fn() {
<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'] ) ?>' />
+ <input id='mantra_columntitle2' name='ma_options[mantra_columntitle2]' size='50' type='text' value='<?php echo esc_html( $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>
+ <textarea id='mantra_columntext2' name='ma_options[mantra_columntext2]' rows='3' cols='50' type='textarea' ><?php echo esc_html($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>
@@ -475,9 +475,9 @@ function cryout_setting_frontcolumns_fn() {
<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> <?php _e("Title","mantra");?> </h5>
- <input id='mantra_columntitle3' name='ma_options[mantra_columntitle3]' size='50' type='text' value='<?php echo esc_attr( $mantra_options['mantra_columntitle3'] ) ?>' />
+ <input id='mantra_columntitle3' name='ma_options[mantra_columntitle3]' size='50' type='text' value='<?php echo esc_html( $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>
+ <textarea id='mantra_columntext3' name='ma_options[mantra_columntext3]' rows='3' cols='50' type='textarea' ><?php echo esc_html($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>
@@ -490,9 +490,9 @@ function cryout_setting_frontcolumns_fn() {
<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'] ) ?>' />
+ <input id='mantra_columntitle4' name='ma_options[mantra_columntitle4]' size='50' type='text' value='<?php echo esc_html( $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>
+ <textarea id='mantra_columntext4' name='ma_options[mantra_columntext4]' rows='3' cols='50' type='textarea' ><?php echo esc_html($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>
@@ -512,17 +512,17 @@ function cryout_setting_fronttext_fn() {
<small><?php _e("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.<br>It's all optional so leave any input field empty if it's not required.","mantra") ?></small>
</div>
<h5><?php _e("Top Title","mantra") ?></h5><br>
- <input id='mantra_fronttext1' name='ma_options[mantra_fronttext1]' size='50' type='text' value='<?php echo esc_attr( $mantra_options['mantra_fronttext1'] ) ?>' />
+ <input id='mantra_fronttext1' name='ma_options[mantra_fronttext1]' size='50' type='text' value='<?php echo esc_html( $mantra_options['mantra_fronttext1'] ) ?>' />
<h5><?php _e("Second Title","mantra")?></h5>
- <input id='mantra_fronttext2' name='ma_options[mantra_fronttext2]' size='50' type='text' value='<?php echo esc_attr( $mantra_options['mantra_fronttext2'] ) ?>' />
+ <input id='mantra_fronttext2' name='ma_options[mantra_fronttext2]' size='50' type='text' value='<?php echo esc_html( $mantra_options['mantra_fronttext2'] ) ?>' />
<h5><?php _e("Title color","mantra")?></h5>
- <input type="text" id="mantra_fronttitlecolor" name="ma_options[mantra_fronttitlecolor]" style="width:100px;display:block;float:none;" value="<?php echo esc_attr( $mantra_options['mantra_fronttitlecolor'] ) ?>" />
+ <input type="text" id="mantra_fronttitlecolor" name="ma_options[mantra_fronttitlecolor]" style="width:100px;display:block;float:none;" value="<?php echo esc_html( $mantra_options['mantra_fronttitlecolor'] ) ?>" />
<div id="mantra_fronttitlecolor2"></div>
<h5><?php _e("Bottom Text 1","mantra")?></h5>
- <textarea id='mantra_fronttext3' name='ma_options[mantra_fronttext3]' rows='3' cols='50' type='textarea' ><?php echo esc_attr($mantra_options['mantra_fronttext3']) ?> </textarea>
+ <textarea id='mantra_fronttext3' name='ma_options[mantra_fronttext3]' rows='3' cols='50' type='textarea' ><?php echo esc_html($mantra_options['mantra_fronttext3']) ?> </textarea>
<h5><?php _e("Bottom Text 2","mantra")?> </h5>
- <textarea id='mantra_fronttext4' name='ma_options[mantra_fronttext4]' rows='3' cols='50' type='textarea' ><?php echo esc_attr($mantra_options['mantra_fronttext4']) ?> </textarea>
+ <textarea id='mantra_fronttext4' name='ma_options[mantra_fronttext4]' rows='3' cols='50' type='textarea' ><?php echo esc_html($mantra_options['mantra_fronttext4']) ?> </textarea>
</div>
</div>
@@ -570,7 +570,7 @@ function cryout_setting_fronttext_fn() {
/////////////////////////////
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
+ global $mantra_options; ?> <input id='mantra_hheight' name='ma_options[mantra_hheight]' size='4' type='text' value='<?php echo esc_html( intval($mantra_options['mantra_hheight'] )) ?>' /> px
<?php
$header_width = $mantra_options['mantra_sidebar']+$mantra_options['mantra_sidewidth'];
?>
@@ -636,23 +636,12 @@ function cryout_setting_logoupload_fn() {
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") ?>
+ <input id='mantra_headermargintop' name='ma_options[mantra_headermargintop]' size='4' type='text' value='<?php echo esc_html( 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_html( intval($mantra_options['mantra_headermarginleft'] )) ?>' /> px <?php echo __("left","mantra") ?>
<div><small> <?php _e("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>
<?php
}
-function cryout_setting_favicon_fn() {
- global $mantra_options; ?>
- <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" />
- <div><small> <?php _e("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 /////////////
@@ -710,7 +699,7 @@ function cryout_setting_fontfamily_fn() {
cryout_fontselect_helper( 'mantra_fontfamily' );
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 '<input class="googlefonts" type="text" size="45" value="'.esc_html($mantra_options['mantra_googlefont']).'" name="ma_options[mantra_googlefont]" id="mantra_googlefont" />';
echo "<div><small>".__("Or insert your Google Font identifier. <br /> Ex: Marko One. Go to <a href='http://www.google.com/webfonts' > Google fonts </a> for some font inspiration.","mantra")."</small></div>";
}
@@ -720,7 +709,7 @@ function cryout_setting_fonttitle_fn() {
cryout_fontselect_helper( 'mantra_fonttitle', true );
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 '<input class="googlefonts" type="text" size="45" value="'.esc_html($mantra_options['mantra_googlefonttitle']).'" name="ma_options[mantra_googlefonttitle]" id="mantra_googlefonttitle" />';
echo "<div><small>".__("Or insert your Google Font identifier. <br /> Ex: Marko One. Go to <a href='http://www.google.com/webfonts' > Google fonts </a> for some font inspiration.","mantra")."</small></div>";
}
@@ -729,7 +718,7 @@ function cryout_setting_fontside_fn() {
cryout_fontselect_helper( 'mantra_fontside', true );
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 '<input class="googlefonts" type="text" size="45" value="'.esc_html($mantra_options['mantra_googlefontside']).'" name="ma_options[mantra_googlefontside]" id="mantra_googlefontside" />';
echo "<div><small>".__("Or insert your Google Font identifier. <br /> Ex: Marko One. Go to <a href='http://www.google.com/webfonts' > Google fonts </a> for some font inspiration.","mantra")."</small></div>";
}
@@ -738,7 +727,7 @@ function cryout_setting_fontsubheader_fn() {
cryout_fontselect_helper( 'mantra_fontsubheader', true );
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 '<input class="googlefonts" type="text" size="45" value="'.esc_html($mantra_options['mantra_googlefontsubheader']).'" name="ma_options[mantra_googlefontsubheader]" id="mantra_googlefontsubheader" />';
echo "<div><small>".__("Or insert your Google Font identifier. <br /> Ex: Marko One. Go to <a href='http://www.google.com/webfonts' > Google fonts </a> for some font inspiration.","mantra")."</small></div>";
}
@@ -877,112 +866,112 @@ function cryout_setting_sitebackground_fn() {
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 '<input type="text" id="mantra_backcolor" name="ma_options[mantra_backcolor]" value="'.esc_html( $mantra_options['mantra_backcolor'] ).'" />';
echo '<div id="mantra_backcolor2"></div>';
echo "<div><small>".__("Background color (Default value is 444444).","mantra")."</small></div>";
}
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 '<input type="text" id="mantra_headercolor" name="ma_options[mantra_headercolor]" value="'.esc_html( $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 '<input type="text" id="mantra_contentbg" name="ma_options[mantra_contentbg]" value="'.esc_html( $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 '<input type="text" id="mantra_menubg" name="ma_options[mantra_menubg]" value="'.esc_html( $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 '<input type="text" id="mantra_s1bg" name="ma_options[mantra_s1bg]" value="'.esc_html( $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 '<input type="text" id="mantra_s2bg" name="ma_options[mantra_s2bg]" value="'.esc_html( $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>";
}
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 '<input type="text" id="mantra_prefootercolor" name="ma_options[mantra_prefootercolor]" value="'.esc_html( $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>";
}
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 '<input type="text" id="mantra_footercolor" name="ma_options[mantra_footercolor]" value="'.esc_html( $mantra_options['mantra_footercolor'] ).'" />';
echo '<div id="mantra_footercolor2"></div>';
echo "<div><small>".__("Footer background color (Default value is 222222).","mantra")."</small></div>";
}
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 '<input type="text" id="mantra_titlecolor" name="ma_options[mantra_titlecolor]" value="'.esc_html( $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>";
}
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 '<input type="text" id="mantra_descriptioncolor" name="ma_options[mantra_descriptioncolor]" value="'.esc_html( $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>";
}
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 '<input type="text" id="mantra_contentcolor" name="ma_options[mantra_contentcolor]" value="'.esc_html( $mantra_options['mantra_contentcolor'] ).'" />';
echo '<div id="mantra_contentcolor2"></div>';
echo "<div><small>".__("Content Text Color (Default value is 333333).","mantra")."</small></div>";
}
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 '<input type="text" id="mantra_linkscolor" name="ma_options[mantra_linkscolor]" value="'.esc_html( $mantra_options['mantra_linkscolor'] ).'" />';
echo '<div id="mantra_linkscolor2"></div>';
echo "<div><small>".__("Links color (Default value is 0D85CC).","mantra")."</small></div>";
}
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 '<input type="text" id="mantra_hovercolor" name="ma_options[mantra_hovercolor]" value="'.esc_html( $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>";
}
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 '<input type="text" id="mantra_headtextcolor" name="ma_options[mantra_headtextcolor]" value="'.esc_html( $mantra_options['mantra_headtextcolor'] ).'" />';
echo '<div id="mantra_headtextcolor2"></div>';
echo "<div><small>".__("Post Header Text Color (Default value is 333333).","mantra")."</small></div>";
}
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 '<input type="text" id="mantra_headtexthover" name="ma_options[mantra_headtexthover]" value="'.esc_html( $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>";
}
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 '<input type="text" id="mantra_sideheadbackcolor" name="ma_options[mantra_sideheadbackcolor]" value="'.esc_html( $mantra_options['mantra_sideheadbackcolor'] ).'" />';
echo '<div id="mantra_sideheadbackcolor2"></div>';
echo "<div><small>".__("Sidebar Header Background color (Default value is 444444).","mantra")."</small></div>";
@@ -990,28 +979,28 @@ function cryout_setting_sideheadbackcolor_fn() {
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 '<input type="text" id="mantra_sideheadtextcolor" name="ma_options[mantra_sideheadtextcolor]" value="'.esc_html( $mantra_options['mantra_sideheadtextcolor'] ).'" />';
echo '<div id="mantra_sideheadtextcolor2"></div>';
echo "<div><small>".__("Sidebar Header Text Color(Default value is 2EA5FD).","mantra")."</small></div>";
}
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 '<input type="text" id="mantra_footerheader" name="ma_options[mantra_footerheader]" value="'.esc_html( $mantra_options['mantra_footerheader'] ).'" />';
echo '<div id="mantra_footerheader2"></div>';
echo "<div><small>".__("Footer Widget Text Color (Default value is 0D85CC).","mantra")."</small></div>";
}
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 '<input type="text" id="mantra_footertext" name="ma_options[mantra_footertext]" value="'.esc_html( $mantra_options['mantra_footertext'] ).'" />';
echo '<div id="mantra_footertext2"></div>';
echo "<div><small>".__("Footer Widget Link Color (Default value is 666666).","mantra")."</small></div>";
}
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 '<input type="text" id="mantra_footerhover" name="ma_options[mantra_footerhover]" value="'.esc_html( $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>";
}
@@ -1429,7 +1418,7 @@ function cryout_setting_excerptarchive_fn() {
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 "<input id='mantra_excerptwords' name='ma_options[mantra_excerptwords]' size='6' type='text' value='".esc_html( $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>";
}
@@ -1450,13 +1439,13 @@ function cryout_setting_magazinelayout_fn() {
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 "<input id='mantra_excerptdots' name='ma_options[mantra_excerptdots]' size='40' type='text' value='".esc_html( $mantra_options['mantra_excerptdots'] )."' />";
echo "<div><small>".__("Replaces the three dots ('[...])' that are appended automatically to excerpts.","mantra")."</small></div>";
}
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 "<input id='mantra_excerptcont' name='ma_options[mantra_excerptcont]' size='40' type='text' value='".esc_html( $mantra_options['mantra_excerptcont'] )."' />";
echo "<div><small>".__("Edit the 'Continue Reading' link added to your post excerpts.","mantra")."</small></div>";
}
@@ -1530,8 +1519,8 @@ function cryout_setting_falign_fn() {
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)";
+ echo "<input id='mantra_fwidth' name='ma_options[mantra_fwidth]' size='4' type='text' value='".esc_html( $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_html( $mantra_options['mantra_fheight'] )."' />px (height)";
$checkedClass = ($mantra_options['mantra_fcrop']=='1') ? ' checkedClass' : '';
echo " <label id='fcrop' for='mantra_fcrop' class='socialsdisplay $checkedClass'><input ";
@@ -1677,4 +1666,4 @@ function cryout_setting_editorstyle_fn() {
echo "<div><small>".__("Disable to turn off the theme's styling in the Visual Editor.","mantra")."</small></div>";
}
-// FIN \ No newline at end of file
+// FIN
diff --git a/themes/mantra/functions.php b/themes/mantra/functions.php
index 764325e6..3d8647e0 100644
--- a/themes/mantra/functions.php
+++ b/themes/mantra/functions.php
@@ -9,17 +9,17 @@
// theme specifics
define ('_CRYOUT_THEME_NAME','mantra');
-define ('_CRYOUT_THEME_VERSION','3.2.0');
+define ('_CRYOUT_THEME_VERSION','3.3.1');
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-setup.php"); // Setup and init
+require_once(get_template_directory() . "/includes/theme-styles.php"); // 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-comments.php"); // Comments functions
+require_once(get_template_directory() . "/includes/theme-functions.php"); // 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 212be8f3..4396f113 100644
--- a/themes/mantra/header.php
+++ b/themes/mantra/header.php
@@ -20,8 +20,8 @@
wp_head(); ?>
</head>
<body <?php body_class(); ?>>
-
-<?php cryout_body_hook(); ?>
+ <?php cryout_body_hook(); ?>
+ <?php /* wp_body_open() call is hooked into cryout_body_hook */ ?>
<div id="wrapper" class="hfeed">
@@ -39,7 +39,7 @@
</div><!-- #branding -->
<a id="nav-toggle"><span>&nbsp; <?php _e('Menu', 'mantra');?></span></a>
- <nav id="access" class="jssafe" role="navigation">
+ <nav id="<?php echo apply_filters( 'mantra_mainnav_id', 'access' ) ?>" class="<?php echo apply_filters( 'mantra_mainnav_class', 'jssafe' ) ?>" role="navigation">
<?php cryout_access_hook();?>
diff --git a/themes/mantra/includes/custom-styles.php b/themes/mantra/includes/custom-styles.php
index aa398636..18767940 100644
--- a/themes/mantra/includes/custom-styles.php
+++ b/themes/mantra/includes/custom-styles.php
@@ -9,14 +9,14 @@ function mantra_body_classes($classes) {
// layout classes are for frontend reference only; styling is still below, case dependent
switch ($options['mantra_side']):
- case "1c": $classes[] = 'mantra-no-sidebar'; break;
- case "2cSr": $classes[] = 'mantra-sidebar-right'; break;
- case "2cSl": $classes[] = 'mantra-sidebar-left'; break;
- case "3cSr": $classes[] = 'mantra-sidebars-right'; break;
- case "3cSl": $classes[] = 'mantra-sidebars-left'; break;
- case "3cSs": $classes[] = 'mantra-sidebars-sided'; break;
+ case "1c": $classes[] = 'mantra-no-sidebar'; break;
+ case "2cSr": $classes[] = 'mantra-sidebar-right'; break;
+ case "2cSl": $classes[] = 'mantra-sidebar-left'; break;
+ case "3cSr": $classes[] = 'mantra-sidebars-right'; break;
+ case "3cSl": $classes[] = 'mantra-sidebars-left'; break;
+ case "3cSs": $classes[] = 'mantra-sidebars-sided'; break;
endswitch;
-
+
$magazine_layout = FALSE;
if ($options['mantra_magazinelayout'] == "Enable") {
if (is_front_page()) {
@@ -33,7 +33,7 @@ function mantra_body_classes($classes) {
$classes[] = 'mantra-presentation-page';
$classes[] = sprintf( 'mantra-coldisplay-%s', $options['mantra_nrcolumns'] );
}
-
+
switch ($options['mantra_menualign']):
case "center": $classes[] = 'mantra-menu-center'; break;
case "right": $classes[] = 'mantra-menu-right'; break;
@@ -54,17 +54,17 @@ function mantra_custom_styles() {
$contentSize = $mantra_sidewidth;
$sidebarSize = $mantra_sidebar;
- ob_start();
-
+ ob_start();
+
/* LAYOUT CSS */
-
+
?>
#wrapper { <?php echo (($mantra_mobile == 'Enable') ? 'max-' : '');?>width: <?php echo ($totalwidth); ?>px; }
#content { width: 100%; max-width:<?php echo absint( $contentSize ) ?>px; max-width: calc( 100% - <?php echo absint( $sidebarSize ) ?>px ); }
- <?php
-
+ <?php
+
// handle layout page template custom sizes
-
+
if (is_page_template("templates/template-onecolumn.php") ) { ?>
#content { width: 100%; margin: 0; }
<?php }
@@ -102,9 +102,9 @@ function mantra_custom_styles() {
// end layout page template custom sizes
else {
// compute sizes based on the general layout
-
+
if ($mantra_side == "1c" ) { ?>
- #content { max-width:<?php echo absint($totalwidth) ?>px; margin-top:0; }
+ #content { max-width:<?php echo absint($totalwidth) ?>px; margin-top:0; }
<?php }
if ($mantra_side == "2cSr" ) { ?>
@@ -183,7 +183,7 @@ function mantra_custom_styles() {
elseif ($mantra_caption == "Light Gray") {?> background-color:#EEE;<?php }
elseif ($mantra_caption == "Gray") {?> background-color:#CCC;<?php }
elseif ($mantra_caption == "Dark Gray") {?> background-color:#444; color:#CCC;<?php }
- elseif ($mantra_caption == "Black") {?> background-color:#000; color:#CCC;<?php }
+ elseif ($mantra_caption == "Black") {?> background-color:#000; color:#CCC;<?php }
?> }
<?php } */
if ($mantra_menurounded == "Disable") { ?> #access ul li {border-radius:0;}<?php }
@@ -203,7 +203,7 @@ function mantra_custom_styles() {
if ($mantra_headfontsize != "Default") { ?> #content h1.entry-title, #content h2.entry-title { font-size:<?php echo esc_attr( $mantra_headfontsize ); ?>; }<?php }
if ($mantra_sidefontsize != "Default") { ?> .widget-area, .widget-area a:link, .widget-area a:visited { font-size:<?php echo esc_attr( $mantra_sidefontsize ); ?>; }<?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().'/resources/images/icon-featured.png' ; ?>) no-repeat 12px 10px transparent; padding-left: 15px; } <?php } ?>
+ .sticky hgroup { background: url(<?php echo esc_url(get_template_directory_uri()).'/resources/images/icon-featured.png' ; ?>) no-repeat 12px 10px transparent; padding-left: 15px; } <?php } ?>
#header-container > div { margin-top:<?php echo absint( $mantra_headermargintop ); ?>px; }
#header-container > div { margin-left:<?php echo absint( $mantra_headermarginleft ); ?>px; } <?php
@@ -213,7 +213,7 @@ function mantra_custom_styles() {
if ($mantra_footercolor != "171717") { ?> #footer2 { background-color:<?php echo esc_attr( $mantra_footercolor ); ?>; }<?php }
if ($mantra_titlecolor != "0D85CC") { ?> #site-title span a { color:<?php echo esc_attr( $mantra_titlecolor ); ?>; }<?php }
if ($mantra_descriptioncolor != "0D85CC") { ?> #site-description { color:<?php echo esc_attr( $mantra_descriptioncolor ); ?>; }<?php }
- if ($mantra_contentcolor != "333333") { ?> #content { color:<?php echo esc_attr( $mantra_contentcolor ); ?> ;}<?php }
+ if ($mantra_contentcolor != "333333") { ?> #content, .column-text, #front-text3, #front-text4 { color:<?php echo esc_attr( $mantra_contentcolor ); ?> ;}<?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 esc_attr( $mantra_linkscolor ); ?>; }<?php }
@@ -232,10 +232,10 @@ function mantra_custom_styles() {
#footer-widget-area .widget-title { color:<?php echo esc_attr( $mantra_footerheader ); ?>; }
#footer-widget-area a { color:<?php echo esc_attr( $mantra_footertext ); ?>; }
- #footer-widget-area a:hover { color:<?php echo esc_attr( $mantra_footerhover ); ?>; } <?php
+ #footer-widget-area a:hover { color:<?php echo esc_attr( $mantra_footerhover ); ?>; }
- #content .wp-caption { background-image:url(<?php echo get_template_directory_uri() . "/resources/images/pins/" . esc_attr($mantra_pin); ?>.png); } <?php
- if ($mantra_sidebullet != "arrow_white") { ?> .widget-area ul ul li { background-image: url(<?php echo get_template_directory_uri() . "/resources/images/bullets/" . esc_attr($mantra_sidebullet); ?>.png); background-position: left calc(2em / 2 - 4px); } <?php }
+ #content .wp-caption { background-image:url(<?php echo esc_url(get_template_directory_uri()) . "/resources/images/pins/" . esc_attr($mantra_pin); ?>.png); } <?php
+ if ($mantra_sidebullet != "arrow_white") { ?> .widget-area ul ul li { background-image: url(<?php echo esc_url(get_template_directory_uri()) . "/resources/images/bullets/" . esc_attr($mantra_sidebullet); ?>.png); background-position: left calc(2em / 2 - 4px); } <?php }
if ($mantra_pagetitle == "Hide") { ?> .page h1.entry-title, .home .page h2.entry-title { display:none; } <?php }
if ($mantra_categtitle == "Hide") { ?> h1.page-title { display:none; } <?php }
diff --git a/themes/mantra/includes/tgm.php b/themes/mantra/includes/tgm.php
index 4585162d..93bd5f15 100644
--- a/themes/mantra/includes/tgm.php
+++ b/themes/mantra/includes/tgm.php
@@ -26,23 +26,23 @@ function cryout_settings_plugin() {
'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.
+ 'page_title' => __( 'Recommended Plugins', 'mantra' ),
+ 'menu_title' => ucwords(_CRYOUT_THEME_NAME) . __( ' Plugins', 'mantra' ),
+ 'installing' => __( 'Installing Plugin: %s', 'mantra' ), // %s = plugin name.
+ 'oops' => __( 'Something went wrong with the plugin API.', 'mantra' ),
+ '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.', 'mantra' ), // %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.', 'mantra' ), // %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.', 'mantra' ), // %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.', 'mantra' ), // %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.', 'mantra' ), // %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.', 'mantra' ), // %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.', 'mantra' ), // %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.', 'mantra' ), // %1$s = plugin name(s).
+ 'install_link' => _n_noop( 'Begin installing plugin', 'Begin installing plugins', 'mantra' ),
+ 'activate_link' => _n_noop( 'Begin activating plugin', 'Begin activating plugins', 'mantra' ),
+ 'return' => __( 'Return to Required Plugins Installer', 'mantra' ),
+ 'plugin_activated' => __( 'Plugin activated successfully.', 'mantra' ),
+ 'complete' => __( 'All plugins installed and activated successfully. %s', 'mantra' ), // %s = dashboard link.
'nag_type' => 'updated' // Determines admin notice type - can only be 'updated', 'update-nag' or 'error'.
)
);
@@ -379,77 +379,77 @@ if ( ! class_exists( 'TGM_Plugin_Activation' ) ) {
// Load class strings.
$this->strings = array(
- 'page_title' => __( 'Install Required Plugins', 'cryout' ),
- 'menu_title' => __( 'Install Plugins', 'cryout' ),
+ 'page_title' => __( 'Install Required Plugins', 'mantra' ),
+ 'menu_title' => __( 'Install Plugins', 'mantra' ),
/* translators: %s: plugin name. */
- 'installing' => __( 'Installing Plugin: %s', 'cryout' ),
+ 'installing' => __( 'Installing Plugin: %s', 'mantra' ),
/* translators: %s: plugin name. */
- 'updating' => __( 'Updating Plugin: %s', 'cryout' ),
- 'oops' => __( 'Something went wrong with the plugin API.', 'cryout' ),
+ 'updating' => __( 'Updating Plugin: %s', 'mantra' ),
+ 'oops' => __( 'Something went wrong with the plugin API.', 'mantra' ),
'notice_can_install_required' => _n_noop(
/* translators: 1: plugin name(s). */
'This theme requires the following plugin: %1$s.',
'This theme requires the following plugins: %1$s.',
- 'cryout'
+ 'mantra'
),
'notice_can_install_recommended' => _n_noop(
/* translators: 1: plugin name(s). */
'This theme recommends the following plugin: %1$s.',
'This theme recommends the following plugins: %1$s.',
- 'cryout'
+ 'mantra'
),
'notice_ask_to_update' => _n_noop(
/* translators: 1: plugin name(s). */
'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'
+ 'mantra'
),
'notice_ask_to_update_maybe' => _n_noop(
/* translators: 1: plugin name(s). */
'There is an update available for: %1$s.',
'There are updates available for the following plugins: %1$s.',
- 'cryout'
+ 'mantra'
),
'notice_can_activate_required' => _n_noop(
/* translators: 1: plugin name(s). */
'The following required plugin is currently inactive: %1$s.',
'The following required plugins are currently inactive: %1$s.',
- 'cryout'
+ 'mantra'
),
'notice_can_activate_recommended' => _n_noop(
/* translators: 1: plugin name(s). */
'The following recommended plugin is currently inactive: %1$s.',
'The following recommended plugins are currently inactive: %1$s.',
- 'cryout'
+ 'mantra'
),
'install_link' => _n_noop(
'Begin installing plugin',
'Begin installing plugins',
- 'cryout'
+ 'mantra'
),
'update_link' => _n_noop(
'Begin updating plugin',
'Begin updating plugins',
- 'cryout'
+ 'mantra'
),
'activate_link' => _n_noop(
'Begin activating plugin',
'Begin activating plugins',
- 'cryout'
+ 'mantra'
),
- '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' ),
+ 'return' => __( 'Return to Required Plugins Installer', 'mantra' ),
+ 'dashboard' => __( 'Return to the Dashboard', 'mantra' ),
+ 'plugin_activated' => __( 'Plugin activated successfully.', 'mantra' ),
+ 'activated_successfully' => __( 'The following plugin was activated successfully:', 'mantra' ),
/* translators: 1: plugin name. */
- 'plugin_already_active' => __( 'No action taken. Plugin %1$s was already active.', 'cryout' ),
+ 'plugin_already_active' => __( 'No action taken. Plugin %1$s was already active.', 'mantra' ),
/* translators: 1: plugin name. */
- 'plugin_needs_higher_version' => __( 'Plugin not activated. A higher version of %s is needed for this theme. Please update the plugin.', 'cryout' ),
+ 'plugin_needs_higher_version' => __( 'Plugin not activated. A higher version of %s is needed for this theme. Please update the plugin.', 'mantra' ),
/* translators: 1: dashboard link. */
- 'complete' => __( 'All plugins installed and activated successfully. %1$s', 'cryout' ),
- 'dismiss' => __( 'Dismiss this notice', 'cryout' ),
- 'notice_cannot_install_activate' => __( 'There are one or more required or recommended plugins to install, update or activate.', 'cryout' ),
- 'contact_admin' => __( 'Please contact the administrator of this site for help.', 'cryout' ),
+ 'complete' => __( 'All plugins installed and activated successfully. %1$s', 'mantra' ),
+ 'dismiss' => __( 'Dismiss this notice', 'mantra' ),
+ 'notice_cannot_install_activate' => __( 'There are one or more required or recommended plugins to install, update or activate.', 'mantra' ),
+ 'contact_admin' => __( 'Please contact the administrator of this site for help.', 'mantra' ),
);
do_action( 'tgmpa_register' );
@@ -574,8 +574,8 @@ if ( ! class_exists( 'TGM_Plugin_Activation' ) ) {
$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' )
+ esc_attr__( 'This plugin needs to be updated to be compatible with your theme.', 'mantra' ),
+ esc_html__( 'Update Required', 'mantra' )
);
return $actions;
@@ -879,7 +879,7 @@ if ( ! class_exists( 'TGM_Plugin_Activation' ) ) {
// 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 '<p>', sprintf( esc_html( $this->strings['complete'] ), '<a href="' . esc_url( self_admin_url() ) . '">' . esc_html__( 'Return to the Dashboard', 'mantra' ) . '</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>';
@@ -986,10 +986,10 @@ if ( ! class_exists( 'TGM_Plugin_Activation' ) ) {
if ( true === $GLOBALS['wp_filesystem']->move( $from_path, $to_path ) ) {
return trailingslashit( $to_path );
} 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 ) );
+ 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.', 'mantra' ) . ' ' . esc_html__( 'Please contact the plugin provider and ask them to package their plugin according to the WordPress guidelines.', 'mantra' ), 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 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.', 'mantra' ) . ' ' . esc_html__( 'Please contact the plugin provider and ask them to package their plugin according to the WordPress guidelines.', 'mantra' ), array( 'found' => $subdir_name, 'expected' => $desired_slug ) );
}
}
@@ -1173,12 +1173,12 @@ if ( ! class_exists( 'TGM_Plugin_Activation' ) ) {
$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 );
+ $imploded = empty( $linked_plugins ) ? $last_plugin : ( implode( ', ', $linked_plugins ) . ' ' . esc_html_x( 'and', 'plugin A *and* plugin B', 'mantra' ) . ' ' . $last_plugin );
$rendered .= sprintf(
$line_template,
sprintf(
- translate_nooped_plural( $this->strings[ $type ], $count, 'cryout' ),
+ translate_nooped_plural( $this->strings[ $type ], $count, 'mantra' ),
$imploded,
$count
)
@@ -1226,14 +1226,14 @@ if ( ! class_exists( 'TGM_Plugin_Activation' ) ) {
if ( $install_count > 0 ) {
$action_links['install'] = sprintf(
$link_template,
- translate_nooped_plural( $this->strings['install_link'], $install_count, 'cryout' ),
+ translate_nooped_plural( $this->strings['install_link'], $install_count, 'mantra' ),
esc_url( $this->get_tgmpa_status_url( 'install' ) )
);
}
if ( $update_count > 0 ) {
$action_links['update'] = sprintf(
$link_template,
- translate_nooped_plural( $this->strings['update_link'], $update_count, 'cryout' ),
+ translate_nooped_plural( $this->strings['update_link'], $update_count, 'mantra' ),
esc_url( $this->get_tgmpa_status_url( 'update' ) )
);
}
@@ -1242,7 +1242,7 @@ if ( ! class_exists( 'TGM_Plugin_Activation' ) ) {
if ( current_user_can( 'activate_plugins' ) && $activate_count > 0 ) {
$action_links['activate'] = sprintf(
$link_template,
- translate_nooped_plural( $this->strings['activate_link'], $activate_count, 'cryout' ),
+ translate_nooped_plural( $this->strings['activate_link'], $activate_count, 'mantra' ),
esc_url( $this->get_tgmpa_status_url( 'activate' ) )
);
}
@@ -2034,7 +2034,7 @@ if ( ! class_exists( 'TGM_Plugin_Activation' ) ) {
esc_html(
sprintf(
/* translators: %s: version number */
- __( 'TGMPA v%s', 'cryout' ),
+ __( 'TGMPA v%s', 'mantra' ),
self::TGMPA_VERSION
)
),
@@ -2325,10 +2325,10 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
*/
protected function get_plugin_advise_type_text( $required ) {
if ( true === $required ) {
- return __( 'Required', 'cryout' );
+ return __( 'Required', 'mantra' );
}
- return __( 'Recommended', 'cryout' );
+ return __( 'Recommended', 'mantra' );
}
/**
@@ -2344,13 +2344,13 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
switch ( $type ) {
case 'repo':
- $string = __( 'WordPress Repository', 'cryout' );
+ $string = __( 'WordPress Repository', 'mantra' );
break;
case 'external':
- $string = __( 'External Source', 'cryout' );
+ $string = __( 'External Source', 'mantra' );
break;
case 'bundled':
- $string = __( 'Pre-Packaged', 'cryout' );
+ $string = __( 'Pre-Packaged', 'mantra' );
break;
}
@@ -2367,25 +2367,25 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
*/
protected function get_plugin_status_text( $slug ) {
if ( ! $this->tgmpa->is_plugin_installed( $slug ) ) {
- return __( 'Not Installed', 'cryout' );
+ return __( 'Not Installed', 'mantra' );
}
if ( ! $this->tgmpa->is_plugin_active( $slug ) ) {
- $install_status = __( 'Installed But Not Activated', 'cryout' );
+ $install_status = __( 'Installed But Not Activated', 'mantra' );
} else {
- $install_status = __( 'Active', 'cryout' );
+ $install_status = __( 'Active', 'mantra' );
}
$update_status = '';
if ( $this->tgmpa->does_plugin_require_update( $slug ) && false === $this->tgmpa->does_plugin_have_update( $slug ) ) {
- $update_status = __( 'Required Update not Available', 'cryout' );
+ $update_status = __( 'Required Update not Available', 'mantra' );
} elseif ( $this->tgmpa->does_plugin_require_update( $slug ) ) {
- $update_status = __( 'Requires Update', 'cryout' );
+ $update_status = __( 'Requires Update', 'mantra' );
} elseif ( false !== $this->tgmpa->does_plugin_have_update( $slug ) ) {
- $update_status = __( 'Update recommended', 'cryout' );
+ $update_status = __( 'Update recommended', 'mantra' );
}
if ( '' === $update_status ) {
@@ -2394,7 +2394,7 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
return sprintf(
/* translators: 1: install status, 2: update status */
- _x( '%1$s, %2$s', 'Install/Update Status', 'cryout' ),
+ _x( '%1$s, %2$s', 'Install/Update Status', 'mantra' ),
$install_status,
$update_status
);
@@ -2440,19 +2440,19 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
switch ( $type ) {
case 'all':
/* translators: 1: number of plugins. */
- $text = _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $count, 'plugins', 'cryout' );
+ $text = _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $count, 'plugins', 'mantra' );
break;
case 'install':
/* translators: 1: number of plugins. */
- $text = _n( 'To Install <span class="count">(%s)</span>', 'To Install <span class="count">(%s)</span>', $count, 'cryout' );
+ $text = _n( 'To Install <span class="count">(%s)</span>', 'To Install <span class="count">(%s)</span>', $count, 'mantra' );
break;
case 'update':
/* translators: 1: number of plugins. */
- $text = _n( 'Update Available <span class="count">(%s)</span>', 'Update Available <span class="count">(%s)</span>', $count, 'cryout' );
+ $text = _n( 'Update Available <span class="count">(%s)</span>', 'Update Available <span class="count">(%s)</span>', $count, 'mantra' );
break;
case 'activate':
/* translators: 1: number of plugins. */
- $text = _n( 'To Activate <span class="count">(%s)</span>', 'To Activate <span class="count">(%s)</span>', $count, 'cryout' );
+ $text = _n( 'To Activate <span class="count">(%s)</span>', 'To Activate <span class="count">(%s)</span>', $count, 'mantra' );
break;
default:
$text = '';
@@ -2534,7 +2534,7 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
$output = array();
if ( $this->tgmpa->is_plugin_installed( $item['slug'] ) ) {
- $installed = ! empty( $item['installed_version'] ) ? $item['installed_version'] : _x( 'unknown', 'as in: "version nr unknown"', 'cryout' );
+ $installed = ! empty( $item['installed_version'] ) ? $item['installed_version'] : _x( 'unknown', 'as in: "version nr unknown"', 'mantra' );
$color = '';
if ( ! empty( $item['minimum_version'] ) && $this->tgmpa->does_plugin_require_update( $item['slug'] ) ) {
@@ -2542,7 +2542,7 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
}
$output[] = sprintf(
- '<p><span style="min-width: 32px; text-align: right; float: right;%1$s">%2$s</span>' . __( 'Installed version:', 'cryout' ) . '</p>',
+ '<p><span style="min-width: 32px; text-align: right; float: right;%1$s">%2$s</span>' . __( 'Installed version:', 'mantra' ) . '</p>',
$color,
$installed
);
@@ -2550,7 +2550,7 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
if ( ! empty( $item['minimum_version'] ) ) {
$output[] = sprintf(
- '<p><span style="min-width: 32px; text-align: right; float: right;">%1$s</span>' . __( 'Minimum required version:', 'cryout' ) . '</p>',
+ '<p><span style="min-width: 32px; text-align: right; float: right;">%1$s</span>' . __( 'Minimum required version:', 'mantra' ) . '</p>',
$item['minimum_version']
);
}
@@ -2562,7 +2562,7 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
}
$output[] = sprintf(
- '<p><span style="min-width: 32px; text-align: right; float: right;%1$s">%2$s</span>' . __( 'Available version:', 'cryout' ) . '</p>',
+ '<p><span style="min-width: 32px; text-align: right; float: right;%1$s">%2$s</span>' . __( 'Available version:', 'mantra' ) . '</p>',
$color,
$item['available_version']
);
@@ -2585,7 +2585,7 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
* @since 2.2.0
*/
public function no_items() {
- echo esc_html__( 'No plugins to install, update or activate.', 'cryout' ) . ' <a href="' . esc_url( self_admin_url() ) . '"> ' . esc_html__( 'Return to the Dashboard', 'cryout' ) . '</a>';
+ echo esc_html__( 'No plugins to install, update or activate.', 'mantra' ) . ' <a href="' . esc_url( self_admin_url() ) . '"> ' . esc_html__( 'Return to the Dashboard', 'mantra' ) . '</a>';
echo '<style type="text/css">#adminmenu .wp-submenu li.current { display: none !important; }</style>';
}
@@ -2599,14 +2599,14 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
public function get_columns() {
$columns = array(
'cb' => '<input type="checkbox" />',
- 'plugin' => __( 'Plugin', 'cryout' ),
- 'source' => __( 'Source', 'cryout' ),
- 'type' => __( 'Type', 'cryout' ),
+ 'plugin' => __( 'Plugin', 'mantra' ),
+ 'source' => __( 'Source', 'mantra' ),
+ 'type' => __( 'Type', 'mantra' ),
);
if ( 'all' === $this->view_context || 'update' === $this->view_context ) {
- $columns['version'] = __( 'Version', 'cryout' );
- $columns['status'] = __( 'Status', 'cryout' );
+ $columns['version'] = __( 'Version', 'mantra' );
+ $columns['status'] = __( 'Status', 'mantra' );
}
return apply_filters( 'tgmpa_table_columns', $columns );
@@ -2655,18 +2655,18 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
// Display the 'Install' action link if the plugin is not yet available.
if ( ! $this->tgmpa->is_plugin_installed( $item['slug'] ) ) {
/* translators: %2$s: plugin name in screen reader markup */
- $actions['install'] = __( 'Install %2$s', 'cryout' );
+ $actions['install'] = __( 'Install %2$s', 'mantra' );
} else {
// Display the 'Update' action link if an update is available and WP complies with plugin minimum.
if ( false !== $this->tgmpa->does_plugin_have_update( $item['slug'] ) && $this->tgmpa->can_plugin_update( $item['slug'] ) ) {
/* translators: %2$s: plugin name in screen reader markup */
- $actions['update'] = __( 'Update %2$s', 'cryout' );
+ $actions['update'] = __( 'Update %2$s', 'mantra' );
}
// Display the 'Activate' action link, but only if the plugin meets the minimum version.
if ( $this->tgmpa->can_plugin_activate( $item['slug'] ) ) {
/* translators: %2$s: plugin name in screen reader markup */
- $actions['activate'] = __( 'Activate %2$s', 'cryout' );
+ $actions['activate'] = __( 'Activate %2$s', 'mantra' );
}
}
@@ -2736,7 +2736,7 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
<tr class="plugin-update-tr">
<td colspan="', absint( $this->get_column_count() ), '" class="plugin-update colspanchange">
<div class="update-message">',
- esc_html__( 'Upgrade message from the plugin author:', 'cryout' ),
+ esc_html__( 'Upgrade message from the plugin author:', 'mantra' ),
' <strong>', wp_kses_data( $item['upgrade_notice'] ), '</strong>
</div>
</td>
@@ -2769,16 +2769,16 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
if ( 'update' !== $this->view_context && 'activate' !== $this->view_context ) {
if ( current_user_can( 'install_plugins' ) ) {
- $actions['tgmpa-bulk-install'] = __( 'Install', 'cryout' );
+ $actions['tgmpa-bulk-install'] = __( 'Install', 'mantra' );
}
}
if ( 'install' !== $this->view_context ) {
if ( current_user_can( 'update_plugins' ) ) {
- $actions['tgmpa-bulk-update'] = __( 'Update', 'cryout' );
+ $actions['tgmpa-bulk-update'] = __( 'Update', 'mantra' );
}
if ( current_user_can( 'activate_plugins' ) ) {
- $actions['tgmpa-bulk-activate'] = __( 'Activate', 'cryout' );
+ $actions['tgmpa-bulk-activate'] = __( 'Activate', 'mantra' );
}
}
@@ -2809,9 +2809,9 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
// Did user actually select any plugins to install/update ?
if ( empty( $_POST['plugin'] ) ) {
if ( 'install' === $install_type ) {
- $message = __( 'No plugins were selected to be installed. No action taken.', 'cryout' );
+ $message = __( 'No plugins were selected to be installed. No action taken.', 'mantra' );
} else {
- $message = __( 'No plugins were selected to be updated. No action taken.', 'cryout' );
+ $message = __( 'No plugins were selected to be updated. No action taken.', 'mantra' );
}
echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>';
@@ -2852,9 +2852,9 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
// No need to proceed further if we have no plugins to handle.
if ( empty( $plugins_to_install ) ) {
if ( 'install' === $install_type ) {
- $message = __( 'No plugins are available to be installed at this time.', 'cryout' );
+ $message = __( 'No plugins are available to be installed at this time.', 'mantra' );
} else {
- $message = __( 'No plugins are available to be updated at this time.', 'cryout' );
+ $message = __( 'No plugins are available to be updated at this time.', 'mantra' );
}
echo '<div id="message" class="error"><p>', esc_html( $message ), '</p></div>';
@@ -2960,7 +2960,7 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
// Did user actually select any plugins to activate ?
if ( empty( $_POST['plugin'] ) ) {
- echo '<div id="message" class="error"><p>', esc_html__( 'No plugins were selected to be activated. No action taken.', 'cryout' ), '</p></div>';
+ echo '<div id="message" class="error"><p>', esc_html__( 'No plugins were selected to be activated. No action taken.', 'mantra' ), '</p></div>';
return false;
}
@@ -2986,7 +2986,7 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
// Return early if there are no plugins to activate.
if ( empty( $plugins_to_activate ) ) {
- echo '<div id="message" class="error"><p>', esc_html__( 'No plugins are available to be activated at this time.', 'cryout' ), '</p></div>';
+ echo '<div id="message" class="error"><p>', esc_html__( 'No plugins are available to be activated at this time.', 'mantra' ), '</p></div>';
return false;
}
@@ -3000,11 +3000,11 @@ if ( ! class_exists( 'TGMPA_List_Table' ) ) {
$count = count( $plugin_names ); // Count so we can use _n function.
$plugin_names = array_map( array( 'TGMPA_Utils', 'wrap_in_strong' ), $plugin_names );
$last_plugin = array_pop( $plugin_names ); // Pop off last name to prep for readability.
- $imploded = empty( $plugin_names ) ? $last_plugin : ( implode( ', ', $plugin_names ) . ' ' . esc_html_x( 'and', 'plugin A *and* plugin B', 'cryout' ) . ' ' . $last_plugin );
+ $imploded = empty( $plugin_names ) ? $last_plugin : ( implode( ', ', $plugin_names ) . ' ' . esc_html_x( 'and', 'plugin A *and* plugin B', 'mantra' ) . ' ' . $last_plugin );
printf( // WPCS: xss ok.
'<div id="message" class="updated"><p>%1$s %2$s.</p></div>',
- esc_html( _n( 'The following plugin was activated successfully:', 'The following plugins were activated successfully:', $count, 'cryout' ) ),
+ esc_html( _n( 'The following plugin was activated successfully:', 'The following plugins were activated successfully:', $count, 'mantra' ) ),
$imploded
);
@@ -3210,8 +3210,8 @@ if ( ! function_exists( 'tgmpa_load_bulk_installer' ) ) {
* @since 2.2.0
*/
public function activate_strings() {
- $this->strings['activation_failed'] = __( 'Plugin activation failed.', 'cryout' );
- $this->strings['activation_success'] = __( 'Plugin activated successfully.', 'cryout' );
+ $this->strings['activation_failed'] = __( 'Plugin activation failed.', 'mantra' );
+ $this->strings['activation_success'] = __( 'Plugin activated successfully.', 'mantra' );
}
/**
@@ -3550,29 +3550,29 @@ if ( ! function_exists( 'tgmpa_load_bulk_installer' ) ) {
if ( 'update' === $this->options['install_type'] ) {
parent::add_strings();
/* translators: 1: plugin name, 2: action number 3: total number of actions. */
- $this->upgrader->strings['skin_before_update_header'] = __( 'Updating Plugin %1$s (%2$d/%3$d)', 'cryout' );
+ $this->upgrader->strings['skin_before_update_header'] = __( 'Updating Plugin %1$s (%2$d/%3$d)', 'mantra' );
} else {
/* translators: 1: plugin name, 2: error message. */
- $this->upgrader->strings['skin_update_failed_error'] = __( 'An error occurred while installing %1$s: <strong>%2$s</strong>.', 'cryout' );
+ $this->upgrader->strings['skin_update_failed_error'] = __( 'An error occurred while installing %1$s: <strong>%2$s</strong>.', 'mantra' );
/* translators: 1: plugin name. */
- $this->upgrader->strings['skin_update_failed'] = __( 'The installation of %1$s failed.', 'cryout' );
+ $this->upgrader->strings['skin_update_failed'] = __( 'The installation of %1$s failed.', 'mantra' );
if ( $this->tgmpa->is_automatic ) {
// Automatic activation strings.
- $this->upgrader->strings['skin_upgrade_start'] = __( 'The installation and activation process is starting. This process may take a while on some hosts, so please be patient.', 'cryout' );
+ $this->upgrader->strings['skin_upgrade_start'] = __( 'The installation and activation process is starting. This process may take a while on some hosts, so please be patient.', 'mantra' );
/* translators: 1: plugin name. */
- $this->upgrader->strings['skin_update_successful'] = __( '%1$s installed and activated successfully.', 'cryout' ) . ' <a href="#" class="hide-if-no-js" onclick="%2$s"><span>' . esc_html__( 'Show Details', 'cryout' ) . '</span><span class="hidden">' . esc_html__( 'Hide Details', 'cryout' ) . '</span>.</a>';
- $this->upgrader->strings['skin_upgrade_end'] = __( 'All installations and activations have been completed.', 'cryout' );
+ $this->upgrader->strings['skin_update_successful'] = __( '%1$s installed and activated successfully.', 'mantra' ) . ' <a href="#" class="hide-if-no-js" onclick="%2$s"><span>' . esc_html__( 'Show Details', 'mantra' ) . '</span><span class="hidden">' . esc_html__( 'Hide Details', 'mantra' ) . '</span>.</a>';
+ $this->upgrader->strings['skin_upgrade_end'] = __( 'All installations and activations have been completed.', 'mantra' );
/* translators: 1: plugin name, 2: action number 3: total number of actions. */
- $this->upgrader->strings['skin_before_update_header'] = __( 'Installing and Activating Plugin %1$s (%2$d/%3$d)', 'cryout' );
+ $this->upgrader->strings['skin_before_update_header'] = __( 'Installing and Activating Plugin %1$s (%2$d/%3$d)', 'mantra' );
} else {
// Default installation strings.
- $this->upgrader->strings['skin_upgrade_start'] = __( 'The installation process is starting. This process may take a while on some hosts, so please be patient.', 'cryout' );
+ $this->upgrader->strings['skin_upgrade_start'] = __( 'The installation process is starting. This process may take a while on some hosts, so please be patient.', 'mantra' );
/* translators: 1: plugin name. */
- $this->upgrader->strings['skin_update_successful'] = esc_html__( '%1$s installed successfully.', 'cryout' ) . ' <a href="#" class="hide-if-no-js" onclick="%2$s"><span>' . esc_html__( 'Show Details', 'cryout' ) . '</span><span class="hidden">' . esc_html__( 'Hide Details', 'cryout' ) . '</span>.</a>';
- $this->upgrader->strings['skin_upgrade_end'] = __( 'All installations have been completed.', 'cryout' );
+ $this->upgrader->strings['skin_update_successful'] = esc_html__( '%1$s installed successfully.', 'mantra' ) . ' <a href="#" class="hide-if-no-js" onclick="%2$s"><span>' . esc_html__( 'Show Details', 'mantra' ) . '</span><span class="hidden">' . esc_html__( 'Hide Details', 'mantra' ) . '</span>.</a>';
+ $this->upgrader->strings['skin_upgrade_end'] = __( 'All installations have been completed.', 'mantra' );
/* translators: 1: plugin name, 2: action number 3: total number of actions. */
- $this->upgrader->strings['skin_before_update_header'] = __( 'Installing Plugin %1$s (%2$d/%3$d)', 'cryout' );
+ $this->upgrader->strings['skin_before_update_header'] = __( 'Installing Plugin %1$s (%2$d/%3$d)', 'mantra' );
}
}
}
@@ -3632,7 +3632,7 @@ if ( ! function_exists( 'tgmpa_load_bulk_installer' ) ) {
echo '<style type="text/css">#adminmenu .wp-submenu li.current { display: none !important; }</style>';
$update_actions['dashboard'] = sprintf(
esc_html( $this->tgmpa->strings['complete'] ),
- '<a href="' . esc_url( self_admin_url() ) . '">' . esc_html__( 'Return to the Dashboard', 'cryout' ) . '</a>'
+ '<a href="' . esc_url( self_admin_url() ) . '">' . esc_html__( 'Return to the Dashboard', 'mantra' ) . '</a>'
);
} else {
$update_actions['tgmpa_page'] = '<a href="' . esc_url( $this->tgmpa->get_tgmpa_url() ) . '" target="_parent">' . esc_html( $this->tgmpa->strings['return'] ) . '</a>';
diff --git a/themes/mantra/includes/theme-comments.php b/themes/mantra/includes/theme-comments.php
index 51655495..fd1bda6e 100644
--- a/themes/mantra/includes/theme-comments.php
+++ b/themes/mantra/includes/theme-comments.php
@@ -19,7 +19,15 @@ if ( ! function_exists( 'mantra_comment' ) ) :
function mantra_comment( $comment, $args, $depth ) {
$GLOBALS['comment'] = $comment;
switch ( $comment->comment_type ) :
- case '' :
+ case 'pingback' :
+ case 'trackback':
+ ?>
+ <li class="post pingback">
+ <p><?php _e( 'Pingback: ', 'mantra' ); ?><?php comment_author_link(); ?><?php edit_comment_link( __('(Edit)', 'mantra'), ' ' ); ?></p>
+ <?php
+ break;
+ case '':
+ default:
?>
<li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">
<div id="comment-<?php comment_ID(); ?>">
@@ -27,8 +35,6 @@ function mantra_comment( $comment, $args, $depth ) {
<?php echo get_avatar( $comment, 40 );
?><?php printf( '%s <span class="says">'.__('says:', 'mantra' ).'</span>', sprintf( '<cite class="fn">%s</cite>', get_comment_author_link() ) ); ?>
-
-
</div><!-- .comment-author .vcard -->
<div class="comment-meta commentmetadata"><a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>">
@@ -51,14 +57,7 @@ function mantra_comment( $comment, $args, $depth ) {
</div><!-- #comment-## -->
<?php
- break;
- case 'pingback' :
- case 'trackback' :
- ?>
- <li class="post pingback">
- <p><?php _e( 'Pingback: ', 'mantra' ); ?><?php comment_author_link(); ?><?php edit_comment_link( __('(Edit)', 'mantra'), ' ' ); ?></p>
- <?php
- break;
+ break;
endswitch;
}
endif;
diff --git a/themes/mantra/includes/theme-frontpage.php b/themes/mantra/includes/theme-frontpage.php
index a730d6b6..b40a9148 100644
--- a/themes/mantra/includes/theme-frontpage.php
+++ b/themes/mantra/includes/theme-frontpage.php
@@ -33,7 +33,7 @@ function mantra_frontpage_generator() {
<?php
// First FrontPage Title
- if(!empty($mantra_fronttext1)) {?><div id="front-text1"> <h2><?php echo esc_attr($mantra_fronttext1) ?> </h2></div><?php }
+ if(!empty($mantra_fronttext1)) {?><div id="front-text1"> <h2><?php echo esc_html($mantra_fronttext1) ?> </h2></div><?php }
// Slider
if ($mantra_slideType=="Slider Shortcode") { ?>
@@ -139,7 +139,7 @@ function mantra_frontpage_generator() {
} // built-in slider
// Second FrontPage title
- if (!empty($mantra_fronttext2)) {?><div id="front-text2"> <h2><?php echo esc_attr($mantra_fronttext2) ?> </h2></div><?php }
+ if (!empty($mantra_fronttext2)) {?><div id="front-text2"> <h2><?php echo esc_html($mantra_fronttext2) ?> </h2></div><?php }
// Frontpage columns
if ($mantra_nrcolumns) { ?>
@@ -158,7 +158,7 @@ function mantra_frontpage_generator() {
<div class="column-text"><?php echo do_shortcode (${'mantra_columntext'.$mantra_cycle} ); ?></div>
<?php if($mantra_columnreadmore) {?>
<div class="columnmore">
- <a href="<?php echo esc_url(${'mantra_columnlink'.$mantra_cycle}) ?>"><?php echo esc_attr($mantra_columnreadmore) ?> &raquo;</a>
+ <a href="<?php echo esc_url(${'mantra_columnlink'.$mantra_cycle}) ?>"><?php echo esc_html($mantra_columnreadmore) ?> &raquo;</a>
</div>
<?php } // if ?>
</div>
diff --git a/themes/mantra/includes/theme-functions.php b/themes/mantra/includes/theme-functions.php
index 889764e5..4195fdbd 100644
--- a/themes/mantra/includes/theme-functions.php
+++ b/themes/mantra/includes/theme-functions.php
@@ -13,7 +13,7 @@
* Used in header.php
*/
function mantra_header_scripts() {
- ?><!--[if lt IE 9]>
+ ?><!--[if lt IE 9]>
<script>
document.createElement('header');
document.createElement('nav');
@@ -50,19 +50,19 @@ function mantra_title_and_description() {
printf( '<img id="bg_image" alt="%1$s" title="" src="%2$s" />', esc_attr( get_bloginfo( 'name', 'display' ) ), $header_image );
}
?>
-
+
<div id="header-container">
-
+
<?php
switch ($mantra_siteheader) {
- case 'Site Title and Description':
+ case 'Site Title and Description':
$heading_tag = ( ( is_home() || is_front_page() ) && !is_page() ) ? 'h1' : 'div'; ?>
<div>
<<?php echo $heading_tag ?> id="site-title">
- <span> <a href="<?php echo esc_url( home_url( '/' ) ) ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ) ?>" rel="home"><?php echo esc_attr( get_bloginfo( 'name' ) ) ?></a> </span>
+ <span> <a href="<?php echo esc_url( home_url( '/' ) ) ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ) ?>" rel="home"><?php echo esc_html( get_bloginfo( 'name' ) ) ?></a> </span>
</<?php echo $heading_tag ?>>
- <div id="site-description" ><?php echo esc_attr( get_bloginfo( 'description' ) ) ?></div>
+ <div id="site-description" ><?php echo esc_html( get_bloginfo( 'description' ) ) ?></div>
</div> <?php
break;
@@ -75,7 +75,7 @@ function mantra_title_and_description() {
if (!empty($mantra_logoupload)) { ?>
<div>
<a id="logo" href="<?php echo esc_url( home_url( '/' ) ) ?>"> <img title="" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ) ?>" src="<?php echo $mantra_logoupload ?>" /> </a>
- </div>
+ </div>
<?php }
break;
@@ -126,7 +126,7 @@ function mantra_set_social_icons($location){
$cryout_special_keys = array('Mail', 'Skype');
global $mantra_options;
extract( $mantra_options ); ?>
- <div class="socials" id="<?php echo $location ?>">
+ <div class="socials" id="<?php echo $location ?>">
<?php
for ($i=1; $i<=9; $i+=2) {
$j=$i+1;
@@ -138,7 +138,7 @@ function mantra_set_social_icons($location){
endif; ?>
<a target="_blank" rel="nofollow" href="<?php echo $cryout_current_social; ?>" class="socialicons social-<?php echo esc_attr(${"mantra_social$i"}); ?>" title="<?php echo esc_attr(${"mantra_social$i"}); ?>">
- <img alt="<?php echo esc_attr(${"mantra_social$i"}); ?>" src="<?php echo get_template_directory_uri().'/resources/images/socials/'.${"mantra_social$i"}.'.png'; ?>" />
+ <img alt="<?php echo esc_attr(${"mantra_social$i"}); ?>" src="<?php echo esc_url( get_template_directory_uri() ).'/resources/images/socials/'.${"mantra_social$i"}.'.png'; ?>" />
</a>
<?php
} // $j
@@ -154,7 +154,7 @@ endif;
* Mantra back to top button
* Creates div for js
*/
-function mantra_back_top() {
+function mantra_back_top() {
?>
<div id="toTop"><i class="crycon-back2top"></i> </div>
<?php
@@ -166,9 +166,9 @@ if ($mantra_backtop=="Enable") add_action( 'cryout_body_hook', 'mantra_back_top'
* Creates breadcrumns with page sublevels and category sublevels.
*/
function mantra_breadcrumbs() {
- global $mantra_options;
+ global $mantra_options;
global $post;
-
+
echo '<div class="breadcrumbs">';
if (is_page() && !is_front_page() || is_single() || is_category() || is_archive()) {
echo '<a href="'.esc_url( home_url() ) .'">' . esc_attr( get_bloginfo('name') ).'</a> &raquo; ';
@@ -183,7 +183,7 @@ function mantra_breadcrumbs() {
}
}
- if (is_single() && has_category()) {
+ if (is_single() && has_category()) {
$category = get_the_category();
echo '<a href="' . get_category_link($category[0]->cat_ID) . '">' . $category[0]->cat_name . '</a> &raquo; ';
}
@@ -271,7 +271,7 @@ function mantra_site_info() { ?>
'Cryout Creations';?>"><?php echo 'Mantra' ?></a> &amp; <a target="_blank" href="<?php echo esc_url('http://wordpress.org/' ); ?>"
title="<?php esc_attr_e('Semantic Personal Publishing Platform', 'mantra'); ?>"> <?php printf(' %s.', 'WordPress' ); ?>
</a>
-</div><!-- #site-info --> <?php
+</div><!-- #site-info --> <?php
}
add_action( 'cryout_footer_hook', 'mantra_site_info', 12 );
@@ -281,7 +281,7 @@ add_action( 'cryout_footer_hook', 'mantra_site_info', 12 );
*/
function mantra_copyright() {
global $mantra_options; ?>
- <div id="site-copyright">
+ <div id="site-copyright">
<?php echo wp_kses_post( do_shortcode( $mantra_options['mantra_copyright'] ) ) ?>
</div>
<?php
@@ -340,16 +340,6 @@ function mantra_mobile_body_class($classes){
}
add_filter('body_class', 'mantra_mobile_body_class');
-
-// Favicon
-function mantra_fav_icon() {
- global $mantra_options;
- echo '<link rel="shortcut icon" href="'.esc_url($mantra_options['mantra_favicon']).'" />';
- echo '<link rel="apple-touch-icon" href="'.esc_url($mantra_options['mantra_favicon']).'" />';
-}
-
-if ($mantra_options['mantra_favicon']) add_action( 'cryout_header_hook', 'mantra_fav_icon' );
-
/**
* WordPress 5.2+ wp_body_open() support
*/
@@ -358,4 +348,4 @@ function mantra_wp_body_open() {
}
add_action( 'cryout_body_hook', 'mantra_wp_body_open', 5 );
-// FIN \ No newline at end of file
+// FIN
diff --git a/themes/mantra/readme.txt b/themes/mantra/readme.txt
index e5309064..841c52b2 100644
--- a/themes/mantra/readme.txt
+++ b/themes/mantra/readme.txt
@@ -1,11 +1,11 @@
=============
Mantra WordPress Theme
-Copyright 2011-19 Cryout Creations
+Copyright 2011-21 Cryout Creations
Author: Cryout Creations
Requires at least: 4.2
-Tested up to: 5.2
-Stable tag: 3.2.0
+Tested up to: 5.7
+Stable tag: 3.3.1
License: GPLv3
License URI: http://www.gnu.org/licenses/gpl.html
Donate link: https://www.cryoutcreations.eu/donate/
@@ -68,6 +68,8 @@ https://www.pexels.com/photo/wine-glass-on-restaurant-table-225228/
https://www.pexels.com/photo/table-in-vintage-restaurant-6267/
https://www.pexels.com/photo/attractive-bar-barista-breakfast-296888/
+https://www.pexels.com/photo/time-lapse-photo-of-lights-220118/
+
All other images bundled with the theme (used in the demo presentation page and admin section) are created by Cryout Creations and released with the theme under GPLv3 as well.
@@ -95,6 +97,27 @@ Turkish - Emre Dalkili�
== Changelog ==
+= 3.3.1 =
+* Fixed jQuery functions deprecation warnings from jQuery 3.5 update brought by WordPress 5.6
+* Fixed mobile menu dropdowns not working correctly with jQuery 3.5
+* Fixed jQuery functions deprecation warning in bundled NivoSlider
+* Fixed jQuery undefined functions errors with WordPress 5.7
+* Fixed admin page styling applies outside its elements (on media upload form)
+* Fixed incorrect example header image with new one and fixed broken preview
+* Fixed settings tooltips unreadable due to jQuery UI transparency and color changes since WordPress 5.6
+* Removed some leftover code from admin.js page script file
+
+= 3.3.0 =
+* Added 'mantra_mainnav_id' and 'mantra_mainnav_class' filters to ease support for mega menu plugins
+* Added 'wp_body_open' action introduced in WordPress 5.2
+* Added required extra sanitization and 'tested/php' headers
+* Fixed pins selection and some hide meta attribute options not working
+* Fixed main content text color option not applying to presentation page elements
+* Fixed inconsistent header line height when header image aspect ratio is forced on
+* Fixed comments list missing with WordPress 5.5
+* Cleaned up some unused code and moved some settings page code to the companion Serious Settings plugin (in v0.5.11)
+* Removed legacy favicon functionality completely as this is no longer allowed in wp.org repository themes
+
= 3.2.0 =
* Added support for WordPress 5.2 wp_body_open() hook
* Added shortcodes support in custom footer text
diff --git a/themes/mantra/resources/css/style-mobile.css b/themes/mantra/resources/css/style-mobile.css
index c7374d6c..df7b4a80 100644
--- a/themes/mantra/resources/css/style-mobile.css
+++ b/themes/mantra/resources/css/style-mobile.css
@@ -68,6 +68,7 @@
.mantra-hratio-1 #branding,
.mantra-hratio-1 #bg_image {
min-height: inherit !important;
+ display: block;
}
#header-container > div {
diff --git a/themes/mantra/resources/images/headers/mantra-thumbnail.png b/themes/mantra/resources/images/headers/mantra-thumbnail.png
new file mode 100644
index 00000000..d5c70aad
--- /dev/null
+++ b/themes/mantra/resources/images/headers/mantra-thumbnail.png
Binary files differ
diff --git a/themes/mantra/resources/images/headers/mantra.png b/themes/mantra/resources/images/headers/mantra.png
index 45e9bb0b..7b0f9d53 100644
--- a/themes/mantra/resources/images/headers/mantra.png
+++ b/themes/mantra/resources/images/headers/mantra.png
Binary files differ
diff --git a/themes/mantra/resources/images/headers/mantra_thumbnail.png b/themes/mantra/resources/images/headers/mantra_thumbnail.png
deleted file mode 100644
index c2342994..00000000
--- a/themes/mantra/resources/images/headers/mantra_thumbnail.png
+++ /dev/null
Binary files differ
diff --git a/themes/mantra/resources/js/frontend.js b/themes/mantra/resources/js/frontend.js
index 391a5550..e32300f4 100644
--- a/themes/mantra/resources/js/frontend.js
+++ b/themes/mantra/resources/js/frontend.js
@@ -1,79 +1,77 @@
/******************************
- Mantra Theme
- custom scripting
- (c) Cryout Creations
- www.cryoutcreations.eu
+ Mantra theme frontend.js
*******************************/
-
jQuery(document).ready(function() {
-/* Standard menu touch support for tablets */
-var custom_event = ('ontouchstart' in window) ? 'touchstart' : 'click'; /* check touch support */
-var ios = /iPhone|iPad|iPod/i.test(navigator.userAgent);
- jQuery('#access .menu > ul > li a').on('click', function(e){
- var $link_id = jQuery(this).attr('href');
- if (jQuery(this).parent().data('clicked') == $link_id) { /* second touch */
- jQuery(this).parent().data('clicked', null);
- }
- else { /* first touch */
- if (custom_event != 'click' && !ios && (jQuery(this).parent().children('ul').length >0)) {e.preventDefault();}
- jQuery(this).parent().data('clicked', $link_id);
- }
+ /* Standard menu touch support for tablets */
+ var custom_event = ('ontouchstart' in window) ? 'touchstart' : 'click'; /* check touch support */
+ var ios = /iPhone|iPad|iPod/i.test(navigator.userAgent);
+ jQuery( '#access .menu > ul > li a' ).on( 'click', function(e){
+ var $link_id = jQuery(this).attr('href');
+ if (jQuery(this).closest('#access').data('clicked') == $link_id) {
+ /* second touch */
+ jQuery(this).closest('#access').data('clicked', null);
+ } else {
+ /* first touch */
+ if (custom_event != 'click' && !ios && (jQuery(this).parent().children('ul').length >0)) { e.preventDefault(); }
+ jQuery(this).closest('#access').data('clicked', $link_id);
+ jQuery(this).next('.sub-menu').slideDown();
+ }
});
-/* Back to top button animation */
-jQuery(function() {
- jQuery(window).scroll(function() {
- var x=jQuery(this).scrollTop();
+ /* Back to top button animation */
+ jQuery(function() {
+ jQuery(window).on('scroll',function() {
+ var x=jQuery(this).scrollTop();
- if(x != 0) {
- jQuery('#toTop').addClass('showtop')
- } else {
- jQuery('#toTop').removeClass('showtop');
- }
+ if(x != 0) {
+ jQuery('#toTop').addClass('showtop')
+ } else {
+ jQuery('#toTop').removeClass('showtop');
+ }
+ });
+ jQuery('#toTop').on('click',function() { jQuery('body,html').animate({scrollTop:0},800); });
});
- jQuery('#toTop').click(function() { jQuery('body,html').animate({scrollTop:0},800); });
-});
-/* Menu animation */
-jQuery("#access ul ul").css({display: "none"}); /* Opera Fix */
-jQuery("#access").removeClass("jssafe"); /* JS failsafe */
-jQuery("#access .menu ul li").hoverIntent({
- over: function(){jQuery(this).children("ul").fadeIn(300);},
- out: function(){ jQuery(this).children('ul').fadeOut();},
- timeout:300}
-);
+ /* Menu animation */
+ jQuery("#access ul ul").css({display: "none"}); /* Opera Fix */
+ jQuery("#access").removeClass("jssafe"); /* JS failsafe */
+ jQuery("#access .menu ul li").hoverIntent({
+ over: function(){jQuery(this).children("ul").fadeIn(300);},
+ out: function(){ jQuery(this).children('ul').fadeOut();},
+ timeout:300}
+ );
-/* detect and apply custom class for safari */
-if (navigator.userAgent.indexOf('Safari') != -1 && navigator.userAgent.indexOf('Chrome') == -1) {
- jQuery('body').addClass('safari');
-}
+ /* detect and apply custom class for safari */
+ if (navigator.userAgent.indexOf('Safari') != -1 && navigator.userAgent.indexOf('Chrome') == -1) {
+ jQuery('body').addClass('safari');
+ }
-/* Add custom borders to images */
-jQuery("img.alignnone, img.alignleft, img.aligncenter, img.alignright").addClass(mantra_options.image_class);
+ /* Add custom borders to images */
+ jQuery("img.alignnone, img.alignleft, img.aligncenter, img.alignright").addClass(mantra_options.image_class);
});
/* end document.ready */
+jQuery(window).on('load', function() {
+ mantra_mobilemenu_init();
+});
+
/* Mobile Menu v2 */
function mantra_mobilemenu_init() {
var state = false;
- jQuery("#nav-toggle").click(function(){
+ jQuery("#nav-toggle").on('click',function(){
jQuery("#access").slideToggle(function(){ if (state) {jQuery(this).removeAttr( 'style' )}; state = ! state; } );
});
}
-jQuery(window).load(function() {
- mantra_mobilemenu_init();
-});
-
/* Columns equalizer, used if at least one sidebar has a bg color */
-function equalizeHeights(){
+function mantra_equalizeHeights(){
var h1 = jQuery("#primary").height();
var h2 = jQuery("#secondary").height();
var h3 = jQuery("#content").height();
@@ -94,7 +92,7 @@ function mantra_onload() {
}
if ( mantra_options.equalizesidebars = 1 ) {
/* Check if sidebars have user colors and if so equalize their heights */
- equalizeHeights();
+ mantra_equalizeHeights();
}
}; // mantra_onload
@@ -188,3 +186,5 @@ function getInternetExplorerVersion()
}
return rv;
}
+
+/*FIN*/ \ No newline at end of file
diff --git a/themes/mantra/resources/js/nivo-slider.js b/themes/mantra/resources/js/nivo-slider.js
index 039f3cfb..9ff31102 100644
--- a/themes/mantra/resources/js/nivo-slider.js
+++ b/themes/mantra/resources/js/nivo-slider.js
@@ -1,5 +1,5 @@
/*
- * jQuery Nivo Slider v3.2
+ * jQuery Nivo Slider v3.2 * corrected for jQuery 3.5 *
* http://nivo.dev7studios.com
*
* Copyright 2012, Dev7studios
@@ -7,4 +7,669 @@
* http://www.opensource.org/licenses/mit-license.php
*/
-(function(e){var t=function(t,n){var r=e.extend({},e.fn.nivoSlider.defaults,n);var i={currentSlide:0,currentImage:"",totalSlides:0,running:false,paused:false,stop:false,controlNavEl:false};var s=e(t);s.data("nivo:vars",i).addClass("nivoSlider");var o=s.children();o.each(function(){var t=e(this);var n="";if(!t.is("img")){if(t.is("a")){t.addClass("nivo-imageLink");n=t}t=t.find("img:first")}var r=r===0?t.attr("width"):t.width(),s=s===0?t.attr("height"):t.height();if(n!==""){n.css("display","none")}t.css("display","none");i.totalSlides++});if(r.randomStart){r.startSlide=Math.floor(Math.random()*i.totalSlides)}if(r.startSlide>0){if(r.startSlide>=i.totalSlides){r.startSlide=i.totalSlides-1}i.currentSlide=r.startSlide}if(e(o[i.currentSlide]).is("img")){i.currentImage=e(o[i.currentSlide])}else{i.currentImage=e(o[i.currentSlide]).find("img:first")}if(e(o[i.currentSlide]).is("a")){e(o[i.currentSlide]).css("display","block")}var u=e("<img/>").addClass("nivo-main-image");u.attr("src",i.currentImage.attr("src")).show();s.append(u);e(window).resize(function(){s.children("img").width(s.width());u.attr("src",i.currentImage.attr("src"));u.stop().height("auto");e(".nivo-slice").remove();e(".nivo-box").remove()});s.append(e('<div class="nivo-caption"></div>'));var a=function(t){var n=e(".nivo-caption",s);if(i.currentImage.attr("title")!=""&&i.currentImage.attr("title")!=undefined){var r=i.currentImage.attr("title");if(r.substr(0,1)=="#")r=e(r).html();if(n.css("display")=="block"){setTimeout(function(){n.html(r)},t.animSpeed)}else{n.html(r);n.stop().fadeIn(t.animSpeed)}}else{n.stop().fadeOut(t.animSpeed)}};a(r);var f=0;if(!r.manualAdvance&&o.length>1){f=setInterval(function(){d(s,o,r,false)},r.pauseTime)}if(r.directionNav){s.append('<div class="nivo-directionNav"><a class="nivo-prevNav">'+r.prevText+'</a><a class="nivo-nextNav">'+r.nextText+"</a></div>");e(s).on("click","a.nivo-prevNav",function(){if(i.running){return false}clearInterval(f);f="";i.currentSlide-=2;d(s,o,r,"prev")});e(s).on("click","a.nivo-nextNav",function(){if(i.running){return false}clearInterval(f);f="";d(s,o,r,"next")})}if(r.controlNav){i.controlNavEl=e('<div class="nivo-controlNav"></div>');s.after(i.controlNavEl);for(var l=0;l<o.length;l++){if(r.controlNavThumbs){i.controlNavEl.addClass("nivo-thumbs-enabled");var c=o.eq(l);if(!c.is("img")){c=c.find("img:first")}if(c.attr("data-thumb"))i.controlNavEl.append('<a class="nivo-control" rel="'+l+'"><img src="'+c.attr("data-thumb")+'" alt="" /></a>')}else{i.controlNavEl.append('<a class="nivo-control" rel="'+l+'">'+(l+1)+"</a>")}}e("a:eq("+i.currentSlide+")",i.controlNavEl).addClass("active");e("a",i.controlNavEl).bind("click",function(){if(i.running)return false;if(e(this).hasClass("active"))return false;clearInterval(f);f="";u.attr("src",i.currentImage.attr("src"));i.currentSlide=e(this).attr("rel")-1;d(s,o,r,"control")})}if(r.pauseOnHover){s.hover(function(){i.paused=true;clearInterval(f);f=""},function(){i.paused=false;if(f===""&&!r.manualAdvance){f=setInterval(function(){d(s,o,r,false)},r.pauseTime)}})}s.bind("nivo:animFinished",function(){u.attr("src",i.currentImage.attr("src"));i.running=false;e(o).each(function(){if(e(this).is("a")){e(this).css("display","none")}});if(e(o[i.currentSlide]).is("a")){e(o[i.currentSlide]).css("display","block")}if(f===""&&!i.paused&&!r.manualAdvance){f=setInterval(function(){d(s,o,r,false)},r.pauseTime)}r.afterChange.call(this)});var h=function(t,n,r){if(e(r.currentImage).parent().is("a"))e(r.currentImage).parent().css("display","block");e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").width(t.width()).css("visibility","hidden").show();var i=e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").parent().is("a")?e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").parent().height():e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").height();for(var s=0;s<n.slices;s++){var o=Math.round(t.width()/n.slices);if(s===n.slices-1){t.append(e('<div class="nivo-slice" name="'+s+'"><img src="'+r.currentImage.attr("src")+'" style="position:absolute; width:'+t.width()+"px; height:auto; display:block !important; top:0; left:-"+(o+s*o-o)+'px;" /></div>').css({left:o*s+"px",width:t.width()-o*s+"px",height:i+"px",opacity:"0",overflow:"hidden"}))}else{t.append(e('<div class="nivo-slice" name="'+s+'"><img src="'+r.currentImage.attr("src")+'" style="position:absolute; width:'+t.width()+"px; height:auto; display:block !important; top:0; left:-"+(o+s*o-o)+'px;" /></div>').css({left:o*s+"px",width:o+"px",height:i+"px",opacity:"0",overflow:"hidden"}))}}e(".nivo-slice",t).height(i);u.stop().animate({height:e(r.currentImage).height()},n.animSpeed)};var p=function(t,n,r){if(e(r.currentImage).parent().is("a"))e(r.currentImage).parent().css("display","block");e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").width(t.width()).css("visibility","hidden").show();var i=Math.round(t.width()/n.boxCols),s=Math.round(e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").height()/n.boxRows);for(var o=0;o<n.boxRows;o++){for(var a=0;a<n.boxCols;a++){if(a===n.boxCols-1){t.append(e('<div class="nivo-box" name="'+a+'" rel="'+o+'"><img src="'+r.currentImage.attr("src")+'" style="position:absolute; width:'+t.width()+"px; height:auto; display:block; top:-"+s*o+"px; left:-"+i*a+'px;" /></div>').css({opacity:0,left:i*a+"px",top:s*o+"px",width:t.width()-i*a+"px"}));e('.nivo-box[name="'+a+'"]',t).height(e('.nivo-box[name="'+a+'"] img',t).height()+"px")}else{t.append(e('<div class="nivo-box" name="'+a+'" rel="'+o+'"><img src="'+r.currentImage.attr("src")+'" style="position:absolute; width:'+t.width()+"px; height:auto; display:block; top:-"+s*o+"px; left:-"+i*a+'px;" /></div>').css({opacity:0,left:i*a+"px",top:s*o+"px",width:i+"px"}));e('.nivo-box[name="'+a+'"]',t).height(e('.nivo-box[name="'+a+'"] img',t).height()+"px")}}}u.stop().animate({height:e(r.currentImage).height()},n.animSpeed)};var d=function(t,n,r,i){var s=t.data("nivo:vars");if(s&&s.currentSlide===s.totalSlides-1){r.lastSlide.call(this)}if((!s||s.stop)&&!i){return false}r.beforeChange.call(this);if(!i){u.attr("src",s.currentImage.attr("src"))}else{if(i==="prev"){u.attr("src",s.currentImage.attr("src"))}if(i==="next"){u.attr("src",s.currentImage.attr("src"))}}s.currentSlide++;if(s.currentSlide===s.totalSlides){s.currentSlide=0;r.slideshowEnd.call(this)}if(s.currentSlide<0){s.currentSlide=s.totalSlides-1}if(e(n[s.currentSlide]).is("img")){s.currentImage=e(n[s.currentSlide])}else{s.currentImage=e(n[s.currentSlide]).find("img:first")}if(r.controlNav){e("a",s.controlNavEl).removeClass("active");e("a:eq("+s.currentSlide+")",s.controlNavEl).addClass("active")}a(r);e(".nivo-slice",t).remove();e(".nivo-box",t).remove();var o=r.effect,f="";if(r.effect==="random"){f=new Array("sliceDownRight","sliceDownLeft","sliceUpRight","sliceUpLeft","sliceUpDown","sliceUpDownLeft","fold","fade","boxRandom","boxRain","boxRainReverse","boxRainGrow","boxRainGrowReverse");o=f[Math.floor(Math.random()*(f.length+1))];if(o===undefined){o="fade"}}if(r.effect.indexOf(",")!==-1){f=r.effect.split(",");o=f[Math.floor(Math.random()*f.length)];if(o===undefined){o="fade"}}if(s.currentImage.attr("data-transition")){o=s.currentImage.attr("data-transition")}s.running=true;var l=0,c=0,d="",m="",g="",y="";if(o==="sliceDown"||o==="sliceDownRight"||o==="sliceDownLeft"){h(t,r,s);l=0;c=0;d=e(".nivo-slice",t);if(o==="sliceDownLeft"){d=e(".nivo-slice",t)._reverse()}d.each(function(){var n=e(this);n.css({top:"0px"});if(c===r.slices-1){setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed,"",function(){t.trigger("nivo:animFinished")})},100+l)}else{setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed)},100+l)}l+=50;c++})}else if(o==="sliceUp"||o==="sliceUpRight"||o==="sliceUpLeft"){h(t,r,s);l=0;c=0;d=e(".nivo-slice",t);if(o==="sliceUpLeft"){d=e(".nivo-slice",t)._reverse()}d.each(function(){var n=e(this);n.css({bottom:"0px"});if(c===r.slices-1){setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed,"",function(){t.trigger("nivo:animFinished")})},100+l)}else{setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed)},100+l)}l+=50;c++})}else if(o==="sliceUpDown"||o==="sliceUpDownRight"||o==="sliceUpDownLeft"){h(t,r,s);l=0;c=0;var b=0;d=e(".nivo-slice",t);if(o==="sliceUpDownLeft"){d=e(".nivo-slice",t)._reverse()}d.each(function(){var n=e(this);if(c===0){n.css("top","0px");c++}else{n.css("bottom","0px");c=0}if(b===r.slices-1){setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed,"",function(){t.trigger("nivo:animFinished")})},100+l)}else{setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed)},100+l)}l+=50;b++})}else if(o==="fold"){h(t,r,s);l=0;c=0;e(".nivo-slice",t).each(function(){var n=e(this);var i=n.width();n.css({top:"0px",width:"0px"});if(c===r.slices-1){setTimeout(function(){n.animate({width:i,opacity:"1.0"},r.animSpeed,"",function(){t.trigger("nivo:animFinished")})},100+l)}else{setTimeout(function(){n.animate({width:i,opacity:"1.0"},r.animSpeed)},100+l)}l+=50;c++})}else if(o==="fade"){h(t,r,s);m=e(".nivo-slice:first",t);m.css({width:t.width()+"px"});m.animate({opacity:"1.0"},r.animSpeed*2,"",function(){t.trigger("nivo:animFinished")})}else if(o==="slideInRight"){h(t,r,s);m=e(".nivo-slice:first",t);m.css({width:"0px",opacity:"1"});m.animate({width:t.width()+"px"},r.animSpeed*2,"",function(){t.trigger("nivo:animFinished")})}else if(o==="slideInLeft"){h(t,r,s);m=e(".nivo-slice:first",t);m.css({width:"0px",opacity:"1",left:"",right:"0px"});m.animate({width:t.width()+"px"},r.animSpeed*2,"",function(){m.css({left:"0px",right:""});t.trigger("nivo:animFinished")})}else if(o==="boxRandom"){p(t,r,s);g=r.boxCols*r.boxRows;c=0;l=0;y=v(e(".nivo-box",t));y.each(function(){var n=e(this);if(c===g-1){setTimeout(function(){n.animate({opacity:"1"},r.animSpeed,"",function(){t.trigger("nivo:animFinished")})},100+l)}else{setTimeout(function(){n.animate({opacity:"1"},r.animSpeed)},100+l)}l+=20;c++})}else if(o==="boxRain"||o==="boxRainReverse"||o==="boxRainGrow"||o==="boxRainGrowReverse"){p(t,r,s);g=r.boxCols*r.boxRows;c=0;l=0;var w=0;var E=0;var S=[];S[w]=[];y=e(".nivo-box",t);if(o==="boxRainReverse"||o==="boxRainGrowReverse"){y=e(".nivo-box",t)._reverse()}y.each(function(){S[w][E]=e(this);E++;if(E===r.boxCols){w++;E=0;S[w]=[]}});for(var x=0;x<r.boxCols*2;x++){var T=x;for(var N=0;N<r.boxRows;N++){if(T>=0&&T<r.boxCols){(function(n,i,s,u,a){var f=e(S[n][i]);var l=f.width();var c=f.height();if(o==="boxRainGrow"||o==="boxRainGrowReverse"){f.width(0).height(0)}if(u===a-1){setTimeout(function(){f.animate({opacity:"1",width:l,height:c},r.animSpeed/1.3,"",function(){t.trigger("nivo:animFinished")})},100+s)}else{setTimeout(function(){f.animate({opacity:"1",width:l,height:c},r.animSpeed/1.3)},100+s)}})(N,T,l,c,g);c++}T--}l+=100}}};var v=function(e){for(var t,n,r=e.length;r;t=parseInt(Math.random()*r,10),n=e[--r],e[r]=e[t],e[t]=n);return e};var m=function(e){if(this.console&&typeof console.log!=="undefined"){console.log(e)}};this.stop=function(){if(!e(t).data("nivo:vars").stop){e(t).data("nivo:vars").stop=true;m("Stop Slider")}};this.start=function(){if(e(t).data("nivo:vars").stop){e(t).data("nivo:vars").stop=false;m("Start Slider")}};r.afterLoad.call(this);return this};e.fn.nivoSlider=function(n){return this.each(function(r,i){var s=e(this);if(s.data("nivoslider")){return s.data("nivoslider")}var o=new t(this,n);s.data("nivoslider",o)})};e.fn.nivoSlider.defaults={effect:"random",slices:15,boxCols:8,boxRows:4,animSpeed:500,pauseTime:3e3,startSlide:0,directionNav:true,controlNav:true,controlNavThumbs:false,pauseOnHover:true,manualAdvance:false,prevText:"Prev",nextText:"Next",randomStart:false,beforeChange:function(){},afterChange:function(){},slideshowEnd:function(){},lastSlide:function(){},afterLoad:function(){}};e.fn._reverse=[].reverse})(jQuery)
+(function($) {
+ var NivoSlider = function(element, options){
+ // Defaults are below
+ var settings = $.extend({}, $.fn.nivoSlider.defaults, options);
+
+ // Useful variables. Play carefully.
+ var vars = {
+ currentSlide: 0,
+ currentImage: '',
+ totalSlides: 0,
+ running: false,
+ paused: false,
+ stop: false,
+ controlNavEl: false
+ };
+
+ // Get this slider
+ var slider = $(element);
+ slider.data('nivo:vars', vars).addClass('nivoSlider');
+
+ // Find our slider children
+ var kids = slider.children();
+ kids.each(function() {
+ var child = $(this);
+ var link = '';
+ if(!child.is('img')){
+ if(child.is('a')){
+ child.addClass('nivo-imageLink');
+ link = child;
+ }
+ child = child.find('img:first');
+ }
+ // Get img width & height
+ var childWidth = (childWidth === 0) ? child.attr('width') : child.width(),
+ childHeight = (childHeight === 0) ? child.attr('height') : child.height();
+
+ if(link !== ''){
+ link.css('display','none');
+ }
+ child.css('display','none');
+ vars.totalSlides++;
+ });
+
+ // If randomStart
+ if(settings.randomStart){
+ settings.startSlide = Math.floor(Math.random() * vars.totalSlides);
+ }
+
+ // Set startSlide
+ if(settings.startSlide > 0){
+ if(settings.startSlide >= vars.totalSlides) { settings.startSlide = vars.totalSlides - 1; }
+ vars.currentSlide = settings.startSlide;
+ }
+
+ // Get initial image
+ if($(kids[vars.currentSlide]).is('img')){
+ vars.currentImage = $(kids[vars.currentSlide]);
+ } else {
+ vars.currentImage = $(kids[vars.currentSlide]).find('img:first');
+ }
+
+ // Show initial link
+ if($(kids[vars.currentSlide]).is('a')){
+ $(kids[vars.currentSlide]).css('display','block');
+ }
+
+ // Set first background
+ var sliderImg = $('<img/>').addClass('nivo-main-image');
+ sliderImg.attr({
+ src : vars.currentImage.attr('src'),
+ alt : vars.currentImage.attr('alt')
+ }).show();
+ slider.append(sliderImg);
+
+ // Detect Window Resize
+ $(window).on('resize',function() {
+ slider.children('img').width(slider.width());
+ sliderImg.attr({
+ src : vars.currentImage.attr('src'),
+ alt : vars.currentImage.attr('alt')
+ });
+ sliderImg.stop().height('auto');
+ $('.nivo-slice').remove();
+ $('.nivo-box').remove();
+ });
+
+ //Create caption
+ slider.append($('<div class="nivo-caption"></div>'));
+
+ // Process caption function
+ var processCaption = function(settings){
+ var nivoCaption = $('.nivo-caption', slider);
+ if(vars.currentImage.attr('title') != '' && vars.currentImage.attr('title') != undefined){
+ var title = vars.currentImage.attr('title');
+ if(title.substr(0,1) == '#') title = $(title).html();
+
+ if(nivoCaption.css('display') == 'block'){
+ setTimeout(function(){
+ nivoCaption.html(title);
+ }, settings.animSpeed);
+ } else {
+ nivoCaption.html(title);
+ nivoCaption.stop().fadeIn(settings.animSpeed);
+ }
+ } else {
+ nivoCaption.stop().fadeOut(settings.animSpeed);
+ }
+ }
+
+ //Process initial caption
+ processCaption(settings);
+
+ // In the words of Super Mario "let's a go!"
+ var timer = 0;
+ if(!settings.manualAdvance && kids.length > 1){
+ timer = setInterval(function(){ nivoRun(slider, kids, settings, false); }, settings.pauseTime);
+ }
+
+ // Add Direction nav
+ if(settings.directionNav){
+ slider.append('<div class="nivo-directionNav"><a class="nivo-prevNav">'+ settings.prevText +'</a><a class="nivo-nextNav">'+ settings.nextText +'</a></div>');
+
+ $(slider).on('click', 'a.nivo-prevNav', function(){
+ if(vars.running) { return false; }
+ clearInterval(timer);
+ timer = '';
+ vars.currentSlide -= 2;
+ nivoRun(slider, kids, settings, 'prev');
+ });
+
+ $(slider).on('click', 'a.nivo-nextNav', function(){
+ if(vars.running) { return false; }
+ clearInterval(timer);
+ timer = '';
+ nivoRun(slider, kids, settings, 'next');
+ });
+ }
+
+ // Add Control nav
+ if(settings.controlNav){
+ vars.controlNavEl = $('<div class="nivo-controlNav"></div>');
+ slider.after(vars.controlNavEl);
+ for(var i = 0; i < kids.length; i++){
+ if(settings.controlNavThumbs){
+ vars.controlNavEl.addClass('nivo-thumbs-enabled');
+ var child = kids.eq(i);
+ if(!child.is('img')){
+ child = child.find('img:first');
+ }
+ if(child.attr('data-thumb')) vars.controlNavEl.append('<a class="nivo-control" rel="'+ i +'"><img src="'+ child.attr('data-thumb') +'" alt="" /></a>');
+ } else {
+ vars.controlNavEl.append('<a class="nivo-control" rel="'+ i +'">'+ (i + 1) +'</a>');
+ }
+ }
+
+ //Set initial active link
+ $('a:eq('+ vars.currentSlide +')', vars.controlNavEl).addClass('active');
+
+ $('a', vars.controlNavEl).on('click', function(){
+ if(vars.running) return false;
+ if($(this).hasClass('active')) return false;
+ clearInterval(timer);
+ timer = '';
+ sliderImg.attr({
+ src : vars.currentImage.attr('src'),
+ alt : vars.currentImage.attr('alt')
+ });
+ vars.currentSlide = $(this).attr('rel') - 1;
+ nivoRun(slider, kids, settings, 'control');
+ });
+ }
+
+ //For pauseOnHover setting
+ if(settings.pauseOnHover){
+ slider.on('hover',function(){
+ vars.paused = true;
+ clearInterval(timer);
+ timer = '';
+ }, function(){
+ vars.paused = false;
+ // Restart the timer
+ if(timer === '' && !settings.manualAdvance){
+ timer = setInterval(function(){ nivoRun(slider, kids, settings, false); }, settings.pauseTime);
+ }
+ });
+ }
+
+ // Event when Animation finishes
+ slider.on('nivo:animFinished', function(){
+ sliderImg.attr({
+ src : vars.currentImage.attr('src'),
+ alt : vars.currentImage.attr('alt')
+ });
+ vars.running = false;
+ // Hide child links
+ $(kids).each(function(){
+ if($(this).is('a')){
+ $(this).css('display','none');
+ }
+ });
+ // Show current link
+ if($(kids[vars.currentSlide]).is('a')){
+ $(kids[vars.currentSlide]).css('display','block');
+ }
+ // Restart the timer
+ if(timer === '' && !vars.paused && !settings.manualAdvance){
+ timer = setInterval(function(){ nivoRun(slider, kids, settings, false); }, settings.pauseTime);
+ }
+ // Trigger the afterChange callback
+ settings.afterChange.call(this);
+ });
+
+ // Add slices for slice animations
+ var createSlices = function(slider, settings, vars) {
+ if($(vars.currentImage).parent().is('a')) $(vars.currentImage).parent().css('display','block');
+ $('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').width(slider.width()).css('visibility', 'hidden').show();
+ var sliceHeight = ($('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').parent().is('a')) ? $('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').parent().height() : $('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').height();
+
+ for(var i = 0; i < settings.slices; i++){
+ var sliceWidth = Math.round(slider.width()/settings.slices);
+
+ if(i === settings.slices-1){
+ slider.append(
+ $('<div class="nivo-slice" name="'+i+'"><img src="'+ vars.currentImage.attr('src') +'" style="position:absolute; width:'+ slider.width() +'px; height:auto; display:block !important; top:0; left:-'+ ((sliceWidth + (i * sliceWidth)) - sliceWidth) +'px;" /></div>').css({
+ left:(sliceWidth*i)+'px',
+ width:(slider.width()-(sliceWidth*i))+'px',
+ height:sliceHeight+'px',
+ opacity:'0',
+ overflow:'hidden'
+ })
+ );
+ } else {
+ slider.append(
+ $('<div class="nivo-slice" name="'+i+'"><img src="'+ vars.currentImage.attr('src') +'" style="position:absolute; width:'+ slider.width() +'px; height:auto; display:block !important; top:0; left:-'+ ((sliceWidth + (i * sliceWidth)) - sliceWidth) +'px;" /></div>').css({
+ left:(sliceWidth*i)+'px',
+ width:sliceWidth+'px',
+ height:sliceHeight+'px',
+ opacity:'0',
+ overflow:'hidden'
+ })
+ );
+ }
+ }
+
+ $('.nivo-slice', slider).height(sliceHeight);
+ sliderImg.stop().animate({
+ height: $(vars.currentImage).height()
+ }, settings.animSpeed);
+ };
+
+ // Add boxes for box animations
+ var createBoxes = function(slider, settings, vars){
+ if($(vars.currentImage).parent().is('a')) $(vars.currentImage).parent().css('display','block');
+ $('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').width(slider.width()).css('visibility', 'hidden').show();
+ var boxWidth = Math.round(slider.width()/settings.boxCols),
+ boxHeight = Math.round($('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').height() / settings.boxRows);
+
+
+ for(var rows = 0; rows < settings.boxRows; rows++){
+ for(var cols = 0; cols < settings.boxCols; cols++){
+ if(cols === settings.boxCols-1){
+ slider.append(
+ $('<div class="nivo-box" name="'+ cols +'" rel="'+ rows +'"><img src="'+ vars.currentImage.attr('src') +'" style="position:absolute; width:'+ slider.width() +'px; height:auto; display:block; top:-'+ (boxHeight*rows) +'px; left:-'+ (boxWidth*cols) +'px;" /></div>').css({
+ opacity:0,
+ left:(boxWidth*cols)+'px',
+ top:(boxHeight*rows)+'px',
+ width:(slider.width()-(boxWidth*cols))+'px'
+
+ })
+ );
+ $('.nivo-box[name="'+ cols +'"]', slider).height($('.nivo-box[name="'+ cols +'"] img', slider).height()+'px');
+ } else {
+ slider.append(
+ $('<div class="nivo-box" name="'+ cols +'" rel="'+ rows +'"><img src="'+ vars.currentImage.attr('src') +'" style="position:absolute; width:'+ slider.width() +'px; height:auto; display:block; top:-'+ (boxHeight*rows) +'px; left:-'+ (boxWidth*cols) +'px;" /></div>').css({
+ opacity:0,
+ left:(boxWidth*cols)+'px',
+ top:(boxHeight*rows)+'px',
+ width:boxWidth+'px'
+ })
+ );
+ $('.nivo-box[name="'+ cols +'"]', slider).height($('.nivo-box[name="'+ cols +'"] img', slider).height()+'px');
+ }
+ }
+ }
+
+ sliderImg.stop().animate({
+ height: $(vars.currentImage).height()
+ }, settings.animSpeed);
+ };
+
+ // Private run method
+ var nivoRun = function(slider, kids, settings, nudge){
+ // Get our vars
+ var vars = slider.data('nivo:vars');
+
+ // Trigger the lastSlide callback
+ if(vars && (vars.currentSlide === vars.totalSlides - 1)){
+ settings.lastSlide.call(this);
+ }
+
+ // Stop
+ if((!vars || vars.stop) && !nudge) { return false; }
+
+ // Trigger the beforeChange callback
+ settings.beforeChange.call(this);
+
+ // Set current background before change
+ if(!nudge){
+ sliderImg.attr('src', vars.currentImage.attr('src'));
+ } else {
+ if(nudge === 'prev'){
+ sliderImg.attr('src', vars.currentImage.attr('src'));
+ }
+ if(nudge === 'next'){
+ sliderImg.attr('src', vars.currentImage.attr('src'));
+ }
+ }
+
+ vars.currentSlide++;
+ // Trigger the slideshowEnd callback
+ if(vars.currentSlide === vars.totalSlides){
+ vars.currentSlide = 0;
+ settings.slideshowEnd.call(this);
+ }
+ if(vars.currentSlide < 0) { vars.currentSlide = (vars.totalSlides - 1); }
+ // Set vars.currentImage
+ if($(kids[vars.currentSlide]).is('img')){
+ vars.currentImage = $(kids[vars.currentSlide]);
+ } else {
+ vars.currentImage = $(kids[vars.currentSlide]).find('img:first');
+ }
+
+ // Set active links
+ if(settings.controlNav){
+ $('a', vars.controlNavEl).removeClass('active');
+ $('a:eq('+ vars.currentSlide +')', vars.controlNavEl).addClass('active');
+ }
+
+ // Process caption
+ processCaption(settings);
+
+ // Remove any slices from last transition
+ $('.nivo-slice', slider).remove();
+
+ // Remove any boxes from last transition
+ $('.nivo-box', slider).remove();
+
+ var currentEffect = settings.effect,
+ anims = '';
+
+ // Generate random effect
+ if(settings.effect === 'random'){
+ anims = new Array('sliceDownRight','sliceDownLeft','sliceUpRight','sliceUpLeft','sliceUpDown','sliceUpDownLeft','fold','fade',
+ 'boxRandom','boxRain','boxRainReverse','boxRainGrow','boxRainGrowReverse');
+ currentEffect = anims[Math.floor(Math.random()*(anims.length + 1))];
+ if(currentEffect === undefined) { currentEffect = 'fade'; }
+ }
+
+ // Run random effect from specified set (eg: effect:'fold,fade')
+ if(settings.effect.indexOf(',') !== -1){
+ anims = settings.effect.split(',');
+ currentEffect = anims[Math.floor(Math.random()*(anims.length))];
+ if(currentEffect === undefined) { currentEffect = 'fade'; }
+ }
+
+ // Custom transition as defined by "data-transition" attribute
+ if(vars.currentImage.attr('data-transition')){
+ currentEffect = vars.currentImage.attr('data-transition');
+ }
+
+ // Run effects
+ vars.running = true;
+ var timeBuff = 0,
+ i = 0,
+ slices = '',
+ firstSlice = '',
+ totalBoxes = '',
+ boxes = '';
+
+ if(currentEffect === 'sliceDown' || currentEffect === 'sliceDownRight' || currentEffect === 'sliceDownLeft'){
+ createSlices(slider, settings, vars);
+ timeBuff = 0;
+ i = 0;
+ slices = $('.nivo-slice', slider);
+ if(currentEffect === 'sliceDownLeft') { slices = $('.nivo-slice', slider)._reverse(); }
+
+ slices.each(function(){
+ var slice = $(this);
+ slice.css({ 'top': '0px' });
+ if(i === settings.slices-1){
+ setTimeout(function(){
+ slice.animate({opacity:'1.0' }, settings.animSpeed, '', function(){ slider.trigger('nivo:animFinished'); });
+ }, (100 + timeBuff));
+ } else {
+ setTimeout(function(){
+ slice.animate({opacity:'1.0' }, settings.animSpeed);
+ }, (100 + timeBuff));
+ }
+ timeBuff += 50;
+ i++;
+ });
+ } else if(currentEffect === 'sliceUp' || currentEffect === 'sliceUpRight' || currentEffect === 'sliceUpLeft'){
+ createSlices(slider, settings, vars);
+ timeBuff = 0;
+ i = 0;
+ slices = $('.nivo-slice', slider);
+ if(currentEffect === 'sliceUpLeft') { slices = $('.nivo-slice', slider)._reverse(); }
+
+ slices.each(function(){
+ var slice = $(this);
+ slice.css({ 'bottom': '0px' });
+ if(i === settings.slices-1){
+ setTimeout(function(){
+ slice.animate({opacity:'1.0' }, settings.animSpeed, '', function(){ slider.trigger('nivo:animFinished'); });
+ }, (100 + timeBuff));
+ } else {
+ setTimeout(function(){
+ slice.animate({opacity:'1.0' }, settings.animSpeed);
+ }, (100 + timeBuff));
+ }
+ timeBuff += 50;
+ i++;
+ });
+ } else if(currentEffect === 'sliceUpDown' || currentEffect === 'sliceUpDownRight' || currentEffect === 'sliceUpDownLeft'){
+ createSlices(slider, settings, vars);
+ timeBuff = 0;
+ i = 0;
+ var v = 0;
+ slices = $('.nivo-slice', slider);
+ if(currentEffect === 'sliceUpDownLeft') { slices = $('.nivo-slice', slider)._reverse(); }
+
+ slices.each(function(){
+ var slice = $(this);
+ if(i === 0){
+ slice.css('top','0px');
+ i++;
+ } else {
+ slice.css('bottom','0px');
+ i = 0;
+ }
+
+ if(v === settings.slices-1){
+ setTimeout(function(){
+ slice.animate({opacity:'1.0' }, settings.animSpeed, '', function(){ slider.trigger('nivo:animFinished'); });
+ }, (100 + timeBuff));
+ } else {
+ setTimeout(function(){
+ slice.animate({opacity:'1.0' }, settings.animSpeed);
+ }, (100 + timeBuff));
+ }
+ timeBuff += 50;
+ v++;
+ });
+ } else if(currentEffect === 'fold'){
+ createSlices(slider, settings, vars);
+ timeBuff = 0;
+ i = 0;
+
+ $('.nivo-slice', slider).each(function(){
+ var slice = $(this);
+ var origWidth = slice.width();
+ slice.css({ top:'0px', width:'0px' });
+ if(i === settings.slices-1){
+ setTimeout(function(){
+ slice.animate({ width:origWidth, opacity:'1.0' }, settings.animSpeed, '', function(){ slider.trigger('nivo:animFinished'); });
+ }, (100 + timeBuff));
+ } else {
+ setTimeout(function(){
+ slice.animate({ width:origWidth, opacity:'1.0' }, settings.animSpeed);
+ }, (100 + timeBuff));
+ }
+ timeBuff += 50;
+ i++;
+ });
+ } else if(currentEffect === 'fade'){
+ createSlices(slider, settings, vars);
+
+ firstSlice = $('.nivo-slice:first', slider);
+ firstSlice.css({
+ 'width': slider.width() + 'px'
+ });
+
+ firstSlice.animate({ opacity:'1.0' }, (settings.animSpeed*2), '', function(){ slider.trigger('nivo:animFinished'); });
+ } else if(currentEffect === 'slideInRight'){
+ createSlices(slider, settings, vars);
+
+ firstSlice = $('.nivo-slice:first', slider);
+ firstSlice.css({
+ 'width': '0px',
+ 'opacity': '1'
+ });
+
+ firstSlice.animate({ width: slider.width() + 'px' }, (settings.animSpeed*2), '', function(){ slider.trigger('nivo:animFinished'); });
+ } else if(currentEffect === 'slideInLeft'){
+ createSlices(slider, settings, vars);
+
+ firstSlice = $('.nivo-slice:first', slider);
+ firstSlice.css({
+ 'width': '0px',
+ 'opacity': '1',
+ 'left': '',
+ 'right': '0px'
+ });
+
+ firstSlice.animate({ width: slider.width() + 'px' }, (settings.animSpeed*2), '', function(){
+ // Reset positioning
+ firstSlice.css({
+ 'left': '0px',
+ 'right': ''
+ });
+ slider.trigger('nivo:animFinished');
+ });
+ } else if(currentEffect === 'boxRandom'){
+ createBoxes(slider, settings, vars);
+
+ totalBoxes = settings.boxCols * settings.boxRows;
+ i = 0;
+ timeBuff = 0;
+
+ boxes = shuffle($('.nivo-box', slider));
+ boxes.each(function(){
+ var box = $(this);
+ if(i === totalBoxes-1){
+ setTimeout(function(){
+ box.animate({ opacity:'1' }, settings.animSpeed, '', function(){ slider.trigger('nivo:animFinished'); });
+ }, (100 + timeBuff));
+ } else {
+ setTimeout(function(){
+ box.animate({ opacity:'1' }, settings.animSpeed);
+ }, (100 + timeBuff));
+ }
+ timeBuff += 20;
+ i++;
+ });
+ } else if(currentEffect === 'boxRain' || currentEffect === 'boxRainReverse' || currentEffect === 'boxRainGrow' || currentEffect === 'boxRainGrowReverse'){
+ createBoxes(slider, settings, vars);
+
+ totalBoxes = settings.boxCols * settings.boxRows;
+ i = 0;
+ timeBuff = 0;
+
+ // Split boxes into 2D array
+ var rowIndex = 0;
+ var colIndex = 0;
+ var box2Darr = [];
+ box2Darr[rowIndex] = [];
+ boxes = $('.nivo-box', slider);
+ if(currentEffect === 'boxRainReverse' || currentEffect === 'boxRainGrowReverse'){
+ boxes = $('.nivo-box', slider)._reverse();
+ }
+ boxes.each(function(){
+ box2Darr[rowIndex][colIndex] = $(this);
+ colIndex++;
+ if(colIndex === settings.boxCols){
+ rowIndex++;
+ colIndex = 0;
+ box2Darr[rowIndex] = [];
+ }
+ });
+
+ // Run animation
+ for(var cols = 0; cols < (settings.boxCols * 2); cols++){
+ var prevCol = cols;
+ for(var rows = 0; rows < settings.boxRows; rows++){
+ if(prevCol >= 0 && prevCol < settings.boxCols){
+ /* Due to some weird JS bug with loop vars
+ being used in setTimeout, this is wrapped
+ with an anonymous function call */
+ (function(row, col, time, i, totalBoxes) {
+ var box = $(box2Darr[row][col]);
+ var w = box.width();
+ var h = box.height();
+ if(currentEffect === 'boxRainGrow' || currentEffect === 'boxRainGrowReverse'){
+ box.width(0).height(0);
+ }
+ if(i === totalBoxes-1){
+ setTimeout(function(){
+ box.animate({ opacity:'1', width:w, height:h }, settings.animSpeed/1.3, '', function(){ slider.trigger('nivo:animFinished'); });
+ }, (100 + time));
+ } else {
+ setTimeout(function(){
+ box.animate({ opacity:'1', width:w, height:h }, settings.animSpeed/1.3);
+ }, (100 + time));
+ }
+ })(rows, prevCol, timeBuff, i, totalBoxes);
+ i++;
+ }
+ prevCol--;
+ }
+ timeBuff += 100;
+ }
+ }
+ };
+
+ // Shuffle an array
+ var shuffle = function(arr){
+ for(var j, x, i = arr.length; i; j = parseInt(Math.random() * i, 10), x = arr[--i], arr[i] = arr[j], arr[j] = x);
+ return arr;
+ };
+
+ // For debugging
+ var trace = function(msg){
+ if(this.console && typeof console.log !== 'undefined') { console.log(msg); }
+ };
+
+ // Start / Stop
+ this.stop = function(){
+ if(!$(element).data('nivo:vars').stop){
+ $(element).data('nivo:vars').stop = true;
+ trace('Stop Slider');
+ }
+ };
+
+ this.start = function(){
+ if($(element).data('nivo:vars').stop){
+ $(element).data('nivo:vars').stop = false;
+ trace('Start Slider');
+ }
+ };
+
+ // Trigger the afterLoad callback
+ settings.afterLoad.call(this);
+
+ return this;
+ };
+
+ $.fn.nivoSlider = function(options) {
+ return this.each(function(key, value){
+ var element = $(this);
+ // Return early if this element already has a plugin instance
+ if (element.data('nivoslider')) { return element.data('nivoslider'); }
+ // Pass options to plugin constructor
+ var nivoslider = new NivoSlider(this, options);
+ // Store plugin object in this element's data
+ element.data('nivoslider', nivoslider);
+ });
+ };
+
+ //Default settings
+ $.fn.nivoSlider.defaults = {
+ effect: 'random',
+ slices: 15,
+ boxCols: 8,
+ boxRows: 4,
+ animSpeed: 500,
+ pauseTime: 3000,
+ startSlide: 0,
+ directionNav: true,
+ controlNav: true,
+ controlNavThumbs: false,
+ pauseOnHover: true,
+ manualAdvance: false,
+ prevText: 'Prev',
+ nextText: 'Next',
+ randomStart: false,
+ beforeChange: function(){},
+ afterChange: function(){},
+ slideshowEnd: function(){},
+ lastSlide: function(){},
+ afterLoad: function(){}
+ };
+
+ $.fn._reverse = [].reverse;
+
+})(jQuery);
+/*FIN*/
diff --git a/themes/mantra/style.css b/themes/mantra/style.css
index fe8ae72d..94d90206 100644
--- a/themes/mantra/style.css
+++ b/themes/mantra/style.css
@@ -4,13 +4,15 @@ Theme URI: https://www.cryoutcreations.eu/wordpress-themes/mantra
Description: Mantra is a do-it-yourself WordPress theme, featuring a pack of over 100 customization options and easy to use tweaks capable of tuning WordPress to your very specific needs and likes. With the help of a simple and efficient user interface you can customize everything:the layout (1,2 or 3 columns), total and partial site widths, colors (all texts, links, backgrounds etc.), fonts (over 35 font-families plus all Google Fonts), text and header sizes, post metas, post excerpts, post formats, header and background images, custom menus, 27 social media links and icons, pins, bullets and much much more. With a fully responsive layout,a customizable showcase presentation page, animated slider, magazine and blog layouts, 8 widget areas, modern graphics and an easy and intuitive admin section, you can start creating your dream site right now.
Author: Cryout Creations
Author URI: https://www.cryoutcreations.eu
-Version: 3.2.0
+Version: 3.3.1
+Tested Up To: 5.7
+Requires PHP: 5.4
License: GNU General Public License v2.0
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: one-column, two-columns, three-columns, right-sidebar, left-sidebar, footer-widgets, grid-layout, custom-background, custom-colors, custom-header, custom-menu, featured-image-header, featured-images, front-page-post-form, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready, blog, entertainment, news
Text domain: mantra
-Copyright (c) 2011-2019 Cryout Creations
+Copyright (c) 2011-2021 Cryout Creations
https://www.cryoutcreations.eu
*/