PluginProbe ʕ •ᴥ•ʔ
Smash Balloon Social Post Feed – Simple Social Feeds for WordPress / trunk
Smash Balloon Social Post Feed – Simple Social Feeds for WordPress vtrunk
4.8.1 trunk 1.0 1.1 1.12.1 1.2.3 1.2.4 1.2.5 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 1.5 1.5.1 1.5.2 1.5.9 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.4.1 1.6.5 1.6.5.1 1.6.6 1.6.6.1 1.6.6.2 1.6.6.3 1.6.7 1.6.7.1 1.6.8 1.6.8.1 1.6.8.2 1.7.0 1.7.1 1.7.2 1.8.0 1.8.1 1.8.2 1.8.2.1 1.8.2.2 1.8.2.3 1.9.0 1.9.1 1.9.3 1.9.4 1.9.5 1.9.6 1.9.7 1.9.8 1.9.8.1 1.9.9 1.9.9.1 1.9.9.2 1.9.9.3 2.0 2.0.1 2.1 2.1.1 2.1.2 2.1.3 2.10 2.11 2.11.1 2.12 2.12.1 2.12.2 2.12.3 2.12.4 2.13 2.14 2.14.1 2.15 2.15.1 2.16 2.16.1 2.17 2.17.1 2.18 2.18.1 2.18.2 2.18.3 2.19 2.19.1 2.19.2 2.19.3 2.2 2.2.1 2.3 2.3.1 2.3.10 2.3.2 2.3.3 2.3.4 2.3.6 2.3.7 2.3.8 2.3.9 2.4 2.4.1 2.4.1.1 2.4.1.2 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.5 2.5.1 2.5.2 2.6 2.6.1 2.6.2 2.6.3 2.6.4 2.7 2.7.1 2.7.2 2.8 2.9 2.9.1 4.0 4.0.1 4.0.2 4.0.3 4.0.4 4.0.5 4.1 4.1.1 4.1.2 4.1.3 4.1.4 4.1.5 4.1.6 4.1.7 4.1.8 4.1.9 4.2 4.2.1 4.2.2 4.2.3 4.2.4 4.2.5 4.2.6 4.3.0 4.3.1 4.3.2 4.3.3 4.3.4 4.7.5 4.7.6 4.7.7
custom-facebook-feed / admin / enqueu-script.php
custom-facebook-feed / admin Last commit date
assets 3 weeks ago builder 3 weeks ago templates 4 months ago views 3 weeks ago addon-functions.php 4 months ago admin-functions.php 4 months ago enqueu-script.php 4 months ago index.php 4 months ago
enqueu-script.php
94 lines
1 <?php
2
3 use CustomFacebookFeed\Builder\CFF_Feed_Builder;
4
5 if (! defined('ABSPATH')) {
6 exit; // Exit if accessed directly
7 }
8
9 require_once trailingslashit(CFF_PLUGIN_DIR) . 'admin/addon-functions.php';
10
11 require_once trailingslashit(CFF_PLUGIN_DIR) . 'inc/Helpers/PluginSilentUpgrader.php';
12 require_once trailingslashit(CFF_PLUGIN_DIR) . 'inc/Helpers/PluginSilentUpgraderSkin.php';
13 require_once trailingslashit(CFF_PLUGIN_DIR) . 'inc/Admin/CFF_Install_Skin.php';
14
15
16 function cff_ppca_token_check_flag()
17 {
18 check_ajax_referer('cff_nonce', 'cff_nonce');
19
20 $cap = current_user_can('manage_custom_facebook_feed_options') ? 'manage_custom_facebook_feed_options' : 'manage_options';
21 $cap = apply_filters('cff_settings_pages_capability', $cap);
22 if (! current_user_can($cap)) {
23 wp_send_json_error(); // This auto-dies.
24 }
25
26 if (get_transient('cff_ppca_access_token_invalid')) {
27 print_r(true);
28 } else {
29 print_r(false);
30 }
31
32 die();
33 }
34 add_action('wp_ajax_cff_ppca_token_check_flag', 'cff_ppca_token_check_flag');
35
36 add_action('admin_enqueue_scripts', 'enqueue_admin_scripts_assets');
37 function enqueue_admin_scripts_assets()
38 {
39 wp_register_style(
40 'custom_wp_admin_css',
41 CFF_PLUGIN_URL . 'admin/assets/css/cff-admin-style.css',
42 false,
43 CFFVER
44 );
45 wp_enqueue_style('custom_wp_admin_css');
46 wp_enqueue_style(
47 'cff-font-awesome',
48 'https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css',
49 array(),
50 '4.5.0'
51 );
52
53 wp_enqueue_script(
54 'cff_admin_script',
55 CFF_PLUGIN_URL . 'admin/assets/js/cff-admin-scripts.js',
56 false,
57 CFFVER
58 );
59
60 wp_localize_script('cff_admin_script', 'cffA', array(
61 'ajax_url' => admin_url('admin-ajax.php'),
62 'cff_nonce' => wp_create_nonce('cff_nonce')
63 ));
64 $strings = array(
65 'addon_activate' => esc_html__('Activate', 'custom-facebook-feed'),
66 'addon_activated' => esc_html__('Activated', 'custom-facebook-feed'),
67 'addon_active' => esc_html__('Active', 'custom-facebook-feed'),
68 'addon_deactivate' => esc_html__('Deactivate', 'custom-facebook-feed'),
69 'addon_inactive' => esc_html__('Inactive', 'custom-facebook-feed'),
70 'addon_install' => esc_html__('Install Addon', 'custom-facebook-feed'),
71 'addon_error' => esc_html__('Could not install addon. Please download from smashballoon.com and install manually.', 'custom-facebook-feed'),
72 'plugin_error' => esc_html__('Could not install a plugin. Please download from WordPress.org and install manually.', 'custom-facebook-feed'),
73 'addon_search' => esc_html__('Searching Addons', 'custom-facebook-feed'),
74 'ajax_url' => admin_url('admin-ajax.php'),
75 'cancel' => esc_html__('Cancel', 'custom-facebook-feed'),
76 'close' => esc_html__('Close', 'custom-facebook-feed'),
77 'nonce' => wp_create_nonce('cff-admin'),
78 'almost_done' => esc_html__('Almost Done', 'custom-facebook-feed'),
79 'oops' => esc_html__('Oops!', 'custom-facebook-feed'),
80 'ok' => esc_html__('OK', 'custom-facebook-feed'),
81 'plugin_install_activate_btn' => esc_html__('Install and Activate', 'custom-facebook-feed'),
82 'plugin_install_activate_confirm' => esc_html__('needs to be installed and activated to import its forms. Would you like us to install and activate it for you?', 'custom-facebook-feed'),
83 'plugin_activate_btn' => esc_html__('Activate', 'custom-facebook-feed'),
84 'oembed_connectionURL' => cffGetOembedConnectionUrl(),
85 'smashPlugins' => CFF_Feed_Builder::get_smashballoon_plugins_info()
86 );
87 $strings = apply_filters('cff_admin_strings', $strings);
88 wp_localize_script(
89 'cff_admin_script',
90 'cff_admin',
91 $strings
92 );
93 }
94