Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

nightly build 6

  • Loading branch information...
commit c72914f534e1d3bba7681e839f5c832358fb299a 1 parent 3404129
@Adrienk Adrienk authored
View
18 AisisCore/AdminPanel/Modules/AisisOptions.php
@@ -52,24 +52,6 @@
</div>
<div class="contents">
- <?php
- if(get_option('admin_404_banner_err_bool') == 'true'){
- ?><div class="err">We cannot allow you to save empty fields. So we set the default text.</div>
- <script>
- $().toastmessage('showErrorToast', "We cannot allow you to set empty fields. Instead we set the default text so the user sees something.");
- </script>
- <?php
- update_option('admin_404_banner_err_bool', '', '', 'yes');
- }elseif(get_option('admin_404_banner_err_bool') == 'false'){
- ?>
- <div class="success">Check out your site to see the changes to the default text!</div>
- <script>
- $().toastmessage('showSuccessToast', "We have changed the default text for the various sections as shown bellow. Check out your site to see your changes.");
- </script>
- <?php
- update_option('admin_404_banner_err_bool', '', '', 'yes');
- }
- echo get_settings_errors('aisis_default_404_banner_setting');?>
<div class="notice">The following is a set of hooks that deisplay default content fopr things like authors and categories when the text for those have not been set. That is to say if an author does not set their bio then the <strong>aisis_author_default_text and aisis_loop_single_author_blurb_default</strong> will be used to display default text.</div>
<div class="optionsSection">
<?php $aisis_forum_url = 'options.php?redirect_to=/wp-admin/admin.php?page=aisis-core-options' ?>
View
10 AisisCore/AdminPanel/Modules/Options/Admin-AisisCoreOptions.php
@@ -152,7 +152,7 @@ function aisis_default_404_banner_message(){
*/
function aisis_default_404_message(){
$options = get_option('aisis_default_404_message_setting');
- ?><textarea id="404_theme_message" name="aisis_default_404_message_setting[404_theme_message]" rows="4" cols="60"><?php if(!isset($options['404_theme_message'])){aisis_404_err_message(); }else{echo $options['404_theme_message'];}?></textarea><?php
+ ?><textarea id="404_theme_message" name="aisis_default_404_message_setting[err_theme_message]" rows="4" cols="60"><?php if(!isset($options['err_theme_message'])){aisis_404_err_message(); }else{echo $options['err_theme_message'];}?></textarea><?php
}
/**
@@ -221,15 +221,15 @@ function aisis_404_banner_validation($input){
}
function aisis_404_message_validation($input){
- $options = get_option('aisis_default_404_banner_setting');
- if($input['404_theme_message'] != ''){
- $options['404_theme_message'] = $input['404_theme_message'];
+ $options = get_option('aisis_default_404_message_setting');
+ if(trim($input['err_theme_message']) != ''){
+ $options['err_theme_message'] = $input['err_theme_message'];
update_option('admin_404_message_err_bool','false','','yes');
return $options;
}else{
add_settings_error(
'aisis_default_404_message_setting',
- '404_theme_message',
+ 'err_theme_message',
'Error Thrown 2.',
'error'
);
View
21 AisisCore/AisisHooks.php
@@ -110,12 +110,10 @@ function default_aisis_404_err_message_banner(){
function default_aisis_404_err_message(){
$options = get_option('aisis_default_404_message_section');
if(!isset($options['404_theme_message'])){
- ?>
- <h1>404</h1>
- <p class="ErrorMessage">Seems the content you were searching for doesn not exist. Please try searching for it.</p>
- <?php
+ ?><h1>404</h1><p class="ErrorMessage">Seems the content you were searching for doesn not exist. Please try searching for it.</p>
+ <?php
}else{
- echo $options['404_theme_message'];
+ echo $options['404_theme_message'];
}
}
@@ -123,11 +121,9 @@ function default_aisis_404_err_message(){
function deafualt_aisis_author_default_text(){
$options = get_option('aisis_default_author_text_setting');
if(!isset($options['default_author_text'])){
- echo "This author is a writer and a contributor to the blog. They enjoy writing various
- content and articles for the blog its self and we are proud to have them
- here and apart of our team :D";
+ echo "This author is a writer and a contributor to the blog. They enjoy writing various content and articles for the blog its self and we are proud to have them here and apart of our team :D";
}else{
- echo $options['default_author_text'];
+ echo $options['default_author_text'];
}
}
@@ -135,10 +131,9 @@ function deafualt_aisis_author_default_text(){
function default_aisis_category_default_text(){
$options = get_option('aisis_default_category_text_setting');
if(!isset($options['default_author_text'])){
- echo "Welcome to this category " . single_cat_title() . " where we hope that we present you
- with the latest and greates in content from this section. Please enjoy your stay :D";
+ echo "Welcome to this category " . single_cat_title() . " where we hope that we present you with the latest and greates in content from this section. Please enjoy your stay :D";
}else{
- $options['default_author_text'];
+ $options['default_author_text'];
}
}
@@ -157,7 +152,7 @@ function default_aisis_default_footer_text(){
if(!isset($options['default_footer_text'])){
echo "Powered by WordPress | Aisis | Adam Balan - 2012";
}else{
- echo $options['default_footer_text'];
+ echo $options['default_footer_text'];
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.