A mixin for writing @font-face rules in SASS.
Create a font face rule. Embedded OpenType, WOFF2, WOFF, TrueType, and SVG files are automatically sourced.
@include font-face(Samplino, fonts/Samplino);
add_filter( 'tribe_event_label_singular', 'event_display_name' ); | |
function event_display_name() { | |
return 'XXXX'; | |
} | |
add_filter( 'tribe_event_label_plural', 'event_display_name_plural' ); | |
function event_display_name_plural() { | |
return 'XXXXs'; | |
} |
afghanistan : Afghanistan | |
albania : Albania | |
algeria : Algeria | |
american_samoa : American Samoa | |
andorra : Andorra | |
angola : Angola | |
anguilla : Anguilla | |
antigua_and_barbuda : Antigua and Barbuda | |
argentina : Argentina | |
armenia : Armenia |
The ability to use PHP 4 style constructors is getting removed from PHP. Without an update, many plugins will eventually no longer work (this is PHP breaking this backwards compatibility, not WordPress)
One of the more common uses of the PHP 4 style constructor (as opposed to PHP 5 style __construct()
) are plugins with widgets calling WP_Widget::WP_Widget()
and/or parent::WP_Widget()
and/or {object}->WP_Widget()
Note: Starting in WordPress 4.3, regardless of the PHP version in use on a server, WordPress will throw a deprecated notice when one of the PHP 4 style constructors is called specifically for widgets.
Basically instead of doing these:
<?php | |
/** | |
* Plugin Name: WooCommerce Composite Products - Hide Components in all Templates | |
* Plugin URI: https://woocommerce.com/products/composite-products/ | |
* Description: Use this snippet to hide Components in the cart, checkout, order and e-mail templates. | |
* Version: 1.0 | |
* Author: SomewhereWarm | |
* Author URI: https://somewherewarm.gr/ | |
* Developer: Manos Psychogyiopoulos | |
* |
<?php | |
/** | |
* Plugin Name: PayPal Sandbox IPN Tester | |
* Description: Pings the IPN endpoint to see if your server can connect. Just head to <a href="/?ipn-test=1">yoursite.com/?ipn-test=1</a> whilst logged in as admin. | |
* Version: 1.0.0 | |
* Author: WooThemes | |
* Requires at least: 4.1 | |
* Tested up to: 4.3 | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { |
<?php | |
add_filter('woocommerce_add_cart_item_data', 'namespace_force_individual_cart_items', 10, 2); | |
function namespace_force_individual_cart_items($cart_item_data, $product_id) { | |
$unique_cart_item_key = md5(microtime() . rand()); | |
$cart_item_data['unique_key'] = $unique_cart_item_key; | |
return $cart_item_data; | |
} |
window.location.host //www.test.com:8082 | |
window.location.hostname // www.test.com | |
window.location.port // 8082 | |
window.location.protocol // http | |
window.location.pathname // index.php | |
window.location.href // http://www.test.com:8082/index.php#tab2 | |
window.location.hash // #tab2 | |
window.location.search // ?foo=123 | |
$(location).attr('host'); // www.test.com:8082 |
<?php | |
// Event taxonomies | |
add_action( 'init', function() { | |
$labels = array( | |
'name' => _x( 'Terms', 'taxonomy general name' ), | |
'singular_name' => _x( 'Term', 'taxonomy singular name' ), | |
); | |
register_taxonomy( 'taxonomy_name', array( 'post' ), array( | |
'hierarchical' => false, |
//Just a random file for loading your posts to see that the infinite scroll works. | |
<?php get_header(); ?> | |
<div class="col-md-6 col-md-offset-3"> | |
<div class="post-container"> | |
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> | |
<div class="page-header post"> | |
<h1><?php the_title(); ?></h1> | |
<p><?php the_excerpt(); ?></p> | |
</div> |