• úvod
  • témata
  • události
  • tržiště
  • diskuze
  • nástěnka
  • přihlásit
    registrace
    ztracené heslo?
    QUITEwordpress
    KOCMOC
    KOCMOC --- ---
    MRTVY_KENNY: umi to i produkty z eshopu pekne vyhazet pod vysledek rovnou jako karty pro objednani, neni to spatny :)
    KOCMOC
    KOCMOC --- ---
    MRTVY_KENNY: ja teda pouzival JSON-LD a delalo to rich snippety pekne. mrkni treba na tu kartu v jinym pripade vpravo pro viper recordings

    Viper recordings - Hledat Googlem
    https://www.google.cz/search?q=Viper%20recordings&rct=j
    MRTVY_KENNY
    MRTVY_KENNY --- ---
    trosku OT, pardon

    KOCMOC: s tema microdatama..
    ja to sem tam nekam strkam do statickych webu (typicky kontakt), mam to na jednom webu k festivalu, kde mam skoro vsechno.. co kde kdy, za kolik listky, lineup.. ale musim se priznat, ze netusim k cemu je to prakticky dobre.. rsp. i kdyz bych cekal, ze treba google to nejak naformatuje jako udalost ve vysledcich vyhledavani, tak na to zcela dlabe i kdyz ten jejich validator je zeleny az za usima
    KACZER
    KACZER --- ---
    Ahoj, hledáme na jeden projekt informačního portálu zkušeného externího wordpress/fronend developera, který by měl v červnu čas. Víc info v poště prosím. Díky
    WRONSKI
    WRONSKI --- ---
    THEODORT: Díky, zkusím to pochopit.
    THEODORT
    THEODORT --- ---
    WRONSKI: tady trocha teorie pro .htaccess(je tam vse co zadas):
    How to… » Stop Hotlinking and Leeching .htaccess (allow multiple domains)
    http://rockdio.org/ayudatech/stop-hotlinking-and-leeching-htaccess-multiple-domain/
    KOCMOC
    KOCMOC --- ---
    a jeste jeden sikovnej JS na otevirani vsech externich linku v novym tabu (ne jen pro content a komenty, ale proste celej dokument)
    function external_links_in_new_windows_loop() {
    		if (!document.links) {
    			document.links = document.getElementsByTagName('a');
    		}
    		var change_link = false;
    		var force = '';
    		var ignore = '';
    
    		for (var t=0; t<document.links.length; t++) {
    			var all_links = document.links[t];
    			change_link = false;
    			
    			if(document.links[t].hasAttribute('onClick') == false) {
    				// forced if the address starts with http (or also https), but does not link to the current domain
    				if(all_links.href.search(/^http/) != -1 && all_links.href.search('futuresickness-records.com') == -1) {
    					// alert('Changeda '+all_links.href);
    					change_link = true;
    				}
    					
    				if(force != '' && all_links.href.search(force) != -1) {
    					// forced
    					// alert('force '+all_links.href);
    					change_link = true;
    				}
    				
    				if(ignore != '' && all_links.href.search(ignore) != -1) {
    					// alert('ignore '+all_links.href);
    					// ignored
    					change_link = false;
    				}
    
    				if(change_link == true) {
    					// alert('Changed '+all_links.href);
    					document.links[t].setAttribute('onClick', 'javascript:window.open(\''+all_links.href+'\'); return false;');
    					document.links[t].removeAttribute('target');
    				}
    			}
    		}
    	}
    	
    	// Load
    	function external_links_in_new_windows_load(func)
    	{	
    		var oldonload = window.onload;
    		if (typeof window.onload != 'function'){
    			window.onload = func;
    		} else {
    			window.onload = function(){
    				oldonload();
    				func();
    			}
    		}
    	}
    
    	external_links_in_new_windows_load(external_links_in_new_windows_loop);
    KOCMOC
    KOCMOC --- ---
    konecne kompletni kod na vypnuti komentaru globalne (functions.php)
    //DISABLE COMMENTS GLOBALLY
    // Disable support for comments and trackbacks in post types
    function df_disable_comments_post_types_support() {
    	$post_types = get_post_types();
    	foreach ($post_types as $post_type) {
    		if(post_type_supports($post_type, 'comments')) {
    			remove_post_type_support($post_type, 'comments');
    			remove_post_type_support($post_type, 'trackbacks');
    		}
    	}
    }
    add_action('admin_init', 'df_disable_comments_post_types_support');
    
    // Close comments on the front-end
    function df_disable_comments_status() {
    	return false;
    }
    add_filter('comments_open', 'df_disable_comments_status', 20, 2);
    add_filter('pings_open', 'df_disable_comments_status', 20, 2);
    
    // Hide existing comments
    function df_disable_comments_hide_existing_comments($comments) {
    	$comments = array();
    	return $comments;
    }
    add_filter('comments_array', 'df_disable_comments_hide_existing_comments', 10, 2);
    
    // Remove comments page in menu
    function df_disable_comments_admin_menu() {
    	remove_menu_page('edit-comments.php');
    }
    add_action('admin_menu', 'df_disable_comments_admin_menu');
    
    // Redirect any user trying to access comments page
    function df_disable_comments_admin_menu_redirect() {
    	global $pagenow;
    	if ($pagenow === 'edit-comments.php') {
    		wp_redirect(admin_url()); exit;
    	}
    }
    add_action('admin_init', 'df_disable_comments_admin_menu_redirect');
    
    // Remove comments metabox from dashboard
    function df_disable_comments_dashboard() {
    	remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal');
    }
    add_action('admin_init', 'df_disable_comments_dashboard');
    
    // Remove comments links from admin bar
    function df_disable_comments_admin_bar() {
    	if (is_admin_bar_showing()) {
    		remove_action('admin_bar_menu', 'wp_admin_bar_comments_menu', 60);
    	}
    }
    add_action('init', 'df_disable_comments_admin_bar');
    KOCMOC
    KOCMOC --- ---
    slusnej werk pro tvorbu a spravu mikrodat
    Schema Creator by Raven — WordPress Plugins
    https://wordpress.org/plugins/schema-creator/
    CRS1138
    CRS1138 --- ---
    KOCMOC: aha :)
    KOCMOC
    KOCMOC --- ---
    CRS1138: To jen tak sem v zoufalosti zkusil plug hide wp
    WRONSKI
    WRONSKI --- ---
    Existuje nějaký jednoduchý plugin, který by odmítl přistup z určité domény prvního řádu?
    Ideálně nějak primitivním nastavením typu blacklist např. "ru, cn". Popř. naopak jako whitelist.
    CRS1138
    CRS1138 --- ---
    KOCMOC
    KOCMOC --- ---
    CRS1138: Hide WP totalni fail haha
    CRS1138
    CRS1138 --- ---
    KOCMOC: hmm, ja to obvykle delam pres iThemes Security = htaccess
    KOCMOC
    KOCMOC --- ---
    hele muzu se zeptat, nemate nekdo vychytanou funkci na tyhle tri veci?
    1) zmena wp-admin url
    2) skryti wp-login.php
    3) znepristupneni linku pro registraci

    nechci na to delat nejakej monstr kod ani zasahovat do htaccessu
    KOCMOC
    KOCMOC --- ---
    a vlaste jeste jedna pro me dulezita vec do functions.php :D
    // FUCK EMOJI
    remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
    remove_action( 'wp_print_styles', 'print_emoji_styles' );
    KOCMOC
    KOCMOC --- ---
    YOAST SEO totalne dole, i pod custom fields (ACF)
    // Move Yoast to bottom
    function yoasttobottom() {
    	return 'low';
    }
    
    add_filter( 'wpseo_metabox_prio', 'yoasttobottom');
    ZATAMOKO
    ZATAMOKO --- ---
    MRTVY_KENNY: bmp umi, uz to mam stazeny na lokale, tak to necham pres noc prechroupat
    Kliknutím sem můžete změnit nastavení reklam