Blog Archives

1 year, 3 months ago 0
Posted in: Programování
add_filter( 'wpseo_metabox_prio', 'jw_filter_yoast_seo_metabox' );
function jw_filter_yoast_seo_metabox() {
	return 'low';
1 year, 4 months ago 0
Posted in: Programování
php -d memory_limit=2048M /usr/local/bin/composer require ....
1 year, 4 months ago 0
Posted in: Programování
# based on
# but modified for the MAMP path and to include default root/root as username and password

for I in $(/Applications/MAMP/Library/bin/mysql -u root -proot -e 'show databases' -s --skip-column-names); do /Applications/MAMP/Library/bin/mysqldump -u root -proot $I | gzip > "$I.sql.gz"; done


1 year, 6 months ago 0
Posted in: WordPress


// $loc obsahuje správné locale (cs_CZ, ...) - záleží na pojmenování lokalizačních souborů
$filename = realpath(dirname(__FILE__) . '/../..') . '/languages/plugins/woocommerce-' . $loc . '.mo';
unload_textdomain('woocommerce' );
load_plugin_textdomain('woocommerce', false, $filename);
3 years, 9 months ago 0
Posted in: Programování
$page_id = !empty($params['page_id']) ? $params['page_id'] : null;
 $assign = !empty($params['assign']) ? $params['assign'] : null;
 if (!empty($page_id)) {
  $contentOps = cmsms()->getContentOperations();
  $templateOps = cmsms()->getTemplateOperations();
 if (!empty($contentOps) && !empty($templateOps)) {
   $content = $contentOps->LoadContentFromId($page_id);
      if (!empty($content)) {
    $templateID = $content->templateId();
    if (!empty($templateID)) {
     $template = $templateOps->LoadTemplateByID($templateID);
     if (!empty($template)) {
      if (!empty($assign)) $smarty->assign($assign, $template->name);
      else return $template->name;
 return false;
3 years, 10 months ago 0
Posted in: Programování
function current_url() {
   $pageURL = 'http';
   if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
   $pageURL .= "://";
   if ($_SERVER["SERVER_PORT"] != "80") {
   } else {
   return $pageURL;

function create_url($other_qs_parsed = array()) {
  $url = current_url();
  $url_parsed = parse_url($url);
  $new_qs_parsed = array();
  parse_str($url_parsed['query'], $new_qs_parsed);

  $final_query_string_array = array_merge($new_qs_parsed, $other_qs_parsed);
  $final_query_string = http_build_query($final_query_string_array);

  $new_url = $url_parsed['scheme'] 
           . '://'
           . $url_parsed['host'] 
           . $url_parsed['path'] 
           . '?'      
           . $final_query_string;
  return $new_url;
4 years, 10 months ago 0
Posted in: Internet

It is not comfortable to select all drops one by one in the web interface of My CloudApp ( If you need to, paste in address bar following snippet and press enter. All drops get selected and you can use the Delete selected button.

javascript:jQuery(".select input").trigger("click");
4 years, 10 months ago 0

For PhoneGap build it is enough to have self-signed keystore certificate. You can easily deploy just www folder and sign the Android application to Google Play deploy.

Having installed JSDK, in bin folder there is a keytool app. Just run the app with following parameters and the generated keystore key can be used to sign the Android application.

keytool -genkey -v -keystore yourapplication.keystore -alias yourapplication -keyalg RSA -keysize 2048 -validity 10000
5 years, 4 months ago 0
Posted in: Programování

In case you are suffering with the category page breadcrumbs, which look like nonsence, showing totally unrelated categories, solution may be quite simple (eventhough unacceptable). There may be wrong categories in table ps_category, which have parent category id linking to non existing category. In the moment you delete all rows with not-existing parent-ids, the breadcrumbs will be fixed.

This happen in the case you created some categories and deleted them, but the deletion mechanism in Prestashop is buggy.

5 years, 6 months ago 0

WordPress allows you to use custom text editors with the function wp_editor. There is one very annoying issue, which is cause in combination with qTranslate plugin. It means, while you are using qTranslate and in the same time for example in admin you have custom wp_editor ‘s, you are not able to insert any files (uploads neither images) in the wp_editor.

There is fix available. Editing file


and make the block on line 238 look following:

$q_config['js']['qtrans_wpActiveEditorOverload'] = "
		/*wpActiveEditor = 'qtrans_textarea_', -5);*/
		 var sliced =, -5);
            if (sliced == 'content'){
 	            wpActiveEditor = 'qtrans_textarea_content';
            } else {
                wpActiveEditor = sliced;