Skip to content

Instantly share code, notes, and snippets.

View teolopez's full-sized avatar
🤓

Teodoro Lopez teolopez

🤓
View GitHub Profile
@teolopez
teolopez / fgetcsv-01
Last active April 26, 2022 02:24
fgetcsv – csv to html table
<table class="table table-bordered table-condensed table-hover">
<?php
$row = 1;
ini_set('auto_detect_line_endings',TRUE);
if (($handle = fopen("http://docs.shopify.com/manual/your-store/products/product_template.csv", "r")) !== FALSE) {
while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
$num = count($data);
echo "<tr>";
<?php
/* Register custom post types on the 'init' hook. */
add_action( 'init', 'my_register_post_types' );
/**
* Registers post types needed by the plugin.
*
* @since 0.1.0
* @access public
@teolopez
teolopez / custom_post_type_template.php
Last active March 10, 2022 07:54
Plugin -- Template to create Custom Post Type
<?php
/**
* Teo Lopez Wordpress Plugin Boilerplate
* Built from: The WordPress Plugin Boilerplate.
*
* A foundation off of which to build well-documented WordPress plugins that
* also follow WordPress Coding Standards and PHP best practices.
*
* @package