Move into wp-content path

Signed-off-by: Adrian Nöthlich <git@promasu.tech>
This commit is contained in:
2019-08-31 00:48:20 +02:00
parent f523d8ccc0
commit 3724cc6edd
342 changed files with 108652 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
/**
* Javascript to show and hide the API specific settings
* for the remote install feature.
*
* @class Fragen\GitHub_Updater\Install
* @since 4.6.0
* @access public
* @package github-updater
*/
jQuery(document).ready(
function ($) {
// Hide non-default (Bitbucket & GitLab) settings on page load.
$.each(['bitbucket', 'gitlab', 'gitea', 'zipfile'],
function () {
$('input.'.concat(this, '_setting')).parents('tr').hide();
});
// When the api selector changes.
$('select[ name="github_updater_api" ]').on('change',
function () {
// create difference array.
var hideMe = $(['github', 'bitbucket', 'gitlab', 'gitea', 'zipfile']).not([this.value]).get();
/*
* Show/hide all settings that have the selected api's class.
* this.value equals either 'github', 'bitbucket', or 'gitlab'.
*/
$.each(
hideMe,
function () {
$('input.'.concat(this, '_setting')).parents('tr').hide();
}
);
$('input.'.concat(this.value, '_setting')).parents('tr').show();
});
});