Skip to content

Instantly share code, notes, and snippets.

function add_opengraph_doctype($output) {
return $output . '
xmlns="https://www.w3.org/1999/xhtml"
xmlns:og="https://ogp.me/ns#"
xmlns:fb="http://www.facebook.com/2008/fbml"';
}
add_filter('language_attributes', 'add_opengraph_doctype');
@prajwal-stha
prajwal-stha / Remove novalidate Comment Form Wordpress
Created October 2, 2016 16:46 — forked from ivanildodias/Remove novalidate Comment Form Wordpress
Remove "novalidate" attribute in default WordPress Comment Form
ob_start();
$commenter = wp_get_current_commenter();
$req = get_option( 'require_name_email' );
$aria_req = ( $req ? " aria-required='true'" : '' );
$html_req = ( $req ? " required='required'" : '' );
$span_req = ( $req ? ' <span class="required">*</span>' : '' );
comment_form( array(
'title_reply' => __( 'Leave your thoughts', 'issimple' ),
'comment_notes_after' => '',
@prajwal-stha
prajwal-stha / add-to-cart.php
Created September 20, 2016 15:48 — forked from claudiosanches/add-to-cart.php
WooCommerce - Template add-to-cart.php with quantity and Ajax!
<?php
/**
* Custom Loop Add to Cart.
*
* Template with quantity and ajax.
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly.
global $product;