403Webshell
Server IP : 89.39.208.18  /  Your IP : 216.73.217.74
Web Server : LiteSpeed
System :
User :  ( )
PHP Version : 7.4.33
Disable Function : eval,./,ln,passthru,dl,system,exec,popen,shell_exec,posix_getpwuid,posix_uname,ftp_exec,posix_uname,posix_getpwuid,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,get_current_user,getmyuid,getmygid,listen,chgrp,apache_note,apache_setenv,apache_child_terminate,closelog,debugger_off,debugge_on,ini_restore,netscript,escapeshellarg,cmd,backtick,virtual,show_sourc,show_source,pclose,pcntl_exec,datasec,old_offset,ctrl_dir,ini_alter,leak,listen,chgrp,apache_setenv,define_syslog_variables,root,diskfreespace,disk_free_space,disk_total_space,posix_kill,getmyuid,getmygid,apache_child_terminate,php_ini_scanned_files,ls,ps_aux,chown,getrusage,posixc,posame,chgrp,posix_setuid,posix_setsid,posix_setgid,apache_note,apache_setenv,x_getuid,e_ini_file,nfo,SQL,mysql_li,t_dbs,filegroup,highlight_file,ilegetcontents,get_dir,popen,popens,pfsockopen,dos_conv,apache_get_modules,crack_check,crack_closedict,rar_open,bzopen,bzread,bzwrite,shellcode,posix_isatty,posix_getservbyname,escapeshellarg,hypot,pg_host,pos,posix_access,inurl,posix_times,posix_mknod,pclose,ps_fill,symlink,id,escapeshellcmd,php_uname,phpinfo
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home3/mahyarcake/public_html/wp-content/themes/ecolive/assets/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home3/mahyarcake/public_html/wp-content/themes/ecolive/assets/js/editor.js
/**
 * Block editor enhancements.
 *
 * Contains functionality to dynamically update the block editor
 * configuration and styling.
 */
"use strict";

(function () {
  /**
   * Check if the main sidebar is active (has widgets).
   *
   * This uses a custom property `mainSidebarActive` added via the
   * `block_editor_settings` filter.
   *
   * @return {boolean} Whether sidebar is active.
   */
  var sidebarIsActive = function sidebarIsActive() {
    var settings = wp.data.select('core/editor').getEditorSettings();

    if (settings.hasOwnProperty('mainSidebarActive') && !!settings.mainSidebarActive) {
      return true;
    }

    return false;
  };
  /**
   * Get current page template name.
   *
   * @return {string} The page template name.
   */


  var getCurrentPageTemplate = function getCurrentPageTemplate() {
    return wp.data.select('core/editor').getEditedPostAttribute('template');
  };
  /**
   * Check if the active theme supports a wide layout.
   *
   * @return {boolean} Whether the theme supports wide layout.
   */


  var themeSupportsWide = function themeSupportsWide() {
    var settings = wp.data.select('core/editor').getEditorSettings();

    if (settings.hasOwnProperty('alignWide') && !!settings.alignWide) {
      return true;
    }

    return false;
  };
  /**
   * Update editor wide support.
   *
   * @param {boolean} alignWide Whether the editor supports
   *                            alignWide support.
   *
   * @return {void}
   */


  var updateWideSupport = function updateWideSupport(alignWide) {
    wp.data.dispatch('core/editor').updateEditorSettings({
      'alignWide': !!alignWide
    });
  };
  /**
   * Update `data-align` attribute on each block.
   *
   * @param {boolean} alignWide Whether alignWide is supported.
   *
   * @return {void}
   */


  var updateAlignAttribute = function updateAlignAttribute(alignWide) {
    var blocks = wp.data.select('core/editor').getBlocks();
    blocks.forEach(function (block) {
      if (block.attributes.hasOwnProperty('align')) {
        var align = block.attributes.align;

        if (!['full', 'wide'].includes(align)) {
          return;
        }

        var blockWrapper = document.getElementById('block-' + block.clientId);

        if (blockWrapper) {
          blockWrapper.setAttribute('data-align', alignWide ? align : '');
        }
      }
    });
  };
  /**
   * Add custom class to editor wrapper if main sidebar is active.
   *
   * @param {boolean} showSidebar Whether to add custom class.
   *
   * @return {void}
   */


  var toggleCustomSidebarClass = function toggleCustomSidebarClass(showSidebar) {
    var editorWrapper = document.getElementsByClassName('editor-writing-flow');

    if (!editorWrapper.length) {
      return;
    }

    if (!!showSidebar) {
      editorWrapper[0].classList.add('ecolive-has-sidebar');
    } else {
      editorWrapper[0].classList.remove('ecolive-has-sidebar');
    }
  };
  /**
   * Update editor and blocks when layout changes.
   *
   * @return {void}
   */


  var maybeUpdateEditor = function maybeUpdateEditor() {
    if ('template-fullwidth.php' === getCurrentPageTemplate()) {
      updateWideSupport(true);
      toggleCustomSidebarClass(false);
      updateAlignAttribute(true);
    } else if (sidebarIsActive()) {
      updateWideSupport(false);
      toggleCustomSidebarClass(true);
      updateAlignAttribute(false);
    } else {
      updateWideSupport(true);
      toggleCustomSidebarClass(false);
      updateAlignAttribute(true);
    }
  };

  wp.domReady(function () {
    // Don't do anything if the theme doesn't declare support for `align-wide`.
    if (!themeSupportsWide()) {
      return;
    }

    maybeUpdateEditor();
    var pageTemplate = getCurrentPageTemplate();
    wp.data.subscribe(function () {
      if (getCurrentPageTemplate() !== pageTemplate) {
        pageTemplate = getCurrentPageTemplate();
        maybeUpdateEditor();
      }
    });
  });
})();

Youez - 2016 - github.com/yon3zu
LinuXploit