code
stringlengths
1
2.08M
language
stringclasses
1 value
// JavaScript Document (function() { // Creates a new plugin class and a custom label tinymce.create('tinymce.plugins.dnp_labels', { createControl: function(n, cm) { switch (n) { case 'dnp_labels': var c = cm.createSplitButton('dnp_label...
JavaScript
// popups abd popover jQuery(function($){ // jQuery('a[rel="popover"]').popover() // jQuery('a:not([rel="popover"])').tooltip() }); //modals jQuery('a[role=button]').on('click', function(e) { e.preventDefault(); var id = $(this).attr('id'); var url = $(this).attr('href'); if ($(this).attr('hr...
JavaScript
/** * Color picker * Author: Stefan Petre www.eyecon.ro * * Dependencies: jQuery */ (function ($) { var ColorPicker = function () { var ids = {}, inAction, charMin = 65, visible, tpl = '<div class="ot_colorpicker colorpicker"><div class="colorpicker_color"><div><div></div></div></di...
JavaScript
/** * Option Tree UI * * Dependencies: jQuery, jQuery UI, ColorPicker * * @author Derek Herman (derek@valendesigns.com) */ ;(function($) { OT_UI = { processing: false, init: function() { this.init_hide_body(); this.init_sortable(); this.init_add(); this.init_edit()...
JavaScript
var acf = { post_id : 0, nonce : '', admin_url : '', ajaxurl : '', text : {}, l10n : {}, helpers : { uniqid : function(){}, sortable : function(){}, create_field : function(){} }, conditional_logic : { fields : [], setup : function(){} }, location : { $el : null, init : function(){}, add_rule...
JavaScript
/* ********************************************** Begin acf.js ********************************************** */ /* * input.js * * All javascript needed for ACF to work * * @type awesome * @date 1/08/13 * * @param N/A * @return N/A */ var acf = { // vars ajaxurl : '', admin_url : '', wp_versi...
JavaScript
/* * Parsley.js allows you to verify your form inputs frontend side, without writing a line of javascript. Or so.. * * Author: Guillaume Potier - @guillaumepotier */ !function ($) { 'use strict'; /** * Validator class stores all constraints functions and associated messages. * Provides public ...
JavaScript
window.ParsleyConfig = window.ParsleyConfig || {}; (function ($) { window.ParsleyConfig = $.extend( true, {}, window.ParsleyConfig, { validators: { minwords: function ( val, nbWords ) { val = val.replace( /(^\s*)|(\s*$)/gi, "" ); val = val.replace( /[ ]{2,}/gi, " " ); val = ...
JavaScript
'use strict'; window.ParsleyConfig = $.extend( true, {}, window.ParsleyConfig, { // deactivate errors animation, causing travis test suite failing animate: false , messages: { type: { urlstrict: "urlstrict global override." } } } ); var triggerSubmitValidation = function ( idOrCl...
JavaScript
;(function(){ // CommonJS require() function require(p){ var path = require.resolve(p) , mod = require.modules[path]; if (!mod) throw new Error('failed to require "' + p + '"'); if (!mod.exports) { mod.exports = {}; mod.call(mod.exports, mod, mod.exports, require.relative(pat...
JavaScript
/** * Sinon.JS 1.5.2, 2012/11/27 * * @author Christian Johansen (christian@cjohansen.no) * @author Contributors: https://github.com/cjohansen/Sinon.JS/blob/master/AUTHORS * * (The BSD License) * * Copyright (c) 2010-2012, Christian Johansen, christian@cjohansen.no * All rights reserved. * * Redi...
JavaScript
/* Zepto v1.0rc1-108-g9e9682a - polyfill zepto event fx ajax data fx_methods - zeptojs.com/license */ ;(function(undefined){ if (String.prototype.trim === undefined) // fix for iOS 3.2 String.prototype.trim = function(){ return this.replace(/^\s+/, '').replace(/\s+$/, '') } // For iOS 3.x // from https...
JavaScript
(function (global, module) { if ('undefined' == typeof module) { var module = { exports: {} } , exports = module.exports } /** * Exports. */ module.exports = expect; expect.Assertion = Assertion; /** * Exports version. */ expect.version = '0.1.2'; /** ...
JavaScript
window.ParsleyConfig = window.ParsleyConfig || {}; (function ($) { window.ParsleyConfig = $.extend( true, {}, window.ParsleyConfig, { validators: { es_dni: function ( val, elem, self ) { var letter, letters, number; letters = 'TRWAGMYFPDXBNJZSQVHLCKET'; val = val.replace("...
JavaScript
window.ParsleyConfig = window.ParsleyConfig || {}; (function ($) { window.ParsleyConfig = $.extend( true, {}, window.ParsleyConfig, { messages: { // parsley ////////////////////////////////////// defaultMessage: "Această valoare nu pare validă." , type: { email: "Ac...
JavaScript
window.ParsleyConfig = window.ParsleyConfig || {}; (function ($) { window.ParsleyConfig = $.extend( true, {}, window.ParsleyConfig, { messages: { // parsley ////////////////////////////////////// defaultMessage: "Þetta gildi virðist vera ógilt." , type: { email: "Þett...
JavaScript
window.ParsleyConfig = window.ParsleyConfig || {}; (function ($) { window.ParsleyConfig = $.extend( true, {}, window.ParsleyConfig, { messages: { // parsley ////////////////////////////////////// defaultMessage: "Die Eingabe scheint nicht korrekt zu sein." , type: { email:...
JavaScript
window.ParsleyConfig = window.ParsleyConfig || {}; (function ($) { window.ParsleyConfig = $.extend( true, {}, window.ParsleyConfig, { messages: { // parsley ////////////////////////////////////// defaultMessage: "Questo valore sembra essere non valido." , type: { email: "Q...
JavaScript
window.ParsleyConfig = window.ParsleyConfig || {}; (function ($) { window.ParsleyConfig = $.extend( true, {}, window.ParsleyConfig, { messages: { // parsley ////////////////////////////////////// defaultMessage: "Denne verdien er ikke gyldig." , type: { email: "Denne ...
JavaScript
window.ParsleyConfig = window.ParsleyConfig || {}; (function ($) { window.ParsleyConfig = $.extend( true, {}, window.ParsleyConfig, { messages: { // parsley ////////////////////////////////////// defaultMessage: "Aquest valor sembla ser invàlid." , type: { email: "Aqu...
JavaScript
/** * /!\ This file is in Croatian /!\ */ window.ParsleyConfig = window.ParsleyConfig || {}; (function ($) { window.ParsleyConfig = $.extend( true, {}, window.ParsleyConfig, { messages: { // parsley ////////////////////////////////////// defaultMessage: "Pogrešan unos" , type: {...
JavaScript
window.ParsleyConfig = window.ParsleyConfig || {}; (function ($) { window.ParsleyConfig = $.extend( true, {}, window.ParsleyConfig, { messages: { // parsley ////////////////////////////////////// defaultMessage: "Алдаатай утга оруулсан байна." , type: { email: "Зөв ...
JavaScript
/** * Swedish i18n. */ window.ParsleyConfig = window.ParsleyConfig || {}; (function ($) { window.ParsleyConfig = $.extend( true, {}, window.ParsleyConfig, { messages: { // parsley ////////////////////////////////////// defaultMessage: "Ogiltigt värde." , type: { email...
JavaScript
window.ParsleyConfig = window.ParsleyConfig || {}; (function ($) { window.ParsleyConfig = $.extend( true, {}, window.ParsleyConfig, { messages: { // parsley ////////////////////////////////////// defaultMessage: "Nilai ini tidak valid." , type: { email: "Nilai ini har...
JavaScript
window.ParsleyConfig = window.ParsleyConfig || {}; (function ($) { window.ParsleyConfig = $.extend( true, {}, window.ParsleyConfig, { messages: { // parsley ////////////////////////////////////// defaultMessage: "تنسيق الحقل غير صحيح" , type: { email: "اكتب البريد ا...
JavaScript
window.ParsleyConfig = window.ParsleyConfig || {}; (function ($) { window.ParsleyConfig = $.extend( true, {}, window.ParsleyConfig, { messages: { // parsley ////////////////////////////////////// defaultMessage: "正しい値を入力してください。" , type: { email: "正しいメールアドレスを入力してください...
JavaScript
window.ParsleyConfig = window.ParsleyConfig || {}; (function ($) { window.ParsleyConfig = $.extend( true, {}, window.ParsleyConfig, { messages: { // parsley ////////////////////////////////////// defaultMessage: "Este valor parece estar inválido." , type: { email: ...
JavaScript
window.ParsleyConfig = window.ParsleyConfig || {}; (function ($) { window.ParsleyConfig = $.extend( true, {}, window.ParsleyConfig, { messages: { // parsley ////////////////////////////////////// defaultMessage: "مقدار وارد شده معتبر نیست." , type: { email: "آدرس ایم...
JavaScript
window.ParsleyConfig = window.ParsleyConfig || {}; (function ($) { window.ParsleyConfig = $.extend( true, {}, window.ParsleyConfig, { messages: { // parsley ////////////////////////////////////// defaultMessage: "Поле заповнене некорректно." , type: { email: "Поле пов...
JavaScript
window.ParsleyConfig = window.ParsleyConfig || {}; (function ($) { window.ParsleyConfig = $.extend( true, {}, window.ParsleyConfig, { messages: { // parsley ////////////////////////////////////// defaultMessage: "Tämä arvo on virheellinen." , type: { email: "Tämän arv...
JavaScript
/** * Estonian i18n */ window.ParsleyConfig = window.ParsleyConfig || {}; (function ($) { window.ParsleyConfig = $.extend( true, {}, window.ParsleyConfig, { messages: { // parsley ////////////////////////////////////// defaultMessage: "Palun kontrolli välja väärtust." , type: { ...
JavaScript
window.ParsleyConfig = window.ParsleyConfig || {}; (function ($) { window.ParsleyConfig = $.extend( true, {}, window.ParsleyConfig, { messages: { // parsley ////////PL/by/Tymek.Cz//////////////// defaultMessage: "Wartość nieprawidłowa" , type: { email: "Niepop...
JavaScript
window.ParsleyConfig = window.ParsleyConfig || {}; (function ($) { window.ParsleyConfig = $.extend( true, {}, window.ParsleyConfig, { messages: { // parsley ////////////////////////////////////// defaultMessage: "Mae'r gwerth hwn yn ymddangos i fod yn annilys." , type: { emai...
JavaScript
window.ParsleyConfig = window.ParsleyConfig || {}; (function ($) { window.ParsleyConfig = $.extend( true, {}, window.ParsleyConfig, { messages: { // parsley ////////////////////////////////////// defaultMessage: "הערך הזה אינו תקין." , type: { email: "ערך זה צריך ל...
JavaScript
window.ParsleyConfig = window.ParsleyConfig || {}; (function ($) { window.ParsleyConfig = $.extend( true, {}, window.ParsleyConfig, { messages: { // parsley ////////////////////////////////////// defaultMessage: "Thông tin này không hợp lệ." , type: { email: "Email không hợ...
JavaScript
/** * /!\ This file is just an example template to create/update your own language file /!\ */ window.ParsleyConfig = window.ParsleyConfig || {}; (function ($) { window.ParsleyConfig = $.extend( true, {}, window.ParsleyConfig, { messages: { // parsley ////////////////////////////////////// ...
JavaScript
window.ParsleyConfig = window.ParsleyConfig || {}; (function ($) { window.ParsleyConfig = $.extend( true, {}, window.ParsleyConfig, { messages: { // parsley ////////////////////////////////////// defaultMessage: "Deze waarde lijkt onjuist." , type: { email: "Dit lijkt...
JavaScript
/** * /!\ This file is just an example template to create/update your own language file /!\ */ window.ParsleyConfig = window.ParsleyConfig || {}; (function ($) { window.ParsleyConfig = $.extend( true, {}, window.ParsleyConfig, { messages: { // parsley ////////////////////////////////////// ...
JavaScript
window.ParsleyConfig = window.ParsleyConfig || {}; (function ($) { window.ParsleyConfig = $.extend( true, {}, window.ParsleyConfig, { messages: { // parsley ////////////////////////////////////// defaultMessage: "Este valor parece ser inválido." , type: { email: "Es...
JavaScript
window.ParsleyConfig = window.ParsleyConfig || {}; (function ($) { window.ParsleyConfig = $.extend( true, {}, window.ParsleyConfig, { messages: { // parsley ////////////////////////////////////// defaultMessage: "Поле заполнено некорректно." , type: { email: ...
JavaScript
window.ParsleyConfig = window.ParsleyConfig || {}; (function ($) { window.ParsleyConfig = $.extend( true, {}, window.ParsleyConfig, { messages: { // parsley ////////////////////////////////////// defaultMessage: "A megadott érték érvénytelen." , type: { email: "A me...
JavaScript
/** * /!\ This file is just an example template to create/update your own language file /!\ */ window.ParsleyConfig = window.ParsleyConfig || {}; (function ($) { window.ParsleyConfig = $.extend( true, {}, window.ParsleyConfig, { messages: { // parsley ////////////////////////////////////// ...
JavaScript
window.ParsleyConfig = window.ParsleyConfig || {}; (function ($) { window.ParsleyConfig = $.extend( true, {}, window.ParsleyConfig, { messages: { // parsley ////////////////////////////////////// defaultMessage: "Cette valeur semble non valide." , type: { email: "Cett...
JavaScript
window.ParsleyConfig = window.ParsleyConfig || {}; (function ($) { window.ParsleyConfig = $.extend( true, {}, window.ParsleyConfig, { messages: { // parsley ////////////////////////////////////// defaultMessage: "Tato položka je neplatná." , type: { email: "Tato položka musí být e-mail...
JavaScript
/** * /!\ Created by Murat Akdeniz: www.webfikirleri.com /!\ */ window.ParsleyConfig = window.ParsleyConfig || {}; (function ($) { window.ParsleyConfig = $.extend( true, {}, window.ParsleyConfig, { messages: { // parsley ////////////////////////////////////// defaultMessage: "Bu değer ge...
JavaScript
window.ParsleyConfig = window.ParsleyConfig || {}; (function ($) { window.ParsleyConfig = $.extend( true, {}, window.ParsleyConfig, { messages: { // parsley ////////////////////////////////////// defaultMessage: "Laukas užpildytas neteisingai" , type: { email: "Neteis...
JavaScript
/** * Theme : Argo * Author: WPStrong * Url: http://themeforest.net/user/wpstrong * Version: 1.0 */ jQuery(function($){ /** * Init slide * -------- */ var options = { nextButton: true, prevButton: true, // pagination: true, animateStartingFra...
JavaScript
jQuery(document).ready(function($) { // Media Uploader window.formfield = ''; $('.upload_btn').live('click', function (e) { e.preventDefault(); formfield = $( $(this).attr('rel') ); window.formfield = $( $(this).attr('rel') ); window.tbframe_interval = se...
JavaScript
/** * jquery.hoverdir.js v1.1.0 * http://www.codrops.com * * Licensed under the MIT license. * http://www.opensource.org/licenses/mit-license.php * * Copyright 2012, Codrops * http://www.codrops.com */ ;( function( $, window, undefined ) { 'use strict'; $.HoverDir = function( ...
JavaScript
jQuery( document ).ready( function( $ ) { $( document ).keydown( function( e ) { var url = false; if ( e.which == 37 ) { // Left arrow key code url = $( '.previous-image a' ).attr( 'href' ); } else if ( e.which == 39 ) { // Right arrow key code url = $( '.entry-attachment a' ).attr( 'href...
JavaScript
/** * navigation.js * * Handles toggling the navigation menu for small screens. */ ( function() { var container = document.getElementById( 'site-navigation' ), button = container.getElementsByTagName( 'h1' )[0], menu = container.getElementsByTagName( 'ul' )[0]; if ( undefine...
JavaScript
( function() { var is_webkit = navigator.userAgent.toLowerCase().indexOf( 'webkit' ) > -1, is_opera = navigator.userAgent.toLowerCase().indexOf( 'opera' ) > -1, is_ie = navigator.userAgent.toLowerCase().indexOf( 'msie' ) > -1; if ( ( is_webkit || is_opera || is_ie ) && 'undefined' !== typ...
JavaScript
/** * Theme Customizer enhancements for a better user experience. * * Contains handlers to make Theme Customizer preview reload changes asynchronously. */ ( function( $ ) { // Site title and description. wp.customize( 'blogname', function( value ) { value.bind( function( to ) { $( '.site...
JavaScript
// JavaScript Document (function() { // Creates a new plugin class and a custom listbox tinymce.create('tinymce.plugins.dnp_tabs', { createControl: function(n, cm) { switch (n) { case 'dnp_tabs': var c = cm.createButton('dnp_tabs'...
JavaScript
// JavaScript Document (function() { // Creates a new plugin for tables shortcodes tinymce.create('tinymce.plugins.dnp_tables', { createControl: function(n, cm) { switch (n) { case 'dnp_tables': var c = cm.createSplitButton('dnp_t...
JavaScript
// JavaScript Document (function() { // Creates a new plugin class and a custom listbox tinymce.create('tinymce.plugins.dnp_service', { createControl: function(n, cm) { switch (n) { case 'dnp_service': var c = cm.createButton('dnp...
JavaScript
// JavaScript Document (function() { // Creates a new plugin class and a custom code tinymce.create('tinymce.plugins.dnp_code', { createControl: function(n, cm) { switch (n) { case 'dnp_code': var c = cm.createSplitButton('dnp_cod...
JavaScript
// JavaScript Document (function() { // Creates a new plugin class and a custom listbox tinymce.create('tinymce.plugins.dnp_collapse', { createControl: function(n, cm) { switch (n) { case 'dnp_collapse': var c = cm.createButton('d...
JavaScript
// JavaScript Document (function() { // Creates a new plugin for icons tinymce.create('tinymce.plugins.dnp_icons', { createControl: function(n, cm) { switch (n) { case 'dnp_icons': var c = cm.createButton('dnp_icons', { ...
JavaScript
// JavaScript Document (function() { // Creates a new plugin class and a custom listbox tinymce.create('tinymce.plugins.dnp_buttons', { createControl: function(n, cm) { switch (n) { case 'dnp_buttons': var c = cm.createButton('dnp...
JavaScript
// JavaScript Document (function() { // Creates a new plugin class and a custom label tinymce.create('tinymce.plugins.dnp_gmap', { createControl: function(n, cm) { switch (n) { case 'dnp_gmap': var c = cm.createSplitButton('dnp_gm...
JavaScript
// JavaScript Document (function() { // Creates a new plugin class and a custom listbox tinymce.create('tinymce.plugins.dnp_alerts', { createControl: function(n, cm) { switch (n) { case 'dnp_alerts': var c = cm.createSplitButton('...
JavaScript
// JavaScript Document (function() { // Creates a new plugin class and a custom code tinymce.create('tinymce.plugins.dnp_blockquote', { createControl: function(n, cm) { switch (n) { case 'dnp_blockquote': var c = cm.createSplitBut...
JavaScript
// JavaScript Document (function() { // Creates a new plugin class and a custom listbox tinymce.create('tinymce.plugins.dnp_typo', { createControl: function(n, cm) { switch (n) { case 'dnp_typo': var c = cm.createSplitButton('dnp_...
JavaScript
// JavaScript Document (function() { // Creates a new plugin class and a custom listbox tinymce.create('tinymce.plugins.dnp_social', { createControl: function(n, cm) { switch (n) { case 'dnp_social': var c = cm.createSplitButton('...
JavaScript
// JavaScript Document (function() { // Creates a new plugin class and a custom listbox tinymce.create('tinymce.plugins.dnp_grid', { createControl: function(n, cm) { switch (n) { case 'dnp_grid': var c = cm.createSplitButton('dnp_...
JavaScript
// JavaScript Document (function() { // Creates a new plugin class and a custom listbox tinymce.create('tinymce.plugins.dnp_thumbnails', { createControl: function(n, cm) { switch (n) { case 'dnp_thumbnails': var c = cm.createSplit...
JavaScript
// JavaScript Document (function() { // Creates a new plugin class and a custom listbox tinymce.create('tinymce.plugins.dnp_progress', { createControl: function(n, cm) { switch (n) { case 'dnp_progress': var c = cm.createSplitButt...
JavaScript
// JavaScript Document (function() { // Creates a new plugin class and a custom listbox tinymce.create('tinymce.plugins.dnp_images', { createControl: function(n, cm) { switch (n) { case 'dnp_images': var c = cm.createSplitButton('...
JavaScript
// JavaScript Document (function() { // Creates a new plugin class and a custom label tinymce.create('tinymce.plugins.dnp_labels', { createControl: function(n, cm) { switch (n) { case 'dnp_labels': var c = cm.createSplitButton('dn...
JavaScript
// popups abd popover jQuery(function($){ // jQuery('a[rel="popover"]').popover() // jQuery('a:not([rel="popover"])').tooltip() }); //modals jQuery('a[role=button]').on('click', function(e) { e.preventDefault(); var id = $(this).attr('id'); var url = $(this).attr('href'); if ($(thi...
JavaScript
/** * Color picker * Author: Stefan Petre www.eyecon.ro * * Dependencies: jQuery */ (function ($) { var ColorPicker = function () { var ids = {}, inAction, charMin = 65, visible, tpl = '<div class="ot_colorpicker colorpicker"><div class="colorpicker_color"><div><div></d...
JavaScript
/** * Option Tree UI * * Dependencies: jQuery, jQuery UI, ColorPicker * * @author Derek Herman (derek@valendesigns.com) */ ;(function($) { OT_UI = { processing: false, init: function() { this.init_hide_body(); this.init_sortable(); this.init_add(); th...
JavaScript
jQuery(document).ready( function($) { postboxes.add_postbox_toggles('comment'); var stamp = $('#timestamp').html(); $('.edit-timestamp').click(function () { if ($('#timestampdiv').is(":hidden")) { $('#timestampdiv').slideDown("normal"); $('.edit-timestamp').hide(); } return false; }); $('.cancel-tim...
JavaScript
/* Plugin Browser Thickbox related JS*/ var tb_position; jQuery(document).ready(function($) { tb_position = function() { var tbWindow = $('#TB_window'), width = $(window).width(), H = $(window).height(), W = ( 720 < width ) ? 720 : width, adminbar_height = 0; if ( $('body.admin-bar').length ) adminbar_height =...
JavaScript
(function($) { inlineEditTax = { init : function() { var t = this, row = $('#inline-edit'); t.type = $('#the-list').attr('data-wp-lists').substr(5); t.what = '#'+t.type+'-'; $('#the-list').on('click', 'a.editinline', function(){ inlineEditTax.edit(this); return false; }); // prepare the edit row...
JavaScript
jQuery(document).ready(function($) { $('#the-list').on('click', '.delete-tag', function(e){ var t = $(this), tr = t.parents('tr'), r = true, data; if ( 'undefined' != showNotice ) r = showNotice.warn(); if ( r ) { data = t.attr('href').replace(/[^?]*\?/, '').replace(/action=delete/, 'action=delete-tag'); ...
JavaScript
var tagBox, commentsBox, editPermalink, makeSlugeditClickable, WPSetThumbnailHTML, WPSetThumbnailID, WPRemoveThumbnail, wptitlehint; // return an array with any duplicate, whitespace or values removed function array_unique_noempty(a) { var out = []; jQuery.each( a, function(key, val) { val = jQuery.trim(val); if...
JavaScript
(function($){ function check_pass_strength() { var pass1 = $('#pass1').val(), user = $('#user_login').val(), pass2 = $('#pass2').val(), strength; $('#pass-strength-result').removeClass('short bad good strong'); if ( ! pass1 ) { $('#pass-strength-result').html( pwsL10n.empty ); return; } strength = p...
JavaScript
var showNotice, adminMenu, columns, validateForm, screenMeta; (function($){ // Removed in 3.3. // (perhaps) needed for back-compat adminMenu = { init : function() {}, fold : function() {}, restoreMenuState : function() {}, toggle : function() {}, favorites : function() {} }; // show/hide/save table columns column...
JavaScript
(function( exports, $ ){ var api = wp.customize; /* * @param options * - previewer - The Previewer instance to sync with. * - transport - The transport to use for previewing. Supports 'refresh' and 'postMessage'. */ api.Setting = api.Value.extend({ initialize: function( id, value, options ) { var eleme...
JavaScript
/*! * Farbtastic: jQuery color picker plug-in v1.3u * * Licensed under the GPL license: * http://www.gnu.org/licenses/gpl.html */ (function($) { $.fn.farbtastic = function (options) { $.farbtastic(this, options); return this; }; $.farbtastic = function (container, callback) { var container = $(container)...
JavaScript
// send html to the post editor var wpActiveEditor; function send_to_editor(h) { var ed, mce = typeof(tinymce) != 'undefined', qt = typeof(QTags) != 'undefined'; if ( !wpActiveEditor ) { if ( mce && tinymce.activeEditor ) { ed = tinymce.activeEditor; wpActiveEditor = ed.id; } else if ( !qt ) { return ...
JavaScript
(function($,undefined) { wpWordCount = { settings : { strip : /<[a-zA-Z\/][^<>]*>/g, // strip HTML tags clean : /[0-9.(),;:!?%#$¿'"_+=\\/-]+/g, // regexp to remove punctuation, etc. w : /\S\s+/g, // word-counting regexp c : /\S/g // char-counting regexp for asian languages }, block : 0, wc : fun...
JavaScript
(function($) { var id = 'undefined' !== typeof current_site_id ? '&site_id=' + current_site_id : ''; $(document).ready( function() { $( '.wp-suggest-user' ).autocomplete({ source: ajaxurl + '?action=autocomplete-user&autocomplete_type=add' + id, delay: 500, minLength: 2, position: ( 'undefined' ...
JavaScript
jQuery(function($){ $( 'body' ).bind( 'click.wp-gallery', function(e){ var target = $( e.target ), id, img_size; if ( target.hasClass( 'wp-set-header' ) ) { ( window.dialogArguments || opener || parent || top ).location.href = target.data( 'location' ); e.preventDefault(); } else if ( target.hasClass( 'wp...
JavaScript
/** * PubSub * * A lightweight publish/subscribe implementation. * Private use only! */ var PubSub, fullscreen, wptitlehint; PubSub = function() { this.topics = {}; }; PubSub.prototype.subscribe = function( topic, callback ) { if ( ! this.topics[ topic ] ) this.topics[ topic ] = []; this.topics[ topic ].pu...
JavaScript
(function($) { inlineEditPost = { init : function(){ var t = this, qeRow = $('#inline-edit'), bulkRow = $('#bulk-edit'); t.type = $('table.widefat').hasClass('pages') ? 'page' : 'post'; t.what = '#post-'; // prepare the edit rows qeRow.keyup(function(e){ if (e.which == 27) return inlineEditPost.rev...
JavaScript
var thickDims, tbWidth, tbHeight; jQuery(document).ready(function($) { thickDims = function() { var tbWindow = $('#TB_window'), H = $(window).height(), W = $(window).width(), w, h; w = (tbWidth && tbWidth < W - 90) ? tbWidth : W - 90; h = (tbHeight && tbHeight < H - 60) ? tbHeight : H - 60; if ( tbWindow.s...
JavaScript
( function( $ ){ $( document ).ready( function () { // Expand/Collapse on click $( '.accordion-container' ).on( 'click keydown', '.accordion-section-title', function( e ) { if ( e.type === 'keydown' && 13 !== e.which ) // "return" key return; e.preventDefault(); // Keep this AFTER the key filter above...
JavaScript
var findPosts; (function($){ findPosts = { open : function(af_name, af_val) { var st = document.documentElement.scrollTop || $(document).scrollTop(), overlay = $( '.ui-find-overlay' ); if ( overlay.length == 0 ) { $( 'body' ).append( '<div class="ui-find-overlay"></div>' ); findPosts.overlay(); ...
JavaScript
var postboxes; (function($) { postboxes = { add_postbox_toggles : function(page, args) { var self = this; self.init(page, args); $('.postbox h3, .postbox .handlediv').bind('click.postboxes', function() { var p = $(this).parent('.postbox'), id = p.attr('id'); if ( 'dashboard_browser_nag' == id ) ...
JavaScript
jQuery(document).ready( function($) { $('#link_rel').prop('readonly', true); $('#linkxfndiv input').bind('click keyup', function() { var isMe = $('#me').is(':checked'), inputs = ''; $('input.valinp').each( function() { if (isMe) { $(this).prop('disabled', true).parent().addClass('disabled'); } else { ...
JavaScript
(function($) { $(document).ready(function() { var bgImage = $("#custom-background-image"), frame; $('#background-color').wpColorPicker({ change: function( event, ui ) { bgImage.css('background-color', ui.color.toString()); }, clear: function() { bgImage.css('background-color', ''); } }); ...
JavaScript
var theList, theExtraList, toggleWithKeyboard = false; (function($) { var getCount, updateCount, updatePending, dashboardTotals; setCommentsList = function() { var totalInput, perPageInput, pageInput, lastConfidentTime = 0, dimAfter, delBefore, updateTotalCount, delAfter, refillTheExtraList; totalInput = $('input[...
JavaScript
var ajaxWidgets, ajaxPopulateWidgets, quickPressLoad; jQuery(document).ready( function($) { /* Dashboard Welcome Panel */ var welcomePanel = $('#welcome-panel'), welcomePanelHide = $('#wp_welcome_panel-hide'), updateWelcomePanel = function( visible ) { $.post( ajaxurl, { action: 'update-welcome-panel', ...
JavaScript
/** * WordPress Administration Navigation Menu * Interface JS functions * * @version 2.0.0 * * @package WordPress * @subpackage Administration */ var wpNavMenu; (function($) { var api = wpNavMenu = { options : { menuItemDepthPerLevel : 30, // Do not use directly. Use depthToPx and pxToDepth instead. ...
JavaScript
/** * Theme Browsing * * Controls visibility of theme details on manage and install themes pages. */ jQuery( function($) { $('#availablethemes').on( 'click', '.theme-detail', function (event) { var theme = $(this).closest('.available-theme'), details = theme.find('.themedetaildiv'); if ( ! details.length...
JavaScript
// Password strength meter function passwordStrength(password1, username, password2) { var shortPass = 1, badPass = 2, goodPass = 3, strongPass = 4, mismatch = 5, symbolSize = 0, natLog, score; // password 1 != password 2 if ( (password1 != password2) && password2.length > 0) return mismatch //password < 4 if ...
JavaScript
( function( $, undef ){ // html stuff var _before = '<a tabindex="0" class="wp-color-result" />', _after = '<div class="wp-picker-holder" />', _wrap = '<div class="wp-picker-container" />', _button = '<input type="button" class="button button-small hidden" />'; // jQuery UI Widget constructor var ColorPicke...
JavaScript