Skip to content

Commit 931626c

Browse files
committed
refactor: acpt static data
1 parent 438ea71 commit 931626c

File tree

3 files changed

+23
-22
lines changed

3 files changed

+23
-22
lines changed

frontend-dev/src/components/AllIntegrations/ACPT/ACPT.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ function ACPT({ formFields, setFlow, flow, allIntegURL }) {
3939
acptFields: [],
4040
acptLabels: [],
4141
utilities: {},
42-
icon: 'dashboard',
42+
icon: 'wordpress',
4343
module: '',
4444
cptFields,
4545
cptLabels,

frontend-dev/src/components/AllIntegrations/ACPT/ACPTActions.jsx

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { $btcbi } from '../../../GlobalStates'
1010
import { __ } from '../../../Utils/i18nwrap'
1111
import ConfirmModal from '../../Utilities/ConfirmModal'
1212
import TableCheckBox from '../../Utilities/TableCheckBox'
13+
import { capabilities, supports } from './staticData'
1314

1415
export default function ACPTActions({
1516
acptConf,
@@ -293,24 +294,3 @@ export default function ACPTActions({
293294
</>
294295
)
295296
}
296-
297-
const supports = [
298-
{ label: __('Title'), value: 'title' },
299-
{ label: __('Editor'), value: 'editor' },
300-
{ label: __('Comments'), value: 'comments' },
301-
{ label: __('Revisions'), value: 'revisions' },
302-
{ label: __('Trackbacks'), value: 'trackbacks' },
303-
{ label: __('Author'), value: 'author' },
304-
{ label: __('Excerpt'), value: 'excerpt' },
305-
{ label: __('Page Attributes'), value: 'page-attributes' },
306-
{ label: __('Thumbnail'), value: 'thumbnail' },
307-
{ label: __('Custom Fields'), value: 'custom-fields' },
308-
{ label: __('Post Formats'), value: 'post-formats' }
309-
]
310-
311-
const capabilities = [
312-
{ label: __('Manage Terms'), value: 'manage_terms' },
313-
{ label: __('Edit Terms'), value: 'edit_terms' },
314-
{ label: __('Delete Terms'), value: 'delete_terms' },
315-
{ label: __('Assign Terms'), value: 'assign_terms' }
316-
]

frontend-dev/src/components/AllIntegrations/ACPT/staticData.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,27 @@ export const optionPageFields = [
121121
{ label: __('Page Description', 'bit-integrations'), key: 'description', required: false }
122122
]
123123

124+
export const supports = [
125+
{ label: __('Title'), value: 'title' },
126+
{ label: __('Editor'), value: 'editor' },
127+
{ label: __('Comments'), value: 'comments' },
128+
{ label: __('Revisions'), value: 'revisions' },
129+
{ label: __('Trackbacks'), value: 'trackbacks' },
130+
{ label: __('Author'), value: 'author' },
131+
{ label: __('Excerpt'), value: 'excerpt' },
132+
{ label: __('Page Attributes'), value: 'page-attributes' },
133+
{ label: __('Thumbnail'), value: 'thumbnail' },
134+
{ label: __('Custom Fields'), value: 'custom-fields' },
135+
{ label: __('Post Formats'), value: 'post-formats' }
136+
]
137+
138+
export const capabilities = [
139+
{ label: __('Manage Terms'), value: 'manage_terms' },
140+
{ label: __('Edit Terms'), value: 'edit_terms' },
141+
{ label: __('Delete Terms'), value: 'delete_terms' },
142+
{ label: __('Assign Terms'), value: 'assign_terms' }
143+
]
144+
124145
export const cptIcons = [
125146
{ label: 'admin-appearance', value: 'admin-appearance' },
126147
{ label: 'admin-collapse', value: 'admin-collapse' },

0 commit comments

Comments
 (0)