Skip to content

Instantly share code, notes, and snippets.

View crumina's full-sized avatar
🎯
Focusing

crumina

🎯
Focusing
View GitHub Profile
@crumina
crumina / functions.php
Last active September 30, 2015 10:49
[Embrace - menu align change]
add_action( 'wp_enqueue_scripts', 'embrace_custom_scripts', 100 );
function embrace_custom_scripts()
{
wp_dequeue_script( 'reactor-js' );
wp_deregister_script( 'reactor-js' );
// Now the parent script is completely removed
/*
* Now enqueue you child js file, no need to register if you are not
* doing conditional loading
@crumina
crumina / functions.php
Created September 11, 2015 09:45
[Embrace] WPML - default language switcher
if ( ! function_exists( 'reactor_toplang_r' ) ) {
function reactor_toplang_r( $args = '' ) {
if ( function_exists( 'icl_get_languages' ) ) {
$defaults = array(
'side' => 'right',
);
$args = wp_parse_args( $args, $defaults );
$args = apply_filters( 'reactor_top_bar_args', $args );
@crumina
crumina / functions.php
Last active September 11, 2015 11:10
Replace related posts for wp under post
function crum_replace_related_posts(){
add_filter( 'rp4wp_append_content', '__return_false' );
add_action( 'reactor_post_after', 'rp4wp_children', 1 );
}
add_action( 'init', 'crum_replace_related_posts' );
<script>
jQuery(document).ready(function(){
jQuery(".widget_crum_block_fetures_box").find("a.link.clickable").removeAttr('href');
jQuery(".widget_block-fetures-box").find(".button").hide();
});
</script>
@crumina
crumina / custom.js
Last active October 2, 2015 09:35
[Onetouch] Remove title from portfolio
jQuery(document).ready(function(){
jQuery("#Grid .round article").find(".absolute-link").removeAttr('title');
});
@crumina
crumina / functions.php
Created October 7, 2015 17:49 — forked from anonymous/functions.php
add links to userpro profiles
<?php
/**
* Meta information for current post: categories, tags, author, and date
*/
if ( !function_exists('reactor_post_meta') ) {
function reactor_post_meta( $args = '' ) {
do_action('reactor_post_meta', $args);
@crumina
crumina / comments.php
Created October 7, 2015 17:53
add links to userpro profiles
<?php
if ( !function_exists('reactor_comments') ) :
function reactor_comments( $comment, $args, $depth ) {
do_action('reactor_comments', $comment, $args, $depth );
global $userpro;
$GLOBALS['comment'] = $comment;
switch ( $comment->comment_type ) :
case 'pingback' :
case 'trackback' :
function crum_changed_content($num,$no_more = false)
{
global $post;
$options = get_option('second-touch');
if ($options['read_more_style'] == '0'){
$read_more_link = '<a href="'. get_permalink($post->ID) . '" class="link-read-more"> </a>';
}else{
$read_more_link = '<a href="'. get_permalink($post->ID) . '"> '.__('Read more','crum').'</a>';
<script type="text/javascript">
jQuery('#header .soc-head-icons a').click(function() { jQuery(this).attr('target', '_blank'); });
</script>
<?php
/**
* Shortcode attributes
* @var $atts
* @var $title
* @var $source
* @var $image
* @var $custom_src
* @var $onclick
* @var $img_size