Skip to content

Instantly share code, notes, and snippets.

View ncesar's full-sized avatar
🎯
Focusing

César Nascimento ncesar

🎯
Focusing
View GitHub Profile
add_filter ( 'woocommerce_account_menu_items', 'misha_rename_downloads' );
function misha_rename_downloads( $menu_links ){
// $menu_links['TAB ID HERE'] = 'NEW TAB NAME HERE';
$menu_links['downloads'] = 'My Files';
return $menu_links;
}
/* Give your iframe a name, and target your anchors to point to it: */
<a href="the iframe link" target="myiframe">Foo</a>
<a href="the iframe link" target="myiframe">Bar</a>
<a href="the iframe link" target="myiframe">Baz</a>
<iframe name="myiframe"></iframe>
@ncesar
ncesar / addAndRemoveActiveClassInaMenu.js
Created January 28, 2019 20:32
This code adds a .active class on a menu, then removes.
$('.menu li').click(function() {
$('.menu li.active').removeClass('active');
$(this).addClass('active');
});
@ncesar
ncesar / hamburgerMenu.html
Created January 28, 2019 20:46
hamburgermenu using jquery and css. made by salah uddin
/* html */
<button id="hamburger-menu" data-toggle="ham-navigation" class="hamburger-menu-button"><span class="hamburger-menu-button-open">Menu</span></button>
<nav id="ham-navigation" class="ham-menu">
<ul class="menu">
<li><a href="#">Home</a></li>
<li class="active"><a href="#">About</a></li>
<li><a href="#">Services</a></li>
<li><a href="#">Features</a></li>
<li><a href="#">Products</a></li>
<li><a href="#">Contact</a></li>
add_filter( 'default_content', 'my_editor_content' );
function my_editor_content( $content ) {
$content = "[vc_row full_width='stretch_row' css='.vc_custom_1546953804123{margin-top: -314px !important;padding-top: 310px !important;padding-bottom: 195px !important;background-image: url(http://homolog.mrjobs.com.br/ocktus/wp-content/uploads/2018/12/2-imoveis-alguel-interna.jpg?id=128) !important;background-position: center !important;background-repeat: no-repeat !important;background-size: cover !important;}'][vc_column][/vc_column][/vc_row][vc_row el_class='post-content' css='.vc_custom_1549045196317{margin-top: -150px !important;background-color: #fbf3f0 !important;}'][vc_column width='2/3'][vc_column_text][sliderImoveis][/vc_column_text][/vc_column][vc_column width='1/3'][vc_raw_html]JTNDcCUzRUxvcmVtJTIwaXBzdW0lMjBkb2xvciUyMHNpdCUyMGFtZXQlMkMlMjBjb25zZWN0ZXR1ciUyMGFkaXBpc2NpbmclMjBlbGl0LiUyMFN1c3BlbmRpc3NlJTIwZGlnbmlzc2ltJTIwbGFjdXMlMjB1dCUyMG1ldHVzJTIwZmluaWJ1cyUyMHByZXRpdW0uJTIwTWF1cmlzJTIwbWF1cmlzJTIwb
function woo_remove_wc_account_page_noindex(){
if (!is_user_logged_in()) {
remove_action( 'wp_head', 'wc_page_noindex' );
}
}
add_action( 'init', 'YOURPREFIX_remove_wc_account_page_noindex' );
add_action('admin_head', 'my_custom_fonts');
function my_custom_fonts() {
echo '<style>
body, td, textarea, input, select {
font-family: "Lucida Grande";
font-size: 12px;
}
</style>';
}
{
"workbench.startupEditor": "newUntitledFile",
"explorer.confirmDelete": false,
"editor.formatOnSave": true,
"prettier": { "arrowParens": "always" }
}
@ncesar
ncesar / Apps úteis para setup de dev
Created April 25, 2019 03:49
Alguns itens para não esquecer quando começar em um setup novo
Tema: Dark+(default Dark)
1. Browser Preview por Kenneth Auchenberg
2. ES7 React/Redux
3. ESLint
5. Prettier
6. VSCode Google Translate por funkyremi
----------------
nvm < para versões do nodejs e npm