WordPress user ID in SQL

WP Data Access version 5.2.3 adds a session variable containing the WordPress user ID to its database connections. This allows plugin users to access the WordPress user ID in SQL queries, database views, triggers, functions and procedures. Open the Query Builder and enter: This returns your WordPress user. Availability Session variable @wpda_wp_user_id is available in […]

Generate API documentation

Generate API Documentation Start the command line interface Navigate to the plugin root folder Enter the following commands: composer require −−dev phpdocumentor/phpdocumentor dev-master php vendor/phpdocumentor/phpdocumentor/bin/phpdoc.php Navigate to subfolder docs Open file index.html in your favourite browser Remove API Documentation Start the command line interface Navigate to the plugin root folder Enter the following command: composer […]

Filter wpda_wpdataaccess_prepare

Filter wpda_wpdataaccess_prepare allows developers to add their own jQuery DataTable options to a publication. This code is used to initialize a publication. More information about jQuery DataTables options… $html HTML code (may include JavaScript code) $schema_name Database schema name (database name) $table_name Database table name $pub_id Publication ID $columns Table columns $table_settings Table settings as […]

Action hooks to add search actions and filters

Two action hooks were added to enhance searching: wpda_add_search_actions and wpda_add_search_filter. Use these actions to customize the search box of your list table. These action hooks apply to WordPress list tables only. They do not affect publications. Action hook wpda_add_search_actions Added to allow developers to add actions to the search bar (e.g. an icon). Action […]

Action hook wpda_after_list_table

Use action hook wpda_after_list_table to add HTML and JavaScript after a list table.  Argument $self contains a reference to your list table instance, which allows you to interact with your list table through public members and methods. Usage Note You can use this action hook in combination with filter wpda_column_default to add interactive elements to […]