Finally, I figured out how to solve my problem:
class Import_Facebook_Events_Facebook_Ext extends Import_Facebook_Events_Facebook {
function get_location( $facebook_event ) {
if ( !isset( $facebook_event->place->id ) ) {
$facebook_event->place->id = '';
//return null;
}
//other code here
return $event_location;
}
}
$new_ife_events = run_import_facebook_events();
$new_ife_events->facebook = new Import_Facebook_Events_Facebook_Ext();
A question: the last two code lines must be included in a function/action?
Related Posts:
- Programatically add options to “add new” custom field dropdown
- Excluding iPad from wp_is_mobile
- paginate_links() don’t properly work in search.php?
- How to influence the information displayed on widget inside wp-admin
- How can I get $id variable in widget’s form function?
- Add attribute to link tag that’s generated through wp_register_style?
- Default or Preset Content for Custom Post Types
- Problem using is_single() to enqueue script from functions.php
- If function exists, and array is met, echo function?
- Remove Menu Page Giving Error
- How to add another user to this remove_menu function?
- RSS Feed has no styles in chrome – function to add one?
- change default option in wp_dropdown_categories
- How to change menu icon which is overriden (i.e. by WooCommerce) [closed]
- modify a function filter
- Change the slug of a particular page every x hours
- Use of undefined constant bloginfo
- Best practices for multiple Custom Feeds functions
- Print Post Parent Title
- Which action hook to use for function?
- Change size and crop medium_large images
- Ninja form Redirect depending on text field content [closed]
- Right way to update widget on dynamic new input field
- Problem only while using require_once() within functions.php
- custom rss templete
- Remove elementor header and display default theme header
- How to force field validation first, then its values saved durning edit profile?
- Filter out other users comments. Visualize only own comments and editor role users’ comments
- WordPress on AWS Auto scaling and ELB giving 503
- enqueue styles for only mobile wp
- WordPress PHP Conflicting User Sessions
- Registration Hooks don’t appear to be working
- is_author(get_current_user_id()) returns false when author id and user id match
- How to use selected WordPress functions?
- Allow Contributor to edit their own posts after Adm aproval
- help I changed one currency in woocommerce and everything is ruined [closed]
- How to run a function in every page, every device
- Change slug shortlink “/?p=” base in WordPress
- How to ignore posts in pre_get_posts?
- How to retrieve the values of a sub-field in the first and last row of an (ACF) repeater inside function?
- unnecessary request call for js and css after calling wp_dequeue_script
- New functions in separate directory — better, portable way
- How to use author meta in shortcode?
- WordPress Migration error phpupdate_option is not a function
- How to cut off question mark in url with functions.php
- How to rewrite wordpress search to work on specific category
- Genesis Framework: How to exclude a specific author from archive custom loop
- How to Add Shortcode to html img code?
- Logout Redirect and also WP-login.php Redirect
- Proper Way to Load stylesheet on Condition
- Insert Content Before div#main from the functions.php File
- How do I place a function in a standalone page?
- Problem in using Customizer
- Ajax resetting my global variable
- Problem enqueuing scripts on not single posts
- Conditional custom menu?
- What function actually renders the wp_admin_bar ? How can I call it?
- Do I Need to Prefix Variables Inside Functions?
- is_main_query() always returning false
- redirecting a URL if accessed directly
- Detect Ajax call inside pre_get_posts function
- Render page with specific id from functions.php
- Display Child Pages if no child Exists Display Siblings
- How to show ACF value under post/page title in wp-admin
- What is wp_get_post_tags for media tags?
- Filter works on last selection but no others
- Undefined variable issue for wp_get_attachment_image_url
- WordPress does not load jQuery
- ACF Flexible in TCPDF
- get_current_user_id() always return 0 in if else statement
- How do i tweak my wp Post title base on category of the post
- Why isn’t comment validation working?
- I’m creating a online store for my website, my aim is to add description to products in home page only how can i achieve it?
- modifying every other element’s class inside while loop
- Adding Custom Body Class for Page: Shop
- Menu and category highlighting for a single post
- “Conditional query tags do not work before the query is run. Before > then, they always return false. “
- Change ‘Categories’ to ‘Topics’
- I need to ‘wp_dequeue_script’ and ‘styles’ and ADD a bunch of other css and js
- True email confirmation for registration (keeping unvalidated users from user table)
- Code I am placing in the wp_footer is going outside the entire HTML frame!
- How to use if (is_page_template (”))
- wordpress function through ajax not being called
- How to assign results to variables?
- Restoring pages in wordpress
- Different body image backgrounds on different pages, posts and categories
- Hide certain post types from editors
- Language switcher for subdomains
- Automatically add custom fields (post_meta) to all published posts, hourly, via wp_cron?
- How to mirror exactly the left admin menu on front end?
- Add Function For Instances of Custom Text in Multiple Category IDs to display in post content
- How to add a class name to the ancestor of a post?
- update_post_meta after form is submited
- Make a table out of meta box
- is_user_logged_in() isn’t working
- Retrive post by tags PHP code
- Add custom css to theme
- Why don’t ‘wp_nav_menu’ CSS classes work until a menu is created?
- Different ads on every website on multisite environment
- How to get variable from other function inside class function using add_action for Ajax call