Nav apraksta

index.jsx 602B

123456789101112131415161718192021222324252627282930
  1. /**
  2. * WordPress dependencies
  3. */
  4. import { render } from '@wordpress/element';
  5. /**
  6. * Internal dependencies
  7. */
  8. import Layout from './components/layout';
  9. import './styles.scss';
  10. /**
  11. * Collapses wp-admin's sidebar menu for additional space.
  12. */
  13. function collapseWpAdminSidebar() {
  14. document.body.classList.add( 'folded' );
  15. }
  16. /**
  17. * Initializes the widgets screen
  18. *
  19. * @param {string} id - Id of the root element to render the screen.
  20. */
  21. function initialize( id ) {
  22. collapseWpAdminSidebar();
  23. render( <Layout />, document.getElementById( id ) );
  24. }
  25. global.jetpackSearchConfigureInit = initialize;