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
// Released under MIT license: http://www.opensource.org/licenses/mit-license.php | |
$('[placeholder]').focus(function() { | |
var input = $(this); | |
if (input.val() == input.attr('placeholder')) { | |
input.val(''); | |
input.removeClass('placeholder'); | |
} | |
}).blur(function() { | |
var input = $(this); | |
if (input.val() == '' || input.val() == input.attr('placeholder')) { |
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
// Your should include this in to your functions theme | |
add_filter('mce_buttons_2', 'wpse3882_mce_buttons_2'); | |
function wpse3882_mce_buttons_2($buttons) | |
{ | |
array_unshift($buttons, 'styleselect'); | |
return $buttons; | |
} | |
add_filter('tiny_mce_before_init', 'wpse3882_tiny_mce_before_init'); | |
function wpse3882_tiny_mce_before_init($settings) |
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
<?php | |
/** | |
* Class Name: wp_bootstrap_navwalker | |
* GitHub URI: https://github.com/twittem/wp-bootstrap-navwalker | |
* Description: A custom WordPress nav walker class to implement the Twitter Bootstrap 2.3.2 navigation style in a custom theme using the WordPress built in menu manager. | |
* Version: 2.0.1 | |
* Author: Edward McIntyre - @twittem | |
* License: GPL-2.0+ | |
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt |
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
http_path = "/" | |
css_dir = "." | |
sass_dir = "." | |
images_dir = "img" | |
javascripts_dir = "js" | |
output_style = :compact | |
relative_assets=true | |
line_comments = false |
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('json_api_encode', 'json_api_encode_acf'); | |
function json_api_encode_acf($response) | |
{ | |
if (isset($response['posts'])) { | |
foreach ($response['posts'] as $post) { | |
json_api_add_acf($post); // Add specs to each post | |
} | |
} |
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
function switch_page_template() { | |
global $post; | |
// Checks if current post type is a page, rather than a post | |
if (is_page()) | |
{ | |
// Checks if page is parent, if yes, return | |
if ($post->post_parent == 0) | |
return true; | |
else if ($post->post_parent != $post->ID) |
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
# Apache Configuration File | |
# (!) Using `.htaccess` files slows down Apache, therefore, if you have access | |
# to the main server config file (usually called `httpd.conf`), you should add | |
# this logic there: http://httpd.apache.org/docs/current/howto/htaccess.html. | |
# ############################################################################## | |
# # CROSS-ORIGIN RESOURCE SHARING (CORS) # | |
# ############################################################################## |
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
packages: | |
yum: | |
git: [] | |
files: | |
/opt/elasticbeanstalk/hooks/appdeploy/pre/51install_meteor.sh: | |
mode: "000755" | |
user: root | |
group: root | |
encoding: plain |
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
// Texto de tipo String o cadena, | |
let texto: String = 'hello world' | |
texto = 2 // Error no puede asignar un Numero a un tipo Cadena o String | |
// Una constante no puede ser reasignada | |
const PI: Number = 3.1416 | |
PI = 3543 // Error: no puede asignar un valor a una constante | |
// Tipos de array lo cual es muy conveniente para evitar mutación de los datos con tipos invalidos | |
let nombres:Array<String> = ['David','Jose','Maria'] |
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 angular from 'angular'; | |
import uiRouter from 'angular-ui-router'; | |
import ocLazyLoad from 'oclazyload'; | |
let aboutModule = angular.module('about', [ | |
uiRouter, | |
ocLazyLoad | |
]) | |
.config(($stateProvider, $compileProvider) => { |
OlderNewer