This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Polylang Shortcode - https://wordpress.org/plugins/polylang/ | |
* Add this code in your functions.php | |
* Put shortcode [polylang_langswitcher] to post/page for display flags | |
* | |
* @return string | |
*/ | |
function custom_polylang_langswitcher() { | |
$output = ''; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function is_site_admin(){ | |
return in_array('administrator', wp_get_current_user()->roles); | |
} | |
add_shortcode('output_data', 'solution_for_rgb_code_test_task_by_kyatipov'); | |
function solution_for_rgb_code_test_task_by_kyatipov() { | |
// Specification from task |