wordpress

package
v1.43.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PluginInstallPath = `wp-admin/plugin-install.php`
	PluginUpdatePath  = `wp-admin/update.php`
	PluginEditPath    = `wp-admin/plugin-editor.php`
)
View Source
var LoginPath = `wp-login.php`

Functions

func GeneratePlugin

func GeneratePlugin(payload, name string) (string, []byte, bool)

Generates a ZIP containing the minimum requirement for a WordPress plugin and the provided payload. This function returns the name of the internal payload and generally will be resolved to `/wp-content/plugins/<name>/<payloadName>`.

func Login

func Login(conf *config.Config, username, password string) ([]*http.Cookie, bool)

Attempts to log into the WordPress instance and if successful return the cookies set by WordPress.

func UploadPlugin

func UploadPlugin(conf *config.Config, cookies []*http.Cookie, zip []byte, name string) (string, bool)

Uploads a ZIP based plugin for WordPress.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL