Procedural File: index.php

Source Location: /index.php



Classes:

Page Details:


Includes:
include_once('default_vcs.php') [line 12]
include_once('theme_revision.php') [line 13]



theme_versioning_adapter_settings_section_text

void theme_versioning_adapter_settings_section_text( )

[line 320]

Callback function used to create the "adapter settings" section text

Parameters

[ Top ]

theme_versioning_add_revision_viewer_html

void theme_versioning_add_revision_viewer_html( )

[line 416]

Includes the revision viewer on the theme-editor.php page

Parameters

[ Top ]

theme_versioning_add_settings_page

void theme_versioning_add_settings_page( )

[line 286]

Action hook callback function to add the settings page to the admin dashboard settings menu

Parameters

[ Top ]

theme_versioning_add_ui

void theme_versioning_add_ui( )

[line 143]

Adds the theme versioning UI if and only if we are viewing/editing the current theme in theme-editor.php

Parameters

[ Top ]

theme_versioning_ajax_commit

void theme_versioning_ajax_commit( )

[line 554]

AJAX-Triggered action to revert all files to a given revision using the VCSAdapter's revert_to( $revision_id ) method.

On Success, When committing all files: Echoes "Successfully committed all files." On Failure, When committing all files: Echoes "Could not commit files." and an error code.

On Success, When committing one file: Echoes "Successfully committed <file's basename>" On Failure, When committing one file: Echoes "Could not commit <file's basename>." and an error code.

To commit commit all files, set the following AJAX POST parameter: commit_all : if set to 'true', the function will commit all of the theme files by calling the VCSAdapter's commit_all method.

To commit one particular file, set the following AJAX POST parameters: file_name : the file name of the file to be committed, if this is not set, the function will commit the current theme-editor file

Parameters

[ Top ]

theme_versioning_ajax_get_revision_file_contents

void theme_versioning_ajax_get_revision_file_contents( )

[line 517]

AJAX-Triggered action to revert all files to a given revision using the VCSAdapter's revert_to( $revision_id ) method.

Echoes the text-area-safe string containing the requested file's contents. AJAX POST parameters this function requires: revision_id : the revision id file_name : the name of the file

Parameters

[ Top ]

theme_versioning_ajax_get_revision_file_names

void theme_versioning_ajax_get_revision_file_names( )

[line 492]

AJAX-Triggered action to revert all files to a given revision using the VCSAdapter's revert_to( $revision_id ) method.

Echoes the json encoded string containing revision's file names. AJAX POST parameters this function requires: revision_id : the id of the revision whose file names are desired.

Parameters

[ Top ]

theme_versioning_ajax_load_revisions

void theme_versioning_ajax_load_revisions( )

[line 595]

AJAX-Triggered action to retrieve additional revisions' information to be presented through the revision viewer.

Echoes the text-area-safe string containing the requested file's contents.

AJAX POST parameters this function requires if specifying start revision id: start_rev_id : the revision id of the last loaded revision currently available in the viewer. num_revisions : the number of revisions to load in this request

AJAX POST parameter this function requires when requesting only the latest revision: latest_revision_only: if set to 'true', only returns the latest revision. No other parameters need be set aside from security.

Parameters

[ Top ]

theme_versioning_ajax_revert_file_to

void theme_versioning_ajax_revert_file_to( )

[line 441]

AJAX-Triggered action to revert a particular file using the VCSAdapter's revert_file_to( $revision_id, $file_name ) method.

On Success: Echoes "Successfully reverted <basename of file> to revision <revision_id>". On Failure: Echoes "Failed to revert <basename of file> to revison <revision_id>" AJAX POST parameters this function requires: revision_id : the revision the file should be reverted to. file_name : the file name of the file to be reverted.

Parameters

[ Top ]

theme_versioning_ajax_revert_to

void theme_versioning_ajax_revert_to( )

[line 467]

AJAX-Triggered action to revert all files to a given revision using the VCSAdapter's revert_to( $revision_id ) method.

On Success: Echoes "Successfully reverted all files to revision <revision_id>". On Failure: Echoes "Failed to revert to revision <revision_id>" AJAX POST parameters this function requires: revision_id : the revision the file should be reverted to.

