Skip to content

Commit 8155953

Browse files
uypd
1 parent b4baa2f commit 8155953

File tree

3 files changed

+5
-147
lines changed

3 files changed

+5
-147
lines changed

class-plugin.php

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -570,15 +570,7 @@ public static function get_widget_style() {
570570
'countdown' => array(
571571
'handler' => 'wcf--countdown',
572572
'src' => 'widgets/countdown.min.css',
573-
<<<<<<< HEAD
574-
<<<<<<< HEAD
575-
'dep' => array( 'wcf-addons-core' ),
576-
=======
577-
'dep' => [],
578-
>>>>>>> cbe273f5e8d98e77474f37520e56e4629e40dc13
579-
=======
580-
'dep' => array( 'wcf-addons-core' ),
581-
>>>>>>> f9817d0874edf7712899710f99a4485851af5a59
573+
'dep' => array( 'wcf-addons-core' ),
582574
'version' => false,
583575
'media' => 'all',
584576
),
@@ -750,30 +742,15 @@ public static function get_widget_style() {
750742
'dep' => array(),
751743
'version' => false,
752744
'media' => 'all',
753-
<<<<<<< HEAD
754-
<<<<<<< HEAD
755-
),
756-
);
757-
=======
758-
],
759-
'post-comment' => [
760-
=======
761-
),
745+
),
762746
'post-comment' => array(
763-
>>>>>>> f9817d0874edf7712899710f99a4485851af5a59
764747
'handler' => 'wcf--post-comment',
765748
'src' => 'widgets/post-comment.min.css',
766749
'dep' => [],
767750
'version' => false,
768-
'media' => 'all',
769-
<<<<<<< HEAD
770-
],
771-
];
772-
>>>>>>> cbe273f5e8d98e77474f37520e56e4629e40dc13
773-
=======
774-
),
751+
'media' => 'all',
752+
),
775753
);
776-
>>>>>>> f9817d0874edf7712899710f99a4485851af5a59
777754
}
778755

