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
name: run-tests | |
on: | |
# Trigger the workflow on push or pull request, | |
# but only for the master branch | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: |
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
/** | |
* Disallow pdfs in robots.txt | |
*/ | |
add_filter( 'robots_txt', function( $output, $public ) { | |
$output .= "Disallow: *.pdf\n"; | |
return $output; | |
}, 0, 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
<?php | |
/** | |
* Gets the blog page set in Settings > Reading. | |
*/ | |
function rn_get_blog_page_url() { | |
if ('page' == get_option('show_on_front')) | |
return get_permalink(get_option('page_for_posts')); | |
return home_url(); |
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 | |
/** | |
* Loads the child theme textdomain. | |
*/ | |
function theme_child_slug_setup() { | |
load_child_theme_textdomain( 'child-theme-textdomain', get_stylesheet_directory() . '/languages' ); | |
} | |
add_action( 'after_setup_theme', theme_child_slug_setup' ); |
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
// Init Masonry | |
var $grid = jQuery('.facetwp-template').masonry({ | |
percentPosition: true, | |
columnWidth: '.grid-sizer', | |
itemSelector: '.grid-item' | |
}); | |
// Reload and update on FacetWP load | |
jQuery(document).on('facetwp-loaded', function() { | |
$grid.masonry('reloadItems') |
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_filter('comments_open', function ($open, $post_id) { | |
$post = get_post($post_id); | |
if ($post->post_type == 'attachment') { | |
return false; | |
} | |
return $open; | |
}, 10, 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
<?php | |
// Download and attach image to post. | |
media_sideload_image($item->image, $post_id, $item->image_caption); | |
// Then find the last image added to the post attachments. | |
$attachment = array_values(get_attached_media( 'image', $post_id ))[0]; | |
// Finally set image as the post thumbnail. | |
if ($attachment) { |
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
@if ($paginator->hasPages()) | |
<nav class="pagination is-centered"> | |
@if ($paginator->onFirstPage()) | |
<span class="pagination-previous is-disabled">Previous</span> | |
@else | |
<a class="pagination-previous" href="{{ $paginator->previousPageUrl() }}" rel="prev">Previous</a> | |
@endif | |
{{-- Next Page Link --}} | |
@if ($paginator->hasMorePages()) |
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
@extends('layouts.app') | |
@section('content') | |
<section class="section"> | |
<div class="container"> | |
<div class="column is-half is-offset-one-quarter"> | |
<form class="form-horizontal" role="form" method="POST" action="{{ url('/register') }}"> | |
{{ csrf_field() }} | |
<p class="control has-icon"> |
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
@extends('layouts.app') | |
@section('content') | |
<section class="section"> | |
<div class="container"> | |
<div class="column is-half is-offset-one-quarter"> | |
<form class="form-horizontal" role="form" method="POST" action="{{ url('/login') }}"> | |
{{ csrf_field() }} |
NewerOlder