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 get_header(); ?> | |
<div id="primary" class="content-area"> | |
<main id="main" class="site-main" role="main"> | |
<?php while ( have_posts() ) : the_post(); ?> | |
<?php get_template_part( 'content', 'page' ); ?> | |
<?php if ( get_theme_mod( 'bwpy_page_comment_toggle' ) == 1 ) : // show page comments? ?> |
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
function bwpy_customizer( $wp_customize ) { | |
// add "Content Options" section | |
$wp_customize->add_section( 'bwpy_content_options_section' , array( | |
'title' => __( 'Content Options', 'bwpy' ), | |
'priority' => 100, | |
) ); | |
// add setting for page comment toggle checkbox |
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 | |
/** | |
* Example Widget Class | |
*/ | |
class example_widget extends WP_Widget { | |
/** constructor -- name this the same as the class above */ | |
function example_widget() { | |
parent::WP_Widget(false, $name = 'Example Text Widget'); |
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
/** | |
* MyFirstTheme's functions and definitions | |
* | |
* @package MyFirstTheme | |
* @since MyFirstTheme 1.0 | |
*/ | |
/** | |
* First, let's set the maximum content width based on the theme's design and stylesheet. | |
* This will limit the width of all uploaded images and embeds. |
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
<html> | |
<head> | |
<title>Example HTML File For JS Class: Example 1</title> | |
<script type="text/javascript" src="script_header.js"></script> <!-- scripts can be included in the header --> | |
<!-- jQuery -> Uncomment this when David says! --> | |
<!-- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> --> | |
<!-- scripts can be included "inline" style in the header --> | |
<script type="text/javascript"> |
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: Envira Gallery - Lightbox Linking | |
* Plugin URI: http://enviragallery.com | |
* Version: 1.0.0 | |
* Author: Envira Gallery Team | |
* Author URI: http://enviragallery.com | |
* Description: This plugin will ignore the image links if the lightbox is not enabled. | |
*/ | |
add_filter('envira_gallery_create_link', 'example_envira_gallery_create_link', 10, 6 ); |
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
function remove_envira_gallery_js_def( $javascript ) { | |
$javascript = '/* var envira_gallery = [], */ | |
var envira_galleries = [], | |
envira_gallery_images = {}, | |
/* envira_isotopes = [], */ | |
envira_isotopes_config = [], | |
envira_playing = false'; | |
return $javascript; | |
} |
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
/* find the shortcode in the post and extract the envira gallery ID */ | |
/* you might have to adjust this logic to account for things, but you get the idea */ | |
$pattern = get_shortcode_regex(); | |
if ( preg_match_all( '/'. $pattern .'/s', $blog_query->post->post_content, $matches ) ) { | |
if (preg_match('/"([^"]+)"/', $matches[3][0], $m)) { | |
$gallery_id = $m[1]; | |
} else { | |
//preg_match returns the number of matches found, | |
//so if here didn't match pattern |
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
<html> | |
<head> | |
<title>This is a JavaScript Example</title> | |
<script language="JavaScript"> | |
var word = prompt("Word To Check", ""); | |
function pal() { | |
if ( word == word.split('').reverse().join('') ) { |
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
function envira_gallery_launch_lightbox( $data ) { | |
?> | |
<script> | |
jQuery(document).ready(function($) { | |
$('a.exampleEnviraLink').on('click', function(e) { | |
e.preventDefault(); | |
$('#envira-gallery-' + $(this).data('envira-gallery-id') + ' a.envira-gallery-link:first').click(); | |
}); | |
}); |
NewerOlder