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
| import { TextBlock, RectShape } from 'react-placeholder/lib/placeholders'; | |
| import ReactPlaceholder from 'react-placeholder'; | |
| const GhostPlaceholder = () => ( | |
| <div className='my-placeholder'> | |
| <RectShape color='gray' style={{width: 25, height: 70}} /> | |
| <TextBlock rows={6} color='blue'/> | |
| </div> | |
| ); | |
| <ReactPlaceholder ready={ready} customPlaceholder={<GhostPlaceholder />}> |
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
| <!-- селект для выбора языка --> | |
| <select id="langs"> | |
| <option value="rus" selected>Русский</option> | |
| <option value="eng">English</option> | |
| </select> | |
| <!-- инпут для загрузки файла изображения --> | |
| <input type="file" id="file" /> | |
| <!-- лог процесса обработки и вывод результата --> |
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 | |
| add_action('admin_init', 'add_options_section'); | |
| function add_options_section() { | |
| add_settins_section( | |
| 'section_name', | |
| 'Section Title', | |
| 'section_callback', | |
| 'reading' |
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 | |
| add_action('wp_head', function() { | |
| $css = "body { background: lightblue; }"; | |
| echo "<style>$css</style>"; | |
| }); |
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 | |
| add_action('add_meta_boxes', function() { | |
| add_meta_box('metabox_name', 'Metabox Title', 'metaboxCallback', array('post', 'page'), 'normal', 'default'); | |
| }, 1); | |
| function metaboxCallback($post) { | |
| $value1 = get_post_meta($post->ID, 'meta_prefix_'.'meta_field_name_1', 1); | |
| $value2 = get_post_meta($post->ID, 'meta_prefix_'.'meta_field_name_2', 1); | |
| ?> |
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 | |
| add_action('add_meta_boxes', function() { | |
| add_meta_box('metabox_name', 'Metabox Title', 'metaboxCallback', array('post', 'page'), 'normal', 'default') | |
| }, 1); | |
| function metaboxCallback($post) { | |
| $value = get_post_meta($post->ID, 'meta_field_name', 1); | |
| ?> |
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
Show hidden characters
| { | |
| "presets": [ | |
| [ | |
| "@babel/preset-env", | |
| { | |
| "modules": false, | |
| "loose": true, | |
| "useBuiltIns": "usage" | |
| } | |
| ] |
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
| /** | |
| * Stylelint configuration | |
| * https://stylelint.io/ | |
| * | |
| * plugins: | |
| * | |
| * stylelint-order | |
| * https://github.com/hudochenkov/stylelint-order | |
| * | |
| * TODO Stylelint rules |
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
| { | |
| "devDependencies": { | |
| "autoprefixer": "^9.7.3", | |
| "node-sass": "^4.13.0", | |
| "postcss-cli": "^6.1.3" | |
| }, | |
| "scripts": { | |
| "css:dev": "node-sass src/scss/style.scss style.css -w", | |
| "css:prebuild": "node-sass src/scss/style.scss style.css", | |
| "css:postcss": "postcss style.css -r --use autoprefixer -c postcss.config.js", |