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
[gist https://gist.github.com/cliffordp/1234567 /] |
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 | |
/* | |
Plugin Name: Bit.ly Shortlinks | |
Version: 0.3 | |
Plugin URI: http://yoast.com/wordpress/bitly-shortlinks/ | |
Description: Use Bit.ly shortlinks instead of the shortlink WP generates. Works with Bit.ly Pro too, so you can immediately use the right URL. | |
Author: Joost de Valk | |
Author URI: http://yoast.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
#site .pl-new-loop { | |
.metahead { //author info | |
display:none; | |
} | |
.hentry { | |
&.post, | |
&.multi-post { | |
padding-left: 0px; //override 100px since hiding .metahead | |
} | |
.metamedia { //featured images on archive and single post displays |
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
// from http://www.pagelinestheme.com/make-content-width-section-full-width/ | |
// overriding dms/dms/less/pl-structure.less | |
body.display-boxed #site .boxed-wrap .pl-area.makestuffinsidefullwidth .pl-area-wrap > .pl-content { | |
padding-left: 0px; | |
padding-right: 0px; | |
} | |
body.display-full #site .pl-area.makestuffinsidefullwidth .pl-content { | |
max-width: none; | |
} |
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 | |
//from http://www.pagelinestheme.com/remove-customize-dms-editors-media-uploads-prefix/ | |
//replace 'PageLines-' prefix for DMS Editor media uploads (from editor/editor.actions.php) | |
add_filter( 'pl_up_image_prefix', 'my_pl_upload_prefix'); | |
function my_pl_upload_prefix(){ | |
return ''; //example result: 'filename.png' | |
//return 'My Keyword - '; //example result: 'My Keyword - filename.jpg' | |
//return get_bloginfo('name','raw') . ' - '; //example result: 'Site Name - filename.gif' | |
} |
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 | |
//from http://www.pagelinestheme.com/removing-dms-2-karma-counter/ | |
//remove display of Karma Counter in DMS 2 | |
remove_shortcode( 'pl_karma' ); | |
add_shortcode( 'pl_karma', '__return_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 | |
// from http://www.pagelinestheme.com/dms-trackbacks-pingbacks/ -- https://github.com/pagelines/DMS/issues/741#issuecomment-42981582 | |
// http://codex.wordpress.org/Function_Reference/wp_list_comments | |
add_filter( 'pl_list_comments', function() { return array( 'type' => 'all', 'avatar_size' => '60' ); } ); |
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
<script> | |
jQuery(document).ready(function() { | |
//from http://www.pagelinestheme.com/adding-jquery-code-dms-editor/ | |
//CHANGE the jQuery selectors using your Canvas Area's Section ID | |
jQuery('#pl_areaukh0pxs .pl-area-wrap .editor-row').addClass('row-closed'); //for when using DMS Editor non-preview mode | |
jQuery('#pl_areaukh0pxs .pl-area-wrap .row.grid-row').addClass('row-closed'); //for when not | |
}) | |
</script> |
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 | |
/** | |
* Automatically login a single WordPress user upon arrival to a specific page. | |
* | |
* Redirect to home page once logged in and prevent viewing of the login page. | |
* Compatible with WordPress 3.9.1+ | |
* Updated 2014-07-18 to resolve WP_DEBUG notice: "get_userdatabylogin is deprecated since version 3.3! Use get_user_by('login') instead." | |
* Updated 2019-07-09 to reformat code, pass 2nd parameter to `do_action()`, and hook into priority 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 | |
// From https://tourkick.com/advice-tips-howto/smugmug-custom-domain-oembed-wordpress/ | |
// Works but full regex version could be used instead: https://gist.github.com/cliffordp/7afaa8700d2a5711e9d6 | |
wp_oembed_add_provider( 'https://media.tourkick.com/*', 'https://api.smugmug.com/services/oembed/' ); |