{"_id":"56d88886b159f10b00304620","__v":2,"category":{"_id":"56d88885b159f10b00304613","pages":["56d88886b159f10b0030461c","56d88886b159f10b0030461d","56d88886b159f10b0030461e","56d88886b159f10b0030461f","56d88886b159f10b00304620","56d88886b159f10b00304621","56d88886b159f10b00304622","56d88886b159f10b00304623","56d88886b159f10b00304624","56d88886b159f10b00304625","56d88886b159f10b00304626","56d88886b159f10b00304627","56d88886b159f10b00304628","56d88886b159f10b00304629","56d88886b159f10b0030462a","56d88886b159f10b0030462b","56d88886b159f10b0030462c","56d88886b159f10b0030462d","56d88886b159f10b0030462e","56d88886b159f10b0030462f","56d88886b159f10b00304630","56d88886b159f10b00304631"],"project":"549a321bf876ae0b00f33623","__v":1,"version":"56d88884b159f10b00304609","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-05-20T00:49:50.639Z","from_sync":false,"order":10,"slug":"developer-api","title":"Filters Reference"},"project":"549a321bf876ae0b00f33623","version":{"_id":"56d88884b159f10b00304609","__v":3,"project":"549a321bf876ae0b00f33623","createdAt":"2016-03-03T18:55:00.567Z","releaseDate":"2016-03-03T18:55:00.567Z","categories":["56d88885b159f10b0030460a","56d88885b159f10b0030460b","56d88885b159f10b0030460c","56d88885b159f10b0030460d","56d88885b159f10b0030460e","56d88885b159f10b0030460f","56d88885b159f10b00304610","56d88885b159f10b00304611","56d88885b159f10b00304612","56d88885b159f10b00304613","56d88885b159f10b00304614","56d89250b159f10b003046d4","56da13977222d50b0070167c"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.2.1","version":"2.2.1"},"parentDoc":null,"user":"549a320d5b50c21400fae689","updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-05-20T03:30:56.804Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":4,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"lifterlms_certificate_background_image_placeholder_height\"\n}\n[/block]\nChange the height for the default background image placeholder image.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php // don't paste this line into your functions.php file\\n\\n/**\\n * Change the height of the default certificate placeholder image height\\n * \\n * :::at:::param  int    $height   Default Height (in pixels) of the background image placeholder image\\n * @param  int    $post_id  WP Post ID of the Certificate\\n * @return int\\n */\\nfunction my_llms_certificate_bg_img_placeholder_height( $height, $post_id ) {\\n\\t\\n\\t$height = 1100; // return an integer, we add pixels for you automatically!\\n\\n\\treturn $height;\\n\\n}\\nadd_filter( 'lifterlms_certificate_background_image_placeholder_height', 'my_llms_certificate_bg_img_placeholder_height', 10, 2 );\",\n      \"language\": \"php\",\n      \"name\": \"lifterlms_certificate_background_image_placeholder_height.php\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"lifterlms_certificate_background_image_placeholder_src\"\n}\n[/block]\nModify the default certificate background image placeholder. This is the certificate background image that displays by default when no background image is uploaded to a certificate.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php // don't paste this line into your functions.php file\\n\\n/**\\n * Change the default placeholder for LifterLMS Certificates\\n * @param  string $src      Default URI to the background image placeholder\\n * @param  int    $post_id  WP Post ID of the Certificate\\n * @return string\\n */\\nfunction my_llms_certificate_bg_img_placeholder( $src, $post_id ) {\\n\\t\\n\\t$src = get_site_url() . '/path/to/my/image.jpg';\\t\\n\\n\\treturn $src;\\n\\n}\\nadd_filter( 'lifterlms_certificate_background_image_placeholder_src', 'my_llms_certificate_bg_img_placeholder', 10, 2 );\",\n      \"language\": \"php\",\n      \"name\": \"lifterlms_certificate_background_image_placeholder_src.php\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"lifterlms_certificate_background_image_placeholder_width\"\n}\n[/block]\nChange the width of the default background image for a certificate.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php // don't paste this line into your functions.php file\\n\\n/**\\n * Change the width of the default certificate placeholder image width\\n * \\n * @param  int    $width   Default width (in pixels) of the background image placeholder image\\n * @param  int    $post_id  WP Post ID of the Certificate\\n * @return int\\n */\\nfunction my_llms_certificate_bg_img_placeholder_width( $width, $post_id ) {\\n\\t\\n\\t$width = 1100; // return an integer, we add pixels for you automatically!\\n\\n\\treturn $width;\\n\\n}\\nadd_filter( 'lifterlms_certificate_background_image_placeholder_width', 'my_llms_certificate_bg_img_placeholder_width', 10, 2 );\",\n      \"language\": \"php\",\n      \"name\": \"lifterlms_certificate_background_image_placeholder_width.php\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"lifterlms_certificate_background_image_height\"\n}\n[/block]\nChange the height of the background image uploaded to a certificate.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php // don't paste this line into your functions.php file\\n\\n/**\\n * Change the height of the default certificate placeholder image height\\n * \\n * @param  int    $height   Default height (in pixels) of the background image placeholder height\\n * @param  int    $post_id  WP Post ID of the Certificate\\n * @return int\\n */\\nfunction my_llms_certificate_bg_img_height( $height, $post_id ) {\\n\\t\\n\\t$height = 1100; // return an integer, we add pixels for you automatically!\\n\\n\\treturn $height;\\n\\n}\\nadd_filter( 'lifterlms_certificate_background_image_height', 'my_llms_certificate_bg_img_height', 10, 2 );\",\n      \"language\": \"php\",\n      \"name\": \"lifterlms_certificate_background_image_height.php\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"lifterlms_certificate_background_image_src\"\n}\n[/block]\nUse this filter to programmatically replace the source of a certificate background image.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php // don't paste this line into your functions.php file\\n\\n/**\\n * Programmatically replace the source of a certificate background image\\n * \\n * @param  string $src      Default URI to the background image as uploaded via the admin panel\\n * @param  int    $post_id  WP Post ID of the Certificate\\n * @return string\\n */\\nfunction my_llms_certificate_bg_img( $src, $post_id ) {\\n\\t\\n\\t$src = get_site_url() . '/path/to/my/image.jpg';\\t\\n\\n\\treturn $src;\\n\\n}\\nadd_filter( 'lifterlms_certificate_background_image_src', 'my_llms_certificate_bg_img', 10, 2 );\",\n      \"language\": \"php\",\n      \"name\": \"lifterlms_certificate_background_image_src.php\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"lifterlms_certificate_background_image_width\"\n}\n[/block]\nChange the width of the background image uploaded to a certificate.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php // don't paste this line into your functions.php file\\n\\n/**\\n * Change the width of the default certificate placeholder image width\\n * \\n * @param  int    $width   Default width (in pixels) of the background image placeholder width\\n * @param  int    $post_id  WP Post ID of the Certificate\\n * @return int\\n */\\nfunction my_llms_certificate_bg_img_width( $width, $post_id ) {\\n\\t\\n\\t$width = 1100; // return an integer, we add pixels for you automatically!\\n\\n\\treturn $width;\\n\\n}\\nadd_filter( 'lifterlms_certificate_background_image_width', 'my_llms_certificate_bg_img_width', 10, 2 );\",\n      \"language\": \"php\",\n      \"name\": \"lifterlms_certificate_background_image_width.php\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"lifterlms_certificate_content\"\n}\n[/block]\nModify the content of a certificate before outputting it on screen.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php // don't paste this line into your functions.php file\\n\\n/**\\n * Modify the content of a LifterLMS Certificate\\n * @param  string $content  Certificate Content (already merged)\\n * @param  int    $post_id  WP Post ID of the Certificate\\n * @return string\\n */\\nfunction my_llms_certificate_content( $content, $post_id ) {\\n\\t\\n\\t// add the date the certificate was received\\t\\n\\t$content .= '<p>Awarded on ' . get_the_date( 'F j, Y', $post_id ) . '</p>';\\n\\n\\treturn $content;\\n\\n}\\nadd_filter( 'lifterlms_certificate_content', 'my_llms_certificate_content', 10, 2 );\",\n      \"language\": \"php\",\n      \"name\": \"lifterlms_certificate_content.php\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"lifterlms_certificate_title\"\n}\n[/block]\nAllows programmatic modification of a certificate title prior to rendering the certificate on screen to student or administrator.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php // don't paste this line into your functions.php file\\n\\n/**\\n * Modify the title of a LifterLMS Certificate\\n * @param  string $title  Certificate title (already merged)\\n * @param  int    $post_id  WP Post ID of the Certificate\\n * @return string\\n */\\nfunction my_llms_certificate_title( $title, $post_id ) {\\n\\t\\n\\t// add an exclamation point to the title because we're really excited about it\\n\\t$title .= '!';\\n\\n\\treturn $title;\\n\\n}\\nadd_filter( 'lifterlms_certificate_title', 'my_llms_certificate_title', 10, 2 );\",\n      \"language\": \"php\",\n      \"name\": \"lifterlms_certificate_title.php\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"filters-certificates","type":"basic","title":"Filters: Certificates"}

Filters: Certificates


[block:api-header] { "type": "basic", "title": "lifterlms_certificate_background_image_placeholder_height" } [/block] Change the height for the default background image placeholder image. [block:code] { "codes": [ { "code": "<?php // don't paste this line into your functions.php file\n\n/**\n * Change the height of the default certificate placeholder image height\n * \n * @param int $height Default Height (in pixels) of the background image placeholder image\n * @param int $post_id WP Post ID of the Certificate\n * @return int\n */\nfunction my_llms_certificate_bg_img_placeholder_height( $height, $post_id ) {\n\t\n\t$height = 1100; // return an integer, we add pixels for you automatically!\n\n\treturn $height;\n\n}\nadd_filter( 'lifterlms_certificate_background_image_placeholder_height', 'my_llms_certificate_bg_img_placeholder_height', 10, 2 );", "language": "php", "name": "lifterlms_certificate_background_image_placeholder_height.php" } ] } [/block] [block:api-header] { "type": "basic", "title": "lifterlms_certificate_background_image_placeholder_src" } [/block] Modify the default certificate background image placeholder. This is the certificate background image that displays by default when no background image is uploaded to a certificate. [block:code] { "codes": [ { "code": "<?php // don't paste this line into your functions.php file\n\n/**\n * Change the default placeholder for LifterLMS Certificates\n * @param string $src Default URI to the background image placeholder\n * @param int $post_id WP Post ID of the Certificate\n * @return string\n */\nfunction my_llms_certificate_bg_img_placeholder( $src, $post_id ) {\n\t\n\t$src = get_site_url() . '/path/to/my/image.jpg';\t\n\n\treturn $src;\n\n}\nadd_filter( 'lifterlms_certificate_background_image_placeholder_src', 'my_llms_certificate_bg_img_placeholder', 10, 2 );", "language": "php", "name": "lifterlms_certificate_background_image_placeholder_src.php" } ] } [/block] [block:api-header] { "type": "basic", "title": "lifterlms_certificate_background_image_placeholder_width" } [/block] Change the width of the default background image for a certificate. [block:code] { "codes": [ { "code": "<?php // don't paste this line into your functions.php file\n\n/**\n * Change the width of the default certificate placeholder image width\n * \n * @param int $width Default width (in pixels) of the background image placeholder image\n * @param int $post_id WP Post ID of the Certificate\n * @return int\n */\nfunction my_llms_certificate_bg_img_placeholder_width( $width, $post_id ) {\n\t\n\t$width = 1100; // return an integer, we add pixels for you automatically!\n\n\treturn $width;\n\n}\nadd_filter( 'lifterlms_certificate_background_image_placeholder_width', 'my_llms_certificate_bg_img_placeholder_width', 10, 2 );", "language": "php", "name": "lifterlms_certificate_background_image_placeholder_width.php" } ] } [/block] [block:api-header] { "type": "basic", "title": "lifterlms_certificate_background_image_height" } [/block] Change the height of the background image uploaded to a certificate. [block:code] { "codes": [ { "code": "<?php // don't paste this line into your functions.php file\n\n/**\n * Change the height of the default certificate placeholder image height\n * \n * @param int $height Default height (in pixels) of the background image placeholder height\n * @param int $post_id WP Post ID of the Certificate\n * @return int\n */\nfunction my_llms_certificate_bg_img_height( $height, $post_id ) {\n\t\n\t$height = 1100; // return an integer, we add pixels for you automatically!\n\n\treturn $height;\n\n}\nadd_filter( 'lifterlms_certificate_background_image_height', 'my_llms_certificate_bg_img_height', 10, 2 );", "language": "php", "name": "lifterlms_certificate_background_image_height.php" } ] } [/block] [block:api-header] { "type": "basic", "title": "lifterlms_certificate_background_image_src" } [/block] Use this filter to programmatically replace the source of a certificate background image. [block:code] { "codes": [ { "code": "<?php // don't paste this line into your functions.php file\n\n/**\n * Programmatically replace the source of a certificate background image\n * \n * @param string $src Default URI to the background image as uploaded via the admin panel\n * @param int $post_id WP Post ID of the Certificate\n * @return string\n */\nfunction my_llms_certificate_bg_img( $src, $post_id ) {\n\t\n\t$src = get_site_url() . '/path/to/my/image.jpg';\t\n\n\treturn $src;\n\n}\nadd_filter( 'lifterlms_certificate_background_image_src', 'my_llms_certificate_bg_img', 10, 2 );", "language": "php", "name": "lifterlms_certificate_background_image_src.php" } ] } [/block] [block:api-header] { "type": "basic", "title": "lifterlms_certificate_background_image_width" } [/block] Change the width of the background image uploaded to a certificate. [block:code] { "codes": [ { "code": "<?php // don't paste this line into your functions.php file\n\n/**\n * Change the width of the default certificate placeholder image width\n * \n * @param int $width Default width (in pixels) of the background image placeholder width\n * @param int $post_id WP Post ID of the Certificate\n * @return int\n */\nfunction my_llms_certificate_bg_img_width( $width, $post_id ) {\n\t\n\t$width = 1100; // return an integer, we add pixels for you automatically!\n\n\treturn $width;\n\n}\nadd_filter( 'lifterlms_certificate_background_image_width', 'my_llms_certificate_bg_img_width', 10, 2 );", "language": "php", "name": "lifterlms_certificate_background_image_width.php" } ] } [/block] [block:api-header] { "type": "basic", "title": "lifterlms_certificate_content" } [/block] Modify the content of a certificate before outputting it on screen. [block:code] { "codes": [ { "code": "<?php // don't paste this line into your functions.php file\n\n/**\n * Modify the content of a LifterLMS Certificate\n * @param string $content Certificate Content (already merged)\n * @param int $post_id WP Post ID of the Certificate\n * @return string\n */\nfunction my_llms_certificate_content( $content, $post_id ) {\n\t\n\t// add the date the certificate was received\t\n\t$content .= '<p>Awarded on ' . get_the_date( 'F j, Y', $post_id ) . '</p>';\n\n\treturn $content;\n\n}\nadd_filter( 'lifterlms_certificate_content', 'my_llms_certificate_content', 10, 2 );", "language": "php", "name": "lifterlms_certificate_content.php" } ] } [/block] [block:api-header] { "type": "basic", "title": "lifterlms_certificate_title" } [/block] Allows programmatic modification of a certificate title prior to rendering the certificate on screen to student or administrator. [block:code] { "codes": [ { "code": "<?php // don't paste this line into your functions.php file\n\n/**\n * Modify the title of a LifterLMS Certificate\n * @param string $title Certificate title (already merged)\n * @param int $post_id WP Post ID of the Certificate\n * @return string\n */\nfunction my_llms_certificate_title( $title, $post_id ) {\n\t\n\t// add an exclamation point to the title because we're really excited about it\n\t$title .= '!';\n\n\treturn $title;\n\n}\nadd_filter( 'lifterlms_certificate_title', 'my_llms_certificate_title', 10, 2 );", "language": "php", "name": "lifterlms_certificate_title.php" } ] } [/block]