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 bootstrap file | |
* | |
* @link https://github.com/PETAF/plugin-get-prod-images | |
* @since 1.0.0 | |
* @package PETA\Plugin_Get_Prod_Images\ | |
* | |
* @wordpress-plugin | |
* Plugin Name: Plugin Get Prod Images |
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 filter_image_url($url){ | |
$liveurl = 'http://www.siteurl.com/'; | |
$localurl = 'http://localhost/yourURL/'; | |
$url = str_replace($localurl, $liveurl, $url); | |
return $url; | |
} | |
add_filter('wp_get_attachment_url', 'filter_image_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
/* | |
|-------------------------------------------------------------------------- | |
| Browser-sync config file | |
|-------------------------------------------------------------------------- | |
| | |
| Please report any issues you encounter: | |
| https://github.com/shakyShane/browser-sync/issues | |
| | |
| For up-to-date information about the options: | |
| https://github.com/shakyShane/browser-sync/wiki/Working-with-a-Config-File |
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 | |
/** | |
* Filter a few parameters into YouTube oEmbed requests | |
* | |
* @link http://goo.gl/yl5D3 | |
*/ | |
function iweb_modest_youtube_player( $html, $url, $args ) { | |
return str_replace( '?feature=oembed', '?feature=oembed&modestbranding=1&showinfo=0&rel=0', $html ); | |
} | |
add_filter( 'oembed_result', 'iweb_modest_youtube_player', 10, 3 ); |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<title>Single-Column Responsive Email Template</title> | |
<style> | |
@media only screen and (min-device-width: 541px) { | |
.content { |
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 | |
# Register custom post types on the 'init' hook. | |
add_action( 'init', 'my_register_post_types' ); | |
/** | |
* Registers post types needed by the plugin. | |
* | |
* @since 1.0.0 | |
* @access public |
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
/** | |
* Custom Gallery Setting | |
*/ | |
( function( $ ) { | |
var media = wp.media; | |
// Wrap the render() function to append controls | |
media.view.Settings.Gallery = media.view.Settings.Gallery.extend({ | |
render: function() { | |
media.view.Settings.prototype.render.apply( this, arguments ); |
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
/* The Grid ---------------------- */ | |
.lt-ie9 .row { width: 940px; max-width: 100%; min-width: 768px; margin: 0 auto; } | |
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; } | |
.lt-ie9 .row.large-collapse .column, | |
.lt-ie9 .row.large-collapse .columns { padding: 0; } | |
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; } | |
.lt-ie9 .row .row.large-collapse { margin: 0; } | |
.lt-ie9 .column, .lt-ie9 .columns { float: left; min-height: 1px; padding: 0 15px; position: relative; } | |
.lt-ie9 .column.large-centered, .columns.large-centered { float: none; margin: 0 auto; } |
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
/** | |
* This now works on both members list and individual profile pages. Note that "birthdate" is name of profile date field - change as needed | |
* Get Age from BuddyPress date of Birth | |
* <a href='http://buddypress.org/community/members/param/' rel='nofollow'>@param</a> string $dob_field_name :name of the DOB field in xprofile, like Dob or Date of Birth | |
* <a href='http://buddypress.org/community/members/param/' rel='nofollow'>@param</a> int $user_id : the user for which you want to retrieve the age | |
* <a href='http://buddypress.org/community/members/param/' rel='nofollow'>@param</a> string $format: the way you want to print the difference, look t <http://php.net/manual/en/dateinterval.format.php> for the acceptable agrs | |
* @return string :the formatted age in year/month | |
*/ | |
function bpdev_get_age_from_dob($birthdate,$user_id=false,$format="%y Years, %m Month(s), %d days"){ |
NewerOlder