-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathhelp.php
211 lines (204 loc) · 13.5 KB
/
help.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
<?php
/*
* Plugin contextual help
*/
/**
* Returns contextual help.
*
* @param type $page
* @param type $contextual_help
*/
function wpcf_admin_help($page, $contextual_help) {
$help = '';
switch ($page) {
// Custom Fields (list)
case 'custom_fields':
$help .= ''
. ''
. __("Custom Fields (also known as post-meta) are information attached to WordPress posts. This data can then be queried and filtered in your database. With Types you can create Custom Field Groups which are then attached to any post type (including Posts, Pages and Custom Post Types) or taxonomy.",
'wpcf')
. '<br /><br />'
. sprintf(__('You can read more about Custom Fields in this tutorial: %s.',
'wpcf'),
'<a href="http://wp-types.com/user-guides/using-custom-fields/" target="_blank">http://wp-types.com/user-guides/using-custom-fields/ »</a>')
. '<br /><br />'
. __("On this page you can see your current custom field groups, as well as information about which post types and taxonomies they are attached to, and whether they are active or not.",
'wpcf')
. '<br /><br />'
. __('You have the following options:', 'wpcf')
. '<ul><li>'
. __('<strong>Add a Custom Fields Group:</strong> Use this to add a new custom fields group which can be attached to a post type',
'wpcf')
. '</li><li>'
. __('<strong>Edit:</strong> Click to edit the custom field group',
'wpcf')
. '</li><li>'
. __('<strong>Deactivate:</strong> Click to deactivate a custom field group (this can be re-activated at a later date)',
'wpcf')
. '</li><li>'
. __('<strong>Delete Permanently:</strong> Click to delete a custom field group. <strong>Warning: This cannot be undone.</strong>',
'wpcf')
. '</li></ul>';
break;
// Custom Types and Taxonomies (list)
case 'custom_types_and_taxonomies':
$help .= __('Custom Post Types are user-defined content types. Custom Taxonomies are used to categorize your content.',
'wpcf')
. ' ' . sprintf(__('You can read more about Custom Post Types and Taxonomies in this tutorial. %s',
'wpcf'), '<a href="http://wp-types.com/learn/custom-post-types/" target="_blank">http://wp-types.com/learn/custom-post-types/ »</a>')
. '<br /><br />'
. __('This is the main admin page for your Custom Post Types and Taxonomies. It provides you with an overview of your data.',
'wpcf')
. '<br />'
. __('On this page you have the following options:', 'wpcf')
. '<ul><li>'
. __('<strong>Add Custom Post Type:</strong> Use to create a new Custom Post Type',
'wpcf')
. '</li><li>'
. __('<strong>Add Custom Taxonomy:</strong> Use to create a new Custom Taxonomy',
'wpcf')
. '</li><li>'
. __('<strong>Edit:</strong> Click to edit the settings of a Custom Post Type or Taxonomy',
'wpcf')
. '</li><li>'
. __('<strong>Deactivate:</strong> Click to deactivate a Custom Post Type or Taxonomy (this can be reactivated at a later date)',
'wpcf')
. '</li><li>'
. __('<strong>Delete:</strong> Click to delete a Custom Post Type or Taxonomy. <strong> Warning: This cannot be undone</strong> ',
'wpcf')
. '</li></ul>';
break;
// Import/Export page
case 'import_export':
$help .= __('Use this page to import and export custom post types, taxonomies and custom fields to and from Types.',
'wpcf')
. '<br /><br />'
. __('This is the main admin page for your Custom Post Types and Taxonomies. It provides you with an overview of your data.',
'wpcf')
. '<br />'
. __('On this page you have the following options:', 'wpcf')
. '<h3>' . __('Import', 'wpcf') . '</h3>'
. '<ul style="list-style-type:none;"><li style="list-style-type:none;">'
. __('<strong>Step 1:</strong> Upload an XML file or paste XML content directly into the text area.',
'wpcf')
. '</li><li style="list-style-type:none;">'
. __('<strong>Step 2:</strong> Select which custom post types, taxonomies and custom fields should be imported.',
'wpcf')
. '</li></ul>'
. '<h3>' . __('Export', 'wpcf') . '</h3>'
. __('Click Export to export data from Types as an XML file.',
'wpcf');
break;
// Add/Edit group form page
case 'edit_group':
$help .= __('This is the edit page for your Custom Fields Groups.',
'wpcf')
. '<br />'
. sprintf(__('You can read more about creating a Custom Fields Group here: %s',
'wpcf'), '<a href="http://wp-types.com/user-guides/using-custom-fields/" target="_blank">http://wp-types.com/user-guides/using-custom-fields/ »</a>')
. '<br /><br />'
. __('On this page you can create and edit your groups. To create a group, do the following:',
'wpcf')
. '<ol style="list-style-type:decimal;"><li style="list-style-type:decimal;">'
. __('Add a Title', 'wpcf')
. '</li><li style="list-style-type:decimal;">'
. __('Choose where to display your group. You can attach this to both default WordPress post types and Custom Post Types. (nb: you can also associate taxonomy terms with Custom Field Groups)',
'wpcf')
. '</li><li style="list-style-type:decimal;">'
. __('To add a field click on the field you desire under “Available Fields” on the right hand side of your screen. This will be added to your Custom Field Group',
'wpcf')
. '</li><li style="list-style-type:decimal;">'
. __('Add information about your Custom Field', 'wpcf')
. '</li></ol>'
. '<h3>' . __('Tips', 'wpcf') . '</h3>'
. '<ul><li>'
. __('To ensure a user completes a field, check the box for validation required',
'wpcf')
. '</li><li>'
. __('Once you have created a field it will be saved for future use under "User created fields"',
'wpcf')
. '</li><li>'
. __('You can drag and drop the order of your custom fields using the blue icon',
'wpcf')
. '</li></ul>';
break;
// Add/Edit custom type form page
case 'edit_type':
$help .= __('Use this page to create a WordPress post type. If you’d like to learn more about Custom Post Types you can read our detailed guide: <a href="http://wp-types.com/learn/custom-post-types/" target="_blank">http://wp-types.com/learn/custom-post-types/</a> or check out our tutorial on creating them with Types: <a href="http://wp-types.com/user-guides/create-a-custom-post-type/" target="_blank">http://wp-types.com/user-guides/create-a-custom-post-type/ »</a>',
'wpcf')
. '<br /><br />'
. '<strong>' . __('Name and Description', 'wpcf') . '</strong>'
. '<br />'
. __('Add a singular and plural name for your post type. You should also add a slug. This will be created from the post type name if none is added.',
'wpcf')
. '<br /><br />'
. '<strong>' . __('Visibility', 'wpcf') . '</strong>'
. '<br /><br />'
. __('Determine whether your post type will be visible on the admin menu to your users.',
'wpcf')
. '<br /><br />'
. __('You can also adjust the menu position. The default position is 20, which means your post type will appear under “Pages”. You can find more information about menu positioning in the WordPress Codex. <a href="http://codex.wordpress.org/Function_Reference/register_post_type#Parameters" target="_blank">http://codex.wordpress.org/Function_Reference/register_post_type#Parameters</a>',
'wpcf')
. '<br /><br />'
. __('The default post type icon is the pushpin icon that appears beside WordPress posts. You can change this by adding your own icon of 16px x 16px.',
'wpcf')
. '<br /><br />'
. '<strong>' . __('Select Taxonomies', 'wpcf') . '</strong>'
. '<br /><br />'
. __('Choose which taxonomies are to be associated with this post type.',
'wpcf')
. '<br /><br />'
. '<strong>' . __('Labels', 'wpcf') . '</strong>'
. '<br /><br />'
. __('Labels are the text that is attached to your custom post type name. Examples of them in use are “Add New Post” (where “Add New” is the label”) and “Edit Post” (where “Edit” is the label). In normal circumstances the defaults will suffice.',
'wpcf')
. '<br /><br />'
. '<strong>' . __('Display Sections', 'wpcf') . '</strong>'
. '<br /><br />'
. __('Choose which sections to display on your “Add New” page.',
'wpcf')
. '<br /><br />'
. '<strong>' . __('Advanced Settings', 'wpcf') . '</strong>'
. '<br /><br />'
. __('Advanced settings give you even more control over your custom post type. You can read in detail what all of these settings do on our tutorial.',
'wpcf');
break;
// Add/Edit custom taxonomy form page
case 'edit_tax':
$help .= __('You can use Custom Taxonomies to categorize your content. Read more about what they are on our website: <a href="http://wp-types.com/learn/custom-post-types/" target="_blank">http://wp-types.com/learn/custom-post-types/ »</a> or you can read our guide about how to set them up: <a href="http://wp-types.com/user-guides/create-custom-taxonomies/" target="_blank">http://wp-types.com/user-guides/create-custom-taxonomies/</a>',
'wpcf')
. '<br /><br />'
. '<strong>' . __('Name and Description', 'wpcf') . '</strong>'
. '<br /><br />'
. __('Add a singular and plural name for your taxonomy. You should also add a slug. This will be created from the taxonomy name if none is added.',
'wpcf')
. '<br /><br />'
. '<strong>' . __('Visibility', 'wpcf') . '</strong>'
. '<br /><br />'
. __('Determine whether your post type will be visible on the admin menu to your users.',
'wpcf')
. '<br /><br />'
. '<strong>' . __('Select Post Types', 'wpcf') . '</strong>'
. '<br /><br />'
. __('Choose which post types this taxonomy should be associated with.',
'wpcf')
. '<br /><br />'
. '<strong>' . __('Labels', 'wpcf') . '</strong>'
. '<br /><br />'
. __('Labels are the text that is attached to your custom post type name. Examples of them in use are “Add New Post” (where “Add New” is the label”) and “Edit Post” (where “Edit” is the label). In normal circumstances the defaults will suffice.',
'wpcf')
. '<br /><br />'
. '<strong>' . __('Display Sections', 'wpcf') . '</strong>'
. '<br /><br />'
. __('Choose which sections to display on your “Add New” page.',
'wpcf')
. '<br /><br />'
. '<strong>' . __('Advanced Settings', 'wpcf') . '</strong>'
. '<br /><br />'
. __('Advanced settings give you even more control over your custom post type. You can read in detail what all of these settings do on our tutorial.',
'wpcf')
;
break;
}
return wpautop($help);
}