Skip to content
WordPress.org
News
Download & Extend
Get WordPress
Themes
Patterns
Plugins
Mobile
Hosting
Openverse ↗︎
Learn
Learn WordPress
Documentation
Forums
Developers
WordPress.tv ↗︎
Community
Make WordPress
Photo Directory
Five for the Future
WordCamp ↗︎
Meetups ↗︎
Job Board ↗︎
About
About WordPress
Showcase
Enterprise
Gutenberg ↗︎
WordPress 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 #16843
Ticket #16843
: test-16843.php
File test-16843.php,
262 bytes
(added by
scribu
,
13 years ago
)
Line
1
<?php
2
3
add_action
(
'init'
,
function
()
{
4
register_post_type
(
'foo'
,
array
(
5
'has_archive'
=>
true
,
6
'public'
=>
true
,
7
'label'
=>
'Foo'
,
8
)
);
9
10
global
$wp_rewrite
;
11
12
var_dump
(
wp_unique_post_slug
(
$wp_rewrite
->
pagination_base
,
1
,
'publish'
,
'foo'
,
0
)
);
13
});
Trac UI Preferences
Download in other formats:
Original Format