-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathwordcamp-pwa-page.php
51 lines (44 loc) · 1.85 KB
/
wordcamp-pwa-page.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
/**
* Provides a mobile friendly, app-style template with timely schedule information to use as a front page with PWA features during a WordCamp.
*
* @link https://www.wordcamp.org
* @since 1.0.0
* @package wordcamp-pwa-page
*
* @wordpress-plugin
* Plugin Name: WordCamp PWA Page
* Plugin URI: https://www.wordcamp.org/
* Description: Provides a mobile friendly, app-style template with timely schedule information to use as a front page with PWA features during a WordCamp.
* Version: 1.0.0
* Author: WCEU 2019
* Author URI: https://2019.europe.wordcamp.org/
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Text Domain: wcpwap
* Domain Path: /languages
*/
namespace WordCamp\PWAPage;
defined( 'ABSPATH' ) || wp_die();
define( 'WCPWAP_VERSION', '1.0.0' );
define( 'WCPWAP_PLUGIN_PATH', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
define( 'WCPWAP_PLUGIN_URL', untrailingslashit( plugin_dir_url( __FILE__ ) ) );
require_once WCPWAP_PLUGIN_PATH . '/includes/offline-storage.php';
require_once WCPWAP_PLUGIN_PATH . '/includes/page-templates.php';
add_action( 'widgets_init', __NAMESPACE__ . '\pwa_page_sidebars_init' );
function pwa_page_sidebars_init() {
$sidebar_configs = array(
array(
'name' => esc_html__( 'PWA Footer Widget Area', 'wordcamp-pwa-page' ),
'id' => 'pwa-footer',
'description' => esc_html__( 'Will Show a widget area on the footer for PWA template only.', 'wordcamp-pwa-page' ),
'before_widget' => '<section id="%1$s" class="widget %2$s">',
'after_widget' => '</section>',
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>',
),
);
foreach ( $sidebar_configs as $sidebar_config ) {
register_sidebar( $sidebar_config );
}
}