" . htmlentities($_GET['message']) . " ";
} // if(isset($_GET['message'])) {
if(isset($_GET['error-message'])) {
echo "Error: " . htmlentities($_GET['error-message']) . "
";
} // if(isset($_GET['error-message'])) {
} // function yydev_accessibility_echo_message_if_exists() {
function yydev_accessibility_echo_success_message_if_exists($success) {
if(isset($success) && !empty($success) ) {
echo " " . htmlentities($success) . "
";
} // if(isset($success) && !empty($success) ) {
} // function yydev_accessibility_echo_success_message_if_exists($success) {
function yydev_accessibility_echo_error_message_if_exists($error) {
if(isset($error) && !empty($error) ) {
echo "Error: " . $error . "
";
} // if(isset($_GET['error-message'])) {
} // function yydev_accessibility_echo_error_message_if_exists() {
// ================================================
// Echoing Message if it's exists
// ================================================
function yydev_accessibility_find_page_id() {
global $wpdb;
$post_id_num = 0;
// in case of page or blog post
if( is_single() || is_page() ) {
$post_id_num = get_the_ID();
} // if( is_single() || is_page() ) {
// in case of static home page
if( is_home() ) {
$blog_page_id = get_option( 'page_for_posts' );
// incase the blog is on the home page
if( !empty($blog_page_id) ) {
$post_id_num = $blog_page_id;
} // if( $blog_page_id ) {
} // if( !empty($blog_page_id) ) {
return intval($post_id_num);
} // function yydev_accessibility_find_page_id() {
// ==================================================================
// redirect the page using the path you provided
// ==================================================================
function yydev_accessibility_redirections_page($link) {
header("Location: {$link}");
exit;
} // function yydev_accessibility_redirections_page($path) {