updated plugin GP Premium version 2.5.6
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
.inline-post-meta-area.block-editor-block-list__layout,.inline-post-meta-area>.gb-inside-container.block-editor-block-list__layout,.inline-post-meta-area>.gb-inside-container>.block-editor-inner-blocks>.block-editor-block-list__layout{align-items:center;display:flex}.inline-post-meta-area.block-editor-block-list__layout>.wp-block.block-list-appender,.inline-post-meta-area>.gb-inside-container.block-editor-block-list__layout>.wp-block.block-list-appender,.inline-post-meta-area>.gb-inside-container>.block-editor-inner-blocks>.block-editor-block-list__layout>.wp-block.block-list-appender{margin-right:20px}.inline-post-meta-area.block-editor-block-list__layout>.wp-block-image,.inline-post-meta-area>.gb-inside-container.block-editor-block-list__layout>.wp-block-image,.inline-post-meta-area>.gb-inside-container>.block-editor-inner-blocks>.block-editor-block-list__layout>.wp-block-image{line-height:0}.inline-post-meta-area.block-editor-block-list__layout>.wp-block-image figcaption,.inline-post-meta-area>.gb-inside-container.block-editor-block-list__layout>.wp-block-image figcaption,.inline-post-meta-area>.gb-inside-container>.block-editor-inner-blocks>.block-editor-block-list__layout>.wp-block-image figcaption{display:none}.inline-post-meta-area .wp-block{margin-right:0;margin-left:0}.gpp-dynamic-container-bg-dropdown .components-popover__content{width:275px}.gpp-dynamic-container-bg-dropdown .components-popover__content .components-base-control:not(:last-child){margin-bottom:20px}.gpp-dynamic-container-bg-dropdown .components-popover__content .components-base-control:last-child .components-base-control__field{margin-bottom:0}.gpp-dynamic-container-bg-dropdown .components-popover__content .components-base-control:last-child .components-base-control__help{margin-top:3px}
|
||||
.gpp-dynamic-headline-text-dropdown .components-popover__content{width:275px}.gpp-dynamic-headline-text-dropdown .components-popover__content .components-base-control:not(:last-child){margin-bottom:20px}.gpp-dynamic-headline-text-dropdown .components-popover__content .components-base-control:last-child .components-base-control__field{margin-bottom:0}.gpp-dynamic-headline-text-dropdown .components-popover__content .components-base-control:last-child .components-base-control__help{margin-top:3px}.gpp-blocks-dynamic-text-replace-field{display:none}.gpp-block-dynamic-year .components-base-control__help{margin-top:2px}
|
||||
.wp-block[data-type="generatepress/dynamic-content"]{margin-bottom:0;margin-top:0}
|
||||
.wp-block[data-type="generatepress/dynamic-image"]{color:#fff;margin-bottom:0;margin-top:0}.wp-block[data-type="generatepress/dynamic-image"] .components-gpp-dynamic-image-placeholder__label{align-items:center;bottom:0;color:#fff;display:flex;font-size:1em;justify-content:center;right:0;position:absolute;left:0;top:0}.wp-block[data-type="generatepress/dynamic-image"] .components-gpp-dynamic-image-placeholder__label>.gpp-dynamic-featured-image__label{margin-right:10px}.wp-block[data-type="generatepress/dynamic-image"] .gpp-dynamic-image-placeholder{background:#000;vertical-align:middle}.wp-block[data-type="generatepress/dynamic-image"] .components-placeholder{width:100%}.wp-block[data-type="generatepress/dynamic-image"] .gpp-dynamic-image-preview{display:inline-block;position:relative}.wp-block[data-type="generatepress/dynamic-image"] .dynamic-author-image-rounded{border-radius:100%}
|
||||
.wp-block[data-type="generatepress/dynamic-image"]{color:#fff;display:inline-block;margin-bottom:0;margin-top:0;position:relative}.wp-block[data-type="generatepress/dynamic-image"] .components-gpp-dynamic-image-placeholder__label{align-items:center;bottom:0;color:#fff;display:flex;font-size:1em;justify-content:center;right:0;position:absolute;left:0;top:0}.wp-block[data-type="generatepress/dynamic-image"] .components-gpp-dynamic-image-placeholder__label svg{height:50px;width:50px;fill:currentColor}.wp-block[data-type="generatepress/dynamic-image"] .components-gpp-dynamic-image-placeholder__label>.gpp-dynamic-featured-image__label{margin-right:10px}.wp-block[data-type="generatepress/dynamic-image"] .gpp-dynamic-image-placeholder{background:#000;vertical-align:middle}.wp-block[data-type="generatepress/dynamic-image"] .components-placeholder{width:100%}.wp-block[data-type="generatepress/dynamic-image"] .dynamic-author-image-rounded{border-radius:100%}
|
||||
.components-generatepress-units-control-header__units{align-items:center;display:flex;justify-content:space-between;margin-bottom:5px}.components-generatepress-control__units .components-generatepress-control-buttons__units button.components-button{background:#fff;border:0;border-radius:0!important;box-shadow:none!important;color:#929da7;font-size:10px;height:auto;line-height:20px;padding:0 5px;position:relative;text-align:center;text-shadow:none}.components-generatepress-control__units .components-generatepress-control-buttons__units button.components-button.is-primary{background:#fff!important;color:#000!important;cursor:default;font-weight:700;z-index:1}
|
||||
.editor-styles-wrapper .is-root-container>.wp-block{margin-right:auto;margin-left:auto;max-width:var(--gp-block-element-width)}.left-sidebar-block-type div:not(.block-editor-inner-blocks)>.block-editor-block-list__layout,.right-sidebar-block-type div:not(.block-editor-inner-blocks)>.block-editor-block-list__layout{padding:10px}.gpp-block-element-panel>.components-base-control{margin-bottom:20px}.gpp-block-element-panel .components-notice,.gpp-block-element-panel .components-notice .components-notice__content{margin:0}.gpp-element-panel-label .components-panel__body-toggle.components-button{display:flex;flex-direction:row-reverse;justify-content:flex-end}.gpp-element-panel-label .components-panel__body-toggle.components-button svg.components-panel__icon{margin:0 0 0 10px}button.gpp-block-elements-template-button{background:#fff;border:1px solid #ddd;border-radius:5px;cursor:pointer;margin:0 0 10px;padding:5px}button.gpp-block-elements-template-button:hover{border-color:var(--wp-admin-theme-color)}button.gpp-block-elements-template-button .gpp-block-template-label{color:#888;font-size:13px;padding:5px}.element-has-parent #generate_premium_elements{display:none}.gpp-block-element-template-panel{background:#fafafa}
|
||||
.gp-select-search .select-search-container{--select-search-background:#fff;--select-search-border:#949494;--select-search-selected:var(--wp-admin-theme-color);--select-search-text:#2c3338;--select-search-subtle-text:#6c6f85;--select-search-inverted-text:var(--select-search-background);--select-search-highlight:#eff1f5;box-sizing:border-box;color:var(--select-search-text);font-family:var(--select-search-font);position:relative;width:100%}.gp-select-search .select-search-container *,.gp-select-search .select-search-container :after,.gp-select-search .select-search-container :before{box-sizing:inherit}.gp-select-search .select-search-input{-webkit-appearance:none;border:1px solid var(--select-search-border);border-radius:3px;color:var(--select-search-text);display:block;font-size:13px;height:30px;letter-spacing:.01rem;line-height:30px;outline:none;padding:0 8px 0 26px;position:relative;text-align:right;text-overflow:ellipsis;width:100%;z-index:1;-webkit-font-smoothing:antialiased;background:var(--select-search-background) url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23555%22%2F%3E%3C%2Fsvg%3E") no-repeat left 5px top 55%;background-size:13px 13px}.gp-select-search .select-search-is-multiple .select-search-input{border-radius:3px 3px 0 0;margin-bottom:-2px}.gp-select-search .select-search-input::-webkit-search-cancel-button,.gp-select-search .select-search-input::-webkit-search-decoration,.gp-select-search .select-search-input::-webkit-search-results-button,.gp-select-search .select-search-input::-webkit-search-results-decoration{-webkit-appearance:none}.gp-select-search .select-search-input[readonly]{cursor:pointer}.gp-select-search .select-search-is-disabled .select-search-input{cursor:not-allowed}.gp-select-search .select-search-container:not(.select-search-is-disabled) .select-search-input:hover,.gp-select-search .select-search-container:not(.select-search-is-disabled).select-search-has-focus .select-search-input{border-color:var(--select-search-selected)}.gp-select-search .select-search-select{background:var(--select-search-background);border:1px solid var(--select-search-border);box-shadow:0 .0625rem .125rem #00000026;max-height:360px;overflow:auto}.gp-select-search .select-search-container:not(.select-search-is-multiple) .select-search-select{border-radius:3px;display:none;right:0;position:absolute;left:0;top:35px;z-index:2}.gp-select-search .select-search-container:not(.select-search-is-multiple).select-search-has-focus .select-search-select{display:block}.gp-select-search .select-search-has-focus .select-search-select{border-color:var(--select-search-selected)}.gp-select-search .select-search-options{list-style:none}.gp-select-search .select-search-not-found,.gp-select-search .select-search-option{background:var(--select-search-background);border:none;color:var(--select-search-text);cursor:pointer;display:block;font-family:monospace;font-size:11px;height:30px;letter-spacing:.01rem;outline:none;padding:0 8px;text-align:right;width:100%;-webkit-font-smoothing:antialiased}.gp-select-search .select-search-option:disabled{background:#0000!important;cursor:not-allowed;opacity:.5}.gp-select-search .select-search-is-highlighted,.gp-select-search .select-search-option:not(.select-search-is-selected):hover{background:var(--select-search-highlight)}.gp-select-search .select-search-is-selected{color:var(--select-search-selected);font-weight:700}.gp-select-search .select-search-group-header{font-size:12px;font-weight:700;letter-spacing:.1rem;padding:10px 8px;text-transform:uppercase}
|
||||
|
||||
@ -1 +1 @@
|
||||
<?php return array('dependencies' => array('lodash', 'react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-dom-ready', 'wp-edit-post', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-plugins', 'wp-server-side-render'), 'version' => '3e4b04d9f2c101e0232f');
|
||||
<?php return array('dependencies' => array('lodash', 'react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-dom-ready', 'wp-edit-post', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-plugins', 'wp-primitives', 'wp-server-side-render'), 'version' => '5c1d2123e302b3b2c9b3');
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
.inline-post-meta-area.block-editor-block-list__layout,.inline-post-meta-area>.gb-inside-container.block-editor-block-list__layout,.inline-post-meta-area>.gb-inside-container>.block-editor-inner-blocks>.block-editor-block-list__layout{align-items:center;display:flex}.inline-post-meta-area.block-editor-block-list__layout>.wp-block.block-list-appender,.inline-post-meta-area>.gb-inside-container.block-editor-block-list__layout>.wp-block.block-list-appender,.inline-post-meta-area>.gb-inside-container>.block-editor-inner-blocks>.block-editor-block-list__layout>.wp-block.block-list-appender{margin-left:20px}.inline-post-meta-area.block-editor-block-list__layout>.wp-block-image,.inline-post-meta-area>.gb-inside-container.block-editor-block-list__layout>.wp-block-image,.inline-post-meta-area>.gb-inside-container>.block-editor-inner-blocks>.block-editor-block-list__layout>.wp-block-image{line-height:0}.inline-post-meta-area.block-editor-block-list__layout>.wp-block-image figcaption,.inline-post-meta-area>.gb-inside-container.block-editor-block-list__layout>.wp-block-image figcaption,.inline-post-meta-area>.gb-inside-container>.block-editor-inner-blocks>.block-editor-block-list__layout>.wp-block-image figcaption{display:none}.inline-post-meta-area .wp-block{margin-left:0;margin-right:0}.gpp-dynamic-container-bg-dropdown .components-popover__content{width:275px}.gpp-dynamic-container-bg-dropdown .components-popover__content .components-base-control:not(:last-child){margin-bottom:20px}.gpp-dynamic-container-bg-dropdown .components-popover__content .components-base-control:last-child .components-base-control__field{margin-bottom:0}.gpp-dynamic-container-bg-dropdown .components-popover__content .components-base-control:last-child .components-base-control__help{margin-top:3px}
|
||||
.gpp-dynamic-headline-text-dropdown .components-popover__content{width:275px}.gpp-dynamic-headline-text-dropdown .components-popover__content .components-base-control:not(:last-child){margin-bottom:20px}.gpp-dynamic-headline-text-dropdown .components-popover__content .components-base-control:last-child .components-base-control__field{margin-bottom:0}.gpp-dynamic-headline-text-dropdown .components-popover__content .components-base-control:last-child .components-base-control__help{margin-top:3px}.gpp-blocks-dynamic-text-replace-field{display:none}.gpp-block-dynamic-year .components-base-control__help{margin-top:2px}
|
||||
.wp-block[data-type="generatepress/dynamic-content"]{margin-bottom:0;margin-top:0}
|
||||
.wp-block[data-type="generatepress/dynamic-image"]{color:#fff;margin-bottom:0;margin-top:0}.wp-block[data-type="generatepress/dynamic-image"] .components-gpp-dynamic-image-placeholder__label{align-items:center;bottom:0;color:#fff;display:flex;font-size:1em;justify-content:center;left:0;position:absolute;right:0;top:0}.wp-block[data-type="generatepress/dynamic-image"] .components-gpp-dynamic-image-placeholder__label>.gpp-dynamic-featured-image__label{margin-left:10px}.wp-block[data-type="generatepress/dynamic-image"] .gpp-dynamic-image-placeholder{background:#000;vertical-align:middle}.wp-block[data-type="generatepress/dynamic-image"] .components-placeholder{width:100%}.wp-block[data-type="generatepress/dynamic-image"] .gpp-dynamic-image-preview{display:inline-block;position:relative}.wp-block[data-type="generatepress/dynamic-image"] .dynamic-author-image-rounded{border-radius:100%}
|
||||
.wp-block[data-type="generatepress/dynamic-image"]{color:#fff;display:inline-block;margin-bottom:0;margin-top:0;position:relative}.wp-block[data-type="generatepress/dynamic-image"] .components-gpp-dynamic-image-placeholder__label{align-items:center;bottom:0;color:#fff;display:flex;font-size:1em;justify-content:center;left:0;position:absolute;right:0;top:0}.wp-block[data-type="generatepress/dynamic-image"] .components-gpp-dynamic-image-placeholder__label svg{height:50px;width:50px;fill:currentColor}.wp-block[data-type="generatepress/dynamic-image"] .components-gpp-dynamic-image-placeholder__label>.gpp-dynamic-featured-image__label{margin-left:10px}.wp-block[data-type="generatepress/dynamic-image"] .gpp-dynamic-image-placeholder{background:#000;vertical-align:middle}.wp-block[data-type="generatepress/dynamic-image"] .components-placeholder{width:100%}.wp-block[data-type="generatepress/dynamic-image"] .dynamic-author-image-rounded{border-radius:100%}
|
||||
.components-generatepress-units-control-header__units{align-items:center;display:flex;justify-content:space-between;margin-bottom:5px}.components-generatepress-control__units .components-generatepress-control-buttons__units button.components-button{background:#fff;border:0;border-radius:0!important;box-shadow:none!important;color:#929da7;font-size:10px;height:auto;line-height:20px;padding:0 5px;position:relative;text-align:center;text-shadow:none}.components-generatepress-control__units .components-generatepress-control-buttons__units button.components-button.is-primary{background:#fff!important;color:#000!important;cursor:default;font-weight:700;z-index:1}
|
||||
.editor-styles-wrapper .is-root-container>.wp-block{margin-left:auto;margin-right:auto;max-width:var(--gp-block-element-width)}.left-sidebar-block-type div:not(.block-editor-inner-blocks)>.block-editor-block-list__layout,.right-sidebar-block-type div:not(.block-editor-inner-blocks)>.block-editor-block-list__layout{padding:10px}.gpp-block-element-panel>.components-base-control{margin-bottom:20px}.gpp-block-element-panel .components-notice,.gpp-block-element-panel .components-notice .components-notice__content{margin:0}.gpp-element-panel-label .components-panel__body-toggle.components-button{display:flex;flex-direction:row-reverse;justify-content:flex-end}.gpp-element-panel-label .components-panel__body-toggle.components-button svg.components-panel__icon{margin:0 10px 0 0}button.gpp-block-elements-template-button{background:#fff;border:1px solid #ddd;border-radius:5px;cursor:pointer;margin:0 0 10px;padding:5px}button.gpp-block-elements-template-button:hover{border-color:var(--wp-admin-theme-color)}button.gpp-block-elements-template-button .gpp-block-template-label{color:#888;font-size:13px;padding:5px}.element-has-parent #generate_premium_elements{display:none}.gpp-block-element-template-panel{background:#fafafa}
|
||||
.gp-select-search .select-search-container{--select-search-background:#fff;--select-search-border:#949494;--select-search-selected:var(--wp-admin-theme-color);--select-search-text:#2c3338;--select-search-subtle-text:#6c6f85;--select-search-inverted-text:var(--select-search-background);--select-search-highlight:#eff1f5;box-sizing:border-box;color:var(--select-search-text);font-family:var(--select-search-font);position:relative;width:100%}.gp-select-search .select-search-container *,.gp-select-search .select-search-container :after,.gp-select-search .select-search-container :before{box-sizing:inherit}.gp-select-search .select-search-input{-webkit-appearance:none;border:1px solid var(--select-search-border);border-radius:3px;color:var(--select-search-text);display:block;font-size:13px;height:30px;letter-spacing:.01rem;line-height:30px;outline:none;padding:0 26px 0 8px;position:relative;text-align:left;text-overflow:ellipsis;width:100%;z-index:1;-webkit-font-smoothing:antialiased;background:var(--select-search-background) url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23555%22%2F%3E%3C%2Fsvg%3E") no-repeat right 5px top 55%;background-size:13px 13px}.gp-select-search .select-search-is-multiple .select-search-input{border-radius:3px 3px 0 0;margin-bottom:-2px}.gp-select-search .select-search-input::-webkit-search-cancel-button,.gp-select-search .select-search-input::-webkit-search-decoration,.gp-select-search .select-search-input::-webkit-search-results-button,.gp-select-search .select-search-input::-webkit-search-results-decoration{-webkit-appearance:none}.gp-select-search .select-search-input[readonly]{cursor:pointer}.gp-select-search .select-search-is-disabled .select-search-input{cursor:not-allowed}.gp-select-search .select-search-container:not(.select-search-is-disabled) .select-search-input:hover,.gp-select-search .select-search-container:not(.select-search-is-disabled).select-search-has-focus .select-search-input{border-color:var(--select-search-selected)}.gp-select-search .select-search-select{background:var(--select-search-background);border:1px solid var(--select-search-border);box-shadow:0 .0625rem .125rem #00000026;max-height:360px;overflow:auto}.gp-select-search .select-search-container:not(.select-search-is-multiple) .select-search-select{border-radius:3px;display:none;left:0;position:absolute;right:0;top:35px;z-index:2}.gp-select-search .select-search-container:not(.select-search-is-multiple).select-search-has-focus .select-search-select{display:block}.gp-select-search .select-search-has-focus .select-search-select{border-color:var(--select-search-selected)}.gp-select-search .select-search-options{list-style:none}.gp-select-search .select-search-not-found,.gp-select-search .select-search-option{background:var(--select-search-background);border:none;color:var(--select-search-text);cursor:pointer;display:block;font-family:monospace;font-size:11px;height:30px;letter-spacing:.01rem;outline:none;padding:0 8px;text-align:left;width:100%;-webkit-font-smoothing:antialiased}.gp-select-search .select-search-option:disabled{background:#0000!important;cursor:not-allowed;opacity:.5}.gp-select-search .select-search-is-highlighted,.gp-select-search .select-search-option:not(.select-search-is-selected):hover{background:var(--select-search-highlight)}.gp-select-search .select-search-is-selected{color:var(--select-search-selected);font-weight:700}.gp-select-search .select-search-group-header{font-size:12px;font-weight:700;letter-spacing:.1rem;padding:10px 8px;text-transform:uppercase}
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
<?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-html-entities', 'wp-i18n'), 'version' => 'a6719ff1717f5c4541f7');
|
||||
<?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-html-entities', 'wp-i18n'), 'version' => 'f422745dc456529c75e3');
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -254,6 +254,7 @@ class GeneratePress_Site_Layout {
|
||||
|
||||
add_action( 'wp', array( $this, 'after_setup' ), 100 );
|
||||
add_action( 'wp_enqueue_scripts', array( $this, 'build_css' ), 50 );
|
||||
add_filter( 'block_editor_settings_all', array( $this, 'add_editor_width_css' ), 20 );
|
||||
|
||||
if ( is_admin() ) {
|
||||
add_action( 'current_screen', array( $this, 'after_setup' ), 100 );
|
||||
@ -383,6 +384,31 @@ class GeneratePress_Site_Layout {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add our editor width CSS.
|
||||
*
|
||||
* @param array $editor_settings The editor settings.
|
||||
*/
|
||||
public function add_editor_width_css( $editor_settings ) {
|
||||
$content_width = '';
|
||||
|
||||
if ( 'full-width' === $this->content_area ) {
|
||||
$content_width = '100%';
|
||||
}
|
||||
|
||||
if ( $this->content_width ) {
|
||||
$content_width = absint( $this->content_width ) . 'px';
|
||||
}
|
||||
|
||||
if ( $content_width ) {
|
||||
$editor_settings['styles'][] = array(
|
||||
'css' => '.editor-styles-wrapper {--content-width: ' . $content_width . ';}',
|
||||
);
|
||||
}
|
||||
|
||||
return $editor_settings;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check to see if our individual post metabox has a value.
|
||||
*
|
||||
|
||||
@ -54,7 +54,20 @@ class GeneratePress_Pro_Font_Library_CPT extends GeneratePress_Pro_Singleton {
|
||||
'show_in_menu' => true,
|
||||
'has_archive' => false,
|
||||
'exclude_from_search' => true,
|
||||
'show_in_rest' => true,
|
||||
'show_in_rest' => false,
|
||||
'capabilities' => array(
|
||||
'read' => 'manage_options',
|
||||
'read_private_posts' => 'manage_options',
|
||||
'create_posts' => 'manage_options',
|
||||
'publish_posts' => 'manage_options',
|
||||
'edit_posts' => 'manage_options',
|
||||
'edit_others_posts' => 'manage_options',
|
||||
'edit_published_posts' => 'manage_options',
|
||||
'delete_posts' => 'manage_options',
|
||||
'delete_others_posts' => 'manage_options',
|
||||
'delete_published_posts' => 'manage_options',
|
||||
),
|
||||
'map_meta_cap' => true,
|
||||
);
|
||||
|
||||
register_post_type( GeneratePress_Pro_Font_Library::FONT_LIBRARY_CPT, $args );
|
||||
|
||||
@ -74,17 +74,6 @@ class GeneratePress_Pro_Font_Library_Rest extends WP_REST_Controller {
|
||||
)
|
||||
);
|
||||
|
||||
// Download a Google font.
|
||||
register_rest_route(
|
||||
$namespace,
|
||||
'/download-google-font/',
|
||||
array(
|
||||
'methods' => WP_REST_Server::EDITABLE,
|
||||
'callback' => array( $this, 'download_google_font' ),
|
||||
'permission_callback' => array( $this, 'edit_posts_permission' ),
|
||||
)
|
||||
);
|
||||
|
||||
// Upload a font.
|
||||
register_rest_route(
|
||||
$namespace,
|
||||
@ -188,7 +177,15 @@ class GeneratePress_Pro_Font_Library_Rest extends WP_REST_Controller {
|
||||
* @return mixed
|
||||
*/
|
||||
public function delete_font( WP_REST_Request $request ) {
|
||||
$font_id = $request->get_param( 'fontId' );
|
||||
$font_id = $request->get_param( 'fontId' );
|
||||
|
||||
if ( GeneratePress_Pro_Font_Library::FONT_LIBRARY_CPT !== get_post_type( $font_id ) ) {
|
||||
return $this->error(
|
||||
'invalid_font_post',
|
||||
__( 'Invalid font post.', 'gp-premium' )
|
||||
);
|
||||
}
|
||||
|
||||
$slug = get_post_field( 'post_name', $font_id );
|
||||
$upload_dir = wp_get_upload_dir();
|
||||
$font_base_path = trailingslashit( $upload_dir['basedir'] ) . 'generatepress/fonts/' . $slug . '/';
|
||||
@ -303,6 +300,7 @@ class GeneratePress_Pro_Font_Library_Rest extends WP_REST_Controller {
|
||||
$variants = $request->get_param( 'variants' );
|
||||
$source = $request->get_param( 'source' );
|
||||
$slug = $request->get_param( 'slug' ) ?? $font['slug'] ?? '';
|
||||
$slug = sanitize_title( $slug );
|
||||
$results = array(
|
||||
'ID' => null,
|
||||
'variants' => array(),
|
||||
@ -393,6 +391,10 @@ class GeneratePress_Pro_Font_Library_Rest extends WP_REST_Controller {
|
||||
$results['variants'] = $checked_variants;
|
||||
}
|
||||
|
||||
if ( empty( $results['ID'] ) && ! empty( $results['error'] ) ) {
|
||||
return $this->failed( $results );
|
||||
}
|
||||
|
||||
return $this->success( $results );
|
||||
}
|
||||
|
||||
@ -469,7 +471,15 @@ class GeneratePress_Pro_Font_Library_Rest extends WP_REST_Controller {
|
||||
$font_display = $request->get_param( 'fontDisplay' );
|
||||
$fallback = $request->get_param( 'fallback' );
|
||||
$css_variable = $request->get_param( 'cssVariable' );
|
||||
$slug = get_post_field( 'post_name', $font_id );
|
||||
|
||||
if ( GeneratePress_Pro_Font_Library::FONT_LIBRARY_CPT !== get_post_type( $font_id ) ) {
|
||||
return $this->error(
|
||||
'invalid_font_post',
|
||||
__( 'Invalid font post.', 'gp-premium' )
|
||||
);
|
||||
}
|
||||
|
||||
$slug = get_post_field( 'post_name', $font_id );
|
||||
|
||||
// Update the font post.
|
||||
wp_update_post(
|
||||
@ -519,7 +529,7 @@ class GeneratePress_Pro_Font_Library_Rest extends WP_REST_Controller {
|
||||
* @return bool
|
||||
*/
|
||||
public function edit_posts_permission() {
|
||||
return current_user_can( 'edit_posts' );
|
||||
return current_user_can( 'manage_options' );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -315,9 +315,8 @@ class GeneratePress_Pro_Font_Library extends GeneratePress_Pro_Singleton {
|
||||
* Overwrite it if it exists, and delete associated font file if different.
|
||||
* Otherwise, add new variant if not found in the list.
|
||||
*
|
||||
* @param array $variants Font variants.
|
||||
* @param int $new_variant New variant to be added.
|
||||
* @param string $base_path Base path.
|
||||
* @param array $variants Font variants.
|
||||
* @param int $new_variant New variant to be added.
|
||||
*
|
||||
* @return array The resolved list of variants.
|
||||
*/
|
||||
@ -468,6 +467,7 @@ class GeneratePress_Pro_Font_Library extends GeneratePress_Pro_Singleton {
|
||||
if ( ! $slug ) {
|
||||
$slug = $variant['slug'] ?? '';
|
||||
}
|
||||
$slug = sanitize_title( $slug );
|
||||
$upload_dir = wp_get_upload_dir();
|
||||
$base_path = trailingslashit( $upload_dir['basedir'] ) . 'generatepress/fonts/' . $slug . '/';
|
||||
|
||||
@ -480,18 +480,13 @@ class GeneratePress_Pro_Font_Library extends GeneratePress_Pro_Singleton {
|
||||
* If $file is an array, assume it's a param from $_FILES.
|
||||
*/
|
||||
if ( is_array( $file ) ) {
|
||||
$file_name = basename( $file['name'] );
|
||||
$file_path = $base_path . $file_name;
|
||||
$file_name = sanitize_file_name( wp_basename( $file['name'] ) );
|
||||
$file['name'] = $file_name;
|
||||
|
||||
// Check if the font file exists and delete it if so.
|
||||
if ( file_exists( $file_path ) ) {
|
||||
unlink( $file_path );
|
||||
}
|
||||
|
||||
$set_upload_dir = function ( $font_dir ) use ( $base_path, $slug ) {
|
||||
$set_upload_dir = function ( $font_dir ) use ( $base_path, $slug, $upload_dir ) {
|
||||
$font_dir['path'] = $base_path;
|
||||
$font_dir['url'] = untrailingslashit(
|
||||
content_url( 'uploads/generatepress/fonts/' . $slug )
|
||||
trailingslashit( $upload_dir['baseurl'] ) . 'generatepress/fonts/' . $slug
|
||||
);
|
||||
$font_dir['subdir'] = '';
|
||||
return $font_dir;
|
||||
@ -501,11 +496,14 @@ class GeneratePress_Pro_Font_Library extends GeneratePress_Pro_Singleton {
|
||||
add_filter( 'upload_dir', $set_upload_dir );
|
||||
|
||||
$overrides = array(
|
||||
'upload_error_handler' => array( __CLASS__, 'handle_font_file_upload_error' ),
|
||||
'upload_error_handler' => array( __CLASS__, 'handle_font_file_upload_error' ),
|
||||
// Not testing a form submission.
|
||||
'test_form' => false,
|
||||
'test_form' => false,
|
||||
// Only allow uploading font files for this request.
|
||||
'mimes' => self::get_allowed_font_mime_types(),
|
||||
'mimes' => self::get_allowed_font_mime_types(),
|
||||
'unique_filename_callback' => function () use ( $file_name ) {
|
||||
return $file_name;
|
||||
},
|
||||
);
|
||||
|
||||
$uploaded_file = wp_handle_upload( $file, $overrides );
|
||||
@ -516,44 +514,67 @@ class GeneratePress_Pro_Font_Library extends GeneratePress_Pro_Singleton {
|
||||
return $uploaded_file;
|
||||
}
|
||||
|
||||
$file_name = basename( $variant['src'] );
|
||||
$file_path = $base_path . $file_name;
|
||||
|
||||
$response = wp_remote_get( $variant['src'] );
|
||||
|
||||
if ( is_wp_error( $response ) ) {
|
||||
$error_message = $response->get_error_message();
|
||||
return new WP_Error( 500, "Failed to download {$variant['fontFamily']} from {$variant['src']}: $error_message" );
|
||||
if ( ! function_exists( 'download_url' ) || ! function_exists( 'wp_handle_sideload' ) ) {
|
||||
require_once ABSPATH . 'wp-admin/includes/file.php';
|
||||
}
|
||||
|
||||
// Save the file.
|
||||
$filesystem = generate_premium_get_wp_filesystem();
|
||||
$file_name = sanitize_file_name( wp_basename( (string) wp_parse_url( $variant['src'], PHP_URL_PATH ) ) );
|
||||
$file_type = wp_check_filetype( $file_name, self::get_allowed_font_mime_types() );
|
||||
|
||||
if ( ! $filesystem ) {
|
||||
return new WP_Error( 500, 'Error setting up the file system object.' );
|
||||
if ( empty( $file_type['ext'] ) || empty( $file_type['type'] ) ) {
|
||||
return new WP_Error(
|
||||
'rest_font_upload_invalid_file_type',
|
||||
__( 'Sorry, you are not allowed to upload this file type.', 'gp-premium' ),
|
||||
array( 'status' => 400 )
|
||||
);
|
||||
}
|
||||
|
||||
$file_contents = wp_remote_retrieve_body( $response );
|
||||
$tmp_file = download_url( $variant['src'] );
|
||||
|
||||
if ( ! $file_contents ) {
|
||||
return new WP_Error( 500, "Failed to download $variant from {$variant['src']}: Empty body" );
|
||||
if ( is_wp_error( $tmp_file ) ) {
|
||||
return new WP_Error( 500, $tmp_file->get_error_message() );
|
||||
}
|
||||
|
||||
// Assuming $filesystem is already set up correctly.
|
||||
$chmod_file = defined( 'FS_CHMOD_FILE' ) ? FS_CHMOD_FILE : 0644;
|
||||
$sideload_file = array(
|
||||
'name' => $file_name,
|
||||
'tmp_name' => $tmp_file,
|
||||
'type' => '',
|
||||
'error' => 0,
|
||||
'size' => filesize( $tmp_file ),
|
||||
);
|
||||
|
||||
if ( is_writable( $file_path ) || is_writable( dirname( $file_path ) ) ) {
|
||||
if ( $filesystem->put_contents( $file_path, $file_contents, $chmod_file ) ) {
|
||||
return array(
|
||||
'file' => $file_path,
|
||||
'url' => trailingslashit( $upload_dir['baseurl'] ) . 'generatepress/fonts/' . $slug . '/' . $file_name,
|
||||
);
|
||||
} else {
|
||||
return new WP_Error( 500, "Failed to download $variant from {$variant['src']}." );
|
||||
}
|
||||
$set_upload_dir = function ( $font_dir ) use ( $base_path, $slug, $upload_dir ) {
|
||||
$font_dir['path'] = $base_path;
|
||||
$font_dir['url'] = untrailingslashit(
|
||||
trailingslashit( $upload_dir['baseurl'] ) . 'generatepress/fonts/' . $slug
|
||||
);
|
||||
$font_dir['subdir'] = '';
|
||||
return $font_dir;
|
||||
};
|
||||
|
||||
add_filter( 'upload_mimes', array( __CLASS__, 'get_allowed_font_mime_types' ) );
|
||||
add_filter( 'upload_dir', $set_upload_dir );
|
||||
|
||||
$uploaded_file = wp_handle_sideload(
|
||||
$sideload_file,
|
||||
array(
|
||||
'upload_error_handler' => array( __CLASS__, 'handle_font_file_upload_error' ),
|
||||
'test_form' => false,
|
||||
'mimes' => self::get_allowed_font_mime_types(),
|
||||
'unique_filename_callback' => function () use ( $file_name ) {
|
||||
return $file_name;
|
||||
},
|
||||
)
|
||||
);
|
||||
|
||||
remove_filter( 'upload_dir', $set_upload_dir );
|
||||
remove_filter( 'upload_mimes', array( __CLASS__, 'get_allowed_font_mime_types' ) );
|
||||
|
||||
if ( is_wp_error( $uploaded_file ) && file_exists( $tmp_file ) ) {
|
||||
unlink( $tmp_file );
|
||||
}
|
||||
|
||||
return new WP_Error( 500, 'Unable to write to file path.' );
|
||||
return $uploaded_file;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -585,7 +606,6 @@ class GeneratePress_Pro_Font_Library extends GeneratePress_Pro_Singleton {
|
||||
* @return void
|
||||
*/
|
||||
public function update_post_meta( $post_id, $key, $value ) {
|
||||
$upload_dir = wp_get_upload_dir();
|
||||
// Bail if we're not working with a font library post variant meta value.
|
||||
if ( get_post_type( $post_id ) !== self::FONT_LIBRARY_CPT || 'gp_font_variants' !== $key ) {
|
||||
return;
|
||||
@ -607,49 +627,14 @@ class GeneratePress_Pro_Font_Library extends GeneratePress_Pro_Singleton {
|
||||
continue;
|
||||
}
|
||||
|
||||
$font_slug = get_post_field( 'post_name', $post_id );
|
||||
$font_dir = trailingslashit( $upload_dir['basedir'] ) . 'generatepress/fonts/' . $font_slug . '/';
|
||||
$font_base_url = trailingslashit( $upload_dir['baseurl'] ) . 'generatepress/fonts/' . $font_slug . '/';
|
||||
$response = wp_remote_get( $variant['src'] );
|
||||
$response_code = (int) wp_remote_retrieve_response_code( $response );
|
||||
$font_slug = get_post_field( 'post_name', $post_id );
|
||||
$font_file = self::handle_font_file_upload( $variant, $font_slug, null );
|
||||
|
||||
if ( is_wp_error( $response ) || 200 !== $response_code ) {
|
||||
if ( is_wp_error( $font_file ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$file_name = basename( $variant['src'] );
|
||||
$file_path = $font_dir . $file_name;
|
||||
|
||||
// If the directory exists, remove it and it's contents.
|
||||
if ( ! file_exists( $font_dir ) ) {
|
||||
wp_mkdir_p( $font_dir );
|
||||
}
|
||||
|
||||
// Setup filesystem.
|
||||
$filesystem = generate_premium_get_wp_filesystem();
|
||||
|
||||
// Bail here if the filesystem can't initialize.
|
||||
if ( ! $filesystem ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$file_contents = wp_remote_retrieve_body( $response );
|
||||
|
||||
// Bail if file contents are empty or not found.
|
||||
if ( ! $file_contents ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$chmod_file = defined( 'FS_CHMOD_FILE' ) ? FS_CHMOD_FILE : 0644;
|
||||
|
||||
if ( is_writable( $file_path ) || is_writable( dirname( $file_path ) ) ) {
|
||||
// Bail if the file can't be written.
|
||||
if ( ! $filesystem->put_contents( $file_path, $file_contents, $chmod_file ) ) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
$variant['src'] = $font_base_url . $file_name;
|
||||
$variant['src'] = $font_file['url'];
|
||||
}
|
||||
|
||||
// Update the meta value with the new src for each variant.
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
* Plugin Name: GP Premium
|
||||
* Plugin URI: https://generatepress.com
|
||||
* Description: The entire collection of GeneratePress premium modules.
|
||||
* Version: 2.5.2
|
||||
* Version: 2.5.6
|
||||
* Requires at least: 6.1
|
||||
* Requires PHP: 7.2
|
||||
* Author: Tom Usborne
|
||||
@ -19,7 +19,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
define( 'GP_PREMIUM_VERSION', '2.5.2' );
|
||||
define( 'GP_PREMIUM_VERSION', '2.5.6' );
|
||||
define( 'GP_PREMIUM_DIR_PATH', plugin_dir_path( __FILE__ ) );
|
||||
define( 'GP_PREMIUM_DIR_URL', plugin_dir_url( __FILE__ ) );
|
||||
define( 'GP_LIBRARY_DIRECTORY', plugin_dir_path( __FILE__ ) . 'library/' );
|
||||
|
||||
@ -5,7 +5,7 @@ Tags: generatepress
|
||||
Requires at least: 6.1
|
||||
Tested up to: 6.8
|
||||
Requires PHP: 7.2
|
||||
Stable tag: 2.5.2
|
||||
Stable tag: 2.5.6
|
||||
License: GPLv2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
@ -27,6 +27,18 @@ In most cases, #1 will work fine and is way easier.
|
||||
|
||||
== Changelog ==
|
||||
|
||||
= 2.5.6 =
|
||||
* Security: Harden Font Library REST API permissions and remote font installation validation.
|
||||
|
||||
= 2.5.5 =
|
||||
* Feature: Add GPP/GP One Site Library filters
|
||||
|
||||
= 2.5.4 =
|
||||
* Tweak: Enable smooth device transition in Elements editor
|
||||
|
||||
= 2.5.3 =
|
||||
* Fix: Layout Element full width editor
|
||||
|
||||
= 2.5.2 =
|
||||
* Fix: Customizer notice placements
|
||||
|
||||
|
||||
@ -67,9 +67,9 @@ class GeneratePress_Site_Library_Rest extends WP_REST_Controller {
|
||||
$namespace,
|
||||
'/get_sites/',
|
||||
array(
|
||||
'methods' => WP_REST_Server::EDITABLE,
|
||||
'methods' => WP_REST_Server::READABLE,
|
||||
'callback' => array( $this, 'get_sites' ),
|
||||
'permission_callback' => array( $this, 'update_settings_permission' ),
|
||||
'permission_callback' => array( $this, 'get_sites_permission' ),
|
||||
)
|
||||
);
|
||||
|
||||
@ -171,6 +171,39 @@ class GeneratePress_Site_Library_Rest extends WP_REST_Controller {
|
||||
return current_user_can( 'manage_options' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get sites permissions.
|
||||
*
|
||||
* @param WP_REST_Request $request The request object.
|
||||
* @return bool
|
||||
*/
|
||||
public function get_sites_permission( WP_REST_Request $request ) {
|
||||
// Allow admin users.
|
||||
if ( current_user_can( 'manage_options' ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Allow public access if enabled via filter.
|
||||
return apply_filters( 'generatepress_allow_public_site_library', false, $request );
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify nonce for destructive operations.
|
||||
*
|
||||
* @param WP_REST_Request $request The request object.
|
||||
* @return bool True if nonce is valid, false otherwise.
|
||||
*/
|
||||
private function verify_nonce( WP_REST_Request $request ) {
|
||||
$nonce = $request->get_header( 'X-WP-Nonce' );
|
||||
|
||||
if ( ! $nonce ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return wp_verify_nonce( $nonce, 'wp_rest' );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Export a group of assets.
|
||||
*
|
||||
@ -179,7 +212,13 @@ class GeneratePress_Site_Library_Rest extends WP_REST_Controller {
|
||||
* @return mixed
|
||||
*/
|
||||
public function get_sites( WP_REST_Request $request ) {
|
||||
// Check if this is a force refresh request (requires manage_options capability).
|
||||
$force_refresh = $request->get_param( 'forceRefresh' );
|
||||
|
||||
if ( $force_refresh && ! current_user_can( 'manage_options' ) ) {
|
||||
$force_refresh = false;
|
||||
}
|
||||
|
||||
$sites = get_option( 'generatepress_sites', array() );
|
||||
|
||||
$time_now = strtotime( 'now' );
|
||||
@ -301,6 +340,11 @@ class GeneratePress_Site_Library_Rest extends WP_REST_Controller {
|
||||
* @return mixed
|
||||
*/
|
||||
public function import_options( WP_REST_Request $request ) {
|
||||
// Verify nonce for destructive operation.
|
||||
if ( ! $this->verify_nonce( $request ) ) {
|
||||
return $this->error( 'invalid_nonce', 'Invalid nonce provided.' );
|
||||
}
|
||||
|
||||
$site_data = $request->get_param( 'siteData' );
|
||||
|
||||
if ( ! GeneratePress_Site_Library_Helper::file_exists( $site_data['directory'] . '/options.json' ) ) {
|
||||
@ -484,7 +528,13 @@ class GeneratePress_Site_Library_Rest extends WP_REST_Controller {
|
||||
* @return mixed
|
||||
*/
|
||||
public function activate_plugins( WP_REST_Request $request ) {
|
||||
// Verify nonce for destructive operation.
|
||||
if ( ! $this->verify_nonce( $request ) ) {
|
||||
return $this->error( 'invalid_nonce', 'Invalid nonce provided.' );
|
||||
}
|
||||
|
||||
$site_data = $request->get_param( 'siteData' );
|
||||
|
||||
$settings = GeneratePress_Site_Library_Helper::get_options( $site_data['directory'] . '/options.json' );
|
||||
$plugins = $settings['plugins'];
|
||||
|
||||
@ -531,6 +581,11 @@ class GeneratePress_Site_Library_Rest extends WP_REST_Controller {
|
||||
* @return mixed
|
||||
*/
|
||||
public function import_content( WP_REST_Request $request ) {
|
||||
// Verify nonce for destructive operation.
|
||||
if ( ! $this->verify_nonce( $request ) ) {
|
||||
return $this->error( 'invalid_nonce', 'Invalid nonce provided.' );
|
||||
}
|
||||
|
||||
$site_data = $request->get_param( 'siteData' );
|
||||
$site_slug = $request->get_param( 'siteSlug' );
|
||||
$import_options = $request->get_param( 'importOptions' );
|
||||
@ -596,6 +651,11 @@ class GeneratePress_Site_Library_Rest extends WP_REST_Controller {
|
||||
* @return mixed
|
||||
*/
|
||||
public function import_site_options( WP_REST_Request $request ) {
|
||||
// Verify nonce for destructive operation.
|
||||
if ( ! $this->verify_nonce( $request ) ) {
|
||||
return $this->error( 'invalid_nonce', 'Invalid nonce provided.' );
|
||||
}
|
||||
|
||||
$site_data = $request->get_param( 'siteData' );
|
||||
$site_slug = $request->get_param( 'siteSlug' );
|
||||
$backup_data = get_option( '_generatepress_site_library_backup', array() );
|
||||
@ -727,6 +787,11 @@ class GeneratePress_Site_Library_Rest extends WP_REST_Controller {
|
||||
* @return mixed
|
||||
*/
|
||||
public function import_widgets( WP_REST_Request $request ) {
|
||||
// Verify nonce for destructive operation.
|
||||
if ( ! $this->verify_nonce( $request ) ) {
|
||||
return $this->error( 'invalid_nonce', 'Invalid nonce provided.' );
|
||||
}
|
||||
|
||||
$site_data = $request->get_param( 'siteData' );
|
||||
|
||||
require_once GP_PREMIUM_DIR_PATH . 'site-library/classes/class-site-widget-importer.php';
|
||||
@ -751,8 +816,14 @@ class GeneratePress_Site_Library_Rest extends WP_REST_Controller {
|
||||
|
||||
/**
|
||||
* Restore our theme options.
|
||||
*
|
||||
* @param WP_REST_Request $request The request object.
|
||||
*/
|
||||
public function restore_theme_options() {
|
||||
public function restore_theme_options( WP_REST_Request $request ) {
|
||||
// Verify nonce for destructive operation.
|
||||
if ( ! $this->verify_nonce( $request ) ) {
|
||||
return $this->error( 'invalid_nonce', 'Invalid nonce provided.' );
|
||||
}
|
||||
$backup_data = get_option( '_generatepress_site_library_backup', array() );
|
||||
|
||||
if ( ! empty( $backup_data ) ) {
|
||||
@ -829,8 +900,14 @@ class GeneratePress_Site_Library_Rest extends WP_REST_Controller {
|
||||
|
||||
/**
|
||||
* Restore content.
|
||||
*
|
||||
* @param WP_REST_Request $request The request object.
|
||||
*/
|
||||
public function restore_content() {
|
||||
public function restore_content( WP_REST_Request $request ) {
|
||||
// Verify nonce for destructive operation.
|
||||
if ( ! $this->verify_nonce( $request ) ) {
|
||||
return $this->error( 'invalid_nonce', 'Invalid nonce provided.' );
|
||||
}
|
||||
$backup_data = get_option( '_generatepress_site_library_backup', array() );
|
||||
|
||||
// Plugins.
|
||||
|
||||
@ -115,6 +115,7 @@ class GeneratePress_Site_Library {
|
||||
'gppVersion' => GP_PREMIUM_VERSION,
|
||||
'gpVersion' => generate_premium_get_theme_version(),
|
||||
'generateblocksVersion' => defined( 'GENERATEBLOCKS_VERSION' ) ? GENERATEBLOCKS_VERSION : '',
|
||||
'isGenerateBlocksProInstalled' => file_exists( WP_PLUGIN_DIR . '/generateblocks-pro/plugin.php' ),
|
||||
'elementorReplaceUrls' => esc_url( admin_url( 'admin.php?page=elementor-tools#tab-replace_url' ) ),
|
||||
'uploadsUrl' => $uploads_url['baseurl'],
|
||||
'isDebugEnabled' => defined( 'WP_DEBUG' ) && true === WP_DEBUG,
|
||||
|
||||
Reference in New Issue
Block a user