PHP Class S3_Uploads_WP_CLI_Command

Inheritance: extends WP_CLI_Command
Mostrar archivo Open project: humanmade/s3-uploads

Public Methods

Method Description
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.

Private Methods

Method Description
get_iam_policy ( )
recurse_copy ( $src, $dst )
verify_s3_access_constants ( ) : boolean Verify that the required constants for the S3 connections are set.

Method Details

cp() public method

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

create_iam_user() public method

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

disable() public method

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

enable() public method

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

generate_iam_policy() public method

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() public method

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

migrate_attachment_to_s3() public method

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

migrate_attachments_to_s3() public method

public migrate_attachments_to_s3 ( $args, $args_assoc )

rm() public method

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

upload_directory() public method

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

verify_api_keys() public method

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