| @@ 104-116 (lines=13) @@ | ||
| 101 | * |
|
| 102 | * @param array $post_types Custom post types to be registered. |
|
| 103 | */ |
|
| 104 | private static function init_post_types( $post_types ) { |
|
| 105 | if ( is_array( $post_types ) ) { |
|
| 106 | foreach ( $post_types as $type => $options ) { |
|
| 107 | self::add_post_type( |
|
| 108 | $type, |
|
| 109 | $options['config'], |
|
| 110 | $options['singular'], |
|
| 111 | $options['multiple'] |
|
| 112 | ); |
|
| 113 | } |
|
| 114 | } |
|
| 115 | } |
|
| 116 | ||
| 117 | /** |
|
| 118 | * Wrapper for register_post_type(). |
|
| 119 | * |
|
| @@ 151-164 (lines=14) @@ | ||
| 148 | * |
|
| 149 | * @param array $taxonomies Taxonomies to be registered. |
|
| 150 | */ |
|
| 151 | private static function init_taxonomies( $taxonomies ) { |
|
| 152 | if ( is_array( $taxonomies ) ) { |
|
| 153 | foreach ( $taxonomies as $type => $options ) { |
|
| 154 | self::add_taxonomy( |
|
| 155 | $type, |
|
| 156 | $options['for'], |
|
| 157 | $options['config'], |
|
| 158 | $options['singular'], |
|
| 159 | $options['multiple'] |
|
| 160 | ); |
|
| 161 | } |
|
| 162 | } |
|
| 163 | } |
|
| 164 | ||
| 165 | /** |
|
| 166 | * Wrapper for register_taxonomy(). |
|
| 167 | * |
|