Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
ETH Embed Anchor.fm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
WP Plugins
ETH Embed Anchor.fm
Commits
05e897ee
Commit
05e897ee
authored
3 years ago
by
Erick Hitter
Browse files
Options
Downloads
Patches
Plain Diff
Scaffold
parent
5b100b83
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!1
Initial release
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
eth-embed-anchor-fm.php
+20
-0
20 additions, 0 deletions
eth-embed-anchor-fm.php
inc/class-plugin.php
+49
-0
49 additions, 0 deletions
inc/class-plugin.php
with
69 additions
and
0 deletions
eth-embed-anchor-fm.php
+
20
−
0
View file @
05e897ee
...
...
@@ -27,3 +27,23 @@
*/
namespace
ETH_Embed_Anchor_FM
;
/**
* Perform setup actions after plugin loads.
*
* @return void
*/
function
action_plugins_loaded
()
{
load_plugin_textdomain
(
'eth-embed-anchor-fm'
,
false
,
dirname
(
plugin_basename
(
__FILE__
)
)
.
'/languages/'
);
}
add_action
(
'plugins_loaded'
,
__NAMESPACE__
.
'\action_plugins_loaded'
);
/**
* Load plugin classes.
*/
require_once
__DIR__
.
'/inc/class-plugin.php'
;
Plugin
::
get_instance
();
This diff is collapsed.
Click to expand it.
inc/class-plugin.php
0 → 100644
+
49
−
0
View file @
05e897ee
<?php
/**
* Plugin functionality.
*
* @package ETH_Embed_Anchor_FM
*/
namespace
ETH_Embed_Anchor_FM
;
/**
* Class Plugin.
*/
class
Plugin
{
/**
* Singleton.
*
* @var Plugin
*/
private
static
$_instance
=
null
;
/**
* Implement singleton.
*
* @return Plugin
*/
public
static
function
get_instance
():
Plugin
{
if
(
!
is_a
(
self
::
$_instance
,
__CLASS__
)
)
{
self
::
$_instance
=
new
self
();
self
::
$_instance
->
setup
();
}
return
self
::
$_instance
;
}
/**
* Silence is golden!
*/
private
function
__construct
()
{}
/**
* Register hooks.
*
* @return void
*/
private
function
setup
():
void
{
// TODO: add oEmbed handler.
// TODO: add shortcode.
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment