This file contains 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 each = function(collection, callback) { | |
if( Array.isArray(collection) ) { | |
for( var i = 0; i < collection.length; i++ ) { | |
collection[i] = callback( collection[i] ); | |
} | |
} else { | |
for( var prop in collection ) { | |
collection[prop] = callback( collection[prop] ); | |
} | |
} |
This file contains 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
<form action="index.html" method="post"> | |
<label for="name">Name:</label> | |
<input type="text" id="name" name="user_name"> | |
<label for="mail">Email:</label> | |
<input type="email" id="mail" name="user_email"> | |
<label for="password">Password:</label> | |
<input type="password" id="password" name="user_password"> |
This file contains 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
angular.module('demoApp', ['ngMessages']) | |
.controller('FormCtrl', function($scope, FormFactory) { | |
$scope.formData = {}; | |
$scope.submitAppForm = function() { | |
FormFactory.sendFormData($scope.postData) | |
.then(function(resp) { | |
// process response | |
}) |
This file contains 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
<div class="container"> | |
<form name="messageForm"> | |
<!-- NAME --> | |
<label for="name">Name</label> | |
<input type="text" name="name" id="name" placeholder="Name" required> | |
<!-- EMAIL --> | |
<label for="email">Email</label> | |
<input type="email" name="email" id="email" placeholder="Email address" required> |
This file contains 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
<div class="container" ng-app="demoApp"> | |
<form name="messageForm"> | |
<!-- NAME --> | |
<label for="name">Name</label> | |
<input type="text" name="name" id="name" placeholder="Name" ng-model="formData.name" required> | |
<!-- EMAIL --> | |
<label for="email">Email</label> | |
<input type="email" name="email" id="email" placeholder="Email address" ng-model="formData.email" required> |
This file contains 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
<div class="container" ng-app="demoApp"> | |
<form name="messageForm" novalidate> | |
<!-- NAME --> | |
<label for="name">Name</label> | |
<input type="text" name="name" id="name" placeholder="Name" ng-model="formData.name" required> | |
<div ng-messages="messageForm.name.$error" ng-show="messageForm.name.$touched"> | |
<div ng-message="required">This field is required</div> | |
</div> |
This file contains 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
<div class="container" ng-app="demoApp"> | |
<form name="messageForm" novalidate> | |
<!-- NAME --> | |
<label for="name">Name</label> | |
<input type="text" name="name" id="name" placeholder="Name" ng-model="formData.name" required> | |
<div ng-messages="messageForm.name.$error" ng-show="messageForm.name.$touched"> | |
<div ng-message="required">This field is required</div> | |
</div> |
This file contains 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 React from 'react'; | |
const Testing = props => { | |
return ( | |
<pre> | |
<code>{JSON.stringify(props, null, 4)}</code> | |
</pre> | |
); | |
}; |
This file contains 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
add_filter( 'genesis_cpt_archive_settings_menu_label', 'genesis_starter_cpt_archive_settings_menu_label' ); | |
function genesis_starter_cpt_archive_settings_menu_label() { | |
$label = __( 'Settings', 'genesis_starter' ); | |
return $label; | |
} | |
// Remove meta boxes on the CPT Archive pages. | |
add_action( 'genesis_cpt_archives_settings_metaboxes', 'genesis_starter_remove_cpt_archives_settings_metaboxes' ); |
This file contains 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
add_filter( ‘jetpack_just_in_time_msgs’, ‘__return_false’ ); |
OlderNewer