feat: SEO field types and the complete SEO tab
This commit is contained in:
23
field_types.go
Normal file
23
field_types.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package seo
|
||||
|
||||
import (
|
||||
"git.golem15.com/golem15/sm-seo-plugin/classes"
|
||||
"git.golem15.com/golem15/sm-seo-plugin/controllers"
|
||||
"git.golem15.com/golem15/summercms/modules/backpack"
|
||||
"git.golem15.com/golem15/summercms/modules/pact"
|
||||
)
|
||||
|
||||
// FormFieldTypes registers the SEO field types (classes.FieldTypes):
|
||||
// seotext, mlseotext, seorobots, mlseorobots and seoimage. Their element
|
||||
// bundle loads on every admin page, so the SEO tab works on other plugins'
|
||||
// forms.
|
||||
func (p *Plugin) FormFieldTypes() []pact.FormFieldType {
|
||||
return classes.FieldTypes(func() *backpack.App {
|
||||
if p == nil {
|
||||
return nil
|
||||
}
|
||||
return p.app
|
||||
}, controllers.PermissionManage)
|
||||
}
|
||||
|
||||
var _ pact.HasFormFieldTypes = (*Plugin)(nil)
|
||||
Reference in New Issue
Block a user