View all commands:
$ docker
Search for images
<?php | |
/* | |
Plugin Name: Arif Site Toolkit | |
Plugin URI: http://arifulislamm.com/wp | |
Description: This is a toolkit plugin for arif site <cite>Arif Site Toolkit</cite> . | |
Author: Arif-Ul-Islam | |
Version: 1.0 | |
Author URI: http://arifulislamm.com/wp | |
*/ |
/**** Register Custom Post *****/ | |
function industry_theme_custom_post() { | |
register_post_type( 'industry-slides', | |
array( | |
'labels' => array( | |
'name' => __( 'Slides' ), | |
'singular_name' => __( 'Slide' ) | |
), | |
'supports' => array('title', 'editor', 'custom-fields', 'thumbnail', 'page-attributes'), |
... | |
class PaperAdmin(admin.ModelAdmin): | |
... | |
def get_fields(self, request, paper=None): | |
fields = super(PaperAdmin, self).get_fields(request, paper) | |
if paper: | |
fields.remove('category') | |
fields.remove('country') | |
return fields | |
... |
class NewsAdmin(admin.ModelAdmin): | |
list_display = (..., 'getCategory', ...) | |
... | |
... | |
def getCategory(self, obj): | |
return "\n".join([cat.name for cat in obj.category.all()]) | |
... | |
... |
// Update state | |
constructor() { | |
super(); | |
this.state = { | |
location: 'Bangladesh' // By default it will be set to "Bangladesh" | |
} | |
this.handleLocationChange = this.handleLocationChange.bind(this); | |
} |
<?php | |
namespace App\Auth\Grants; | |
use RuntimeException; | |
use Illuminate\Http\Request; | |
use App\Exceptions\OtpException; | |
use Laravel\Passport\Bridge\User; | |
use League\OAuth2\Server\RequestEvent; | |
use App\Auth\Grants\OtpVerifierFactory; |
<?php | |
namespace App\Providers; | |
use App\Auth\Grants\OtpGrant; | |
use Laravel\Passport\Passport; | |
use Illuminate\Support\Facades\Gate; | |
use Laravel\Passport\Bridge\RefreshTokenRepository; | |
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; | |
use League\OAuth2\Server\AuthorizationServer; |
/* | |
Give the service worker access to Firebase Messaging. | |
Note that you can only use Firebase Messaging here, other Firebase libraries are not available in the service worker. | |
*/ | |
importScripts('https://www.gstatic.com/firebasejs/6.3.4/firebase-app.js'); | |
importScripts('https://www.gstatic.com/firebasejs/6.3.4/firebase-messaging.js'); | |
/* | |
Initialize the Firebase app in the service worker by passing in the messagingSenderId. | |
* New configuration for app@pulseservice.com |