Skip to content

Commit

Permalink
add banner images
Browse files Browse the repository at this point in the history
  • Loading branch information
farhan-shafi committed Sep 11, 2023
1 parent 5395df4 commit 9fb3d8d
Show file tree
Hide file tree
Showing 13 changed files with 158 additions and 54 deletions.
2 changes: 1 addition & 1 deletion build/index.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-dom-ready', 'wp-html-entities', 'wp-polyfill', 'wp-url'), 'version' => 'bf5d02cb0417478c00a42da392e7b10c');
<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-dom-ready', 'wp-html-entities', 'wp-polyfill', 'wp-url'), 'version' => '1e1714bd540a6b7173fa1233d14cbf9b');
16 changes: 8 additions & 8 deletions build/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21571,15 +21571,15 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _query_client__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./query-client */ "./src/addons/template-library/query-client.js");
/* harmony import */ var _stores_library__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./stores/library */ "./src/addons/template-library/stores/library.js");

/**
* WordPress Dependencies
/**
* WordPress Dependencies
*/




/**
* Custom Dependencies
/**
* Custom Dependencies
*/


Expand Down Expand Up @@ -22949,10 +22949,10 @@ function _getTemplates() {
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var zustand__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! zustand */ "./node_modules/zustand/index.js");
/* harmony import */ var zustand__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(zustand__WEBPACK_IMPORTED_MODULE_0__);
/**
*
* zustand Dependencies
*
/**
*
* zustand Dependencies
*
*/

var useLibrary = zustand__WEBPACK_IMPORTED_MODULE_0___default()(function (set) {
Expand Down
2 changes: 1 addition & 1 deletion build/settings.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '33495f2403a800db9b3f432240babfda');
<?php return array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => '32ba406fdea6988edc334ddea80f5bef');
40 changes: 27 additions & 13 deletions build/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -15166,14 +15166,14 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _hooks_use_setting__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../hooks/use-setting */ "./src/admin/hooks/use-setting.js");

/**
* WordPress Dependencies
/**
* WordPress Dependencies
*/



/**
* Custom Dependencies
/**
* Custom Dependencies
*/

function AddonsManager() {
Expand Down Expand Up @@ -15819,12 +15819,12 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =



/**
* A custom hook that allows fetching of wp settings easier.
*
* @param {string} key - Setting key.
*
* @return any - Setting value
/**
* A custom hook that allows fetching of wp settings easier.
*
* @param {string} key - Setting key.
*
* @return any - Setting value
*/
function useSetting(key) {
var onSuccess = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {
Expand Down Expand Up @@ -15967,7 +15967,6 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re




/**
* WordPress dependencies
*/
Expand Down Expand Up @@ -16026,6 +16025,7 @@ var EditorsKitSettings = /*#__PURE__*/function (_Component) {
activeClass: "active-tab",
tabs: tabs
}, function (tab) {
var _editorskitData$block, _editorskitData, _editorskitData$templ, _editorskitData2;
switch (tab.name) {
case 'ek-getting-started':
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])(Fragment, null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])("div", {
Expand All @@ -16051,9 +16051,23 @@ var EditorsKitSettings = /*#__PURE__*/function (_Component) {
className: "editorskit-features-manager-items-wrapper"
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])(_extensions_components_manager_components_manager__WEBPACK_IMPORTED_MODULE_7__["default"], null)));
case 'ek-blocks-manager':
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])(Fragment, null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])("p", null, __('Manage each individual blocks! You can enable or disable any blocks you want and it will be reflected on Gutenberg block manager settings. Just uncheck the box and it will automatically be saved.', 'block-options')), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])(_block_manager___WEBPACK_IMPORTED_MODULE_8__["default"], null));
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])(Fragment, null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])("a", {
href: "https://shop.gutenberghub.com/blocks/",
target: "_blank"
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])("img", {
width: "100%",
height: "100%",
src: (_editorskitData$block = (_editorskitData = editorskitData) === null || _editorskitData === void 0 ? void 0 : _editorskitData.blockBanner) !== null && _editorskitData$block !== void 0 ? _editorskitData$block : ""
})), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])("p", null, __('Manage each individual blocks! You can enable or disable any blocks you want and it will be reflected on Gutenberg block manager settings. Just uncheck the box and it will automatically be saved.', 'block-options')), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])(_block_manager___WEBPACK_IMPORTED_MODULE_8__["default"], null));
case 'ek-template-library':
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])(Fragment, null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])("p", null, __('Here you can enable/disable the integrated GutenbergHub\'s template library.', 'block-options')), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])(_addons_manager__WEBPACK_IMPORTED_MODULE_11__["default"], null));
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])(Fragment, null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])("a", {
href: "https://shop.gutenberghub.com/patterns/",
target: "_blank"
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])("img", {
width: "100%",
height: "100%",
src: (_editorskitData$templ = (_editorskitData2 = editorskitData) === null || _editorskitData2 === void 0 ? void 0 : _editorskitData2.templateBanner) !== null && _editorskitData$templ !== void 0 ? _editorskitData$templ : ""
})), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])("p", null, __('Here you can enable/disable the integrated GutenbergHub\'s template library.', 'block-options')), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_5__["createElement"])(_addons_manager__WEBPACK_IMPORTED_MODULE_11__["default"], null));
}
});
};
Expand Down
2 changes: 1 addition & 1 deletion build/template-library-addon.js.map

