Listing php functions that were run to load page - php

I'm working on a custom website and currently integrating a new section. Having done everything exactly the same as with previous sections, the behavior achieved is different.
It would be useful if I could get a list of functions run once the page loads, just like when you get them listed if there is a critical error, without having any errors.
Can't find any information on this, so any help will be appreciated!

All information that you need are in xhprof.
With that, you can check any function called in given request.

Related

Advanced Custom Fields Issue

So, there's a code that I've recycled multiple times on sites as it's well liked by my company. I am trying to update and recreate my portfolio due to my old hosting company wiping my entire file system. My fault for not having a back up, but lesson learned. Makattak.com Using this code here, I am unable to get anything to display.
A site I've used it on is here: Bowhunting.com
Here is a photo of my repeater field in ACF. I followed the same structure but still cannot get anything to display.
Can anyone offer some suggestions as far as what I am doing wrong? I've tried cutting things out, I've tried rebuilding from scratch, I just can't seem to get the loop to happen.
I am using the latest version of WordPress, and the latest purchased copy of ACF: Advanced.
I know this my sounds stupid but, did you assign the template to a page and select the page on the wordpress Reading settings?
Thanks to both Dre and Raul Cruz, I was able to find the issue.
I didn't set the Reading Settings to Home Page, static.
I revamped my code to change the_sub_field('field'); to
get_sub_field('field')
a change I made while debugging but didn't revert back
There was an issue with my syntax, and when writing the code back in, line by line, testing after each line, I was able to get what I needed back in working order
Thank you both for the help.

Wordpress - changing logo when on an imember360 page

A client is using iMember360 on his website, and doesn't want to give me access to the infusionsoft login so I can't ask this in their support forums, so hoping someone here will know a solution.
When you are viewing pages that are for a specific membership role only, he wants the website to have a different logo.
IE . if you are a profit.Ology member/subscriber, show a profit.Ology logo.
I was hoping when you are logged in, it would add some sort of body class to the tune of 'Profit.ology-Membership', so I could use that to change the logo, but nothing like that happens.
I know I can add a class using body_class('$myclass'); - but my issue is I don't know how to grab a variable for which of these was clicked (if that makes sense).
Has anyone done this before? Any ideas?
Cookies...
You will probably need to use the shortcodes provided by the iMember360 Wordpress plugin. See here for a reference. Even though it's not the original intent, you can use a shortcode as a php function (getting a value in return) by doing the following:
$variable = do_shortcode('[shortcode-name]');
So for example, if you used the ran the following code:
$i4w_users = do_shortcode('[i4w_user_levels sep="|"]');
Then take a look at what information is contained in the $i4w_users variable. You might be able to use that to parse out different user types/levels. If that shortcode doesn't do what you're looking for, you might need to look at some of the other shortcodes they provide on that reference page.

Joomla Retrieve current route in module

This is something I feel should be easy, but after an hour so far scouring the web it just does not seem to be jumping out.
What I want is to have a module trigger a task in a component, then redirect to the last page.
To do this I want to get the current route in the modules form. However I cannot find any Joomla function that can output the current pages "JRoute", if I try use JRoute with no parameters it just outputs the url with no query, so will every method of JURI.
There must be an obvious answer to this, however for some reason I might just not be searching for the right thing and not turning up any results.
Try:
JURI::getInstance()->toString()
This will give you the current url.

How do I create simple module from already existing PHP script that will display on the main column

I have already working guestbook script, which I’d like to add to my prestashop on a separate page. The problem is, that I can’t find where to place it.
I’ve browsed through a lot of modules, but it looks like all of them are registering to either left or right column hook. What I need is to display the script in the middle column, which basically consists of only calling one or two methods that will render out the correct html.
I don’t need to do anything with configuration or accessing the prestashop database, or even create a page in the administration. Basically the same thing I’m trying to achieve could be done using an iframe in a CMS page, where the iframe’s url would link to the guestbook script, but that really doesn’t seem like a clean solution to me.
Is there any simple way to make a separate php script display on the “main” center column?
Isn't the include able to help you?
<div><?PHP include(something)?></div>
<div><?PHP include(something else)?></div>
etc
you can place if conditions if needed.

How to take my PHP form handler pages into WordPress to connect with PayPal API

I'm trying to integrate a form like this into Wordpress
This form works perfectly with the PayPal API sandbox. However, when I tried to move this work over to the WP site of my organization, globalcitizenyear.org/donate/donation-form-2/, I keep coming up short.
Anyone have any tips to keep in mind when doing this? What steps would you take first to make this happen in Wordpress - any details on what to avoid, or what potential hangups might be?
Make a page called page-donation-form-2.php and load this code into it. You can leave in the get_header() and get_footer() tags if you want to have the site wrapper around the outside.
Make sure to change your form action also. And remember, that since this is in WordPress now, you will need to avoid some reserved form elements. Full list here.
If you have any trouble, please post your code here.

Categories