| 1 |
<?php |
| 2 |
|
| 3 |
// class to add admin submenu page |
| 4 |
|
| 5 |
class GutSlider_Admin { |
| 6 |
/** |
| 7 |
* Constructor |
| 8 |
*/ |
| 9 |
public function __construct() { |
| 10 |
add_action( 'admin_menu', [ $this, 'gutslider_admin_menu' ] ); |
| 11 |
// enqueue admin assets |
| 12 |
add_action( 'admin_enqueue_scripts', [ $this, 'gutslider_admin_assets' ] ); |
| 13 |
} |
| 14 |
|
| 15 |
/** |
| 16 |
* Enqueue admin scripts |
| 17 |
*/ |
| 18 |
public function gutslider_admin_assets($screen) { |
| 19 |
if( $screen === 'settings_page_gutslider-block' ){ |
| 20 |
wp_enqueue_style( 'gutslider-admin-style', GUTSLIDER_URL . 'includes/Admin/admin.css', [], GUTSLIDER_VERSION ); |
| 21 |
// JS |
| 22 |
wp_enqueue_script( 'gutslider-admin-script', GUTSLIDER_URL . 'includes/Admin/admin.js', [ 'jquery' ], GUTSLIDER_VERSION, true ); |
| 23 |
} |
| 24 |
} |
| 25 |
|
| 26 |
/** |
| 27 |
* Add admin menu |
| 28 |
*/ |
| 29 |
public function gutslider_admin_menu() { |
| 30 |
add_submenu_page( |
| 31 |
'options-general.php', |
| 32 |
__( 'Gutslider Block', 'slider-blocks' ), |
| 33 |
__( 'Gutslider Block', 'slider-blocks' ), |
| 34 |
'manage_options', |
| 35 |
'gutslider-block', |
| 36 |
[ $this, 'gutslider_admin_page' ] |
| 37 |
); |
| 38 |
} |
| 39 |
|
| 40 |
/** |
| 41 |
* Admin page |
| 42 |
*/ |
| 43 |
public function gutslider_admin_page() { |
| 44 |
?> |
| 45 |
<div class="gutslider__wrap"> |
| 46 |
<div class="plugin_max_container"> |
| 47 |
<div class="plugin__head_container"> |
| 48 |
<div class="plugin_head"> |
| 49 |
<h1 class="plugin_title"> |
| 50 |
<?php _e( 'Gutslider Block', 'slider-blocks' ); ?> |
| 51 |
</h1> |
| 52 |
<p class="plugin_description"> |
| 53 |
<?php _e( 'Gutslider Block is a Gutenberg block plugin that allows you to create amazing slider in Gutenberg Editor without any coding knowledge', 'slider-blocks' ); ?> |
| 54 |
</p> |
| 55 |
</div> |
| 56 |
</div> |
| 57 |
<div class="plugin__body_container"> |
| 58 |
<div class="plugin_body"> |
| 59 |
<div class="tabs__panel_container"> |
| 60 |
<div class="tabs__titles"> |
| 61 |
<p class="tab__title active" data-tab="tab1"> |
| 62 |
<?php _e( 'Help and Support', 'slider-blocks' ); ?> |
| 63 |
</p> |
| 64 |
<p class="tab__title" data-tab="tab2"> |
| 65 |
<?php _e( 'Changelog', 'slider-blocks' ); ?> |
| 66 |
</p> |
| 67 |
</div> |
| 68 |
<div class="tabs__container"> |
| 69 |
<div class="tabs__panels"> |
| 70 |
<div class="tab__panel active" id="tab1"> |
| 71 |
<div class="tab__panel_flex"> |
| 72 |
<div class="tab__panel_left"> |
| 73 |
<h3 class="video__title"> |
| 74 |
<?php _e( 'Video Tutorial', 'slider-blocks' ); ?> |
| 75 |
</h3> |
| 76 |
<p class="video__description"> |
| 77 |
<?php _e( 'Watch the video tutorial to learn how to use the plugin. It will help you start your own design quickly.', 'slider-blocks' ); ?> |
| 78 |
</p> |
| 79 |
<div class="video__container"> |
| 80 |
<iframe width="560" height="315" src="https://www.youtube.com/embed/B3EuKpf3NXM" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> |
| 81 |
</div> |
| 82 |
</div> |
| 83 |
<div class="tab__panel_right"> |
| 84 |
<div class="single__support_panel"> |
| 85 |
<h3 class="support__title"> |
| 86 |
<?php _e( 'Get Support', 'slider-blocks' ); ?> |
| 87 |
</h3> |
| 88 |
<p class="support__description"> |
| 89 |
<?php _e( 'If you find any issue or have any suggestion, please let me know.', 'slider-blocks' ); ?> |
| 90 |
</p> |
| 91 |
<a href="https://wordpress.org/support/plugin/slider-blocks/" class="support__link" target="_blank"> |
| 92 |
<?php _e( 'Support', 'slider-blocks' ); ?> |
| 93 |
</a> |
| 94 |
</div> |
| 95 |
<div class="single__support_panel"> |
| 96 |
<h3 class="support__title"> |
| 97 |
<?php _e( 'Spread Your Love', 'slider-blocks' ); ?> |
| 98 |
</h3> |
| 99 |
<p class="support__description"> |
| 100 |
<?php _e( 'If you like this plugin, please share your opinion', 'slider-blocks' ); ?> |
| 101 |
</p> |
| 102 |
<a href="https://wordpress.org/support/plugin/slider-blocks/reviews/" class="support__link" target="_blank"> |
| 103 |
<?php _e( 'Rate the Plugin', 'slider-blocks' ); ?> |
| 104 |
</a> |
| 105 |
</div> |
| 106 |
<div class="single__support_panel"> |
| 107 |
<h3 class="support__title"> |
| 108 |
<?php _e( 'Similar Blocks', 'slider-blocks' ); ?> |
| 109 |
</h3> |
| 110 |
<p class="support__description"> |
| 111 |
<?php _e( 'Want to get more similar blocks, please visit my website', 'slider-blocks' ); ?> |
| 112 |
</p> |
| 113 |
<a href="https://makegutenblock.com" class="support__link" target="_blank"> |
| 114 |
<?php _e( 'Visit my Website', 'slider-blocks' ); ?> |
| 115 |
</a> |
| 116 |
</div> |
| 117 |
</div> |
| 118 |
</div> |
| 119 |
<div class="custom__block_request"> |
| 120 |
<h3 class="custom__block_request_title"> |
| 121 |
<?php _e( 'Need to Hire Me?', 'slider-blocks' ); ?> |
| 122 |
</h3> |
| 123 |
<p class="custom__block_request_description"> |
| 124 |
<?php _e( 'I am available for any freelance projects. Please feel free to share your project detail with me.', 'slider-blocks' ); ?> |
| 125 |
</p> |
| 126 |
<div class="available__links"> |
| 127 |
<a href="mailto:[email protected]" class="available__link mail" target="_blank"> |
| 128 |
<?php _e( 'Send Email', 'slider-blocks' ); ?> |
| 129 |
</a> |
| 130 |
<a href="https://makegutenblock.com/contact" class="available__link web" target="_blank"> |
| 131 |
<?php _e( 'Send Message', 'slider-blocks' ); ?> |
| 132 |
</a> |
| 133 |
<a href="https://www.fiverr.com/devs_zak" class="available__link fiverr" target="_blank"> |
| 134 |
<?php _e( 'Fiverr', 'slider-blocks' ); ?> |
| 135 |
</a> |
| 136 |
<a href="https://www.upwork.com/freelancers/~010af183b3205dc627" class="available__link upwork" target="_blank"> |
| 137 |
<?php _e( 'UpWork', 'slider-blocks' ); ?> |
| 138 |
</a> |
| 139 |
</div> |
| 140 |
</div> |
| 141 |
</div> |
| 142 |
<div class="tab__panel" id="tab2"> |
| 143 |
<div class="change__log_head"> |
| 144 |
<h3 class="change__log_title"> |
| 145 |
<?php _e( 'Changelog', 'slider-blocks' ); ?> |
| 146 |
</h3> |
| 147 |
<p class="change__log_description"> |
| 148 |
<?php _e( 'This is the changelog of the plugin. You can see the changes in each version.', 'slider-blocks' ); ?> |
| 149 |
</p> |
| 150 |
<div class="change__notes"> |
| 151 |
<div class="single__note"> |
| 152 |
<span class="info change__note"><?php _e( 'i', 'slider-blocks' ); ?></span> |
| 153 |
<span class="note__description"><?php _e( 'Info', 'slider-blocks' ); ?></span> |
| 154 |
</div> |
| 155 |
<div class="single__note"> |
| 156 |
<span class="feature change__note"><?php _e( 'N', 'slider-blocks' ); ?></span> |
| 157 |
<span class="note__description"><?php _e( 'New Feature', 'slider-blocks' ); ?></span> |
| 158 |
</div> |
| 159 |
<div class="single__note"> |
| 160 |
<span class="update change__note"><?php _e( 'U', 'slider-blocks' ); ?></span> |
| 161 |
<span class="note__description"><?php _e( 'Update', 'slider-blocks' ); ?></span> |
| 162 |
</div> |
| 163 |
<div class="single__note"> |
| 164 |
<span class="fixing change__note"><?php _e( 'F', 'slider-blocks' ); ?></span> |
| 165 |
<span class="note__description"><?php _e( 'Issue Fixing', 'slider-blocks' ); ?></span> |
| 166 |
</div> |
| 167 |
</div> |
| 168 |
</div> |
| 169 |
<div class="change__log_body"> |
| 170 |
<div class="single__log"> |
| 171 |
<div class="plugin__info"> |
| 172 |
<span class="log__version">1.0.0</span> |
| 173 |
<span class="log__date">2023-08-11</span> |
| 174 |
</div> |
| 175 |
<div class="log__description"> |
| 176 |
<span class="change__note info">i</span> |
| 177 |
<span class="description__text"><?php _e( 'Initial Release', 'slider-blocks' ); ?></span> |
| 178 |
</div> |
| 179 |
</div> |
| 180 |
</div> |
| 181 |
</div> |
| 182 |
</div> |
| 183 |
</div> |
| 184 |
</div> |
| 185 |
</div> |
| 186 |
</div> |
| 187 |
</div> |
| 188 |
</div> |
| 189 |
<?php |
| 190 |
} |
| 191 |
} |
| 192 |
|
| 193 |
new GutSlider_Admin(); // initialize the class |