Getting started:
Related tutorials:
- MySQL-CLI: https://www.youtube.com/playlist?list=PLfdtiltiRHWEw4-kRrh1ZZy_3OcQxTn7P
- Analyzing Business Metrics: https://www.codecademy.com/learn/sql-analyzing-business-metrics
<?php | |
add_filter( 'wp_headers', array( 'eg_send_cors_headers' ), 11, 1 ); | |
function eg_send_cors_headers( $headers ) { | |
$headers['Access-Control-Allow-Origin'] = get_http_origin(); // Can't use wildcard origin for credentials requests, instead set it to the requesting origin | |
$headers['Access-Control-Allow-Credentials'] = 'true'; | |
// Access-Control headers are received during OPTIONS requests | |
if ( 'OPTIONS' == $_SERVER['REQUEST_METHOD'] ) { |
Getting started:
Related tutorials:
<?php | |
//Simple Ajax Login Form | |
//Source: http://natko.com/wordpress-ajax-login-without-a-plugin-the-right-way/ | |
//html | |
<form id="login" action="login" method="post"> | |
<h1>Site Login</h1> | |
<p class="status"></p> | |
<label for="username">Username</label> | |
<input id="username" type="text" name="username"> |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
Cheatsheet: http://cheats.jesse-obrien.ca/
PhpStorm Helper: https://github.com/laravelbook/laravel4-phpstorm-helper
<?php | |
/** | |
* Deregister matching post types. | |
*/ | |
function custom_unregister_theme_post_types() { | |
global $wp_post_types; | |
foreach( array( 'portfolio', 'gallery', 'team', 'testimonial', 'highlight' ) as $post_type ) { | |
if ( isset( $wp_post_types[ $post_type ] ) ) { | |
unset( $wp_post_types[ $post_type ] ); | |
} |
<meta property="og:title" content="Full structured image property"> | |
<meta property="og:site_name" content="Open Graph protocol examples"> | |
<meta property="og:type" content="website"> | |
<meta property="og:locale" content="en_US"> | |
<link rel="canonical" href="http://examples.opengraphprotocol.us/image-url.html"> | |
<meta property="og:url" content="http://examples.opengraphprotocol.us/image-url.html"> | |
<meta property="og:image:url" content="http://examples.opengraphprotocol.us/media/images/50.png"> | |
<meta property="og:image:secure_url" content="https://d72cgtgi6hvvl.cloudfront.net/media/images/50.png"> | |
<meta property="og:image:width" content="50"> | |
<meta property="og:image:height" content="50"> |
manage_{$post_type}_posts_columns | |
https://codex.wordpress.org/Plugin_API/Filter_Reference/manage_$post_type_posts_columns | |
manage_{$post_type}_posts_custom_column | |
https://codex.wordpress.org/Plugin_API/Action_Reference/manage_$post_type_posts_custom_column | |
add_filter( 'manage_book_posts_columns', 'set_custom_edit_book_columns' ); | |
add_action( 'manage_book_posts_custom_column' , 'custom_book_column', 10, 2 ); | |
function set_custom_edit_book_columns($columns) { | |
unset( $columns['author'] ); |
// Get The Page ID You Need | |
get_option( ‘woocommerce_shop_page_id’ ); | |
get_option( ‘woocommerce_cart_page_id’ ); | |
get_option( ‘woocommerce_checkout_page_id’ ); | |
get_option( ‘woocommerce_pay_page_id’ ); | |
get_option( ‘woocommerce_thanks_page_id’ ); | |
get_option( ‘woocommerce_myaccount_page_id’ ); | |
get_option( ‘woocommerce_edit_address_page_id’ ); | |
get_option( ‘woocommerce_view_order_page_id’ ); | |
get_option( ‘woocommerce_terms_page_id’ ); |