Helpme-Plugin WordPress‏

QuestionsHelpme-Plugin WordPress‏
Yamil asked 11 years ago

Hello,
I'm creating a plugin for wordpress, the plugin only works on the back end.
When I try to use phpgrid only shows me the json object.
In my first line of my plugin I'm writing this:
include (".. / wp-content / plugins / pluginHojaAtencion / new-technician / lib / inc / jqgrid_dist.php");
But when I see the source code of this line is after the. Js and css includes default wordpress.
You know any way to fix this.
Because according to what I read in the forums you request to include include (".. / Wp-content / plugins / pluginHojaAtencion / new-technician / lib / inc / jqgrid_dist.php") before an echo.

4 Answers
Abu Ghufran answered 11 years ago

For wordpress integration, you need to use 2 actions.

// load core lib and set grid $out variable (global)
add_action("wp_loaded", "init_phpgrid");

// load js and css files
add_action( "wp_head", "load_jqgrid" );

// added short code for display position, and print $out global variable
add_shortcode( "phpgrid", "render_phpgrid" );

Yamil answered 11 years ago

I sent him an email explaining my problem better
I hope I can help.

Abu Ghufran answered 11 years ago

Working wordpress plugin sent to your email. Closing this thread.

Anonymous answered 11 years ago

Would be nice to see a functioning skeleton plugin with all of this working.

Your Answer

11 + 7 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?