This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// zrušení meta tagů | |
remove_action('wp_head', 'rsd_link'); // remove really simple discovery link | |
remove_action('wp_head', 'wp_generator'); // remove wordpress version | |
remove_action('wp_head', 'feed_links', 2); // remove rss feed links (make sure you add them in yourself if youre using feedblitz or an rss service) | |
remove_action('wp_head', 'feed_links_extra', 3); // removes all extra rss feed links | |
remove_action('wp_head', 'index_rel_link'); // remove link to index page | |
remove_action('wp_head', 'wlwmanifest_link'); // remove wlwmanifest.xml (needed to support windows live writer) | |
remove_action('wp_head', 'start_post_rel_link', 10, 0); // remove random post link | |
remove_action('wp_head', 'parent_post_rel_link', 10, 0); // remove parent post link | |
remove_action('wp_head', 'adjacent_posts_rel_link', 10, 0); // remove the next and previous post links |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// zkrácení znaků | |
function zkrat($string, $number) | |
{ | |
if ( mb_strlen($string) > $number ) | |
{ | |
$return = strpos( $string, ' ', $number ); | |
$return = substr( $string, 0, $return ); | |
$return = $return.'…'; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// vytažení nadstránek | |
function getSuppages() { | |
global $post; | |
$pid = wp_get_post_parent_id($post->ID); | |
$pages = get_pages(array("parent" => $pid, "sort_column" => "menu_order")); | |
return $pages; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// přidání vlastních stylů | |
if ( ! function_exists( 'wpex_styles_dropdown' ) ) { | |
function wpex_styles_dropdown( $settings ) { | |
// Create array of new styles | |
$new_styles = array( | |
array( | |
'title' => __( 'Vlastní styly', 'wpex' ), | |
'items' => array( | |
array( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// zjištění aktuální kategorie pro rozdělení formulářů | |
$current_category = get_queried_object(); | |
$current_category = $current_category->post_parent; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// titulek stránky | |
if ( is_404() ) { $page_title = "Chyba 404 - stránka nenalezena"; } // chyba 404 | |
elseif ( is_search() ) { $page_title = "Vyhledávání"; } // vyhledávání | |
elseif ( is_archive() ) { $page_title = str_replace("Archiv: ", "", get_the_archive_title()); } // zrušení dodatku Arichív | |
else { $page_title = get_the_title(); } // standardní titulek |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// zrušení načítání jQuery pro Contact Form 7 | |
add_filter( 'wpcf7_load_js', '__return_false' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<files .htaccess> | |
Order allow,deny | |
Deny from all | |
</files> | |
<files readme.html> | |
Order allow,deny | |
Deny from all | |
</files> | |
<files license.txt> | |
Order allow,deny |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// napojení pluginu Zalomení na ACF pole | |
function my_acf_format_value( $value, $post_id, $field ) { | |
$value = do_shortcode($value); | |
return Zalomeni::texturize($value); | |
} | |
// pouze pro text, textarea a wysiwyg | |
add_filter('acf/format_value/type=text', 'my_acf_format_value', 10, 3); | |
add_filter('acf/format_value/type=textarea', 'my_acf_format_value', 10, 3); | |
add_filter('acf/format_value/type=wysiwyg', 'my_acf_format_value', 10, 3); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE wp_posts SET guid = REPLACE(guid, 'http://stararaurl.cz', 'http://novaurl.cz'); | |
UPDATE wp_posts SET post_content = REPLACE(post_content, 'http://stararaurl.cz', 'http://novaurl.cz'); | |
UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, 'http://stararaurl.cz', 'http://novaurl.cz'); | |
UPDATE wp_options SET option_value = REPLACE(option_value, 'http://stararaurl.cz', 'http://novaurl.cz'); |