This file contains 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řesměrování nástěnky | |
function dashboard_redirect(){ | |
wp_redirect(admin_url('edit.php?post_type=page')); | |
} | |
add_action('load-index.php','dashboard_redirect'); | |
function login_redirect( $redirect_to, $request, $user ){ | |
return admin_url('edit.php?post_type=page'); | |
} | |
add_filter('login_redirect','login_redirect',10,3); |
This file contains 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
// skrytí některých částí administrace | |
function remove_menus(){ | |
remove_menu_page('index.php'); // nástěnka | |
remove_menu_page('edit.php'); // posty | |
remove_menu_page('edit-comments.php'); // komentáře | |
} | |
add_action('admin_menu', 'remove_menus'); |
This file contains 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í admin baru | |
show_admin_bar(false); |
This file contains 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
// definice velikostí obrázků | |
add_action( 'after_setup_theme', 'wpdocs_theme_setup' ); | |
function wpdocs_theme_setup() { | |
add_image_size('picture_name', 100, 100, true); | |
} |
This file contains 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
// zobrazení formátů v editoru | |
if ( ! function_exists( 'wpex_style_select' ) ) { | |
function wpex_style_select( $buttons ) { | |
array_push( $buttons, 'styleselect'); | |
return $buttons; | |
} | |
} | |
add_filter( 'mce_buttons', 'wpex_style_select' ); |
This file contains 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í pluginu do TinyMCE | |
function my_mce_external_plugins($plugins) { | |
$plugins['anchor'] = '/wp-includes/js/tinymce/plugins/anchor/plugin.min.js'; // plugin pro kotvy | |
return $plugins; | |
} | |
add_filter('mce_external_plugins', 'my_mce_external_plugins'); | |
// přidání rozšířených vlastností k TinyMCE | |
function extra_editor_buttons($buttons) { | |
$buttons[] = 'anchor'; |
This file contains 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
// standardní zapnutí vložení prostého textu do TinyMCE | |
function tinymce_paste_as_text( $init ) { | |
$init['paste_as_text'] = true; | |
return $init; | |
} | |
add_filter('tiny_mce_before_init', 'tinymce_paste_as_text'); |
This file contains 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í podstránek | |
function getSubpages() { | |
global $post; | |
$pid = $post->ID; | |
$pages = get_pages(array("parent" => $pid, "sort_column" => "menu_order")); | |
return $pages; | |
} |
This file contains 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í emoji | |
function disable_wp_emojicons() { | |
// all actions related to emojis | |
remove_action( 'admin_print_styles', 'print_emoji_styles' ); | |
remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); | |
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); | |
remove_action( 'wp_print_styles', 'print_emoji_styles' ); | |
remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' ); | |
remove_filter( 'the_content_feed', 'wp_staticize_emoji' ); |
This file contains 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í položek z admin baru | |
function remove_admin_bar_links() { | |
global $wp_admin_bar; | |
//$wp_admin_bar->remove_menu('wp-logo'); // Remove the WordPress logo | |
//$wp_admin_bar->remove_menu('about'); // Remove the about WordPress link | |
//$wp_admin_bar->remove_menu('wporg'); // Remove the WordPress.org link | |
//$wp_admin_bar->remove_menu('documentation'); // Remove the WordPress documentation link | |
//$wp_admin_bar->remove_menu('support-forums'); // Remove the support forums link | |
//$wp_admin_bar->remove_menu('feedback'); // Remove the feedback link | |
//$wp_admin_bar->remove_menu('site-name'); // Remove the site name menu |
OlderNewer