-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.php
40 lines (34 loc) · 1.53 KB
/
setup.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
<?php
/*
setup
*/
/**
* Declare the Namespace.
*
* @since 1.0.0
*/
namespace azurecurve\Icons;
/**
* Setup registration activation hook, actions, filters and shortcodes.
*
* @since 1.0.0
*/
// add actions.
add_action( 'admin_menu', __NAMESPACE__ . '\\create_admin_menu' );
add_action( 'plugins_loaded', __NAMESPACE__ . '\\load_languages' );
add_action( 'admin_init', __NAMESPACE__ . '\\register_admin_styles' );
add_action( 'admin_enqueue_scripts', __NAMESPACE__ . '\\enqueue_admin_styles' );
add_action( 'admin_init', __NAMESPACE__ . '\\register_admin_scripts' );
add_action( 'admin_enqueue_scripts', __NAMESPACE__ . '\\enqueue_admin_scripts' );
add_action( 'init', __NAMESPACE__ . '\\register_frontend_styles' );
add_filter( 'the_posts', __NAMESPACE__ . '\\check_for_shortcode' );
add_action( 'admin_post_' . PLUGIN_UNDERSCORE . '_save_options', __NAMESPACE__ . '\\save_options' );
add_action( 'admin_post_' . PLUGIN_UNDERSCORE . '_upload_image', __NAMESPACE__ . '\\upload_image' );
// add filters.
add_filter( 'plugin_action_links', __NAMESPACE__ . '\\add_plugin_action_link', 10, 2 );
$plugin_slug_for_um = plugin_basename( trim( PLUGIN_FILE ) );
add_filter( 'codepotent_update_manager_' . $plugin_slug_for_um . '_image_path', __NAMESPACE__ . '\\custom_image_path' );
add_filter( 'codepotent_update_manager_' . $plugin_slug_for_um . '_image_url', __NAMESPACE__ . '\\custom_image_url' );
// add shortcodes.
add_shortcode( 'icon', __NAMESPACE__ . '\\shortcode_display_icon' );
add_shortcode( 'ICON', __NAMESPACE__ . '\\shortcode_display_icon' );