udpate 13/10/22

This commit is contained in:
Your NameAntoine 2022-10-13 15:26:53 +02:00
parent f48f1c052a
commit fcc8c6081a
2 changed files with 58 additions and 4 deletions

View File

@ -1,8 +1,11 @@
<?php
// function custom_menu_page_removing() {
// remove_menu_page('edit.php'); // Posts
// }
// add_action( 'admin_menu', 'custom_menu_page_removing' );
// Removing Articles from the admin bar
function custom_menu_page_removing() {
remove_menu_page('edit.php'); // Hide Articles
remove_menu_page('edit-comments.php'); // Hide Commentaires
}
add_action( 'admin_menu', 'custom_menu_page_removing' );

View File

@ -1,11 +1,30 @@
<?php
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
?>
// ##### Syntax
<?php if($var):?>
<p><?php echo $var['title']?></p>
<?php endif;?>
<?php if($var){?>
<p><?php echo $var['title']?></p>
<?php };?>
<?php
// ##### Template parts 🡒 Get templates parts
get_template_part( 'template-parts/blocks/the-file', null,
@ -93,3 +112,35 @@ $post_date = date_i18n('j F Y', strtotime($post['post_date']));
echo site_url('/admission/', 'https');
/** ------------------------------
ENABLE SVG
------------------------------*/
/* <?xml version="1.0" encoding="utf-8"?> */
function cc_mime_types($mimes) {
$mimes['svg'] = 'image/svg+xml';
return $mimes;
}
add_filter('upload_mimes', 'cc_mime_types');
/** ------------------------------
INIT WIDGET
------------------------------*/
function tailwind_widgets_init() {
register_sidebar(
array(
'name' => esc_html__( 'Discover_next', 'tailwind' ),
'id' => 'discover_next',
'description' => esc_html__( 'Add widgets here.', 'tailwind' ),
'before_widget' => '<section id="%1$s" class="widget %2$s">',
'after_widget' => '</section>',
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>',
)
);
}