Snippets from my talk: Cómo hacer el mal en WordPress
/00-evil-wordpress.md Secret
Last active
January 30, 2017 11:35
Star
You must be signed in to star a gist
Cómo hacer el mal en WordPress
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
:after, :before, * { | |
-webkit-box-sizing: border-box; | |
-moz-box-sizing: border-box; | |
box-sizing: border-box; | |
} |
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
.row:before, .row:after { | |
display: table; | |
content: " "; | |
clear: both; | |
} | |
.margin-bottom { | |
margin-bottom: 10px; | |
} | |
.no-margin { | |
margin: 0; | |
} |
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
.row:before, .row:after { | |
display: table !important; | |
content: " " !important; | |
clear: both !important; | |
} | |
.margin-bottom { | |
margin-bottom: 10px !important; | |
} | |
.no-margin { | |
margin: 0 !important; | |
} |
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
:after, :before, * { | |
font-family: "Comic Sans" !important; | |
} |
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
<?php | |
// ... | |
wp_enqueue_script( | |
$this->plugin_name, | |
NELIO_CONTENT_ADMIN_URL . '/js/admin.min.js', | |
array( 'jquery', 'backbone', /* ... */ ), | |
$this->version, | |
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
<?php | |
// ... | |
?> | |
<script type="text/javascript" src="<?php | |
echo esc_url( PLUGIN_ADMIN_URL . '/lib/js/jquery.min.js' ); | |
?>"></script> | |
<?php | |
// ... |
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
<?php | |
function evil_fix_scripts() { | |
wp_deregister_script( 'jquery' ); | |
}//end evil_fix_scripts() | |
add_action( 'wp_enqueue_scripts', 'evil_fix_scripts', 1 ); |
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
<?php | |
// ... | |
if ( $this->is_current_screen( '...certain-page...' ) ) { | |
wp_enqueue_script( | |
$this->plugin_name, | |
NELIO_CONTENT_ADMIN_URL . '/js/admin.min.js', | |
array( 'jquery', 'backbone', /* ... */ ), | |
$this->version, | |
false | |
); | |
}//end if |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment