WordPress.org
News
Showcase
Hosting
Extend
Themes
Plugins
Patterns
Blocks
Openverse
↗
︎
Learn
Learn WordPress
Documentation
Forums
Developers
WordPress.tv
↗
︎
Community
Make WordPress
Photo Directory
Five for the Future
Events
Job Board
↗
︎
About
About WordPress
Enterprise
Gutenberg
↗
︎
Swag Store
↗
︎
Get WordPress
Search Trac
Get WordPress
Make WordPress Core
Blog
Handbook
Tickets
Components
Browse Source
Trac Timeline
Create a New Ticket
Search:
Login
Notifications
Context Navigation
Back to Ticket #20444
Ticket #20444
: test-wpautop.php
File test-wpautop.php,
225 bytes
(added by
niallkennedy
,
12 years ago
)
wp-load and call wpautop with a single line div
Line
1
<?php
2
3
if
(
!
function_exists
(
'wpautop'
)
)
4
require_once
(
dirname
(
__FILE__
)
.
'/wp-load.php'
);
5
6
header
(
'Content-Type: text/plain'
,
true
);
7
8
var_dump
(
wpautop
(
'<div><p>Hello world</p><span>WordPress</span></div>'
)
);
9
10
?>
Trac UI Preferences
Download in other formats:
Original Format