Skip to content

Instantly share code, notes, and snippets.

View trishasalas's full-sized avatar

Trisha Salas trishasalas

  • Level Access
  • Tulsa, OK
View GitHub Profile
<?php
/**
* HTML Template for Order Meal Selection
*
* @package woocommerce-cote
*/
function cote_meals( $meal_type, $section_title, $section_image ) {
$meals = get_post_meta( get_the_ID(), $meal_type, true );
<?php
class Multisite_Directory_Settings {
function __construct() {
add_action( 'admin_menu', array( $this, 'ms_dir_add_admin_menu' ) );
add_action( 'admin_init', array( $this, 'ms_dir_settings_init' ) );
}
<?php if ( $phone || $email ) : ?>
<div class="top-info">
<div class="contact" itemscope itemtype="http://schema.org/Organization">
<a href="tel:<?php echo $phone; ?>" itemprop="telephone" class="telephone"><?php echo $phone; ?></a>
<a href="mailto:<?php echo antispambot( $email ); ?>" itemprop="email" class="email"><?php echo antispambot( $email ); ?></a>
</div><!-- contact -->
</div><!-- top-info -->
<?php endif;?>
jQuery(document).ready(function($) {
//Customer Info
$( "#field_1_1 h2.gsection_title" ).click(function() {
$( "#field_1_2" ).toggle( "slow", function() {
});
});
//Interior Inspection
$( "#field_1_13 h2.gsection_title" ).click(function() {
@trishasalas
trishasalas / migrate-multisite-to-mainsite.php
Created December 23, 2015 00:13
This will migrate sites from a multisite into the main blog.
<?php
/*********************************
|||| MAGIC.SCRIPT ||||
|||| XX ||||
|||| ----------------- ||||
|||| for migrating ||||
|||| multisite posts ||||
|||| into a single site ||||
**********************************/
<?php
/*********************************
|||| MAGIC.SCRIPT ||||
|||| XX ||||
|||| ----------------- ||||
|||| for migrating ||||
|||| multisite posts ||||
|||| into a single site ||||
**********************************/
<?php
// Customizer.php
/**
* Add postMessage support for site title and description for the Theme Customizer.
*
* @param WP_Customize_Manager $wp_customize Theme Customizer object.
*/
function ts_customize_register( $wp_customize ) {
@trishasalas
trishasalas / mysql.sh
Created September 25, 2015 18:23
MySql Command Line Snippets
#Count Number of Tables
SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = 'dbName';
#or
USE databasename; SHOW TABLES; SELECT FOUND_ROWS();

Post Links

Pesky image arrows would stay lined up so I decided to make them with just css. Added some hover animation just for fun!

A Pen by Trisha Salas on CodePen.

License.

@trishasalas
trishasalas / translate-variable.php
Created October 14, 2014 21:38
translate a variable
<?php
$url = get_post_meta( $post->ID, '_project-url', true );
if ($url != '') {
$link = sprintf( __( '%s', 'wpp-portfolio' ), esc_url( $url ) );?>
<p><?php echo $link;?></p>
<?php }
?>