This file contains hidden or 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 | |
/** | |
* | |
* Description : lockdown wordpress rights | |
* version 1.0 | |
* | |
*/ | |
$mode = ''; | |
$path_rights = array( | |
array( |
This file contains hidden or 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 stf_redirect_to_post(){ | |
global $wp_query; | |
if( is_archive() && $wp_query->post_count == 1 ){ | |
the_post(); | |
$post_url = get_permalink(); | |
// Redirect to post page | |
wp_redirect( $post_url ); | |
} | |
} | |
add_action('template_redirect', 'stf_redirect_to_post'); |
This file contains hidden or 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 | |
class Last_Tweets extends WP_Widget { | |
/** | |
* Register widget with WordPress. | |
*/ | |
function __construct() { | |
parent::__construct( | |
'Last-post', // Base ID | |
__('Lyra Network - Last Tweets', 'twentyfifteen'), // Name |
NewerOlder