Skip to main content
deleted 2 characters in body
Source Link
Dealazer
  • 57
  • 1
  • 2

The correct answers to the above solution-question isare by else programming basic:

if( current_user_can('administrator')) { 

<!-- only administrator will see this message -->

} else { 

        if( current_user_canwp_get_current_user('editor')) {

<!-- logic thinking tells here but it is not here -->

} else {

<!-- only editor but no administrator will see this message -->

?>
<style type="text/css">#perhapsDIVremovalidentifier{
display:none;
</style>
}
<?php
} else {

<!-- the user is neither editor or administrator -->

}}  

Brief: The administrator is found, but if we push editor the administrator is as well found. So we just let the administrator pass through and identify the editor only.

Remember you should always use this code to call that above to minimize cpu code usage:

if(is_user_logged_in()){}

The correct answers to the above solution-question is by else programming basic:

if( current_user_can('administrator')) { 

<!-- only administrator will see this message -->

} else { 

        if( current_user_can('editor')) {

<!-- logic thinking tells here but it is not here -->

} else {

<!-- only editor but no administrator will see this message -->

?>
<style type="text/css">#perhapsDIVremovalidentifier{
display:none;
</style>
}
<?php
}}

Brief: The administrator is found, but if we push editor the administrator is as well found. So we just let the administrator pass through and identify the editor only.

The correct answers to the above solution-question are by else programming basic:

if( current_user_can('administrator')) { 

<!-- only administrator will see this message -->

} else { 

        if( wp_get_current_user('editor')) {

<!-- only editor but no administrator will see this message -->

?>
<style type="text/css">#perhapsDIVremovalidentifier{
display:none;
</style>
}
<?php
} else {

<!-- the user is neither editor or administrator -->

}}  

Brief: The administrator is found, but if we push editor the administrator is as well found. So we just let the administrator pass through and identify the editor only.

Remember you should always use this code to call that above to minimize cpu code usage:

if(is_user_logged_in()){}
deleted 2 characters in body
Source Link
Dealazer
  • 57
  • 1
  • 2

The correct answers to the above solution-question is by else programming basic:

if( current_user_can('administrator')) { 

<!-- only administrator will see this message -->

        }
  else {  

        if( current_user_can('editor')) {

<!-- logic thinking tells here but it is not here -->

} else {

<!-- only editor but no administrator will see this message -->

?>
<style type="text/css">#perhapsDIVremovalidentifier{
display:none;
</style>
}
<?php
}}

Brief: The administrator is found, but if we push editor the administrator is as well found. So we just let the administrator pass through and identify the editor only.

The correct answers to the above solution-question is by else programming basic:

if( current_user_can('administrator')) { 

<!-- only administrator will see this message -->

        }
 else { 
        if( current_user_can('editor')) {

<!-- logic thinking tells here but it is not here -->

} else {

<!-- only editor but no administrator will see this message -->

?>
<style type="text/css">#perhapsDIVremovalidentifier{
display:none;
</style>
}
<?php
}}

Brief: The administrator is found, but if we push editor the administrator is as well found. So we just let the administrator pass through and identify the editor only.

The correct answers to the above solution-question is by else programming basic:

if( current_user_can('administrator')) { 

<!-- only administrator will see this message -->

} else {  

        if( current_user_can('editor')) {

<!-- logic thinking tells here but it is not here -->

} else {

<!-- only editor but no administrator will see this message -->

?>
<style type="text/css">#perhapsDIVremovalidentifier{
display:none;
</style>
}
<?php
}}

Brief: The administrator is found, but if we push editor the administrator is as well found. So we just let the administrator pass through and identify the editor only.

added 49 characters in body
Source Link
Dealazer
  • 57
  • 1
  • 2

The correct answers to the above solution-question is by else programming basic:

if( current_user_can('administrator')) { 

<!-- only administrator will see this message -->

        }
else { 
        if( current_user_can('editor')) {

<!-- logic thinking tells here but it is not here -->

} else {

<!-- only editor but no administrator will see this message -->

?>
<style type="text/css">#perhapsDIVremovalidentifier{
display:none;
</style>
}
<?php

} else {

}}

Brief: The administrator is found, but if we push editor the administrator is as well found. So we just let the administrator pass through and identify the editor only.

The correct answers to the above solution-question is by else programming basic:

if( current_user_can('administrator')) { 

<!-- only administrator will see this message -->

        }
else { 
        if( current_user_can('editor')) {

<!-- only editor but no administrator will see this message -->

?>
<style type="text/css">#perhapsDIVremovalidentifier{
display:none;
</style>
}
<?php

} else {

}}

Brief: The administrator is found, but if we push editor the administrator is as well found. So we just let the administrator pass through and identify the editor only.

The correct answers to the above solution-question is by else programming basic:

if( current_user_can('administrator')) { 

<!-- only administrator will see this message -->

        }
else { 
        if( current_user_can('editor')) {

<!-- logic thinking tells here but it is not here -->

} else {

<!-- only editor but no administrator will see this message -->

?>
<style type="text/css">#perhapsDIVremovalidentifier{
display:none;
</style>
}
<?php
}}

Brief: The administrator is found, but if we push editor the administrator is as well found. So we just let the administrator pass through and identify the editor only.

added 5 characters in body
Source Link
Dealazer
  • 57
  • 1
  • 2
Loading
added Brief because commenter didn't know what this was about.
Source Link
Dealazer
  • 57
  • 1
  • 2
Loading
added Brief because commenter didn't know what this was about.
Source Link
Dealazer
  • 57
  • 1
  • 2
Loading
added Brief because commenter didn't know what this was about.
Source Link
Dealazer
  • 57
  • 1
  • 2
Loading
deleted 719 characters in body
Source Link
Dealazer
  • 57
  • 1
  • 2
Loading
added 61 characters in body
Source Link
Dealazer
  • 57
  • 1
  • 2
Loading
added 125 characters in body
Source Link
Dealazer
  • 57
  • 1
  • 2
Loading
Source Link
Dealazer
  • 57
  • 1
  • 2
Loading