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 formEl = document.querySelector('.form-profile-upd'); | |
| formEl.addEventListener('submit', e => { | |
| e.preventDefault(); | |
| const data = new FormData(formEl); | |
| const id = window.WP_DATA.USER_ID; | |
| console.log(data.get('birthday')); | |
| fetch(`${WP_DATA.ROOT_URL}wp/v2/users/` + id, { | |
| method: 'POST', | |
| credentials: 'same-origin', | |
| body: { |
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
| // Remove default genesis sidebars | |
| remove_action( 'genesis_after_content', 'genesis_get_sidebar' ); | |
| remove_action( 'genesis_after_content_sidebar_wrap', 'genesis_get_sidebar_alt'); |
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
| body { | |
| -webkit-overflow-scrolling: touch; | |
| } |
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
| class Observer { | |
| subscribe(subscriber) { | |
| this.subscribers.push(subscriber); | |
| } | |
| publish(event, data) { | |
| let query = this.subscribers.filter(subscriber => subscriber.event === event); | |
| if (query.length) query.forEach(subscriber => subscriber.action(data)); | |
| } | |
| constructor() { | |
| this.subscribers = []; |
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
| // Price Format | |
| function formatNum(num){ | |
| var num = num + '', | |
| arr = num.split(''), | |
| arrCopy = arr.slice(0), | |
| j = 0; | |
| for(var i = arr.length -1 ; i >= 0; i--){ | |
| if ( j % 3 === 0 && j !== 0 ) { | |
| arrCopy.splice( i + 1, 0, ' ' ); | |
| } |
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
| <?php | |
| // Remove | |
| remove_action( 'genesis_meta', 'genesis_load_stylesheet' ); | |
| // Replace with custom | |
| add_filter( 'stylesheet_uri', 'custom_replace_default_style_sheet', 10, 2 ); | |
| function custom_replace_default_style_sheet() { | |
| return CHILD_URL . '/green-pack.css'; | |
| } |
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
| <?php | |
| //* Remove .site-inner | |
| add_filter( 'genesis_markup_site-inner', '__return_null' ); | |
| add_filter( 'genesis_markup_content-sidebar-wrap_output', '__return_false' ); | |
| add_filter( 'genesis_markup_content', '__return_null' ); | |
| ?> |
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
| function debounce(func, wait, immediate) { | |
| var timeout; | |
| return function() { | |
| var context = this, args = arguments; | |
| var later = function() { | |
| timeout = null; | |
| if (!immediate) func.apply(context, args); | |
| }; | |
| var callNow = immediate && !timeout; | |
| clearTimeout(timeout); |
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
| <?php | |
| // Remove post info | |
| remove_action('genesis_before_post_content', 'genesis_post_info'); | |
| ?> |
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
| <?php | |
| // Unregister other site layouts | |
| genesis_unregister_layout( 'full-width-content' ); | |
| genesis_unregister_layout( 'content-sidebar' ); | |
| genesis_unregister_layout( 'sidebar-content' ); | |
| genesis_unregister_layout( 'content-sidebar-sidebar' ); | |
| genesis_unregister_layout( 'sidebar-sidebar-content' ); | |
| genesis_unregister_layout( 'sidebar-content-sidebar' ); |