Inherited Methods
Class Details
[ Top ]
Class Variables
Class Methods
commit
true commit(
String
$file_name,
$message)
[line 163]
Commit the changes to the file with name $file_name.
This method commits the changes only to the single file with the name that was passed in as $file_name
Tags:
- return - on success, wp_error with descriptive error message on failure
- access - public
- Theme_Versioning_VCSAdapter::commit()
- Commit the changes to the file with name $file_name.
Parameters:
- String $file_name - A string containing the file name to commit.
- $message -
[ Top ]
commit_all
void commit_all(
$message)
[line 124]
Commit changes to all files.
Tags:
- access - public
- Theme_Versioning_VCSAdapter::commit_all()
- Commit changes to all files.
Parameters:
- $message -
[ Top ]
get_name
String get_name(
)
[line 375]
Get name of the VCS Adapter.
Tags:
- return - The readable name for this VCS Adapter
- access - public
- Theme_Versioning_VCSAdapter::get_name()
- Get name of the VCS Adapter.
Parameters:
[ Top ]
get_revision
Revision get_revision(
String
$revision_id)
[line 288]
Get the revision specified by $revision_id
Tags:
- return - The revision with the given revision number
- access - public
- Theme_Versioning_VCSAdapter::get_revision()
- Get the revision specified by $revision_id
Parameters:
- String $revision_id - The revision number or hash of the desired Revision
[ Top ]
get_revisions
array get_revisions(
int
$max_num_revisions)
[line 305]
Returns an array containing up to the number of past revisions specified by num_past_revisons.
If there are fewer than $max_num_past_revisions then all revisions will be returned.
Tags:
- return - An array containing all the revisions, an empty array if there are no revisions
- access - public
- Theme_Versioning_VCSAdapter::get_revisions()
- Returns an array containing up to the number of past revisions specified by num_past_revisons.
Parameters:
- int $max_num_revisions - the maximum number of past revisions to return.
[ Top ]
get_revisions_before
void get_revisions_before(
mixed
$revision_id, int
$num_revisions)
[line 330]
Return the specified number of revisions that were committed before the revision specified by $revision_id (in order from most recent to least recent)
Tags:
- access - public
- Theme_Versioning_VCSAdapter::get_revisions_before()
- Return the specified number of revisions that were committed before the revision specified by $revision_id (in order from most recent to least recent)
Parameters:
- mixed $revision_id -
- int $num_revisions - the number of revisions to return
[ Top ]
revert_file_to
true revert_file_to(
String
$revision_id, String
$file_name)
[line 260]
revert the file with name $file_name back to its state
in the given revision
Tags:
- return - on success, a WP_Error on failure
- access - public
- Theme_Versioning_VCSAdapter::revert_file_to()
- revert the file with name $file_name back to its state
Parameters:
- String $revision_id - The Revision to revert to.
- String $file_name - A string containing the file name to commit.
[ Top ]
revert_to
bool revert_to(
The
$revision_id)
[line 242]
Revert all files back to the state in the given revision
Tags:
- return - returns true on success, WP_Error on failure.
- access - public
- Theme_Versioning_VCSAdapter::revert_to()
- Revert all files back to the state in the given revision
Parameters:
- The $revision_id - id of the Revision to revert to.
[ Top ]
revert_to_previous
void revert_to_previous(
)
[line 218]
Undo all local changes since last commit
Reverts all files to their state as of the last commit. Much like an "undo" function to go back to the previous revision. Returns the post ID on success, false on failure.
Tags:
- access - public
Parameters:
[ Top ]
Class Constants
POST_META_KEY_FILES = 'files'
[line 23]
[ Top ]
POST_TYPE = 'theme_versioning_rev'
[line 24]
[ Top ]