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
function ak_remove_footer_admin() { ?> | |
<p>© <?php echo date('Y'); ?> sitename.com</p> | |
<?php | |
} | |
add_filter('admin_footer_text', 'ak_remove_footer_admin'); |
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
function ak_dashboard_widget() { ?> | |
<p>stuff</p> | |
<?php | |
} | |
function ak_add_dashboard_widget() { | |
wp_add_dashboard_widget('wp_dashboard_widget', 'Welcome to This Site', 'ak_dashboard_widget'); | |
} | |
add_action('wp_dashboard_setup', 'ak_add_dashboard_widget'); |
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
add_action('admin_menu', 'ak_menu'); | |
function ak_menu() { | |
add_menu_page('Page Title', 'Menu Title', 'administrator', 'new-pg', 'ak_menu_content'); | |
} | |
function ak__menu_content(){ ?> | |
<div class="wrap"> | |
<h2>Page Title</h2> | |
<p>content</p> | |
</div> |
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
function ak_custom_meta_box_removal() { | |
remove_meta_box( 'postexcerpt', 'product', 'normal' ); | |
remove_meta_box( 'authordiv', 'product', 'normal' ); | |
remove_meta_box( 'revisionsdiv', 'product', 'normal' ); | |
remove_meta_box( 'slugdiv', 'product', 'normal' ); | |
remove_meta_box( 'mp-meta-download', 'product', 'normal'); | |
} | |
add_action('admin_menu', 'ak_custom_meta_box_removal'); |
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
function ak_editor_content( $content ) { | |
$content.= "<p>This content is now default text in the wysiwyg editor.</p>"; | |
$content.= "<p>And so is this"; | |
return $content; | |
} | |
add_filter( 'default_content', 'ak_editor_content'); |
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
function hide_personal_options(){echo "\n" | |
. '<script type="text/javascript">jQuery(document).ready(function($) { | |
$(\'form#your-profile > h3:first\').hide(); | |
$(\'form#your-profile > table:first\').hide(); | |
$(\'table.form-table:eq(1) tr:eq(3)\').hide(); | |
$(\'table.form-table:eq(1) tr:eq(4)\').hide(); | |
$(\'table.form-table:eq(2) tr:eq(1)\').hide(); | |
$(\'table.form-table:eq(2) tr:eq(2)\').hide(); | |
$(\'table.form-table:eq(2) tr:eq(3)\').hide(); | |
$(\'table.form-table:eq(2) tr:eq(4)\').hide(); |
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
// top row | |
if(!function_exists('ak_editor_mce_buttons_top')) { | |
function ak_editor_mce_buttons_top($buttons) { | |
return array( 'bold', 'italic', 'strikethrough', 'separator', 'bullist', 'numlist', 'justifyleft', 'justifycenter', 'justifyright', 'spellchecker' ); | |
/* wp defaults | |
return array( | |
'bold', 'italic', 'strikethrough', 'separator', 'bullist', 'numlist', 'blockquote', 'separator', 'justifyleft', 'justifycenter', 'justifyright', 'separator', | |
'link', 'unlink', 'wp_more', 'separator', 'spellchecker', 'fullscreen', 'wp_adv' ); | |
*/ |
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
function ak_admin_bar_nav($wp_toolbar) { | |
$wp_toolbar->remove_node('comments'); | |
$wp_toolbar->remove_node('new-content'); | |
$wp_toolbar->remove_node('my-sites'); | |
$wp_toolbar->remove_node('wp-logo'); | |
$wp_toolbar->add_node(array( | |
'id' => 'theid', | |
'title' => 'A Title', | |
'href' => 'http://linkurl.com' | |
)); |
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
function ak_post_thumbnail_html( $html ) { | |
if ( empty( $html ) ) | |
$html = '<img src="' . trailingslashit( get_stylesheet_directory_uri() ) . 'images/default-thumbnail.jpg' . '" alt="No Image provided" />'; | |
return $html; | |
} | |
add_filter( 'post_thumbnail_html', 'ak_post_thumbnail_html' ); |
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
<div class="container"> | |
<header></header> | |
<div class="content"></div> | |
</div> | |
<footer class="site-footer"> | |
<p>footer stays at bottom</p> | |
</footer> |