Articles with tag 'PHP'


WPDK: thinking Object-Oriented

Think of objects is critical (and natural) in some programming languages. In Objective-C, for example, there is no thing that can not be designed and molded to objects. In PHP this practice is less common, because the language is a bit recently, object-oriented, a little bit because it does not offer much in terms of OO programming, and a little bit because the same PHP programmers have perhaps fear of burdening or embarking on situations apparently solved by writing code more linear.

Continued ...

WPDK: how I did it

During the development of the system wpXtreme and in particular the development WPDK KIT (WordPress Development Kit), I learned a lot! Above all, I began to appreciate techniques that in the past I used infrequently.

So I want to start with this post to tell you about all the wonderful things that I have learned to love and put into practice, in relation to the development of the framework WPDK dedicated to the development of WordPress.

Continued ...

Table WordPress shortcode

Let me show how you can use the shortcode - indented (nested) - WordPress to create tables to be inserted into posts and pages. For example, I will show you how to create comparative tables, those used to compare the particularities of applications or products, such as:

Continued ...

WordPress snippet: remove the admin bar

The latest version of WordPress has added a new toolbar frontend when the administrator is logged. If you want to disable it you enter this code in the file functions.php of your theme:

1
2
3
4
/ / Check that there is a filter show_admin_bar
has_filter ( 'show_admin_bar' ) ) { if (has_filter ('show_admin_bar')) {
, '__return_false' ) ; add_filter ('show_admin_bar', '__return_false');
}

Continued ...

HTML output in PHP

The methods (or functions) that return an immediate visual and HTML output can be packaged in two main ways:

Continued ...

Coding Guidelines

When you are not working alone for most all developers comes time to find guidance in the writing of the code. Protocols and standards to allow "read" easily and intervene (more easily) in the code of others.
When we work on a project more programmers, often of different languages, you must find a common form of writing, in the standard internal and external documentation to the code. In my work I am normally interact with:

  • Objetive-C, C / C + +
  • PHP
  • HTML
  • Javascript
  • Actionscript
  • CSS

Continued ...

PhpStorm 2.0

PHP IDE dedicated to the development there are many, ranging from free to those in charge. For a long time I have used tools such as Eclipse or Aptana , coming to serve specialized editors for HTML / Javascript and - even - CSS. For a year now, however, I think I found definitivamento a complete environment that, at least in my case, it solves all my problems: PhpStorm .

Continued ...

WordPress: retrieve the contents of private pages

Allotment from the post WordPress: retrieve the contents of a page to add some information. First of all it is possible to retrieve the contents of a page using a work like this:

1
2
3
4
$slug ) { getPageBySlug function ($ slug) {
get_page_by_path ( $slug ) ; $ ObjectPost = get_page_by_path ($ slug);
"the_content" , $objectPost -> post_content ) ; return apply_filters ("the_content", $ objectPost -> post_content);
}

Continued ...

How to develop in PHP with Xcode and Objective-C

How many programmers use to do, I also build my own function libraries ready to be reused in multiple projects and in multiple contexts. Let me pass the title of this post, perhaps a bit 'risky but, nevertheless, as we shall see, not far from reality.

In Objective-C you can write and call C / C + +, including the assembly for that matter. This characteristic makes it a truly versatile language and, in some respects, phenomenal. On the one hand, in fact, you can use and appreciate the syntax purely Objective-C, on the other hand you can run fast porting of code written in ANSI C (perhaps for Digital Unix, Sun) and use it comfortably in our iPhone or iPad application; not to mention all the BSD Kernel already available on Mac OS X!

Continued ...

Very short snippet: detect iPad on the device and on the Web

Not just the browser or desktop portatitli browsing the sites by us, now the era of mobile - mobile browser - is widespread, thanks to devices such as the Apple iPhone, iPad, Android, etc ... Moreover, even for those who develop for the Apple iPhone has become mandatory to understand to which device the application is running.

On the Web, the situation is similar to that displayed in the Browser or Mobile Browser? , with the variant:

Continued ...