Use angular.js with WordPress

AngularJS And WordPress

1. Download zip file.
[wpfilebase tag=file id=1 /]
2. Install and activate the plugin.
3. Set wp-angularjs-include to true in Custom Fields on post edit page.

Sample test code:

<div>
  Name:
  
  <hr>
  <b>Hello <span style="color:#ff6600;">{{yourName}}</span>!</b>
<div />

Sample test code output (type anything into the input field to see “Hello …” string update:

Name:

Hello {{yourName}}!

Advertisements

First WordPress plugin

I released my first WordPress plugin today. I have have been trawling through custom code I have coded over years, and found some that are ideal to turn into plugins. The first is a simple on that adds an address field on the post form, and allows user to add a googlemap identifying location, with a customisable widget. Will be adding a proximity search and multiple map marker display in future releases.  Will also be creating a user guide to demontsrate how to create plugins, and how this particular one was made. Continue reading

Anonymous web server

i2p-logo

If you had a mind to use an anonymous web server, then I2P is worth a look. And offer a lot more besides, covering – anonymous web browsing, web hosting, chat, file sharing, e-mail, blogging and content syndication, newsgroups, as well as several other applications under development.

  • Web browsing: using any existing browser that supports using a proxy.
  • Chat: IRC, Jabber, I2P-Messenger.
  • File sharing: I2PSnark, Robert, iMule, I2Phex, PyBit, I2P-bt and others.
  • E-mail: susimail and I2P-Bote.
  • Blog: using e.g. the pebble plugin or the distributed blogging software Syndie.
  • Distributed Data Store: Save your data redundantly in the Tahoe-LAFS cloud over I2P.
  • Newsgroups: using any newsgroup reader that supports using a proxy.

i2p screenshotOnce installed on your PC for testing, you just have to files under ~/.i2p/eepsite/docroot/ (Linux) or %APPDATA%I2Peepsitedocroot (Windows) and they’ll be reachable by others once you follow the instructions below on the Help page (just click Help from the control panel, once you have installed and started up I2P).

Useful WP Plugins for dev/QA

Wordpress-Plugins

WordPress has a (largely undiscovered) set of plugins that are useful for WP developers and testers alike. The Debug Bar (which has around 20 related extension plugins), provides Firebug type features, at WordPress level. I omitted any plugins prior to 2010, as they are highly unlikely to work with the current version of WordPress.

P3 (Plugin Performance Profiler)

See which plugins are slowing down your site. This plugin creates a performance report for your site.

Debug Objects

The Plugin Debug Objects provides a large number of information: query, cache, cron, constants, hooks, functions and many more.

Adminer

Adminer is a full-featured MySQL management tool written in PHP. This plugin include this tool in WordPress.

Simple Debug

Analyzes WordPress website performance, helps to locate slow function hooks.

get options

View all the WordPress Options

dbug

Simple error debugging and logging functions.

Safe Mode

Makes it possible to enable safe mode for WordPress. In safe mode, plugins will not be loaded and the default theme (if installed) will be activated.

Monster Widget

Provides a quick and easy method of adding all core widgets to a sidebar for testing purposes.

Admin’s Debug Tool

Admin-only tool for checking execution times and error output of current theme/plugins

Log Viewer

This plugin provides an easy way to view *.log files directly in the admin panel.

YARPP Experiments

Some extras for tuning and diagnosing YARPP.

WP Debug Robot

An unobtrusive debugging tool for WordPress that leverages UDP

Debug Bar Transients

Debug Bar Transients adds a new panel to Debug Bar that displays information about WordPress transients.

Admin Bar Queries

Admin bar MySQL query and script execution timer output.

wp-dBug

Plugin implements the awesome dBug class created by Kwaku Otchere for use in WordPress plugin debugging

Xdebug Output Handler

This WordPress Plugin collects the XDebug output and displayes it in the footer. Only use it with Xdebug extension for PHP activated

CrashFeed

Capture exceptions, uncaught errors, and custom events into your crashfeed.com dashboard.

Development Debug Backtraces

Display debug backtraces for every error generated by PHP.

FreshMuse DebugBar Extender

Custom extension of the WordPress Debug Bar. Designed from the development needs of FreshMuse

WP Page Load Stats

Display memory, page load time, average load time and query count in the footer of your site.

Facebook Debug Links

Provides links in your wordpress backend to easily open your page/post in the Facebook Debugger

AskApache Debug Viewer

This advanced debugging plugin is custom-made for WordPress Developers, Plugin Developers, or anyone wanting to see under the hood of their website an

Debug Bar Action Hooks

Displays a list of actions fired for the current request. Requires the debug bar plugin.

What Template File Am I Viewing?

This is a debugging plugin that displays the current php file that is loading on the front end of the website.

WP-FirePHP

Work with FirePHP, only PHP5 and a sample af values of WordPress

Debug Notifier

If WP_DEBUG=true, this plugin adds a visual style that prevents admins from forgetting that debugging is enabled. Simple, slim, handy.

Display – Queries

Display Plugin for number of queries and page loading time

What Template

Adds the current page’s template name to the admin bar.

Disable Deprecated Warnings

Prevents plugins from showing deprecated errors in the WordPress admin.

Debug Bar

Adds a debug menu to the admin bar that shows query, cache, and other helpful debugging information.

Redirect Source

Prints backtrace of call to wp_redirect().

Config Constants

Modify WP_DEBUG and other wp-config.php constants directly in the WordPress admin rather than manually editing them!

Automatic Facebook Cache Cleaner

No more outdated post/page info when sharing on Facebook. Our plugin makes sure that Facebook’s cache always has the most up to date details.

PHP Validator

PHP Validator is a pseudo-compiler for PHP to help developers locate undefined functions and methods.

Debug Bar Console

Adds a PHP/MySQL console to the debug bar. Requires the debug bar plugin.

MySQL Profiler

Displays a list of each page’s SQL queries and the functions calling them that can be searched and sorted by time, type, etc.

Deprecation Checker

Deprecation Checker simply scans your plugins, themes, and custom directories for deprecated functions.

Kint Debugger

Kint Debugger makes debugging and dumping variables a more pleasant experience. Kint Debugger integrates seamlessly with the Debug Bar plugin.

Debug Bar Template Trace

Adds a template trace panel to the Debug Bar. Requires the Debug Bar plugin.

WP XHProf Profiler

Adds PHP profiling support to your WordPress using Facebook’s XHProf Profiler.

WPDebugger

WpDebugger lists multiple variables responsible for the execution of each page along with database queries.

WordPress Debug

Displays and emails system information for debugging purposes for easy debugging of your own or a client/user site.

Quick Cache ( Speed Without Compromise )

Speed up your site ~ BIG Time! – If you care about the speed of your site, Quick Cache is a plugin that you absolutely MUST have installed.

WIS-Logger – UDP, File & Growl logger

WIS-Logger is a simple and powerful log system

Debug-Bar-Extender

Extends the debug-bar plugin with additional tabs to measure runtimes between checkpoints and lookup variable content.

Debug Queries

List query-actions only for admins; for debug purposes

WP Debugger

A plugin that helps you locate and fix issuess with your WordPress installation.

WP Debug Logger

A plugin that makes it easy to log code activity to a file.

Allow Multiple Accounts

Reveal Template

Debugging Translation

Messages are displayed in both the source language and the target language.

SM Debug Bar

EASY TO USE! Dropdown console for wordperss enthusiasts to print and watch the value of PHP variables.

Monkeyman Rewrite Analyzer

Making sense of the rewrite mess. Display and play with your rewrite rules.

wp pear debug

This plugin incorporates the pear php_debug library into wordpress.

Loggy

Loggy is simple express server for remote logging with REST API and WordPress plugin.

WP Query Counter

Displays exactly how many MySQL queries are executed and how long it took to execute them.

Cron Debug Log

A rudimentary plugin for debugging cron.

Option Editor

Allows users to edit the internal WordPress options without digging about the database.

Yet Another Logger Plugin

Provides logging and debugging data via e-mail and FirePHP.

SQL Monitor

The plugin analyzes every query to the database. Warning: For PHP 5 only.

Plugins for testing WordPress

AntiVirus for WordPress

Viruses, worms and malware exist for WordPress and could easily attack your WordPress installation. AntiVirus for WordPress monitors malicious injections and warns you of any possible attacks. With multilingual support.

Better WP Security

Takes the best WordPress security features and techniques and combines them in a single plugin thereby ensuring that as many security holes as possible are patched without having to worry about conflicting features or the possibility of missing anything on your site. With one-click activation for most features as well as advanced features for experienced users Better WP Security can help protect any site.

SES Theme Split Test

This plugin lets you set up two different templates with differences that you think might increase conversions, serve these different templates up to users, and track their activity using custom segments in Google Analytics. Alternatively you can use it to “choose” a particular theme by setting a URL parameter so you can experiment using different themes yourself

PHP Validator Lite

PHP Validator is a developer tool. It scans the file you specify and determines whether you have undefined functions or methods.

ThemeCheck

The theme check plugin is an easy way to test your theme and make sure it’s up to spec with the latest theme review standards. With it, you can run all the same automated testing tools on your theme that WordPress.org uses for theme submissions.

Plugin-Check

Plugin-Check runs most of the checks that Theme-Check uses against all your plugins

Monster Widget

Provides a quick and easy method of adding all core widgets to a sidebar for testing purposes.

Debogger

Debugging tool for theme authors and reviewers. This tool intercepts all debug information and prints it all out neatly into the footer. It also checks each page for W3C validation. This plugin is released as a tool to aid the development of themes and plugins for WordPress and can be used to aid debugging your theme before submission to the themes directory.

Debug Bar

Adds a debug menu to the admin bar that shows query, cache, and other helpful debugging information.  Many extensions to increase features.

Regenerate Thumbnails

Regenerate Thumbnails allows you to regenerate the thumbnails for your image attachments. This is very handy if you’ve changed any of your thumbnail dimensions (via Settings -> Media) after previously uploading images or have changed to a theme with different featured post image dimensions. You can either regenerate the thumbnails for all image uploads, individual image uploads, or specific multiple image uploads.

Log Deprecated Notices

This plugin logs the usage of deprecated files, functions, and function arguments. It identifies where the deprecated functionality is being used and offers the alternative if available.

SimpleTest

SimpleTest for WordPress is a tool for WordPress plugin developers who want to create and run automated tests for their plugins. It includes SimpleTest 1.0.1 and uses a shortcode to let you run unit tests on WordPress plugins, and see the results in a WordPress page. Since it runs within WordPress, you can also do integration testing of plugins (that is, custom WordPress functions used in the plugins will work correctly when the tests are run).
Requires the plugin below to be installed first

Toppa Plugins Libraries for WordPress

Facilitates the use of Agile coding techniques in developing WordPress plugins.

WordPress – deactivate plugins from db

Wordpress plugin issues

Sometimes it may be necessary to deactivate plugins, but you can’t access the administrative menus to do so. usually down to a flaky plugin that not only fails to work, but leaves garbage that causes wordpress to throw a hissy fit.

In the table wp_options, under the option_name column (field) find the active_plugins row
TO deactivate ALL plugins, change the option_value field to: a:0:{}.  Hopefully this should intially bring your site back to life, and you can gradually activate each plugin until you find the offending one (that causes your site to fall over),

Here is an example from the option record:-

a:11:{i:0;s:31:”autocompleter/autocompleter.php”;i:1;s:48:”classipress-ajax-post-sort/wp-ajax-post-sort.php”;i:2;s:21:”cpmobile/cpmobile.php”;i:3;s:21:”exec-php/exec-php.php”;i:4;s:43:”image-sizes-manager/image-sizes-manager.php”;i:6;s:30:”premium-gallery/sp-gallery.php”;i:7;s:40:”related-ads/related-posts-thumbnails.php”;i:8;s:35:”si-contact-form/si-contact-form.php”;i:9;s:25:”user-photo/user-photo.php”;i:10;s:41:”wordpress-importer/wordpress-importer.php”;}

To remove reference to a plugin, that you already know is the likely problem, simply remove the whole entry (terminated by a “;”).  The blue highlighted text illustrates a complete plugin entry.