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
| require.config({ | |
| baseUrl: '/backbone-tests/', | |
| paths: { | |
| 'jquery' : '/app/libs/jquery', | |
| 'underscore' : '/app/libs/underscore', | |
| 'backbone' : '/app/libs/backbone', | |
| 'mocha' : 'libs/mocha', | |
| 'chai' : 'libs/chai', | |
| 'chai-jquery' : 'libs/chai-jquery', | |
| 'models' : '/app/models' |
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
| // Usage: | |
| // get_id_by_slug('any-page-slug'); | |
| function get_id_by_slug($page_slug) { | |
| $page = get_page_by_path($page_slug); | |
| if ($page) { | |
| return $page->ID; | |
| } else { | |
| 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
| // Usage: | |
| // get_id_by_slug('any-page-slug'); | |
| function get_id_by_slug($page_slug) { | |
| $page = get_page_by_path($page_slug); | |
| if ($page) { | |
| return $page->ID; | |
| } else { | |
| 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
| if ( class_exists( 'WPBakeryShortCodesContainer' ) ) { | |
| class WPBakeryShortCode_Team_Wrapper extends WPBakeryShortCodesContainer { | |
| } | |
| } | |
| if ( class_exists( 'WPBakeryShortCode' ) ) { | |
| class WPBakeryShortCode_Team_Mate extends WPBakeryShortCode { | |
| } | |
| } |
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 team_mate_block_function( $atts, $content ) { | |
| extract( shortcode_atts( array( | |
| 'name' => '', | |
| 'status' => '', | |
| 'profile_image' => '', | |
| 'description' => '' | |
| ), $atts ) ); | |
| ob_start(); | |
| ?> |
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 team_wrapper_block_function( $atts, $content ) { | |
| extract( shortcode_atts( array( | |
| 'el_class' => '' | |
| ), $atts ) ); | |
| ob_start(); | |
| echo '<section class="team-wrapper"> | |
| <div class="team-thumbnail"> |
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
| vc_map( array( | |
| "name" => __("Team Mate", "rhthm"), | |
| "base" => "team_mate", | |
| 'category' =>__('Team', 'rhthm'), | |
| "content_element" => true, | |
| "as_child" => array('only' => 'team_wrapper'), // Use only|except attributes to limit parent (separate multiple values with comma) | |
| "params" => array( | |
| // add params same as with any other content element | |
| array( | |
| "type" => "textfield", |
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
| vc_map( array( | |
| "name" => __("Team Wrapper", "my-text-domain"), | |
| "base" => "team_wrapper", | |
| 'category' =>__('Team', 'rhthm'), | |
| "as_parent" => array('only' => 'team_mate'), // Use only|except attributes to limit child shortcodes (separate multiple values with comma) | |
| "content_element" => true, | |
| "show_settings_on_create" => false, | |
| "is_container" => true, | |
| "js_view" => 'VcColumnView' | |
| ) ); |
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
| { | |
| "name": "react-hello-world", | |
| "version": "1.0.0", | |
| "description": "", | |
| "main": "index.js", | |
| "scripts": { | |
| "test": "echo \"Error: no test specified\" && exit 1" | |
| }, | |
| "author": "", | |
| "license": "ISC", |
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
| var gulp = require("gulp"); | |
| var gutil = require("gulp-util"); | |
| var webpack = require("webpack"); | |
| var webpack = require('webpack-stream'); | |
| var webpackConfig = require("./webpack.config.js"); | |
| var uglify = require('gulp-uglify'); | |
| // The development server (the recommended option for development) | |
| gulp.task("default", ["webpack:build-dev"]); |