Method | Description | |
---|---|---|
AssignToRole ( integer $customWritePanelId, string $roleName ) | Assign a specified write panel to a role. | |
Create ( string $name, string $description = '', array $standardFields = [], array $categories = [], integer $display_order = 1, string $type = FALSE, boolean $createDefaultGroup = true, $single_post, $default_theme_page = NULL, $default_parent_page = NULL, $expanded ) : the | Create a new write panel. | |
Delete ( integer $customWritePanelId = null ) | Delete a write panel without deleting its modules | |
Export ( integer $panelID ) | Export a write panel to file | |
Get ( unknown_type $customWritePanelId ) : an | Get the properties of a write panel | |
GetAssignedCategories ( integer $customWritePanelId ) : array | Get a list of categories assigned to a write panel | |
GetAssignedCategoryIds ( integer $customWritePanelId ) : array | Get a list of the ids of the categories assigned to a write panel | |
GetCapabilityName ( string $customWritePanelName ) : string | 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) | |
GetCountPostNotWritePanel ( $type ) | ||
GetCountPstWritePanel ( $write_panel_id ) | ||
GetCustomGroups ( $customWritePanelId, $orderby = "name" ) : array | Retrieves the groups of a module | |
GetCustomWritePanels ( $include_global = FALSE ) : array | Get all Write Panels. | |
GetIdByName ( string $name ) : the | Gets a write panel id based on write panel name. | |
GetParentPage ( $customWritePanelName ) : an | Get the properties of a write panel | |
GetStandardFields ( integer $customWritePanelId ) : array | Get a list of the standard fields of a the write panel | |
GetThemePage ( $customWritePanelName ) : an | Get the properties of a write panel | |
GetWritePanelName ( integer $post_id ) : string | Return the name of the write panel giving the post_id | |
Import ( string $panelFilePath, string $writePanelName = false, boolean $overwrite = false ) : the | Import a write panel given the file path. | |
Update ( integer $customWritePanelId, string $name, string $description = '', array $standardFields = [], array $categories = [], integer $display_order = 1, string $type = FALSE, $createDefaultGroup = true, $single_post, $default_theme_page = NULL, $default_parent_page = NULL, $expanded ) | Updates the properties of a write panel |
public static AssignToRole ( integer $customWritePanelId, string $roleName ) | ||
$customWritePanelId | integer | panel id |
$roleName | string | role name (see roles in wordpress) |
public Create ( string $name, string $description = '', array $standardFields = [], array $categories = [], integer $display_order = 1, string $type = FALSE, boolean $createDefaultGroup = true, $single_post, $default_theme_page = NULL, $default_parent_page = NULL, $expanded ) : the | ||
$name | string | write panel name |
$description | string | write panel description |
$standardFields | array | a list of standard fields ids that are to be displayed in in the panel. Use $STANDARD_FIELDS defined in MF_Constant.php |
$categories | array | array of category ids that are checked by default when the user opens Write tab for that panel. |
$display_order | integer | the order of the panel in Magic Fields > Write Panels tab |
$type | string | 'post' or 'page' |
$createDefaultGroup | boolean | indicates whether to create a default group. |
return | the | id of the write panel |
public static Get ( unknown_type $customWritePanelId ) : an | ||
$customWritePanelId | unknown_type | |
return | an | object containing the properties of the write panel which are id, name, description, display_order, capability_name, type |
public static GetAssignedCategories ( integer $customWritePanelId ) : array | ||
$customWritePanelId | integer | write panel id |
return | array | of objects, each object contains cat_id and cat_name |
public static GetAssignedCategoryIds ( integer $customWritePanelId ) : array | ||
$customWritePanelId | integer | write panel id |
return | array | of ids |
public static GetCapabilityName ( string $customWritePanelName ) : string | ||
$customWritePanelName | string | panel name |
return | string | capability name |
public static GetCountPstWritePanel ( $write_panel_id ) |
public static GetCustomGroups ( $customWritePanelId, $orderby = "name" ) : array | ||
return | array | of objects representing basic information of the group, each object contains id, name and module_id |
public static GetCustomWritePanels ( $include_global = FALSE ) : array | ||
return | array | of objects containing all write panels. Each object contains id, name, description, display_order, capability_name, type, always_show |
public GetIdByName ( string $name ) : the | ||
$name | string | |
return | the | write panel id |
public static GetParentPage ( $customWritePanelName ) : an | ||
return | an | object containing the properties of the write panel which are id, name, description, display_order, capability_name, type |
public static GetStandardFields ( integer $customWritePanelId ) : array | ||
$customWritePanelId | integer | panel id |
return | array | of ids of the standard fields (see $STANDARD_FIELDS defined in MF_Constant.php) |
public GetThemePage ( $customWritePanelName ) : an | ||
return | an | object containing the properties of the write panel which are id, name, description, display_order, capability_name, type |
public GetWritePanelName ( integer $post_id ) : string | ||
$post_id | integer | |
return | string |
public Import ( string $panelFilePath, string $writePanelName = false, boolean $overwrite = false ) : the | ||
$panelFilePath | string | the full path of the panel file |
$writePanelName | string | 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 |
$overwrite | boolean | whether to overwrite existing panels with the same name |
return | the | panel id, or false in case of error. |
public static Update ( integer $customWritePanelId, string $name, string $description = '', array $standardFields = [], array $categories = [], integer $display_order = 1, string $type = FALSE, $createDefaultGroup = true, $single_post, $default_theme_page = NULL, $default_parent_page = NULL, $expanded ) | ||
$customWritePanelId | integer | panel id |
$name | string | write panel name |
$description | string | write panel description |
$standardFields | array | a list of standard fields ids that are to be displayed in in the panel. Use $STANDARD_FIELDS defined in MF_Constant.php |
$categories | array | array of category ids that are checked by default when the user opens Write tab for that panel. |
$display_order | integer | the order of the panel in Magic Fields > Write Panels tab |
$type | string | 'post' or 'page' |