import { Router, LocationProvider, Redirect } from '@reach/router';
import Templates from './pages/templates';
import TemplateType from './pages/template-type';
import AddNew from './pages/add-new';
import Conditions from './pages/conditions/conditions';
import Import from './pages/import';
import TemplatesProvider, { Context as TemplatesContext } from './context/templates';
import { Layout, AllPartsButton, NotFound } from '@elementor/site-editor';
import { ErrorBoundary, Grid, Button } from '@elementor/app-ui';
import router from '@elementor/router';
import Component from './data/component';
import './site-editor.scss';
function SiteEditor() {
const basePath = 'site-editor';
const headerButtons = [
{
id: 'import',
text: __( 'import', 'elementor-pro' ),
hideText: true,
icon: 'eicon-download-circle-o',
onClick: () => router.appHistory.navigate( basePath + '/import' ),
},
];
// Remove Core cache.
elementorCommon.ajax.invalidateCache( {
unique_id: 'app_site_editor_template_types',
} );
const SiteEditorDefault = () => {
const { templates } = React.useContext( TemplatesContext );
if ( Object.keys( templates ).length ) {
return ;
}
return ;
};
return (
} headerButtons={ headerButtons } titleRedirectRoute={ '/' + basePath }>
);
}
export default class Module {
constructor() {
elementorCommon.debug.addURLToWatch( 'elementor-pro/assets' );
$e.components.register( new Component() );
router.addRoute( {
path: '/site-editor/*',
component: SiteEditor,
} );
}
}
import { Router, LocationProvider, Redirect } from '@reach/router';
import Templates from './pages/templates';
import TemplateType from './pages/template-type';
import AddNew from './pages/add-new';
import Conditions from './pages/conditions/conditions';
import Import from './pages/import';
import TemplatesProvider, { Context as TemplatesContext } from './context/templates';
import { Layout, AllPartsButton, NotFound } from '@elementor/site-editor';
import { ErrorBoundary, Grid, Button } from '@elementor/app-ui';
import router from '@elementor/router';
import Component from './data/component';
import './site-editor.scss';
function SiteEditor() {
const basePath = 'site-editor';
const headerButtons = [
{
id: 'import',
text: __( 'import', 'elementor-pro' ),
hideText: true,
icon: 'eicon-download-circle-o',
onClick: () => router.appHistory.navigate( basePath + '/import' ),
},
];
// Remove Core cache.
elementorCommon.ajax.invalidateCache( {
unique_id: 'app_site_editor_template_types',
} );
const SiteEditorDefault = () => {
const { templates } = React.useContext( TemplatesContext );
if ( Object.keys( templates ).length ) {
return ;
}
return ;
};
return (
} headerButtons={ headerButtons } titleRedirectRoute={ '/' + basePath }>
);
}
export default class Module {
constructor() {
elementorCommon.debug.addURLToWatch( 'elementor-pro/assets' );
$e.components.register( new Component() );
router.addRoute( {
path: '/site-editor/*',
component: SiteEditor,
} );
}
}
import { Router, LocationProvider, Redirect } from '@reach/router';
import Templates from './pages/templates';
import TemplateType from './pages/template-type';
import AddNew from './pages/add-new';
import Conditions from './pages/conditions/conditions';
import Import from './pages/import';
import TemplatesProvider, { Context as TemplatesContext } from './context/templates';
import { Layout, AllPartsButton, NotFound } from '@elementor/site-editor';
import { ErrorBoundary, Grid, Button } from '@elementor/app-ui';
import router from '@elementor/router';
import Component from './data/component';
import './site-editor.scss';
function SiteEditor() {
const basePath = 'site-editor';
const headerButtons = [
{
id: 'import',
text: __( 'import', 'elementor-pro' ),
hideText: true,
icon: 'eicon-download-circle-o',
onClick: () => router.appHistory.navigate( basePath + '/import' ),
},
];
// Remove Core cache.
elementorCommon.ajax.invalidateCache( {
unique_id: 'app_site_editor_template_types',
} );
const SiteEditorDefault = () => {
const { templates } = React.useContext( TemplatesContext );
if ( Object.keys( templates ).length ) {
return ;
}
return ;
};
return (
} headerButtons={ headerButtons } titleRedirectRoute={ '/' + basePath }>
);
}
export default class Module {
constructor() {
elementorCommon.debug.addURLToWatch( 'elementor-pro/assets' );
$e.components.register( new Component() );
router.addRoute( {
path: '/site-editor/*',
component: SiteEditor,
} );
}
}
import { Router, LocationProvider, Redirect } from '@reach/router';
import Templates from './pages/templates';
import TemplateType from './pages/template-type';
import AddNew from './pages/add-new';
import Conditions from './pages/conditions/conditions';
import Import from './pages/import';
import TemplatesProvider, { Context as TemplatesContext } from './context/templates';
import { Layout, AllPartsButton, NotFound } from '@elementor/site-editor';
import { ErrorBoundary, Grid, Button } from '@elementor/app-ui';
import router from '@elementor/router';
import Component from './data/component';
import './site-editor.scss';
function SiteEditor() {
const basePath = 'site-editor';
const headerButtons = [
{
id: 'import',
text: __( 'import', 'elementor-pro' ),
hideText: true,
icon: 'eicon-download-circle-o',
onClick: () => router.appHistory.navigate( basePath + '/import' ),
},
];
// Remove Core cache.
elementorCommon.ajax.invalidateCache( {
unique_id: 'app_site_editor_template_types',
} );
const SiteEditorDefault = () => {
const { templates } = React.useContext( TemplatesContext );
if ( Object.keys( templates ).length ) {
return ;
}
return ;
};
return (
} headerButtons={ headerButtons } titleRedirectRoute={ '/' + basePath }>
);
}
export default class Module {
constructor() {
elementorCommon.debug.addURLToWatch( 'elementor-pro/assets' );
$e.components.register( new Component() );
router.addRoute( {
path: '/site-editor/*',
component: SiteEditor,
} );
}
}
import { Router, LocationProvider, Redirect } from '@reach/router';
import Templates from './pages/templates';
import TemplateType from './pages/template-type';
import AddNew from './pages/add-new';
import Conditions from './pages/conditions/conditions';
import Import from './pages/import';
import TemplatesProvider, { Context as TemplatesContext } from './context/templates';
import { Layout, AllPartsButton, NotFound } from '@elementor/site-editor';
import { ErrorBoundary, Grid, Button } from '@elementor/app-ui';
import router from '@elementor/router';
import Component from './data/component';
import './site-editor.scss';
function SiteEditor() {
const basePath = 'site-editor';
const headerButtons = [
{
id: 'import',
text: __( 'import', 'elementor-pro' ),
hideText: true,
icon: 'eicon-download-circle-o',
onClick: () => router.appHistory.navigate( basePath + '/import' ),
},
];
// Remove Core cache.
elementorCommon.ajax.invalidateCache( {
unique_id: 'app_site_editor_template_types',
} );
const SiteEditorDefault = () => {
const { templates } = React.useContext( TemplatesContext );
if ( Object.keys( templates ).length ) {
return ;
}
return ;
};
return (
} headerButtons={ headerButtons } titleRedirectRoute={ '/' + basePath }>
);
}
export default class Module {
constructor() {
elementorCommon.debug.addURLToWatch( 'elementor-pro/assets' );
$e.components.register( new Component() );
router.addRoute( {
path: '/site-editor/*',
component: SiteEditor,
} );
}
}
/* global wp_mail_smtp_admin_notices, ajaxurl */
/**
* WP Mail SMTP Admin Notices.
*
* @since 4.4.0
*/
'use strict';
var WPMailSMTPAdminNotices = window.WPMailSMTPAdminNotices || ( function( document, window, $ ) {
/**
* Public functions and properties.
*
* @since 4.4.0
*
* @type {object}
*/
var app = {
/**
* Start the engine.
*
* @since 4.4.0
*/
init: function() {
$( app.ready );
},
/**
* Document ready.
*
* @since 4.4.0
*/
ready: function() {
app.events();
},
/**
* Register JS events.
*
* @since 4.4.0
*/
events: function() {
$( '.wp-mail-smtp-notice.is-dismissible' )
.on( 'click', '.notice-dismiss', app.dismiss );
},
/**
* Click on the dismiss notice button.
*
* @since 4.4.0
*
* @param {object} event Event object.
*/
dismiss: function( event ) {
var $notice = $( this ).closest( '.wp-mail-smtp-notice' );
// If notice key is not defined, we can't dismiss it permanently.
if ( $notice.data( 'notice' ) === undefined ) {
return;
}
var $button = $( this );
$.ajax( {
url: ajaxurl,
dataType: 'json',
type: 'POST',
data: {
action: 'wp_mail_smtp_ajax',
nonce: wp_mail_smtp_admin_notices.nonce,
task: 'notice_dismiss',
notice: $notice.data( 'notice' ),
},
beforeSend: function() {
$button.prop( 'disabled', true );
},
} );
},
};
return app;
}( document, window, jQuery ) );
// Initialize.
WPMailSMTPAdminNotices.init();