mirror of
https://github.com/inretio/WordPress-Plugin-Boilerplate
synced 2024-12-23 04:13:53 +02:00
* removing ampersands from php compatibility
* removing the translated mo file * removing calls to wp_register_script and wp_register_style
This commit is contained in:
parent
81b7be5b72
commit
a74004d26c
3 changed files with 11 additions and 14 deletions
|
@ -1,4 +1,5 @@
|
||||||
(function ($) {
|
(function ($) {
|
||||||
|
"use strict";
|
||||||
$(function () {
|
$(function () {
|
||||||
// Place your administration-specific JavaScript here
|
// Place your administration-specific JavaScript here
|
||||||
});
|
});
|
||||||
|
|
BIN
lang/plugin.mo
BIN
lang/plugin.mo
Binary file not shown.
24
plugin.php
24
plugin.php
|
@ -42,15 +42,15 @@ class PluginName {
|
||||||
load_plugin_textdomain( 'plugin-name-locale', false, dirname( plugin_basename( __FILE__ ) ) . '/lang' );
|
load_plugin_textdomain( 'plugin-name-locale', false, dirname( plugin_basename( __FILE__ ) ) . '/lang' );
|
||||||
|
|
||||||
// Register admin styles and scripts
|
// Register admin styles and scripts
|
||||||
add_action( 'admin_print_styles', array( &$this, 'register_admin_styles' ) );
|
add_action( 'admin_print_styles', array( $this, 'register_admin_styles' ) );
|
||||||
add_action( 'admin_enqueue_scripts', array( &$this, 'register_admin_scripts' ) );
|
add_action( 'admin_enqueue_scripts', array( $this, 'register_admin_scripts' ) );
|
||||||
|
|
||||||
// Register site styles and scripts
|
// Register site styles and scripts
|
||||||
add_action( 'wp_enqueue_scripts', array( &$this, 'register_plugin_styles' ) );
|
add_action( 'wp_enqueue_scripts', array( $this, 'register_plugin_styles' ) );
|
||||||
add_action( 'wp_enqueue_scripts', array( &$this, 'register_plugin_scripts' ) );
|
add_action( 'wp_enqueue_scripts', array( $this, 'register_plugin_scripts' ) );
|
||||||
|
|
||||||
register_activation_hook( __FILE__, array( &$this, 'activate' ) );
|
register_activation_hook( __FILE__, array( $this, 'activate' ) );
|
||||||
register_deactivation_hook( __FILE__, array( &$this, 'deactivate' ) );
|
register_deactivation_hook( __FILE__, array( $this, 'deactivate' ) );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* TODO:
|
* TODO:
|
||||||
|
@ -92,8 +92,7 @@ class PluginName {
|
||||||
public function register_admin_styles() {
|
public function register_admin_styles() {
|
||||||
|
|
||||||
// TODO change 'plugin-name' to the name of your plugin
|
// TODO change 'plugin-name' to the name of your plugin
|
||||||
wp_register_style( 'plugin-name-admin-styles', plugins_url( 'plugin-name/css/admin.css' ) );
|
wp_enqueue_style( 'plugin-name-admin-styles', plugins_url( 'plugin-name/css/admin.css' ) );
|
||||||
wp_enqueue_style( 'plugin-name-admin-styles' );
|
|
||||||
|
|
||||||
} // end register_admin_styles
|
} // end register_admin_styles
|
||||||
|
|
||||||
|
@ -103,8 +102,7 @@ class PluginName {
|
||||||
public function register_admin_scripts() {
|
public function register_admin_scripts() {
|
||||||
|
|
||||||
// TODO change 'plugin-name' to the name of your plugin
|
// TODO change 'plugin-name' to the name of your plugin
|
||||||
wp_register_script( 'plugin-name-admin-script', plugins_url( 'plugin-name/js/admin.js' ) );
|
wp_enqueue_script( 'plugin-name-admin-script', plugins_url( 'plugin-name/js/admin.js' ) );
|
||||||
wp_enqueue_script( 'plugin-name-admin-script' );
|
|
||||||
|
|
||||||
} // end register_admin_scripts
|
} // end register_admin_scripts
|
||||||
|
|
||||||
|
@ -114,8 +112,7 @@ class PluginName {
|
||||||
public function register_plugin_styles() {
|
public function register_plugin_styles() {
|
||||||
|
|
||||||
// TODO change 'plugin-name' to the name of your plugin
|
// TODO change 'plugin-name' to the name of your plugin
|
||||||
wp_register_style( 'plugin-name-plugin-styles', plugins_url( 'plugin-name/css/display.css' ) );
|
wp_enqueue_style( 'plugin-name-plugin-styles', plugins_url( 'plugin-name/css/display.css' ) );
|
||||||
wp_enqueue_style( 'plugin-name-plugin-styles' );
|
|
||||||
|
|
||||||
} // end register_plugin_styles
|
} // end register_plugin_styles
|
||||||
|
|
||||||
|
@ -125,8 +122,7 @@ class PluginName {
|
||||||
public function register_plugin_scripts() {
|
public function register_plugin_scripts() {
|
||||||
|
|
||||||
// TODO change 'plugin-name' to the name of your plugin
|
// TODO change 'plugin-name' to the name of your plugin
|
||||||
wp_register_script( 'plugin-name-plugin-script', plugins_url( 'plugin-name/js/display.js' ) );
|
wp_enqueue_script( 'plugin-name-plugin-script', plugins_url( 'plugin-name/js/display.js' ) );
|
||||||
wp_enqueue_script( 'plugin-name-plugin-script' );
|
|
||||||
|
|
||||||
} // end register_plugin_scripts
|
} // end register_plugin_scripts
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue