PHP Class S3_Uploads_WP_CLI_Command

Inheritance: extends WP_CLI_Command
Afficher le fichier Open project: humanmade/s3-uploads

Méthodes publiques

Méthode 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

Méthode 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 méthode

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

create_iam_user() public méthode

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

disable() public méthode

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

enable() public méthode

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

generate_iam_policy() public méthode

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 méthode

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

migrate_attachment_to_s3() public méthode

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

migrate_attachments_to_s3() public méthode

public migrate_attachments_to_s3 ( $args, $args_assoc )

rm() public méthode

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

upload_directory() public méthode

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

verify_api_keys() public méthode

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