PluginProbe
Post Duplicator / 2.26
Post Duplicator v2.26
3.0.16 trunk 1.1 2.0 2.2 2.20 2.21 2.22 2.23 2.24 2.25 2.26 2.27 2.28 2.29 2.3 2.30 2.31 2.32 2.33 2.34 2.35 2.36 2.37 2.38 All 52 releases
post-duplicator / includes / helpers.php

helpers.php in Post Duplicator 2.26, at includes/helpers.php

28 lines 725 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /* --------------------------------------------------------- */
4 /* !Return an array of post types - 2.12 */
5 /* --------------------------------------------------------- */
6
7 if( !function_exists('mtphr_post_duplicator_post_types') ) {
8 function mtphr_post_duplicator_post_types() {
9
10 $post_types = array('same' => __('Same as original', 'post-duplicator'));
11 $pts = get_post_types(array(), 'objects');
12
13 // Remove framework post types
14 unset( $pts['attachment'] );
15 unset( $pts['revision'] );
16 unset( $pts['nav_menu_item'] );
17 unset( $pts['wooframework'] );
18
19 if( is_array($pts) && count($pts) > 0 ) {
20 foreach( $pts as $i=>$pt ) {
21 $post_types[$i] = $pt->labels->singular_name;
22 }
23 }
24
25 return $post_types;
26 }
27 }
28