Filter
-
You showed me how to write a filter to wrap code around the table cells
What I want to do is take a value from row1 and update row 3 with it
This is the code I came up with but it does not work – do you know why?//***Custom TablePress Table 60**/ add_filter( 'tablepress_cell_content', 'Table60', 10, 4 ); function Table60( $tablepress_cell_content, $table_id, $row_number, $column_number ) { if ($table_id==60) { if ($row_number!=1) { if ($column_number==1) { global $fernname; $temp1=strip_tags($tablepress_cell_content); $fernname=str_replace(" ","_",$temp1); } if ($column_number==3) { $tablepress_cell_content=$fernname; } } } return $tablepress_cell_content; }
[Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been damaged by the forum’s parser.]
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Filter’ is closed to new replies.