| | 1097 | * Adds blank string to all HTML A empty elements in content. |
| | 1098 | * |
| | 1099 | * @since 2.9.2 |
| | 1100 | * |
| | 1101 | * @param string $text Content that may contain HTML A elements. |
| | 1102 | * @return string Converted content. |
| | 1103 | */ |
| | 1104 | function fill_empty_links($text){ |
| | 1105 | $text = preg_replace_callback('|<a (.+?)>\s*</a>|i', 'fill_empty_links_callback', $text); |
| | 1106 | return $text; |
| | 1107 | } |
| | 1108 | |
| | 1109 | /** |
| | 1110 | * Callback to used to add blank string to HTML A empty element. |
| | 1111 | * |
| | 1112 | * @since 2.9.2 |
| | 1113 | * |
| | 1114 | * @param array $matches Single Match |
| | 1115 | * @return string HTML A Element with blank text. |
| | 1116 | */ |
| | 1117 | function fill_empty_links_callback( $matches ) { |
| | 1118 | $text = $matches[1]; |
| | 1119 | return "<a $text >blank</a>"; |
| | 1120 | } |
| | 1121 | |
| | 1122 | /** |