Parameters

[ Top ]

theme_versioning_commit_trigger

void theme_versioning_commit_trigger( )

[line 399]

This function triggers the commits in the Basic UI

Parameters

[ Top ]

theme_versioning_get_current_editor_file

mixed theme_versioning_get_current_editor_file( )

[line 87]

Get the current file being viewed/edited if on theme-editor.php.

Tags:

  • return - The string full file name/path of the current file being viewed/edited if on theme-editor.php. false otherwise

Parameters

[ Top ]

theme_versioning_get_theme_file_paths

array theme_versioning_get_theme_file_paths( )

[line 67]

Get the paths to all the theme files editable via theme-editor.php.

Provided for use in the VCSAdapter's commitAll() function

Tags:

  • return - an array containing the paths to the current theme's files (both stylesheet and template files).

Parameters

[ Top ]

theme_versioning_get_ui_mode

String theme_versioning_get_ui_mode( )

[line 19]

Get the UI mode. Determines if the UI is in basic or advanced mode.

Tags:

  • return - 'basic' if the UI is currently set to basic mode, 'advanced' if set to advanced mode.

Parameters

[ Top ]

theme_versioning_get_vcs

Theme_Versioning_VCSAdapter theme_versioning_get_vcs( )

[line 28]

Get the current VCSAdapter.

Tags:

  • return - on success, false if no adapter is set

Parameters

[ Top ]

theme_versioning_get_vcs_include_path

string theme_versioning_get_vcs_include_path( $vcs_adapter)

[line 46]

Get the path to the file where the current vcs is declared so that it can be included in other script files programmatically.

Tags:

  • return - the path to the file where the current vcs is declared.

Parameters

  • $vcs_adapter -

[ Top ]

theme_versioning_interface_settings_section_text

void theme_versioning_interface_settings_section_text( )

[line 361]

Callback function to output the Interface Settings Text and Field

Parameters

[ Top ]

theme_versioning_is_editing_current_theme

boolean theme_versioning_is_editing_current_theme( )

[line 133]

Check to see if the theme editor page is on the current theme.

Tags:

  • return - true if currently on the theme editor page and viewing the current theme. flase otherwise.

Parameters

[ Top ]

theme_versioning_make_adapter_settings_field

void theme_versioning_make_adapter_settings_field( )

[line 338]

Callback function used to create the fields in the adapter settings section.

This function outputs the select input used to choose an adapter

Parameters

[ Top ]

theme_versioning_make_settings_page

void theme_versioning_make_settings_page( )

[line 299]

Callback function used to create the Theme Versioning Settings Page

Parameters

[ Top ]

theme_versioning_make_ui_mode_settings_field

void theme_versioning_make_ui_mode_settings_field( )

[line 379]

Callback function used to create the UI Mode Settings text and field.

Parameters

[ Top ]

theme_versioning_print_styles

void theme_versioning_print_styles( )

[line 171]

Include the style sheets for the revision viewer on the theme-editor.php page.

Parameters

[ Top ]

theme_versioning_register_adapter

void theme_versioning_register_adapter( Theme_Versioning_VCSAdapter $vcs_adapter)

[line 207]

The VCSAdapter plugins will have to register themeselves by calling this function.

Parameters

[ Top ]

theme_versioning_register_default_vcs

void theme_versioning_register_default_vcs( )

[line 190]

Register the Default VCS

Parameters

[ Top ]

theme_versioning_settings_init

void theme_versioning_settings_init( )

[line 238]

Setup the settings for the plugin.

Parameters

[ Top ]

theme_versioning_set_vcs

bool theme_versioning_set_vcs( Theme_Versioning_VCSAdapter $vcs_adapter)

[line 58]

Set the vcs_adapter to be used by the Theme Versioning plugin.

Tags:

  • return - true on success, false on failure

Parameters

[ Top ]

theme_versioning_uninstall

void theme_versioning_uninstall( )

[line 671]

Uninstall Hook Callback. Deletes options in database.

Parameters

[ Top ]


Documentation generated on Fri, 19 Aug 2011 18:08:44 -0600 by phpDocumentor 1.4.3