Skip to content

Instantly share code, notes, and snippets.

Avatar

Jose Castaneda jocastaneda

View GitHub Profile
View intercom.css
.conversation__view__stream-wrapper {
width: 70% !important;
}
.conversation__inbox__current-context {
width: 30% !important;
}
.conversation__inbox__current-context .attribute__editor-row {
height: 13px;
}
.conversation__inbox__current-context .profile-sidebar-section__regular-padding div {
View file.js
(function(){
console.log(ait_php_var);
})();
View preview.js
// ==UserScript==
// @name worg-support-preview
// @namespace http://tampermonkey.net/
// @version 0.1.0
// @description Random functionality for support forums.
// @author Jose Castaneda
// @include https://*.wordpress.org/support/topic/*
// @include https://wordpress.org/support/topic/*
// @grant none
// ==/UserScript==
View shortcode-example.php
<?php // add_shortcode needs to return a string.
function tags_function() {
$termsSecteur = get_the_terms( $post->ID , 'secteur' );
if ( $termsSecteur != null ) {
foreach ( $termsSecteur as $termsSecteur ) {
$termsSecteur_link = get_term_link( $termsSecteur, 'secteur' );
$return .= sprintf( '<a class="tag-secteur" href="%1$s">%2$s</a>', $termsSecteur_link, $termsSecteur->name );
unset( $termsSecteur );
}
}
View adjusted.html
<div class="msgHere">
... loading today's quote
</div>
<script type='text/javascript'>
var xmlhttp = null;
function AjaxRequest(url) {
if(xmlhttp != null){
if(xmlhttp.abort)
View possible-actions.diff
diff --git a/src/includes/class-healthcheck.php b/src/includes/class-healthcheck.php
index ff3f4ad..31204fb 100644
--- a/src/includes/class-healthcheck.php
+++ b/src/includes/class-healthcheck.php
@@ -308,13 +308,16 @@ class HealthCheck {
</h1>
<?php
- $tabs = array(
+ /*
@jocastaneda
jocastaneda / questions.md
Created Jun 20, 2018
Health Check contributing questions
View questions.md
  • is a local setup needed?
    • how does one setup for contributing?
  • creating issues in the github repo?
    • follow a template or just open an issue?
  • what is a good pull request?
    • is up to date with current master of the project?
    • commit messages clean?
    • PHPCS standards followed?
    • should branches be used?
    • should branch names be descriptive?
View lack-o-options.php
<?php
function lametheme_get_breadcrumbs() {
/* === OPTIONS === */
$text['home'] = esc_html__( 'Home', 'lametheme' ); // text for the 'Home' link
$text['blog'] = esc_html__( 'Blog', 'lametheme' ); // text for the 'Blog' link
$text['category'] = esc_html__( 'Archive by Category "%s"', 'lametheme' ); // text for a category page
$text['search'] = esc_html__( 'Search Results for "%s" Query', 'lametheme' ); // text for a search results page
$text['tag'] = esc_html__( 'Posts Tagged "%s"', 'lametheme' ); // text for a tag page
$text['author'] = esc_html__( 'Articles Posted by %s', 'lametheme' ); // text for an author page
View kalunder.php
<?php
/*
Plugin Name: Kalunder
Plugin URI: http://blog.josemcastaneda.comn
Description: Adds the shortcode kalunder so that you can display the WordPress calendar to any post, page or custom post type.
Author: Jose Castaneda
Version: 1.0.0
Author URI: https://blog.josemcastaneda.com
*/
add_shortcode( 'kalunder', 'jc_get_cal' );
@jocastaneda
jocastaneda / audio.css
Last active Jan 27, 2018
HTML and CSS provided when using [audio|video] shortcodes in WordPress. The CSS was extracted and any pre-populated styles are inline-styles that are used by MediaElements. Note that you can target specific instances by targetting the `#mep_{$instance}` or even `#{$type}-{$post_id}-{$instance}` Yes, I have provided some SCSS as well if you want …
View audio.css
#mep_0 {
width: 100%;
height: 30px;
}
#audio-post_id-1 {
width: 100%;
}
.mejs-offscreen {