Large diffs are not rendered by default.

Binary file added images/blocks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/templates.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 49 additions & 0 deletions includes/class-editorskit-plugin-images-links.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?php
/**
* Editorskit Plugin Images
*
* @package Editorskit
*/

/**
* Responsible for creating images links.
*/
class Editorskit_Plugin_Images_Links {

/**
* The Plugin version.
*
* @var string $slug
*/
private $slug;

/**
* Constructor.
*
* @return void
*/
public function __construct() {
$this->slug = 'editorskit';
$this->plugin_image_links();
}
/**
* Generates Plugins images.
*/
public function plugin_image_links() {

$template_banner = EDITORSKIT_PLUGIN_URL . 'images/templates.png';
$block_banner = EDITORSKIT_PLUGIN_URL . 'images/blocks.png';

// Localize data to pass variables to JavaScript.
wp_localize_script(
$this->slug . '-admin',
'editorskitData',
array(
'templateBanner' => $template_banner,
'blockBanner' => $block_banner,
)
);
}
};

new Editorskit_Plugin_Images_Links();
1 change: 1 addition & 0 deletions includes/class-editorskit-welcome.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ public function enqueue() {

wp_add_inline_script( $this->slug . '-admin', 'window.editorskitSettings = ' . wp_json_encode( $global ) . ';', 'before' );
wp_add_inline_script( $this->slug . '-admin', 'window.editorskitInfo = ' . wp_json_encode( $global ) . ';', 'before' );
require_once EDITORSKIT_PLUGIN_DIR . 'includes/class-editorskit-plugin-images-links.php';
}

