function SicEm() { $this->name = strtolower(get_class($this)); add_filter('syndicated_post', array(&$this, 'process_post'), 10, 2); add_filter('feedwordpress_update_complete', array(&$this, 'process_captured_images'), -1000, 1); add_action('feedwordpress_admin_page_posts_meta_boxes', array(&$this, 'add_settings_box')); add_action('feedwordpress_admin_page_posts_save', array(&$this, 'save_settings'), 10, 2); add_filter('feedwordpress_diagnostics', array(&$this, 'diagnostics'), 10, 2); // If user opts for it, put a gallery at the end of syndicated posts add_filter('the_content', array(&$this, 'the_content'), 200000, 2); global $pagenow; global $sicem_path; if (WP_ADMIN) { // set up image picker through massive fuckery add_action('admin_init', array(&$this, 'fix_async_upload_image')); if (FeedWordPressSettingsUI::is_admin()) { wp_enqueue_style('thickbox'); wp_enqueue_script('sic-em-image-picker', WP_PLUGIN_URL . '/' . $sicem_path . '/image-picker.js', array('thickbox'), false, true); } elseif ('media-upload.php' == $pagenow || 'async-upload.php' == $pagenow) { add_filter('image_send_to_editor', array($this, 'image_send_to_editor'), 1, 8); add_filter('gettext', array($this, 'replace_text_in_thickbox'), 1, 3); add_filter('media_upload_tabs', array($this, 'media_upload_tabs')); } } }
public function admin_init() { global $pagenow; global $sicem_path; if (class_exists('FeedWordPressSettingsUI')) { if (FeedWordPressSettingsUI::is_admin()) { wp_enqueue_style('thickbox'); wp_enqueue_script('sic-em-image-picker', WP_PLUGIN_URL . '/' . $sicem_path . '/image-picker.js', array('thickbox'), false, true); } elseif ('media-upload.php' == $pagenow || 'async-upload.php' == $pagenow) { add_filter('image_send_to_editor', array($this, 'image_send_to_editor'), 1, 8); add_filter('gettext', array($this, 'replace_text_in_thickbox'), 1, 3); add_filter('media_upload_tabs', array($this, 'media_upload_tabs')); } } }
function init() { global $fwp_path; // If this is a FeedWordPress admin page, queue up scripts for AJAX // functions that FWP uses. If it is a display page or a non-FWP admin // page, don't. wp_register_style('feedwordpress-elements', WP_PLUGIN_URL . '/' . $fwp_path . '/feedwordpress-elements.css'); if (FeedWordPressSettingsUI::is_admin()) { // For JavaScript that needs to be generated dynamically add_action('admin_print_scripts', array('FeedWordPressSettingsUI', 'admin_scripts')); // For CSS that needs to be generated dynamically. add_action('admin_print_styles', array('FeedWordPressSettingsUI', 'admin_styles')); wp_enqueue_style('dashboard'); wp_enqueue_style('feedwordpress-elements'); if (function_exists('wp_admin_css')) { wp_admin_css('css/dashboard'); } } $this->clear_cache_magic_url(); $this->update_magic_url(); }
/** * fix notice in 3.3 */ function fwp_scripts() { // If this is a FeedWordPress admin page, queue up scripts for AJAX functions that FWP uses // If it is a display page or a non-FeedWordPress admin page, don't. if (FeedWordPressSettingsUI::is_admin()) { add_action('admin_print_scripts', array('FeedWordPressSettingsUI', 'admin_scripts')); wp_register_style('feedwordpress-elements', A16Z_PLUGIN_URL . 'feedwordpress-elements.css'); wp_enqueue_style('dashboard'); wp_enqueue_style('feedwordpress-elements'); if (function_exists('wp_admin_css')) { if (fwp_test_wp_version(FWP_SCHEMA_25)) { wp_admin_css('css/dashboard'); } } } }
function init() { global $fwp_path; // If this is a FeedWordPress admin page, queue up scripts for AJAX // functions that FWP uses. If it is a display page or a non-FWP admin // page, don't. wp_register_style('feedwordpress-elements', WP_PLUGIN_URL . '/' . $fwp_path . '/feedwordpress-elements.css'); if (FeedWordPressSettingsUI::is_admin()) { // For JavaScript that needs to be generated dynamically add_action('admin_print_scripts', array('FeedWordPressSettingsUI', 'admin_scripts')); // For CSS that needs to be generated dynamically. add_action('admin_print_styles', array('FeedWordPressSettingsUI', 'admin_styles')); wp_enqueue_style('dashboard'); wp_enqueue_style('feedwordpress-elements'); /*if (function_exists('wp_admin_css')) : wp_admin_css('css/dashboard'); endif;*/ } // This is a special post status for hiding posts that have expired register_post_status('fwpretired', array('label' => _x('Retired', 'post'), 'label_count' => _n_noop('Retired <span class="count">(%s)</span>', 'Retired <span class="count">(%s)</span>'), 'exclude_from_search' => true, 'public' => false, 'publicly_queryable' => false, 'show_in_admin_all_list' => false, 'show_in_admin_status_list' => true)); add_action('template_redirect', array($this, 'redirect_retired'), -100); add_action('wp_ajax_fwp_feeds', array($this, 'fwp_feeds')); add_action('wp_ajax_fwp_feedcontents', array($this, 'fwp_feedcontents')); add_action('wp_ajax_fwp_xpathtest', array($this, 'fwp_xpathtest')); $this->clear_cache_magic_url(); $this->update_magic_url(); }