This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * External Dependencies | |
| */ | |
| import classnames from 'classnames'; | |
| /** | |
| * Add custom element class in save element. | |
| * | |
| * @param {Object} extraProps Block element. | |
| * @param {Object} blockType Blocks object. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * WordPress Dependencies | |
| */ | |
| const { __ } = wp.i18n; | |
| const { addFilter } = wp.hooks; | |
| const { Fragment } = wp.element; | |
| const { InspectorAdvancedControls } = wp.editor; | |
| const { createHigherOrderComponent } = wp.compose; | |
| const { ToggleControl } = wp.components; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * WordPress Dependencies | |
| */ | |
| const { addFilter } = wp.hooks; | |
| /** | |
| * Add custom attribute for mobile visibility. | |
| * | |
| * @param {Object} settings Settings for the block. | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| wp.apiRequest( { path: '/phpbits/test-blocks/v1/user-roles/' } ) | |
| .then( | |
| ( obj ) => { | |
| console.log( obj ); | |
| } | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| edit: withSelect( ( select ) => { | |
| return { | |
| roles: select('phpbits/test-block').receiveUserRoles(), | |
| }; | |
| } )( props => { | |
| console.log( this.props.roles ); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const { apiFetch } = wp; | |
| const { registerStore, withSelect } = wp.data; | |
| const actions = { | |
| setUserRoles( userRoles ) { | |
| return { | |
| type: 'SET_USER_ROLES', | |
| userRoles, | |
| }; | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .site-footer{ | |
| background-color: #232525; | |
| text-align: left; | |
| } | |
| .site-footer, .site-footer a{ | |
| color: #fff; | |
| text-decoration: none; | |
| border: 0px; | |
| } | |
| .site-footer-hi .widget-title{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .footer-widgets{ | |
| padding: 0px; | |
| background: linear-gradient(90deg, #dd3333 50%, #000000 50%); | |
| } | |
| .footer-widgets .widget{ | |
| padding: 90px 40px; | |
| margin: 0px; | |
| } | |
| .footer-widgets .widget-title{ | |
| text-transform: uppercase; |