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 | |
// http://developer.ninjaforms.com/codex/custom-form-action/ | |
// https://kb.mailster.co/mailster-for-developers/ | |
add_action('init', 'ninjaforms_mailster_integration_init'); | |
function ninjaforms_mailster_integration_init() { | |
if (!function_exists( 'mailster' )) return; | |
add_action( 'ninja_forms_mailster_integration', 'action_ninja_forms_mailster_integration' ); |
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 maor_image_proportions_classes($attr, $attachment) { | |
$image = wp_get_attachment_image_src( $attachment->ID, 'full', false ); | |
if ( ! $image ) | |
return $attr; | |
list( $src, $width, $height ) = $image; | |
$attr['class'] .= ( $height > $width ) ? ' wp-image-portrait' : ' wp-image-landscape'; |
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 | |
function ch_photonize( $url = '', $params = array() ) { | |
$server_pool = rand( 0,3 ); | |
return add_query_arg( | |
$params, | |
"https://i{$server_pool}.wp.com/" . str_replace( array( 'http://', 'https://' ), '', $url ) | |
); | |
} |
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 | |
/* | |
Plugin Name: Just Give Me Berlin. | |
Plugin URI: http://www.berlin.de/en/ | |
Description: Berlin. Nuff said. | |
Author: A Berliner | |
Author URI: http://www.findme.in/berlin | |
Version: 0.0 | |
*/ |
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
[{ | |
"id": "571", | |
"type": "0", | |
"user": "RedAlertAdminApp-95.35.61", | |
"date": "09\/07\/2014 - 09:01:58", | |
"message": "Rockets Attack : Moatza Ezorit Eshkol", | |
"count": 9 | |
}, { | |
"id": "570", | |
"type": "0", |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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( $ ) { | |
// $ is safe to use here. | |
$(document).ready( function() { | |
// ... | |
} ); | |
} )( jQuery ); |
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 | |
// https://www.facebook.com/groups/wordpress.support/permalink/497037907031944 | |
function mc_497037907031944( $content ) { | |
if ( is_user_logged_in() ) | |
return $content; | |
else | |
return 'Sorry, you must be logged in...'; | |
} |
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 | |
/** | |
* @author Maor Chasen <[email protected]> | |
*/ | |
function mc_497346850334383( $classes, $class, $post_id ) { | |
$post = get_post( $post_id ); | |
if ( ! $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
<?php | |
/** | |
* Add a new <select> field, pre-populated with all countries in our tiny, tiny world. | |
* | |
* @author Maor Chasen | |
*/ | |
function aff_register_ninja_forms_fields() { | |
$args = array( |
NewerOlder