PHP Класс S3_Uploads_WP_CLI_Command

Наследование: extends WP_CLI_Command
Показать файл Открыть проект

Открытые методы

Метод Описание
cp ( $args ) Copy files to / from the uploads directory. Use s3://bucket/location for S3
create_iam_user ( $args, $args_assoc ) Create an AWS IAM user for S3 Uploads to user
disable ( $args, $assoc_args ) Disable the auto-rewriting of media links to S3
enable ( $args, $assoc_args ) Ensable the auto-rewriting of media links to S3
generate_iam_policy ( ) Create AWS IAM Policy that S3 Uploads requires
ls ( $args ) List files in the S3 bukcet
migrate_attachment_to_s3 ( $args, $args_assoc ) Migrate a single attachment's files to S3
migrate_attachments_to_s3 ( $args, $args_assoc )
rm ( $args, $args_assoc ) Delete files from S3
upload_directory ( $args, $args_assoc ) Upload a directory to S3
verify_api_keys ( ) Verifies the API keys entered will work for writing and deleting from S3.

Приватные методы

Метод Описание
get_iam_policy ( )
recurse_copy ( $src, $dst )
verify_s3_access_constants ( ) : boolean Verify that the required constants for the S3 connections are set.

Описание методов

cp() публичный Метод

Copy files to / from the uploads directory. Use s3://bucket/location for S3
public cp ( $args )

create_iam_user() публичный Метод

Create an AWS IAM user for S3 Uploads to user
public create_iam_user ( $args, $args_assoc )

disable() публичный Метод

Disable the auto-rewriting of media links to S3
public disable ( $args, $assoc_args )

enable() публичный Метод

Ensable the auto-rewriting of media links to S3
public enable ( $args, $assoc_args )

generate_iam_policy() публичный Метод

It's typically not a good idea to use access keys that have full access to your S3 account, as if the keys are compromised through the WordPress site somehow, you don't want to give full control via those keys.
public generate_iam_policy ( )

ls() публичный Метод

List files in the S3 bukcet
public ls ( $args )

migrate_attachment_to_s3() публичный Метод

Migrate a single attachment's files to S3
public migrate_attachment_to_s3 ( $args, $args_assoc )

migrate_attachments_to_s3() публичный Метод

public migrate_attachments_to_s3 ( $args, $args_assoc )

rm() публичный Метод

Delete files from S3
public rm ( $args, $args_assoc )

upload_directory() публичный Метод

Upload a directory to S3
public upload_directory ( $args, $args_assoc )

verify_api_keys() публичный Метод

Verifies the API keys entered will work for writing and deleting from S3.
public verify_api_keys ( )