" . htmlentities($success) . " ";
} // if(isset($success) && !empty($success) ) {
} // function yydev_phone_btn_echo_success_message_if_exists($success) {
function yydev_phone_btn_echo_error_message_if_exists($error) {
if(isset($error) && !empty($error) ) {
echo "Error: " . $error . "
";
} // if(isset($_GET['error-message'])) {
} // function yydev_phone_btn_echo_error_message_if_exists() {
// ================================================
// Echoing Message if it's exists
// ================================================
function yydev_phone_btn_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_phone_btn_find_page_id() {
// ==================================================================
// redirect the page using the path you provided
// ==================================================================
function yydev_phone_btn_redirections_page($link) {
header("Location: {$link}");
exit;
} // function yydev_phone_btn_redirections_page($path) {