[ Class Tree: FlutterDatabaseObjects ] [ Index: FlutterDatabaseObjects ] [ All elements ]
FlutterDatabaseObjects
FlutterDatabaseObjects
·

# Class: RCCWP_CustomWritePanel

Source Location: /RCCWP_CustomWritePanel.php

### Class Overview [line 11]

Create/edit/delete write panels.

#### Author(s):

#### Version:

#### Copyright:

### Variables

### Constants

### Methods

- AssignToRole
- Create
- Delete
- Export
- Get
- GetAssignedCategories
- GetAssignedCategoryIds
- GetCapabilityName
- GetCustomGroups
- GetCustomWritePanels
- GetStandardFields
- Import
- Update

## Inherited Variables

## Inherited Constants

## Inherited Methods

## Class Details

Create/edit/delete write panels.

[ Top ]

## Class Variables

## Class Methods

### AssignToRole

`void AssignToRole( integer $customWritePanelId, string $roleName)`

[line 40]

Assign a specified write panel to a role.

#### Parameters:

- integer $customWritePanelId - panel id
- string $roleName - role name (see roles in wordpress)

[ Top ]

### Create

`the Create( string $name, [string $description = ''], [array $standardFields = array()], [array $categories = array()], [integer $display_order = 1], [string $type = FALSE], [boolean $createDefaultGroup = true])`

[line 62]

Create a new write panel.

#### Tags:

- return - id of the write panel

#### Parameters:

- string $name - write panel name
- string $description - write panel description
- array $standardFields - a list of standard fields ids that are to be displayed in in the panel. Use $STANDARD_FIELDS defined in RCCWP_Constant.php
- array $categories - array of category ids that are checked by default when the user opens Write tab for that panel.
- integer $display_order - the order of the panel in Flutter > Write Panels tab
- string $type - 'post' or 'page'
- boolean $createDefaultGroup - indicates whether to create a default group.

[ Top ]

### Delete

`void Delete( [integer $customWritePanelId = null])`

[line 126]

Delete a write panel without deleting its modules

#### Parameters:

- integer $customWritePanelId - write panel id

[ Top ]

### Export

`void Export( integer $panelID, string $exportedFilename)`

[line 516]

Export a write panel to file

#### Parameters:

- integer $panelID -
- string $exportedFilename - the full path of the file to which the panel will be exported

[ Top ]

### Get

`an Get( unknown_type $customWritePanelId)`

[line 165]

Get the properties of a write panel

#### Tags:

- return - object containing the properties of the write panel which are id, name, description, display_order, capability_name, type

#### Parameters:

- unknown_type $customWritePanelId -

[ Top ]

### GetAssignedCategories

`array GetAssignedCategories( integer $customWritePanelId)`

[line 201]

Get a list of categories assigned to a write panel

#### Tags:

- return - of objects, each object contains cat_id and cat_name

#### Parameters:

- integer $customWritePanelId - write panel id

[ Top ]

### GetAssignedCategoryIds

`array GetAssignedCategoryIds( integer $customWritePanelId)`

[line 183]

Get a list of the ids of teh categories assigned to a write panel

#### Tags:

- return - of ids

#### Parameters:

- integer $customWritePanelId - write panel id

[ Top ]

### GetCapabilityName

`string GetCapabilityName( string $customWritePanelName)`

[line 240]

Create a capability name for a write panel given its name. This function is copied from WP's sanitize_title_with_dashes($title) (formatting.php)

#### Tags:

- return - capability name

#### Parameters:

- string $customWritePanelName - panel name

[ Top ]

### GetCustomGroups

`array GetCustomGroups( $customWritePanelId, integer $customWriteModuleId)`

[line 428]

Retrieves the groups of a module

#### Tags:

- return - of objects representing basic information of the group, each object contains id, name and module_id

#### Parameters:

- integer $customWriteModuleId - module id
- $customWritePanelId -

[ Top ]

### GetCustomWritePanels

`array GetCustomWritePanels( )`

[line 20]

Get all Write Panels.

#### Tags:

- return - of objects containing all write panels. Each object contains id, name, description, display_order, capability_name, type, always_show

#### Parameters:

[ Top ]

### GetStandardFields

`array GetStandardFields( integer $customWritePanelId)`

[line 281]

Get a list of the standard fields of a the wrie panel

#### Tags:

- return - of ids of the standard fields (see $STANDARD_FIELDS defined in RCCWP_Constant.php)

#### Parameters:

- integer $customWritePanelId - panel id

[ Top ]

### Import

`the Import( string $panelFilePath, [string $writePanelName = false])`

[line 450]

Import a write panel given the file path.

#### Tags:

- return - panel id, or false in case of error.

#### Parameters:

- string $panelFilePath - the full path of the panel file
- string $writePanelName - the write panel name, if this value if false, the function will use the pnl filename as the write panel name. The default value is false

[ Top ]

### Update

`void Update( integer $customWritePanelId, string $name, [string $description = ''], [array $standardFields = array()], [array $categories = array()], [integer $display_order = 1], string $type)`

[line 306]

Updates the properties of a write panel

#### Parameters:

- integer $customWritePanelId - panel id
- string $name - write panel name
- string $description - write panel description
- array $standardFields - a list of standard fields ids that are to be displayed in in the panel. Use $STANDARD_FIELDS defined in RCCWP_Constant.php
- array $categories - array of category ids that are checked by default when the user opens Write tab for that panel.
- integer $display_order - the order of the panel in Flutter > Write Panels tab
- string $type - 'post' or 'page'

[ Top ]

## Class Constants

Documentation generated on Tue, 09 Sep 2008 12:47:59 +0000 by phpDocumentor 1.4.2