/**
Expand Down
82 changes: 62 additions & 20 deletions languages/editorskit.pot
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,84 @@ msgstr ""
"Content-Type: text/plain; charset=utf-8\n"
"X-Generator: babel-plugin-makepot\n"

#: src/addons/template-library/components/library-cloud.js:171
msgid "Get Now"
#: src/admin/index.js:101
msgid ""
"Manage each individual blocks! You can enable or disable any blocks you "
"want and it will be reflected on Gutenberg block manager settings. Just "
"uncheck the box and it will automatically be saved."
msgstr ""

#: src/addons/template-library/components/library-cloud.js:195
msgid "Deactivate"
#: src/admin/index.js:112
msgid "Here you can enable/disable the integrated GutenbergHub's template library."
msgstr ""

#: src/addons/template-library/components/library-cloud.js:31
msgid "Enter License Key"
#: src/admin/index.js:127
msgid "Settings → EditorsKit"
msgstr ""

#: src/addons/template-library/components/library-cloud.js:44
msgid "Cancel"
#: src/admin/index.js:128
msgid "Getting Started with"
msgstr ""

#: src/addons/template-library/components/library-cloud.js:58
msgid "Activating..."
#: src/admin/index.js:129
msgid ""
"Congratulations! You've just unlocked more Gutenberg block editor tools for "
"easier editing and better workflow. Check more information about the plugin "
"below and please make sure to navigate through \"Tutorials and Docs\" tab "
"to learn more on how to use each available features."
msgstr ""

#: src/addons/template-library/components/library-cloud.js:73
msgid "Activate"
#: src/admin/index.js:139
msgid "Buy me a Coffee"
msgstr ""

#: src/addons/template-library/components/library-no-connections-found.js:15
msgid "No Cloud Found"
#: src/admin/index.js:147
msgid "Leave a Review"
msgstr ""

#: src/addons/template-library/components/library-no-connections-found.js:21
msgid "You don't have any existing cloud. Try adding a new cloud."
#: src/admin/index.js:23
msgid "Getting Started"
msgstr ""

#: src/addons/template-library/components/library-no-connections-found.js:30
msgid "Add New Cloud"
#: src/admin/index.js:28
msgid "Tutorial and Docs"
msgstr ""

#: src/addons/template-library/components/library-sidebar.js:72
msgid "All"
#: src/admin/index.js:33
msgid "Features Manager"
msgstr ""

#: src/admin/index.js:38
msgid "Blocks Manager"
msgstr ""

#: src/admin/index.js:43
msgid "Template Library"
msgstr ""

#: src/admin/index.js:60
msgid ""
"EditorsKit provides set of tools to extend the way you are building content "
"on WordPress Gutenberg block editor. Designed and integrated to help users "
"easily navigate; and control each block the way it should be."
msgstr ""

#: src/admin/index.js:63
msgid "EditorsKit video preview"
msgstr ""

#: src/admin/index.js:68
msgid ""
"If you have any questions or suggestion, let us know through "
"%1$sTwitter%4$s or our %2$sFacebook community %4$s. Also, %3$ssubscribe to "
"our newsletter%4$s if you want to stay up to date with what's new and "
"upcoming at EditorsKit."
msgstr ""

#: src/admin/index.js:88
msgid ""
"All features are active by default but you have complete control over each "
"one of them. Disable any features do not want to use and re-enable them "
"anytime on this page or under the \"EditorsKit Settings\" on Gutenberg "
"editor. Just uncheck the box and it will automatically be saved."
msgstr ""
8 changes: 1 addition & 7 deletions plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,7 @@ private function includes() {
require_once EDITORSKIT_PLUGIN_DIR . 'includes/class-editorskit-plugin-shortcuts.php';

require_once EDITORSKIT_PLUGIN_DIR . 'includes/class-editorskit-addon-manager.php';
// $addons_manager = new Editorskit_Addon_Manager();
// var_dump( $addons_manager->get_addon_settings() );
// wp_localize_script(
// 'editorskit-editor',
// 'editorskit_addons',
// $addons_manager->get_addon_settings()
// );

if ( is_admin() || ( defined( 'WP_CLI' ) && WP_CLI ) ) {
require_once EDITORSKIT_PLUGIN_DIR . 'includes/class-editorskit-welcome.php';
require_once EDITORSKIT_PLUGIN_DIR . 'includes/class-editorskit-page-template-support.php';
Expand Down
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Plugin URI: https://editorskit.com
Contributors: munirkamal
Tags: Gutenberg blocks, WordPress blocks, gutenberg, blocks, Gutenberg editor
Requires at least: 5.0
Tested up to: 6.2
Tested up to: 6.3
Requires PHP: 5.6
Stable tag: 1.34.9
License: GPL-3.0
Expand Down
8 changes: 6 additions & 2 deletions src/admin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import EditorsKitDocs from './docs';
import FeaturesManager from '../extensions/components/manager/components/manager';
import BlockManager from './block-manager/';
import Notices from './notices';

/**
* WordPress dependencies
*/
Expand Down Expand Up @@ -96,6 +95,9 @@ class EditorsKitSettings extends Component {
case 'ek-blocks-manager':
return (
<Fragment>
<a href='https://shop.gutenberghub.com/blocks/' target='_blank'>
<img width='100%' height='100%' src={editorskitData?.blockBanner ?? ""} />
</a>
<p>{__('Manage each individual blocks! You can enable or disable any blocks you want and it will be reflected on Gutenberg block manager settings. Just uncheck the box and it will automatically be saved.', 'block-options')}</p>
<BlockManager />
</Fragment>
Expand All @@ -104,12 +106,14 @@ class EditorsKitSettings extends Component {
case 'ek-template-library':
return (
<Fragment>
<a href='https://shop.gutenberghub.com/patterns/' target='_blank'>
<img width='100%' height='100%' src={editorskitData?.templateBanner ?? ""} />
</a>
<p>{__('Here you can enable/disable the integrated GutenbergHub\'s template library.', 'block-options')}</p>
<AddonsManager />
</Fragment>

);

}
}}
</TabPanel>
Expand Down

0 comments on commit 9fb3d8d

Please sign in to comment.