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: Lesson Reply Notification | |
Description: Send and email to the student, when he receives a response | |
Author: David Perálvarez | |
Version: 1.0 | |
Author URI: https://silicodevalley.com | |
*/ | |
apply_filters( 'wp_mail_from', 'david@silicodevalley.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
<?php | |
// Add custom shortcodes to Contact Form 7 WP plugin | |
add_action( 'wpcf7_init', 'mp_cf7_custom_shortcode' ); | |
function mp_cf7_custom_shortcode(){ | |
// code | |
} |
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 to get the member level | |
function mp_get_member_level(){ | |
// Get current user's ID | |
$memberID = get_current_user_id(); | |
if( $memberID != 0 ): | |
// Get member's info |
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: MemberPerks | |
Description: Ofrece beneficios a tus usuarios más leales | |
Author: David Perálvarez | |
Version: 1.0.0 | |
Author URI: https://silicodevalley.com | |
*/ | |
// Create the shortcode |
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 ( have_posts() ): | |
while ( have_posts() ): the_post(); | |
//Mostramos el "slug" del formato de post | |
echo get_post_format(); | |
endwhile; | |
endif; | |
?> |
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 ( have_posts() ): | |
while ( have_posts() ): the_post(); | |
//Cargamos una plantilla u otra en función del formato de post | |
//El primer parámetro que recibe es el nombre del directorio que contiene las plantillas | |
get_template_part('template-parts', get_post_format()); | |
endwhile; | |
endif; | |
?> |
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 | |
// Damos soporte a los Post Formats: Aside, Link, Image, Video y Quote | |
add_theme_support( 'post-formats', array( 'aside', 'link', 'image', 'video' , 'quote' ) ); |
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: Lesson Reply Notification | |
Description: Send and email to the student, when he receives a response | |
Author: David Perálvarez | |
Version: 1.0 | |
Author URI: https://silicodevalley.com | |
*/ | |
add_action( 'wp_insert_comment', 'scv_comment_notification', 99, 2 ); |
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 id="main"> | |
<header></header> | |
<ul> | |
<li class="item1"></li> | |
<li class="item2"></li> | |
<li class="item3"></li> | |
</ul> | |
<footer></footer> | |
</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
body{ | |
background-color: #f2f2f2; | |
width: 960px; | |
margin: 0 auto; | |
} | |
.post{ | |
background-color: white; | |
padding: 20px; | |
} |