Composer Process Timeout

COMPOSER_PROCESS_TIMEOUT=2000 php composer.phar install

Reference http://www.papayasoft.com/2013/08/22/composer-process-timeout-when-fetching-large-repositories/
Advertisements

Collapsible sidebar menus, correction

Reference: http://mysitemyway.com/docs/index.php/Collapsible_sidebar_menus

But correct in the javascript to prevent the  e.preventDefault();

jQuery(‘.menu .dropdown a’).click(function(e){
if (jQuery(this).parent().hasClass(“dropdown”)) {
e.preventDefault();
if (jQuery(this).parent().children(‘.sub-menu:first’).is(‘:visible’)) {
jQuery(this).parent().children(‘.sub-menu:first’).hide();
} else {
jQuery(this).parent().children(‘.sub-menu:first’).show();
}
}
});

 

 

Error qtraslate switching editor Visual -> HTML -> Visual

To fix do that:

In plugins/qtraslate/qtranslate_javascript.php

Change this code:

—————————————————————————————————-

$q_config['js']['qtrans_xsplit'] = "
String.prototype.xsplit = function(_regEx){

—————————————————————————————————-

to this:

—————————————————————————————————-

$q_config['js']['qtrans_xsplit'] = "
var usr_sett_ed = getUserSetting( 'editor' );
if ( parseInt( getUserSetting( 'ed_size' ) ) < 300 ) {
setUserSetting( 'ed_size', 300 );
}
setUserSetting( 'editor', 'html' );
String.prototype.xsplit = function(_regEx){

—————————————————————————————————-

and this:

—————————————————————————————————-

var h = wpCookies.getHash('TinyMCE_content_size');

—————————————————————————————————-

to this:

—————————————————————————————————-

var h = getUserSetting( 'ed_size' );

—————————————————————————————————-

Thanks: Nikola Nikolov on http://www.qianqin.de/qtranslate/forum/viewtopic.php?f=3&t=3831

How add order by, where and inner to wp_query, to order by subcategori

add_filter(‘posts_orderby’, ‘edit_posts_orderby’);
add_filter(‘posts_where’, ‘edit_posts_where’);
add_filter(‘posts_join_paged’,’edit_posts_join_paged’);

function edit_posts_join_paged($join_paged_statement) {
global $wpdb;
$pais = get_cat_ID(“Pais”);
$join_paged_statement = ” INNER JOIN $wpdb->term_relationships ON ($wpdb->posts.ID = $wpdb->term_relationships.object_id) INNER JOIN $wpdb->term_taxonomy ON ($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id AND $wpdb->term_taxonomy.parent=$pais) INNER JOIN $wpdb->terms ON ($wpdb->term_taxonomy.term_id=$wpdb->terms.term_id) “;
return $join_paged_statement;
}
function edit_posts_where($where_statement){
global $wpdb;
$where_statement = ” AND $wpdb->term_taxonomy.taxonomy = \’category\’ “;
return $where_statement;
}
function edit_posts_orderby($orderby_statement) {
global $wpdb;
$orderby_statement = ” $wpdb->terms.name ASC, post_title ASC “;
return $orderby_statement;
}

Example to use;

// The Query
$arre = array();
if(is_day()) $arre[‘day’] = get_the_time(‘d’);$arre[‘monthnum’]= get_the_time(‘m’);$arre[‘year’]= get_the_time(‘Y’);
if(is_month()) $arre[‘monthnum’]= get_the_time(‘m’);$arre[‘year’]= get_the_time(‘Y’);
if(is_year()) $arre[‘year’]= get_the_time(‘Y’);
$arre[‘nopaging’]=true;

add_filter(‘posts_join_paged’,’edit_posts_join_paged’);
add_filter(‘posts_orderby’, ‘edit_posts_orderby’);
$query = new WP_Query($arre);
remove_filter(‘posts_join_paged’, ‘edit_posts_join_paged’) ;
remove_filter(‘posts_orderby’, ‘edit_posts_orderby’) ;

 

REFERENCE: http://codex.wordpress.org/Plugin_API/Filter_Reference/posts_orderby