Skip to content

Instantly share code, notes, and snippets.

Vladimír Smitka lynt-smitka

Block or report user

Report or block lynt-smitka

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View my-custom-functions.php
<?php
/*
Plugin name: Moje funkce
*/
add_filter( 'get_the_archive_title', function ( $title ) {
if( is_category() ) {
$title = single_cat_title( '', false );
}
View hide-archive.php
add_filter( 'get_the_archive_title', function ( $title ) {
if( is_category() ) {
$title = single_cat_title( '', false );
}
if( is_tag() ) {
$title = single_tag_title( '', false );
}
View wp-simple-localization.php
<?php
function lynt_is_en() {
$path_parts = explode('/', $_SERVER['REQUEST_URI']);
if (isset($path_parts[1]) && $path_parts[1] === 'en') {
return true;
}
@lynt-smitka
lynt-smitka / ansible-info.yml
Created Feb 24, 2020
Run command on all ansible hosts and return output
View ansible-info.yml
- hosts: all
gather_facts: no
tasks:
- shell: uname -a
register: result
- debug: msg={{ result.stdout }}
View CF7 - GTM
<script>
document.addEventListener( 'wpcf7mailsent', function( event ) {
window.dataLayer.push({
"event" : "cf7submission",
"formId" : event.detail.contactFormId,
"response" : event.detail.inputs
})
});
</script>
View Synology x86
Active Backup for Business
Active Backup for G Suite
Active Backup for Office 365
Antivirus by McAfee
Archiware P5
Archiware Pure
Central Management System
Data Deposit Box
Synology Directory Server
Docker
View rubrika_ontop.php
function lynt_rubrika_checked_ontop($args){
$args['checked_ontop'] = false;
return $args;
}
add_filter('wp_terms_checklist_args','lynt_rubrika_checked_ontop');
View wp-config-debug.php
define( 'WP_DEBUG', true );
define( 'WP_DISABLE_FATAL_ERROR_HANDLER', true );
View wp-config-part.php
define( 'WP_DEBUG', true );
define( 'WP_DISABLE_FATAL_ERROR_HANDLER', true );
You can’t perform that action at this time.