$value ) { $key = strtolower( trim( $key ) ); if ( ! preg_match( '/^[a-z_:][a-z_:.0-9-]*$/', $key ) ) { continue; } $value = trim( $value ); if ( '' !== $value ) { $html .= sprintf( ' %s="%s"', $key, esc_attr( $value ) ); } } $html = trim( $html ); return $html; } function wp3cxc2c_link( $url, $anchor_text, $args = '' ) { $defaults = array( 'id' => '', 'class' => '', ); $args = wp_parse_args( $args, $defaults ); $args = array_intersect_key( $args, $defaults ); $atts = wp3cxc2c_format_atts( $args ); $link = sprintf( '%2$s', esc_url( $url ), esc_html( $anchor_text ), $atts ? ( ' ' . $atts ) : '' ); return $link; } function wp3cxc2c_register_post_types() { if ( class_exists( 'WP3CXC2C_ClickToTalkForm' ) ) { WP3CXC2C_ClickToTalkForm::register_post_type(); return true; } else { return false; } }