779756
/**

inc/CodeSnippet/CodeSnippetFrontend.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,6 @@ public static function instance() {
6363
private function init_hooks() {
6464
// Use 'wp' so conditional tags (is_singular, is_archive, etc.) are available.
6565
$this->run_php_code_snippets();
66-
<<<<<<< HEAD
67-
// add_action( 'wp', array( $this, 'run_php_code_snippets' ) );
68-
=======
69-
>>>>>>> f9817d0874edf7712899710f99a4485851af5a59
7066
add_action( 'wp_head', array( $this, 'execute_head_snippets' ), 1 );
7167
add_action( 'wp_footer', array( $this, 'execute_footer_snippets' ), 999 );
7268
add_action( 'wp_body_open', array( $this, 'execute_body_start_snippets' ), 1 );
@@ -91,11 +87,7 @@ public function run_php_code_snippets() {
9187
$snippets = $this->get_active_snippets( 'php' );
9288

9389
foreach ( $snippets as $snippet ) {
94-
<<<<<<< HEAD
95-
$snippet_data = $this->get_code_snippet_settings( $snippet->ID );
96-
=======
9790
$snippet_data = $this->aae_get_code_snippet_settings( $snippet->ID );
98-
>>>>>>> f9817d0874edf7712899710f99a4485851af5a59
9991
if ( $this->check_visibility_conditions( $snippet_data ) ) {
10092
$this->execute_snippet( $snippet_data );
10193
}

inc/hook.php

Lines changed: 1 addition & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,6 @@
66

77
use Elementor\Plugin;
88

9-
<<<<<<< HEAD
10-
<<<<<<< HEAD
11-
if ( function_exists( 'wcf_set_postview' ) ) {
12-
add_action( 'wp_head', 'wcf_set_postview' );
13-
}
14-
15-
function aaeaddonlight_hk_allow_svg_uploads( $mimes ) {
16-
// Allow SVG files
17-
$mimes['svg'] = 'image/svg+xml';
18-
$mimes['svgz'] = 'image/svg+xml'; // Compressed SVG
19-
return $mimes;
20-
=======
21-
=======
22-
>>>>>>> f9817d0874edf7712899710f99a4485851af5a59
239
if (function_exists('wcf_set_postview')) {
2410
add_action('wp_head', 'wcf_set_postview');
2511
}
@@ -30,63 +16,10 @@ function aaeaddonlight_hk_allow_svg_uploads($mimes)
3016
$mimes['svg'] = 'image/svg+xml';
3117
$mimes['svgz'] = 'image/svg+xml'; // Compressed SVG
3218
return $mimes;
33-
<<<<<<< HEAD
34-
>>>>>>> cbe273f5e8d98e77474f37520e56e4629e40dc13
35-
}
36-
37-
add_filter( 'upload_mimes', 'aaeaddonlight_hk_allow_svg_uploads' );
38-
39-
<<<<<<< HEAD
40-
function aae_handle_aae_post_shares_count() {
41-
if ( ! isset( $_POST['nonce'] ) ) {
42-
exit( 'No naughty business please . Provide Security Code' );
43-
}
44-
$nonce = sanitize_text_field( wp_unslash( $_POST['nonce'] ) );
45-
if ( ! wp_verify_nonce( $nonce, 'wcf-addons-frontend' ) ) {
46-
exit( 'No naughty business please' );
47-
}
48-
49-
if ( isset( $_POST['post_id'] ) && isset( $_POST['social'] ) ) {
50-
$post_id = intval( sanitize_text_field( wp_unslash( $_POST['post_id'] ) ) );
51-
$social = sanitize_text_field( wp_unslash( $_POST['social'] ) );
52-
53-
// Retrieve current share count, increment it, or set it if it doesn't exist
54-
$current_shares = get_post_meta( $post_id, 'aae_post_shares', true );
55-
if ( ! is_array( $current_shares ) ) {
56-
$current_shares = array();
57-
}
58-
if ( isset( $current_shares[ $social ] ) ) {
59-
++$current_shares[ $social ];
60-
} else {
61-
$current_shares[ $social ] = 1;
62-
}
63-
64-
$shares_count = array_sum( array_values( $current_shares ) );
65-
66-
foreach ( $current_shares as $k => $single ) {
67-
update_post_meta( $post_id, 'aae_post_shares_' . $k, $single );
68-
}
69-
70-
update_post_meta( $post_id, 'aae_post_shares_count', $shares_count );
71-
update_post_meta( $post_id, 'aae_post_shares', $current_shares );
72-
73-
// Return updated share count as a response
74-
wp_send_json_success(
75-
array(
76-
'share_count' => $shares_count,
77-
'post_shares' => $current_shares,
78-
)
79-
);
80-
} else {
81-
wp_send_json_error( 'Invalid post ID' );
82-
}
83-
=======
84-
=======
8519
}
8620

8721
add_filter('upload_mimes', 'aaeaddonlight_hk_allow_svg_uploads');
8822

89-
>>>>>>> f9817d0874edf7712899710f99a4485851af5a59
9023
function aae_handle_aae_post_shares_count()
9124
{
9225
if (!isset($_POST['nonce'])) {
@@ -129,35 +62,10 @@ function aae_handle_aae_post_shares_count()
12962
} else {
13063
wp_send_json_error('Invalid post ID');
13164
}
132-
<<<<<<< HEAD
133-
>>>>>>> cbe273f5e8d98e77474f37520e56e4629e40dc13
134-
=======
135-
>>>>>>> f9817d0874edf7712899710f99a4485851af5a59
13665
}
13766
add_action('wp_ajax_aae_post_shares', 'aae_handle_aae_post_shares_count'); // For logged-in users
13867
add_action('wp_ajax_nopriv_aae_post_shares', 'aae_handle_aae_post_shares_count'); // For non-logged-in users
13968

140-
<<<<<<< HEAD
141-
<<<<<<< HEAD
142-
function aaeaddon_disable_comments_for_custom_post_type() {
143-
remove_post_type_support( 'wcf-addons-template', 'comments' );
144-
}
145-
add_action( 'init', 'aaeaddon_disable_comments_for_custom_post_type', 100 );
146-
147-
function aaeaddon_custom_hide_admin_notices_for_specific_page() {
148-
$screen = get_current_screen();
149-
// ist of admin pages where you want to disable notices
150-
$pages_to_hide_notices = array(
151-
'wcf-custom-fonts',
152-
'wcf-custom-icons',
153-
'animation-addon_page_wcf-cpt-builder',
154-
'edit-wcf-addons-template',
155-
'animation-addon_page_wcf_addons_settings',
156-
'animation-addon_page_wcf_addons_setup_page',
157-
);
158-
=======
159-
=======
160-
>>>>>>> f9817d0874edf7712899710f99a4485851af5a59
16169
function aaeaddon_disable_comments_for_custom_post_type()
16270
{
16371
remove_post_type_support('wcf-addons-template', 'comments');
@@ -176,20 +84,6 @@ function aaeaddon_custom_hide_admin_notices_for_specific_page()
17684
'animation-addon_page_wcf_addons_settings',
17785
'animation-addon_page_wcf_addons_setup_page'
17886
);
179-
<<<<<<< HEAD
180-
>>>>>>> cbe273f5e8d98e77474f37520e56e4629e40dc13
181-
182-
// Check if current screen ID matches any in the list
183-
if ( in_array( $screen->id, $pages_to_hide_notices ) ) {
184-
// Remove core and plugin notices
185-
remove_all_actions( 'admin_notices' );
186-
remove_all_actions( 'all_admin_notices' );
187-
}
188-
}
189-
<<<<<<< HEAD
190-
add_action( 'admin_head', 'aaeaddon_custom_hide_admin_notices_for_specific_page' );
191-
=======
192-
=======
19387

19488
// Check if current screen ID matches any in the list
19589
if (in_array($screen->id, $pages_to_hide_notices)) {
@@ -198,7 +92,6 @@ function aaeaddon_custom_hide_admin_notices_for_specific_page()
19892
remove_all_actions('all_admin_notices');
19993
}
20094
}
201-
>>>>>>> f9817d0874edf7712899710f99a4485851af5a59
20295
add_action('admin_head', 'aaeaddon_custom_hide_admin_notices_for_specific_page');
20396
// post reaction ajax handeler
20497

@@ -246,8 +139,4 @@ function aaeaddon_post_lite_reaction_ajax()
246139
}
247140
add_action('wp_ajax_nopriv_aaeaddon_post_reaction', 'aaeaddon_post_lite_reaction_ajax');
248141
add_action('wp_ajax_aaeaddon_post_reaction', 'aaeaddon_post_lite_reaction_ajax');
249-
}
250-
<<<<<<< HEAD
251-
>>>>>>> cbe273f5e8d98e77474f37520e56e4629e40dc13
252-
=======
253-
>>>>>>> f9817d0874edf7712899710f99a4485851af5a59
142+
}

0 commit comments

Comments
 (0)