1010
1111namespace Marker_Animation \Classes \Models \Custom_Post ;
1212
13+ use Marker_Animation \Classes \Models \Assets ;
14+ use Marker_Animation \Traits \Models \Custom_Post ;
15+ use WP_Framework_Db \Classes \Models \Query \Builder ;
16+ use WP_Framework_Upgrade \Traits \Upgrade ;
17+ use WP_Post ;
18+
1319if ( ! defined ( 'MARKER_ANIMATION ' ) ) {
1420 exit ;
1521}
2026 */
2127class Setting implements \Marker_Animation \Interfaces \Models \Custom_Post, \WP_Framework_Upgrade \Interfaces \Upgrade {
2228
23- use \ Marker_Animation \ Traits \ Models \ Custom_Post, \ WP_Framework_Upgrade \ Traits \ Upgrade;
29+ use Custom_Post, Upgrade;
2430
2531 /**
2632 * insert presets
@@ -53,8 +59,8 @@ private function setup_assets() {
5359 return ;
5460 }
5561
56- /** @var \Marker_Animation\Classes\Models\ Assets $assets */
57- $ assets = \ Marker_Animation \ Classes \ Models \ Assets::get_instance ( $ this ->app );
62+ /** @var Assets $assets */
63+ $ assets = Assets::get_instance ( $ this ->app );
5864 $ assets ->enqueue_marker_animation ();
5965 $ this ->add_script_view ( 'admin/script/custom_post/setting_list ' );
6066 }
@@ -66,24 +72,24 @@ private function setup_assets() {
6672 * @return string
6773 */
6874 public function get_default_class ( $ post_id , $ is_selector = true ) {
69- /** @var \Marker_Animation\Classes\Models\ Assets $assets */
70- $ assets = \ Marker_Animation \ Classes \ Models \ Assets::get_instance ( $ this ->app );
75+ /** @var Assets $assets */
76+ $ assets = Assets::get_instance ( $ this ->app );
7177
7278 return ( $ is_selector ? '. ' : '' ) . $ assets ->get_default_marker_animation_class () . '- ' . $ post_id ;
7379 }
7480
7581 /**
7682 * @param array $params
77- * @param \ WP_Post $post
83+ * @param WP_Post $post
7884 *
7985 * @return array
8086 */
8187 protected function filter_edit_form_params (
8288 /** @noinspection PhpUnusedParameterInspection */
8389 $ params , $ post
8490 ) {
85- /** @var \Marker_Animation\Classes\Models\ Assets $assets */
86- $ assets = \ Marker_Animation \ Classes \ Models \ Assets::get_instance ( $ this ->app );
91+ /** @var Assets $assets */
92+ $ assets = Assets::get_instance ( $ this ->app );
8793 $ setting_details = $ assets ->get_setting_details ( 'setting ' );
8894
8995 foreach ( $ this ->get_setting_list () as $ key => $ name ) {
@@ -159,8 +165,8 @@ protected function get_manage_posts_columns() {
159165 /** @noinspection PhpUnusedParameterInspection */
160166 $ value , $ data , $ post
161167 ) {
162- /** @var \Marker_Animation\Classes\Models\ Assets $assets */
163- $ assets = \ Marker_Animation \ Classes \ Models \ Assets::get_instance ( $ this ->app );
168+ /** @var Assets $assets */
169+ $ assets = Assets::get_instance ( $ this ->app );
164170 $ setting_details = $ assets ->get_setting_details ( 'front ' );
165171 $ attributes = [];
166172 $ details = [];
@@ -246,7 +252,7 @@ protected function get_manage_posts_columns() {
246252 }
247253
248254 /**
249- * @param \ WP_Post $post
255+ * @param WP_Post $post
250256 * @param array $params
251257 */
252258 protected function before_output_edit_form (
@@ -255,15 +261,15 @@ protected function before_output_edit_form(
255261 ) {
256262 $ this ->setup_color_picker ();
257263
258- /** @var \Marker_Animation\Classes\Models\ Assets $assets */
259- $ assets = \ Marker_Animation \ Classes \ Models \ Assets::get_instance ( $ this ->app );
264+ /** @var Assets $assets */
265+ $ assets = Assets::get_instance ( $ this ->app );
260266 $ assets ->enqueue_marker_animation ();
261267 }
262268
263269 /**
264- * @param \ WP_Post $post
270+ * @param WP_Post $post
265271 */
266- public function output_after_editor ( \ WP_Post $ post ) {
272+ public function output_after_editor ( WP_Post $ post ) {
267273 $ this ->get_view ( 'admin/custom_post/setting/test ' , [], true );
268274 }
269275
@@ -282,20 +288,20 @@ protected function get_table_column_name( $key ) {
282288
283289 /**
284290 * @param int $post_id
285- * @param \ WP_Post $post
291+ * @param WP_Post $post
286292 * @param array $old
287293 * @param array $new
288294 */
289- public function data_updated ( $ post_id , \ WP_Post $ post , array $ old , array $ new ) {
295+ public function data_updated ( $ post_id , WP_Post $ post , array $ old , array $ new ) {
290296 $ this ->clear_options_cache ();
291297 }
292298
293299 /**
294300 * @param int $post_id
295- * @param \ WP_Post $post
301+ * @param WP_Post $post
296302 * @param array $data
297303 */
298- public function data_inserted ( $ post_id , \ WP_Post $ post , array $ data ) {
304+ public function data_inserted ( $ post_id , WP_Post $ post , array $ data ) {
299305 $ this ->clear_options_cache ();
300306 }
301307
@@ -310,8 +316,8 @@ public function trash_post( $post_id ) {
310316 * clear options cache
311317 */
312318 private function clear_options_cache () {
313- /** @var \Marker_Animation\Classes\Models\ Assets $assets */
314- $ assets = \ Marker_Animation \ Classes \ Models \ Assets::get_instance ( $ this ->app );
319+ /** @var Assets $assets */
320+ $ assets = Assets::get_instance ( $ this ->app );
315321 $ assets ->clear_options_cache ();
316322 }
317323
@@ -342,13 +348,13 @@ protected function filter_post_field(
342348 * @return array
343349 */
344350 public function get_settings ( $ target ) {
345- /** @var \Marker_Animation\Classes\Models\ Assets $assets */
346- $ assets = \ Marker_Animation \ Classes \ Models \ Assets::get_instance ( $ this ->app );
351+ /** @var Assets $assets */
352+ $ assets = Assets::get_instance ( $ this ->app );
347353 $ setting_details = $ assets ->get_setting_details ( $ target );
348354 $ settings = [];
349355 foreach (
350356 $ this ->get_list_data ( function ( $ query ) {
351- /** @var \WP_Framework_Db\Classes\Models\Query\ Builder $query */
357+ /** @var Builder $query */
352358 $ query ->where ( 'is_valid ' , 1 )
353359 ->order_by ( 'priority ' );
354360 } )['data ' ] as $ data
@@ -369,7 +375,7 @@ public function get_settings( $target ) {
369375 list ( $ name , $ value ) = $ assets ->parse_setting ( $ setting , $ name );
370376 $ options [ $ name ] = $ value ;
371377 }
372- /** @var \ WP_Post $post */
378+ /** @var WP_Post $post */
373379 $ post = $ data ['post ' ];
374380 $ options ['selector ' ] = $ this ->get_default_class ( $ post ->ID );
375381 $ options ['class ' ] = $ this ->get_default_class ( $ post ->ID , false );
0 commit comments