Tag: PHP

  • unserialize() Error at Offset… Different solutions

    unserialize() Error at Offset… Different solutions

    The problem is not always obvious, for example the error message in relation to the function unserialize(). If you look around the net to help you find countless search and few answers, because usually the problem lies in the source, in the passed value. But not always you can control it, especially in debugging helpers…

  • Activate WordPress Plugins Automatically via a Function

    Activate WordPress Plugins Automatically via a Function

    WordPress stores the active Plugins in the database table options, field activate_plugins, so it is easy to change this value to activate various Plugins by WordPress; either as a Plugin solution after setting up a new installation or because some Plugins need some other Plugins.

  • Advent Calendar – WordPress, WPCron and the right Time

    Advent Calendar – WordPress, WPCron and the right Time

    WordPress offers a pseudo-cronjob functionality, which allows the developer to execute scheduled events. For example, the whole Update Notification does it. In these so-called Scheduled Events you can define your own jobs. Thereby you should however pay attention to one important thing: time.

  • Return the Template Name of Current WordPress Page

    Return the Template Name of Current WordPress Page

    WordPress save the assignment in the post_meta table and so it is easy to get the template name with the default function to return post meta data – get_post_meta(). The key for the value is _wp_page_template.

  • Remove Inline Style Of WordPress Gallery Shortcode

    Remove Inline Style Of WordPress Gallery Shortcode

    Today I’ll give you a small tip for the WordPress Gallery. With version 3.1 of WordPress it is possible to replace the inline style of the core, it’s done easily with a Filter-Hook. Use this and include your custom style with the Theme in your frontend; no Plugins, CSS or functions in your Theme for…

  • Advent Calendar – WordPress Editor: Preserve the scroll position

    Advent Calendar – WordPress Editor: Preserve the scroll position

    WordPress has a nice editor, with which are several hundreds of articles written daily. But in my opinion the editor has an usability issue. Every time you save a post the scroll position of the editor will be on top again. If you want to continue writing the post you have first to find he…