├── .gitignore
├── Gruntfile.js
├── README.md
├── documentation-post-type.php
├── includes
├── class-dashboard-glancer.php
├── class-post-type-admin.php
├── class-post-type-registrations.php
└── class-post-type.php
├── languages
├── documentation-post-type-fr_FR.mo
├── documentation-post-type-fr_FR.po
└── documentation-post-type.pot
└── package.json
/.gitignore:
--------------------------------------------------------------------------------
1 | # OSX
2 | .DS_Store
3 | Icon
4 |
5 | # Node.js / Grunt
6 | node_modules
7 | .sass-cache
8 | npm-debug.log
--------------------------------------------------------------------------------
/Gruntfile.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | module.exports = function(grunt) {
3 |
4 | // load all tasks
5 | require('load-grunt-tasks')(grunt, {scope: 'devDependencies'});
6 |
7 | grunt.initConfig({
8 | pkg: grunt.file.readJSON('package.json'),
9 | makepot: {
10 | target: {
11 | options: {
12 | domainPath: '/languages/', // Where to save the POT file.
13 | potFilename: 'documentation-post-type.pot', // Name of the POT file.
14 | type: 'wp-plugin',
15 | updateTimestamp: true,
16 | exclude: [ 'includes/class-dashboard-glancer.php' ]
17 | }
18 | }
19 | }
20 | });
21 |
22 | grunt.registerTask( 'default', [
23 | 'makepot',
24 | ]);
25 |
26 | };
27 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## Documentation Post Type
2 |
3 | Creates a post type for "documentation". It meant primarily for product documentation, though you could adapt if for your own specific use.
4 |
5 | ### Description
6 |
7 | * Registers a "documentation" post type
8 | * Registers a "documentation-category" taxonomy
9 | * Registers a "documentation-tag" taxonomy
10 | * Registers a "product-tag" taxonomy
11 | * Adds the post count to the admin dashboard
12 | * Translation ready
13 |
14 | ### Requirements
15 |
16 | * WordPress 3.8 or higher
17 |
18 | ### Frequently Asked Questions
19 |
20 | #### Is this plugin on the WordPress repo?
21 |
22 | No. It's meant to be more of a white-label plugin to use for your own client projects.
23 |
24 | #### What is Gruntfile.js and package.json used for?
25 |
26 | This is how translation files (.pot) are built. If you have Grunt installed and need to generate a new translation file, just run `npm install` and then `grunt`. If i18n is not needed for your project, feel free to remove.
27 |
28 | #### Can I use this one my own site?
29 |
30 | Yes, go ahead. If you're also interested in having metaboxes, you may also want to look at [this project](https://github.com/devinsays/team-post-type).
31 |
32 | ### Credits
33 |
34 | Built by [Devin Price](http://www.wptheming.com/). The "Dashboard Glancer" class and much re-used code from the Portfolio Post Type plugin by [Gary Jones](http://gamajo.com/).
--------------------------------------------------------------------------------
/documentation-post-type.php:
--------------------------------------------------------------------------------
1 | init();
41 |
42 | /**
43 | * Adds styling to the dashboard for the post type and adds docs posts
44 | * to the "At a Glance" metabox.
45 | */
46 | if ( is_admin() ) {
47 |
48 | // Loads for users viewing the WordPress dashboard
49 | if ( ! class_exists( 'Dashboard_Glancer' ) ) {
50 | require plugin_dir_path( __FILE__ ) . 'includes/class-dashboard-glancer.php'; // WP 3.8
51 | }
52 |
53 | require plugin_dir_path( __FILE__ ) . 'includes/class-post-type-admin.php';
54 |
55 | $post_type_admin = new Documentation_Post_Type_Admin( $post_type_registrations );
56 | $post_type_admin->init();
57 |
58 | }
--------------------------------------------------------------------------------
/includes/class-dashboard-glancer.php:
--------------------------------------------------------------------------------
1 | unset_invalid_post_types( (array) $post_types );
59 |
60 | // If all given post types were invalid, bail now
61 | if ( ! $post_types ) {
62 | return;
63 | }
64 |
65 | // Register each combination of given post type and status
66 | foreach( $post_types as $post_type ) {
67 | foreach ( (array) $statuses as $status ) {
68 | $this->items[] = array(
69 | 'type' => $post_type,
70 | 'status' => $status, // No checks yet to see if status is valid
71 | );
72 | }
73 | }
74 | }
75 |
76 | /**
77 | * Show the items on the dashboard widget.
78 | *
79 | * @since 1.0.0
80 | */
81 | public function show() {
82 | foreach ( $this->items as $item ) {
83 | echo $this->get_single_item( $item );
84 | }
85 | // Reset items, so items aren't shown again if show() is re-called
86 | unset( $this->items );
87 | }
88 |
89 | /**
90 | * Check one or more post types to see if they are valid.
91 | *
92 | * @since 1.0.0
93 | *
94 | * @param array $post_types Each of the post types to check.
95 | *
96 | * @return array List of the given post types that are valid.
97 | */
98 | protected function unset_invalid_post_types( array $post_types ) {
99 | foreach( $post_types as $index => $post_type ) {
100 | $post_type_object = get_post_type_object( $post_type );
101 | if ( is_null( $post_type_object ) ) {
102 | unset( $post_types[ $index ] );
103 | }
104 | }
105 |
106 | return $post_types;
107 | }
108 |
109 | /**
110 | * Build and return the data and markup for a single item.
111 | *
112 | * If the item count is zero, return an empty string, to avoid visual clutter.
113 | *
114 | * @since 1.0.0
115 | *
116 | * @param array $item Registered item.
117 | *
118 | * @return string Markup, or empty string if item count is zero.
119 | */
120 | protected function get_single_item( array $item ) {
121 | $num_posts = wp_count_posts( $item['type'] );
122 | $count = $num_posts->$item['status'];
123 |
124 | if ( ! $count ) {
125 | return '';
126 | }
127 |
128 | $href = $this->get_link_url( $item );
129 | $text = number_format_i18n( $count ) . ' ' . $this->get_label( $item, $count );
130 | $text = $this->maybe_link( $text, $href );
131 |
132 | return $this->get_markup( $text, $item['type'] );
133 | }
134 |
135 | /**
136 | * Get the singular or plural label for an item.
137 | *
138 | * @since 1.0.0
139 | *
140 | * @param array $item Registered item.
141 | * @param int $count Number of items present in WP.
142 | *
143 | * @return string
144 | */
145 | protected function get_label( array $item, $count ) {
146 |
147 | $post_type_object = get_post_type_object( $item['type'] );
148 | if ( 1 === $count ) {
149 | $label = $post_type_object->labels->singular_name;
150 | } else {
151 | $label = $post_type_object->labels->name;
152 | }
153 |
154 | // Append status for non-publish statuses for disambiguation
155 | if ( 'publish' !== $item['status'] ) {
156 | $label .= ' (' . $item['status'] . ')';
157 | }
158 |
159 | return $label;
160 | }
161 |
162 | /**
163 | * Build the URL that linked items use.
164 | *
165 | * @since 1.0.0
166 | *
167 | * @param array $item Registered item.
168 | *
169 | * @return string Admin URL to view the entries of the given post type with the given status
170 | */
171 | public function get_link_url( array $item ) {
172 | return 'edit.php?post_status=' . $item['status'] . '&post_type=' . $item['type'];
173 | }
174 |
175 | /**
176 | * Wrap a glance item in a link, if the current user can edit posts.
177 | *
178 | * @since 1.0.0
179 | *
180 | * @param string $text Text to potentially wrap in a link.
181 | * @param string $href Link target.
182 | *
183 | * @return string Text wrapped in a link if current user can edit posts, or original text otherwise.
184 | */
185 | protected function maybe_link( $text, $href ) {
186 | if ( current_user_can( 'edit_posts' ) ) {
187 | return '' . $text . '';
188 | }
189 | return $text;
190 | }
191 |
192 | /**
193 | * Wrap number and text within list item markup.
194 | *
195 | * @since 1.0.0
196 | *
197 | * @param string $text Text to display. May be wrapped in a link.
198 | */
199 | protected function get_markup( $text, $post_type ) {
200 | return '
' . $text . '' . "\n";
201 | }
202 |
203 | }
--------------------------------------------------------------------------------
/includes/class-post-type-admin.php:
--------------------------------------------------------------------------------
1 | registration_handler = $registration_handler;
20 | }
21 |
22 | public function init() {
23 |
24 | // Add thumbnail support for this post type
25 | add_theme_support( 'post-thumbnails', array( $this->registration_handler->post_type ) );
26 |
27 | // Allow filtering of posts by taxonomy in the admin view
28 | add_action( 'restrict_manage_posts', array( $this, 'add_taxonomy_filters' ) );
29 |
30 | // Show post counts in the dashboard
31 | add_action( 'right_now_content_table_end', array( $this, 'add_rightnow_counts' ) );
32 | add_action( 'dashboard_glance_items', array( $this, 'add_glance_counts' ) );
33 |
34 | }
35 |
36 | /**
37 | * Add taxonomy filters to the post type list page.
38 | *
39 | * Code artfully lifted from http://pippinsplugins.com/
40 | *
41 | * @global string $typenow
42 | */
43 | public function add_taxonomy_filters() {
44 | global $typenow;
45 |
46 | // Must set this to the post type you want the filter(s) displayed on
47 | if ( $this->registration_handler->post_type !== $typenow ) {
48 | return;
49 | }
50 |
51 | foreach ( $this->registration_handler->taxonomies as $tax_slug ) {
52 | echo $this->build_taxonomy_filter( $tax_slug );
53 | }
54 | }
55 |
56 | /**
57 | * Build an individual dropdown filter.
58 | *
59 | * @param string $tax_slug Taxonomy slug to build filter for.
60 | *
61 | * @return string Markup, or empty string if taxonomy has no terms.
62 | */
63 | protected function build_taxonomy_filter( $tax_slug ) {
64 | $terms = get_terms( $tax_slug );
65 | if ( 0 == count( $terms ) ) {
66 | return '';
67 | }
68 |
69 | $tax_name = $this->get_taxonomy_name_from_slug( $tax_slug );
70 | $current_tax_slug = isset( $_GET[$tax_slug] ) ? $_GET[$tax_slug] : false;
71 |
72 | $filter = '';
76 |
77 | return $filter;
78 | }
79 |
80 | /**
81 | * Get the friendly taxonomy name, if given a taxonomy slug.
82 | *
83 | * @param string $tax_slug Taxonomy slug.
84 | *
85 | * @return string Friendly name of taxonomy, or empty string if not a valid taxonomy.
86 | */
87 | protected function get_taxonomy_name_from_slug( $tax_slug ) {
88 | $tax_obj = get_taxonomy( $tax_slug );
89 | if ( ! $tax_obj )
90 | return '';
91 | return $tax_obj->labels->name;
92 | }
93 |
94 | /**
95 | * Build a series of option elements from an array.
96 | *
97 | * Also checks to see if one of the options is selected.
98 | *
99 | * @param array $terms Array of term objects.
100 | * @param string $current_tax_slug Slug of currently selected term.
101 | *
102 | * @return string Markup.
103 | */
104 | protected function build_term_options( $terms, $current_tax_slug ) {
105 | $options = '';
106 | foreach ( $terms as $term ) {
107 | $options .= sprintf(
108 | '%s',
109 | esc_attr( $term->slug ),
110 | selected( $current_tax_slug, $term->slug ),
111 | esc_html( $term->name . '(' . $term->count . ')' )
112 | );
113 | }
114 | return $options;
115 | }
116 |
117 | /**
118 | * Add counts to "At a Glance" dashboard widget in WP 3.8+
119 | *
120 | * @since 0.1.0
121 | */
122 | public function add_glance_counts() {
123 | $glancer = new Dashboard_Glancer;
124 | $glancer->add( $this->registration_handler->post_type, array( 'publish', 'pending' ) );
125 | }
126 |
127 | }
--------------------------------------------------------------------------------
/includes/class-post-type-registrations.php:
--------------------------------------------------------------------------------
1 | register_post_type();
34 | $this->register_taxonomy_categories();
35 | $this->register_taxonomy_tags();
36 | $this->register_taxonomy_product_tags();
37 | }
38 |
39 | /**
40 | * Register the custom post type.
41 | *
42 | * @link http://codex.wordpress.org/Function_Reference/register_post_type
43 | */
44 | protected function register_post_type() {
45 | $labels = array(
46 | 'name' => __( 'Documentation', 'documentation-post-type' ),
47 | 'singular_name' => __( 'Doc', 'documentation-post-type' ),
48 | 'add_new' => __( 'Add Doc', 'documentation-post-type' ),
49 | 'add_new_item' => __( 'Add New Doc', 'documentation-post-type' ),
50 | 'edit_item' => __( 'Edit Doc', 'documentation-post-type' ),
51 | 'new_item' => __( 'New Doc', 'documentation-post-type' ),
52 | 'view_item' => __( 'View Doc', 'documentation-post-type' ),
53 | 'search_items' => __( 'Search Docs', 'documentation-post-type' ),
54 | 'not_found' => __( 'No docs found', 'documentation-post-type' ),
55 | 'not_found_in_trash' => __( 'No docs in the trash', 'documentation-post-type' ),
56 | );
57 |
58 | $supports = array(
59 | 'title',
60 | 'editor',
61 | 'thumbnail',
62 | 'custom-fields',
63 | 'revisions',
64 | );
65 |
66 | $args = array(
67 | 'labels' => $labels,
68 | 'supports' => $supports,
69 | 'public' => true,
70 | 'capability_type' => 'post',
71 | 'rewrite' => array( 'slug' => 'documentation', ), // Permalinks format
72 | 'menu_position' => 30,
73 | 'menu_icon' => 'dashicons-book',
74 | 'has_archive' => true
75 | );
76 |
77 | $args = apply_filters( 'documentation_post_type_args', $args );
78 |
79 | register_post_type( $this->post_type, $args );
80 | }
81 |
82 | /**
83 | * Register a taxonomy for Documentation Categories.
84 | *
85 | * @link http://codex.wordpress.org/Function_Reference/register_taxonomy
86 | */
87 | protected function register_taxonomy_categories() {
88 | $labels = array(
89 | 'name' => __( 'Doc Categories', 'documentation-post-type' ),
90 | 'singular_name' => __( 'Doc Category', 'documentation-post-type' ),
91 | 'menu_name' => __( 'Doc Categories', 'documentation-post-type' ),
92 | 'edit_item' => __( 'Edit Doc Category', 'documentation-post-type' ),
93 | 'update_item' => __( 'Update Doc Category', 'documentation-post-type' ),
94 | 'add_new_item' => __( 'Add New Doc Category', 'documentation-post-type' ),
95 | 'new_item_name' => __( 'New Doc Category Name', 'documentation-post-type' ),
96 | 'parent_item' => __( 'Parent Doc Category', 'documentation-post-type' ),
97 | 'parent_item_colon' => __( 'Parent Doc Category:', 'documentation-post-type' ),
98 | 'all_items' => __( 'All Doc Categories', 'documentation-post-type' ),
99 | 'search_items' => __( 'Search Doc Categories', 'documentation-post-type' ),
100 | 'popular_items' => __( 'Popular Doc Categories', 'documentation-post-type' ),
101 | 'separate_items_with_commas' => __( 'Separate doc categories with commas', 'documentation-post-type' ),
102 | 'add_or_remove_items' => __( 'Add or remove doc categories', 'documentation-post-type' ),
103 | 'choose_from_most_used' => __( 'Choose from the most used doc categories', 'documentation-post-type' ),
104 | 'not_found' => __( 'No doc categories found.', 'documentation-post-type' ),
105 | );
106 |
107 | $args = array(
108 | 'labels' => $labels,
109 | 'public' => true,
110 | 'show_in_nav_menus' => true,
111 | 'show_ui' => true,
112 | 'show_tagcloud' => true,
113 | 'hierarchical' => true,
114 | 'rewrite' => array( 'slug' => 'documentation-category' ),
115 | 'show_admin_column' => true,
116 | 'query_var' => true,
117 | );
118 |
119 | $args = apply_filters( 'documentation_post_type_category_args', $args );
120 |
121 | register_taxonomy( $this->taxonomies[0], $this->post_type, $args );
122 | }
123 |
124 | /**
125 | * Register a taxonomy for Documentation Tags.
126 | *
127 | * @link http://codex.wordpress.org/Function_Reference/register_taxonomy
128 | */
129 | protected function register_taxonomy_tags() {
130 |
131 | $labels = array(
132 | 'name' => __( 'Doc Tags', 'documentation-post-type' ),
133 | 'singular_name' => __( 'Doc Tag', 'documentation-post-type' ),
134 | 'menu_name' => __( 'Doc Tags', 'documentation-post-type' ),
135 | 'edit_item' => __( 'Edit Doc Tag', 'documentation-post-type' ),
136 | 'update_item' => __( 'Update Doc Tag', 'documentation-post-type' ),
137 | 'add_new_item' => __( 'Add New Doc Tag', 'documentation-post-type' ),
138 | 'new_item_name' => __( 'New Doc Tag Name', 'documentation-post-type' ),
139 | 'parent_item' => __( 'Parent Doc Tag', 'documentation-post-type' ),
140 | 'parent_item_colon' => __( 'Parent Doc Tag:', 'documentation-post-type' ),
141 | 'all_items' => __( 'All Doc Tags', 'documentation-post-type' ),
142 | 'search_items' => __( 'Search Doc Tags', 'documentation-post-type' ),
143 | 'popular_items' => __( 'Popular Doc Tags', 'documentation-post-type' ),
144 | 'separate_items_with_commas' => __( 'Separate doc tags with commas', 'documentation-post-type' ),
145 | 'add_or_remove_items' => __( 'Add or remove doc tags', 'documentation-post-type' ),
146 | 'choose_from_most_used' => __( 'Choose from the most used doc tags', 'documentation-post-type' ),
147 | 'not_found' => __( 'No doc tags found.', 'documentation-post-type' ),
148 | );
149 |
150 | $args = array(
151 | 'labels' => $labels,
152 | 'public' => true,
153 | 'show_in_nav_menus' => true,
154 | 'show_ui' => true,
155 | 'show_tagcloud' => true,
156 | 'hierarchical' => false,
157 | 'rewrite' => array( 'slug' => 'documentation-tag' ),
158 | 'show_admin_column' => true,
159 | 'query_var' => true,
160 | );
161 |
162 | $args = apply_filters( 'documentation_post_type_tag_args', $args );
163 |
164 | register_taxonomy( $this->taxonomies[1], $this->post_type, $args );
165 |
166 | }
167 |
168 | /**
169 | * Register a taxonomy for Product Tags.
170 | *
171 | * @link http://codex.wordpress.org/Function_Reference/register_taxonomy
172 | */
173 | protected function register_taxonomy_product_tags() {
174 |
175 | $labels = array(
176 | 'name' => __( 'Product Tags', 'documentation-post-type' ),
177 | 'singular_name' => __( 'Product Tag', 'documentation-post-type' ),
178 | 'menu_name' => __( 'Product Tags', 'documentation-post-type' ),
179 | 'edit_item' => __( 'Edit Product Tag', 'documentation-post-type' ),
180 | 'update_item' => __( 'Update Product Tag', 'documentation-post-type' ),
181 | 'add_new_item' => __( 'Add New Product Tag', 'documentation-post-type' ),
182 | 'new_item_name' => __( 'New Product Tag Name', 'documentation-post-type' ),
183 | 'parent_item' => __( 'Parent Product Tag', 'documentation-post-type' ),
184 | 'parent_item_colon' => __( 'Parent Product Tag:', 'documentation-post-type' ),
185 | 'all_items' => __( 'All Product Tags', 'documentation-post-type' ),
186 | 'search_items' => __( 'Search Product Tags', 'documentation-post-type' ),
187 | 'popular_items' => __( 'Popular Product Tags', 'documentation-post-type' ),
188 | 'separate_items_with_commas' => __( 'Separate product tags with commas', 'documentation-post-type' ),
189 | 'add_or_remove_items' => __( 'Add or remove product tags', 'documentation-post-type' ),
190 | 'choose_from_most_used' => __( 'Choose from the most used product tags', 'documentation-post-type' ),
191 | 'not_found' => __( 'No product tags found.', 'documentation-post-type' ),
192 | );
193 |
194 | $args = array(
195 | 'labels' => $labels,
196 | 'public' => true,
197 | 'show_in_nav_menus' => true,
198 | 'show_ui' => true,
199 | 'show_tagcloud' => true,
200 | 'hierarchical' => false,
201 | 'rewrite' => array( 'slug' => 'document-tag' ),
202 | 'show_admin_column' => true,
203 | 'query_var' => true,
204 | );
205 |
206 | $args = apply_filters( 'documentation_post_type_product_args', $args );
207 |
208 | register_taxonomy( $this->taxonomies[2], $this->post_type, $args );
209 |
210 | }
211 |
212 | }
--------------------------------------------------------------------------------
/includes/class-post-type.php:
--------------------------------------------------------------------------------
1 | registration_handler = $registration_handler;
47 |
48 | // Load plugin text domain
49 | add_action( 'init', array( $this, 'load_plugin_textdomain' ) );;
50 |
51 | }
52 |
53 | /**
54 | * Fired for each blog when the plugin is activated.
55 | *
56 | * @since 0.1.0
57 | */
58 | public function activate() {
59 | $this->registration_handler->register();
60 | flush_rewrite_rules();
61 | }
62 |
63 | /**
64 | * Fired for each blog when the plugin is deactivated.
65 | *
66 | * @since 0.1.0
67 | */
68 | public function deactivate() {
69 | flush_rewrite_rules();
70 | }
71 |
72 | /**
73 | * Load the plugin text domain for translation.
74 | *
75 | * @since 0.1.0
76 | */
77 | public function load_plugin_textdomain() {
78 | $domain = self::PLUGIN_SLUG;
79 | $locale = apply_filters( 'plugin_locale', get_locale(), $domain );
80 |
81 | load_textdomain( $domain, trailingslashit( WP_LANG_DIR ) . $domain . '/' . $domain . '-' . $locale . '.mo' );
82 | load_plugin_textdomain( $domain, FALSE, dirname( dirname( plugin_basename( __FILE__ ) ) ) . '/languages' );
83 | }
84 |
85 | }
--------------------------------------------------------------------------------
/languages/documentation-post-type-fr_FR.mo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/devinsays/documentation-post-type/ab53b24d442ac3b36d110ccf81b069468e5c6c12/languages/documentation-post-type-fr_FR.mo
--------------------------------------------------------------------------------
/languages/documentation-post-type-fr_FR.po:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2014 Docs Post Type
2 | # This file is distributed under the same license as the Docs Post Type package.
3 | msgid ""
4 | msgstr ""
5 | "Project-Id-Version: Docs Post Type 0.1.0\n"
6 | "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/documentation-post-"
7 | "type\n"
8 | "POT-Creation-Date: 2014-11-20 19:12:33+00:00\n"
9 | "PO-Revision-Date: 2015-05-28 12:21+0100\n"
10 | "Last-Translator: fxbenard | FxB \n"
11 | "Language-Team: Hexagone \n"
12 | "Language: fr_FR\n"
13 | "MIME-Version: 1.0\n"
14 | "Content-Type: text/plain; charset=UTF-8\n"
15 | "Content-Transfer-Encoding: 8bit\n"
16 | "X-Generator: Poedit 1.8.1\n"
17 | "Plural-Forms: nplurals=2; plural=(n > 1);\n"
18 | "X-Poedit-SourceCharset: UTF-8\n"
19 |
20 | #: includes/class-post-type-registrations.php:46
21 | msgid "Documentation"
22 | msgstr "Documentation"
23 |
24 | #: includes/class-post-type-registrations.php:47
25 | msgid "Doc"
26 | msgstr "Doc"
27 |
28 | #: includes/class-post-type-registrations.php:48
29 | msgid "Add Doc"
30 | msgstr "Ajouter Doc"
31 |
32 | #: includes/class-post-type-registrations.php:49
33 | msgid "Add New Doc"
34 | msgstr "Ajouter une nouvelle doc"
35 |
36 | #: includes/class-post-type-registrations.php:50
37 | msgid "Edit Doc"
38 | msgstr "Modifier la doc"
39 |
40 | #: includes/class-post-type-registrations.php:51
41 | msgid "New Doc"
42 | msgstr "Nouvelle doc"
43 |
44 | #: includes/class-post-type-registrations.php:52
45 | msgid "View Doc"
46 | msgstr "Voir la doc"
47 |
48 | #: includes/class-post-type-registrations.php:53
49 | msgid "Search Docs"
50 | msgstr "Rechercher des docs"
51 |
52 | #: includes/class-post-type-registrations.php:54
53 | msgid "No docs found"
54 | msgstr "Aucune doc trouvée."
55 |
56 | #: includes/class-post-type-registrations.php:55
57 | msgid "No docs in the trash"
58 | msgstr "Aucune doc trouvée dans la corbeille"
59 |
60 | #: includes/class-post-type-registrations.php:88
61 | #: includes/class-post-type-registrations.php:90
62 | msgid "Doc Categories"
63 | msgstr "Catégories de doc"
64 |
65 | #: includes/class-post-type-registrations.php:89
66 | msgid "Doc Category"
67 | msgstr "Catégorie de la doc"
68 |
69 | #: includes/class-post-type-registrations.php:91
70 | msgid "Edit Doc Category"
71 | msgstr "Modifier la catégorie de la doc"
72 |
73 | #: includes/class-post-type-registrations.php:92
74 | msgid "Update Doc Category"
75 | msgstr "Mettre à jour la catégorie de la doc"
76 |
77 | #: includes/class-post-type-registrations.php:93
78 | msgid "Add New Doc Category"
79 | msgstr "Ajouter une nouvelle catégorie de doc"
80 |
81 | #: includes/class-post-type-registrations.php:94
82 | msgid "New Doc Category Name"
83 | msgstr "Nouveau nom de catégorie de doc"
84 |
85 | #: includes/class-post-type-registrations.php:95
86 | msgid "Parent Doc Category"
87 | msgstr "Catégorie Parente de la doc"
88 |
89 | #: includes/class-post-type-registrations.php:96
90 | msgid "Parent Doc Category:"
91 | msgstr "Catégorie parente de la doc :"
92 |
93 | #: includes/class-post-type-registrations.php:97
94 | msgid "All Doc Categories"
95 | msgstr "Toutes les catégories de doc"
96 |
97 | #: includes/class-post-type-registrations.php:98
98 | msgid "Search Doc Categories"
99 | msgstr "Rechercher des catégories de doc"
100 |
101 | #: includes/class-post-type-registrations.php:99
102 | msgid "Popular Doc Categories"
103 | msgstr "Catégories de doc populaires"
104 |
105 | #: includes/class-post-type-registrations.php:100
106 | msgid "Separate doc categories with commas"
107 | msgstr "Séparer les catégories de doc par des virgules"
108 |
109 | #: includes/class-post-type-registrations.php:101
110 | msgid "Add or remove doc categories"
111 | msgstr "Ajouter ou supprimer des catégories de doc"
112 |
113 | #: includes/class-post-type-registrations.php:102
114 | msgid "Choose from the most used doc categories"
115 | msgstr "Choisir parmi les catégories de doc les plus utilisées"
116 |
117 | #: includes/class-post-type-registrations.php:103
118 | msgid "No doc categories found."
119 | msgstr "Aucune catégorie de doc trouvée."
120 |
121 | #: includes/class-post-type-registrations.php:131
122 | #: includes/class-post-type-registrations.php:133
123 | msgid "Doc Tags"
124 | msgstr "Étiquettes de doc"
125 |
126 | #: includes/class-post-type-registrations.php:132
127 | msgid "Doc Tag"
128 | msgstr "Étiquette de la doc"
129 |
130 | #: includes/class-post-type-registrations.php:134
131 | msgid "Edit Doc Tag"
132 | msgstr "Modifier l'étiquette de la doc"
133 |
134 | #: includes/class-post-type-registrations.php:135
135 | msgid "Update Doc Tag"
136 | msgstr "Mettre à jour le étiquette de la doc"
137 |
138 | #: includes/class-post-type-registrations.php:136
139 | msgid "Add New Doc Tag"
140 | msgstr "Ajouter une nouvelle étiquette de doc"
141 |
142 | #: includes/class-post-type-registrations.php:137
143 | msgid "New Doc Tag Name"
144 | msgstr "Nouveau nom du étiquette de doc"
145 |
146 | #: includes/class-post-type-registrations.php:138
147 | msgid "Parent Doc Tag"
148 | msgstr "Étiquette parente du doc"
149 |
150 | #: includes/class-post-type-registrations.php:139
151 | msgid "Parent Doc Tag:"
152 | msgstr "Étiquette parente du doc :"
153 |
154 | #: includes/class-post-type-registrations.php:140
155 | msgid "All Doc Tags"
156 | msgstr "Tous les étiquettes de doc"
157 |
158 | #: includes/class-post-type-registrations.php:141
159 | msgid "Search Doc Tags"
160 | msgstr "Chercher les étiquettes de doc"
161 |
162 | #: includes/class-post-type-registrations.php:142
163 | msgid "Popular Doc Tags"
164 | msgstr "Étiquettes de doc populaires"
165 |
166 | #: includes/class-post-type-registrations.php:143
167 | msgid "Separate doc tags with commas"
168 | msgstr "Séparer les étiquettes de doc par des virgules"
169 |
170 | #: includes/class-post-type-registrations.php:144
171 | msgid "Add or remove doc tags"
172 | msgstr "Ajouter ou supprimer des étiquettes de doc"
173 |
174 | #: includes/class-post-type-registrations.php:145
175 | msgid "Choose from the most used doc tags"
176 | msgstr "Choisir parmi les étiquettes de doc les plus utilisés"
177 |
178 | #: includes/class-post-type-registrations.php:146
179 | msgid "No doc tags found."
180 | msgstr "Aucune étiquette de doc trouvée."
181 |
182 | #: includes/class-post-type-registrations.php:175
183 | #: includes/class-post-type-registrations.php:177
184 | msgid "Product Tags"
185 | msgstr "Étiquettes du produit"
186 |
187 | #: includes/class-post-type-registrations.php:176
188 | msgid "Product Tag"
189 | msgstr "Étiquette du produit"
190 |
191 | #: includes/class-post-type-registrations.php:178
192 | msgid "Edit Product Tag"
193 | msgstr "Modifier l'étiquette du produit"
194 |
195 | #: includes/class-post-type-registrations.php:179
196 | msgid "Update Product Tag"
197 | msgstr "Mettre à jour le étiquette du produit"
198 |
199 | #: includes/class-post-type-registrations.php:180
200 | msgid "Add New Product Tag"
201 | msgstr "Ajouter une nouvelle étiquette de produit"
202 |
203 | #: includes/class-post-type-registrations.php:181
204 | msgid "New Product Tag Name"
205 | msgstr "Nouveau nom du étiquette du produit"
206 |
207 | #: includes/class-post-type-registrations.php:182
208 | msgid "Parent Product Tag"
209 | msgstr "Étiquette parente du produit"
210 |
211 | #: includes/class-post-type-registrations.php:183
212 | msgid "Parent Product Tag:"
213 | msgstr "Étiquette parente du produit :"
214 |
215 | #: includes/class-post-type-registrations.php:184
216 | msgid "All Product Tags"
217 | msgstr "Tous les étiquettes de produit"
218 |
219 | #: includes/class-post-type-registrations.php:185
220 | msgid "Search Product Tags"
221 | msgstr "Chercher les étiquettes de produit"
222 |
223 | #: includes/class-post-type-registrations.php:186
224 | msgid "Popular Product Tags"
225 | msgstr "Étiquettes de produit populaires"
226 |
227 | #: includes/class-post-type-registrations.php:187
228 | msgid "Separate product tags with commas"
229 | msgstr "Séparer les étiquettes de produit par des virgules"
230 |
231 | #: includes/class-post-type-registrations.php:188
232 | msgid "Add or remove product tags"
233 | msgstr "Ajouter ou supprimer des étiquettes de produit"
234 |
235 | #: includes/class-post-type-registrations.php:189
236 | msgid "Choose from the most used product tags"
237 | msgstr "Choisir parmi les étiquettes de doc les plus utilisés"
238 |
239 | #: includes/class-post-type-registrations.php:190
240 | msgid "No product tags found."
241 | msgstr "Aucune étiquette de produit trouvée."
242 |
243 | #. Plugin Name of the plugin/theme
244 | msgid "Documentation Post Type"
245 | msgstr "Documentation Post Type"
246 |
247 | #. Author URI of the plugin/theme
248 | msgid "http://github.com/devinsays/documentation-post-type"
249 | msgstr "http://github.com/devinsays/documentation-post-type"
250 |
251 | #. Description of the plugin/theme
252 | msgid "Enables a post type for documentation and related taxonomies."
253 | msgstr "Créer un type de contenu et une taxonomie pour de la documentation."
254 |
255 | #. Author of the plugin/theme
256 | msgid "Devin Price"
257 | msgstr "Devin Price"
258 |
259 | #~ msgid ""
260 | #~ "Trying to add At a Glance items to dashboard widget afterhook already fired"
261 | #~ msgstr ""
262 | #~ "L'ajout des éléments de At a Glance à l'afterhook du widget du tableau "
263 | #~ "bord a déjà été déclenché"
264 |
265 | #~ msgid "Image"
266 | #~ msgstr "Image"
267 |
268 | #~ msgid "Articles"
269 | #~ msgstr "Articles"
270 |
271 | #~ msgid "Add Article"
272 | #~ msgstr "Ajouter un article"
273 |
274 | #~ msgid "New Article"
275 | #~ msgstr "Nouvel article"
276 |
--------------------------------------------------------------------------------
/languages/documentation-post-type.pot:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2015 Devin Price
2 | # This file is distributed under the GPL-2.0+.
3 | msgid ""
4 | msgstr ""
5 | "Project-Id-Version: Documentation Post Type 0.1.0\n"
6 | "Report-Msgid-Bugs-To: "
7 | "http://wordpress.org/support/plugin/documentation-post-type\n"
8 | "POT-Creation-Date: 2015-02-05 14:15:33+00:00\n"
9 | "MIME-Version: 1.0\n"
10 | "Content-Type: text/plain; charset=utf-8\n"
11 | "Content-Transfer-Encoding: 8bit\n"
12 | "PO-Revision-Date: 2015-MO-DA HO:MI+ZONE\n"
13 | "Last-Translator: FULL NAME \n"
14 | "Language-Team: LANGUAGE \n"
15 | "X-Generator: grunt-wp-i18n 0.4.9\n"
16 |
17 | #: includes/class-post-type-registrations.php:46
18 | msgid "Documentation"
19 | msgstr ""
20 |
21 | #: includes/class-post-type-registrations.php:47
22 | msgid "Doc"
23 | msgstr ""
24 |
25 | #: includes/class-post-type-registrations.php:48
26 | msgid "Add Doc"
27 | msgstr ""
28 |
29 | #: includes/class-post-type-registrations.php:49
30 | msgid "Add New Doc"
31 | msgstr ""
32 |
33 | #: includes/class-post-type-registrations.php:50
34 | msgid "Edit Doc"
35 | msgstr ""
36 |
37 | #: includes/class-post-type-registrations.php:51
38 | msgid "New Doc"
39 | msgstr ""
40 |
41 | #: includes/class-post-type-registrations.php:52
42 | msgid "View Doc"
43 | msgstr ""
44 |
45 | #: includes/class-post-type-registrations.php:53
46 | msgid "Search Docs"
47 | msgstr ""
48 |
49 | #: includes/class-post-type-registrations.php:54
50 | msgid "No docs found"
51 | msgstr ""
52 |
53 | #: includes/class-post-type-registrations.php:55
54 | msgid "No docs in the trash"
55 | msgstr ""
56 |
57 | #: includes/class-post-type-registrations.php:88
58 | #: includes/class-post-type-registrations.php:90
59 | msgid "Doc Categories"
60 | msgstr ""
61 |
62 | #: includes/class-post-type-registrations.php:89
63 | msgid "Doc Category"
64 | msgstr ""
65 |
66 | #: includes/class-post-type-registrations.php:91
67 | msgid "Edit Doc Category"
68 | msgstr ""
69 |
70 | #: includes/class-post-type-registrations.php:92
71 | msgid "Update Doc Category"
72 | msgstr ""
73 |
74 | #: includes/class-post-type-registrations.php:93
75 | msgid "Add New Doc Category"
76 | msgstr ""
77 |
78 | #: includes/class-post-type-registrations.php:94
79 | msgid "New Doc Category Name"
80 | msgstr ""
81 |
82 | #: includes/class-post-type-registrations.php:95
83 | msgid "Parent Doc Category"
84 | msgstr ""
85 |
86 | #: includes/class-post-type-registrations.php:96
87 | msgid "Parent Doc Category:"
88 | msgstr ""
89 |
90 | #: includes/class-post-type-registrations.php:97
91 | msgid "All Doc Categories"
92 | msgstr ""
93 |
94 | #: includes/class-post-type-registrations.php:98
95 | msgid "Search Doc Categories"
96 | msgstr ""
97 |
98 | #: includes/class-post-type-registrations.php:99
99 | msgid "Popular Doc Categories"
100 | msgstr ""
101 |
102 | #: includes/class-post-type-registrations.php:100
103 | msgid "Separate doc categories with commas"
104 | msgstr ""
105 |
106 | #: includes/class-post-type-registrations.php:101
107 | msgid "Add or remove doc categories"
108 | msgstr ""
109 |
110 | #: includes/class-post-type-registrations.php:102
111 | msgid "Choose from the most used doc categories"
112 | msgstr ""
113 |
114 | #: includes/class-post-type-registrations.php:103
115 | msgid "No doc categories found."
116 | msgstr ""
117 |
118 | #: includes/class-post-type-registrations.php:131
119 | #: includes/class-post-type-registrations.php:133
120 | msgid "Doc Tags"
121 | msgstr ""
122 |
123 | #: includes/class-post-type-registrations.php:132
124 | msgid "Doc Tag"
125 | msgstr ""
126 |
127 | #: includes/class-post-type-registrations.php:134
128 | msgid "Edit Doc Tag"
129 | msgstr ""
130 |
131 | #: includes/class-post-type-registrations.php:135
132 | msgid "Update Doc Tag"
133 | msgstr ""
134 |
135 | #: includes/class-post-type-registrations.php:136
136 | msgid "Add New Doc Tag"
137 | msgstr ""
138 |
139 | #: includes/class-post-type-registrations.php:137
140 | msgid "New Doc Tag Name"
141 | msgstr ""
142 |
143 | #: includes/class-post-type-registrations.php:138
144 | msgid "Parent Doc Tag"
145 | msgstr ""
146 |
147 | #: includes/class-post-type-registrations.php:139
148 | msgid "Parent Doc Tag:"
149 | msgstr ""
150 |
151 | #: includes/class-post-type-registrations.php:140
152 | msgid "All Doc Tags"
153 | msgstr ""
154 |
155 | #: includes/class-post-type-registrations.php:141
156 | msgid "Search Doc Tags"
157 | msgstr ""
158 |
159 | #: includes/class-post-type-registrations.php:142
160 | msgid "Popular Doc Tags"
161 | msgstr ""
162 |
163 | #: includes/class-post-type-registrations.php:143
164 | msgid "Separate doc tags with commas"
165 | msgstr ""
166 |
167 | #: includes/class-post-type-registrations.php:144
168 | msgid "Add or remove doc tags"
169 | msgstr ""
170 |
171 | #: includes/class-post-type-registrations.php:145
172 | msgid "Choose from the most used doc tags"
173 | msgstr ""
174 |
175 | #: includes/class-post-type-registrations.php:146
176 | msgid "No doc tags found."
177 | msgstr ""
178 |
179 | #: includes/class-post-type-registrations.php:175
180 | #: includes/class-post-type-registrations.php:177
181 | msgid "Product Tags"
182 | msgstr ""
183 |
184 | #: includes/class-post-type-registrations.php:176
185 | msgid "Product Tag"
186 | msgstr ""
187 |
188 | #: includes/class-post-type-registrations.php:178
189 | msgid "Edit Product Tag"
190 | msgstr ""
191 |
192 | #: includes/class-post-type-registrations.php:179
193 | msgid "Update Product Tag"
194 | msgstr ""
195 |
196 | #: includes/class-post-type-registrations.php:180
197 | msgid "Add New Product Tag"
198 | msgstr ""
199 |
200 | #: includes/class-post-type-registrations.php:181
201 | msgid "New Product Tag Name"
202 | msgstr ""
203 |
204 | #: includes/class-post-type-registrations.php:182
205 | msgid "Parent Product Tag"
206 | msgstr ""
207 |
208 | #: includes/class-post-type-registrations.php:183
209 | msgid "Parent Product Tag:"
210 | msgstr ""
211 |
212 | #: includes/class-post-type-registrations.php:184
213 | msgid "All Product Tags"
214 | msgstr ""
215 |
216 | #: includes/class-post-type-registrations.php:185
217 | msgid "Search Product Tags"
218 | msgstr ""
219 |
220 | #: includes/class-post-type-registrations.php:186
221 | msgid "Popular Product Tags"
222 | msgstr ""
223 |
224 | #: includes/class-post-type-registrations.php:187
225 | msgid "Separate product tags with commas"
226 | msgstr ""
227 |
228 | #: includes/class-post-type-registrations.php:188
229 | msgid "Add or remove product tags"
230 | msgstr ""
231 |
232 | #: includes/class-post-type-registrations.php:189
233 | msgid "Choose from the most used product tags"
234 | msgstr ""
235 |
236 | #: includes/class-post-type-registrations.php:190
237 | msgid "No product tags found."
238 | msgstr ""
239 |
240 | #. Plugin Name of the plugin/theme
241 | msgid "Documentation Post Type"
242 | msgstr ""
243 |
244 | #. Author URI of the plugin/theme
245 | msgid "http://github.com/devinsays/documentation-post-type"
246 | msgstr ""
247 |
248 | #. Description of the plugin/theme
249 | msgid "Enables a post type for documentation and related taxonomies."
250 | msgstr ""
251 |
252 | #. Author of the plugin/theme
253 | msgid "Devin Price"
254 | msgstr ""
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "documents-post-type",
3 | "version": "0.1.0",
4 | "devDependencies": {
5 | "grunt": "~0.4.5",
6 | "grunt-cli": "~0.1.13",
7 | "load-grunt-tasks": "~0.6.0",
8 | "grunt-wp-i18n": "~0.4.7"
9 | }
10 | }
11 |
--------------------------------------------------------------------------------