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 | |
| // This can be found in the Symfony\Component\HttpFoundation\Response class | |
| const HTTP_CONTINUE = 100; | |
| const HTTP_SWITCHING_PROTOCOLS = 101; | |
| const HTTP_PROCESSING = 102; // RFC2518 | |
| const HTTP_OK = 200; | |
| const HTTP_CREATED = 201; | |
| const HTTP_ACCEPTED = 202; |
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 | |
| if ( is_singular() ) { | |
| sinatra_entry_meta_category( ' ', false ); | |
| } else { | |
| if ( 'blog-horizontal' === sinatra_get_article_feed_layout() ) { | |
| sinatra_entry_meta_category( ' ', false ); | |
| } else { | |
| sinatra_entry_meta_category( ', ', false ); | |
| } |
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
| <!doctype html> | |
| <title>Site Maintenance</title> | |
| <style> | |
| body { text-align: center; padding: 150px; } | |
| h1 { font-size: 50px; } | |
| body { font: 20px Helvetica, sans-serif; color: #333; } | |
| article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
| a { color: #FF9000; text-decoration: none; } | |
| a:hover { color: #333; text-decoration: none; } | |
| </style> |
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
| // Recent Posts With Image Widget | |
| Class My_Recent_Posts_Widget extends WP_Widget { | |
| public function __construct() { | |
| $widget_ops = array( | |
| 'classname' => 'widget_recent_entries', | |
| 'description' => __( 'The most recent posts with image ' ), | |
| 'customize_selective_refresh' => true, | |
| ); | |
| parent::__construct( 'recent-posts', __( 'Recent Post with Image' ), $widget_ops ); |
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
| // Add UserFactory.php file | |
| $factory->define(Profile::class, function (Faker $faker) { | |
| return [ | |
| 'user_id' => User::all()->random()->id, | |
| 'address' => $faker->address | |
| ]; | |
| }); | |
| // Add DatabaseSeeder.php file | |
| factory('App\Profile', 20)->create(); |
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
| //custom recent post widget area | |
| /** | |
| * Extend Recent Posts Widget | |
| * | |
| * Adds different formatting to the default WordPress Recent Posts Widget | |
| */ | |
| Class My_Recent_Posts_Widget extends WP_Widget_Recent_Posts { | |
| function widget($args, $instance) { |
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
| // Get the ID of a given category | |
| $category_id = $catID; | |
| // Get the URL of this category | |
| $category_link = get_category_link( $category_id ); | |
| <?php echo esc_url( $category_link );?> |
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 $thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'full' );?> | |
| <div class="promo-item img-fluid" style="background-image: url( | |
| <?php if(has_post_thumbnail()) : ?> | |
| <?php echo $thumb['0']; ?> | |
| <?php else: ?> | |
| <?php echo get_stylesheet_directory_uri(); ?>/img/d.jpg; | |
| <?php endif; ?> | |
| )"> | |
| </div> |
NewerOlder