RCCWP_CustomWritePanel::Get PHP Method

Get() public static method

Get the properties of a 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 function Get($customWritePanelId)
    {
        global $wpdb;
        $sql = $wpdb->prepare("SELECT id, name, description, display_order, capability_name, type,single, expanded FROM " . MF_TABLE_PANELS . " WHERE id = %d", array($customWritePanelId));
        $results = $wpdb->get_row($sql);
        return $results;
    }

Usage Example

Ejemplo n.º 1
0
function add_input_search_manage($where)
{
    if (isset($_GET['custom-write-panel-id'])) {
        $write_panel = RCCWP_CustomWritePanel::Get($_GET['custom-write-panel-id']);
        printf("\n      <script type=\"text/javascript\">\n      //<![CDATA[\n        jQuery().ready(function() {\n          add_input_search_manage('%s');\n        });\n      //]]>\n      </script>", $_GET['custom-write-panel-id']);
    }
    return $where;
}
All Usage Examples Of RCCWP_CustomWritePanel::Get